[drupal-devel] [bug] locale.inc uses deprecated elements and attributes

robrechtj drupal-devel at drupal.org
Thu Jul 28 18:59:57 UTC 2005


Issue status update for 
http://drupal.org/node/27668
Post a follow up: 
http://drupal.org/project/comments/add/27668

 Project:      Drupal
 Version:      cvs
 Component:    locale.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  wulff
 Updated by:   robrechtj
 Status:       patch

"del" is not the right tag here. It is not because the default style for
"del" is strike-through that it is "correct" to use it if you replacing
something with "style=strikethrough". "del" (and "ins") is for document
changes, and only for that. Here the strike-through doesn't mean that.


So a "span", or maybe "em" (you put emphasis on the fact that it is
untranslated?) is better.




robrechtj



Previous comments:
------------------------------------------------------------------------

Thu, 28 Jul 2005 10:13:15 +0000 : wulff

Attachment: http://drupal.org/files/issues/locale.inc.html.patch (3.08 KB)

locale.inc:


Uses the deprecated element <strike> - should be changed to <span
style=\"text-decoration: line-through;\">


Uses the deprecated attribute nowrap - should be changed to
style="white-space: nowrap;"


Also, method="POST" should be changed to method="post".


Applying these changes makes the 'manage strings' results page validate
as XHTML 1.0 strict.




------------------------------------------------------------------------

Thu, 28 Jul 2005 10:16:56 +0000 : Junyor

I'd prefer to see the styling done in drupal.css, rather than inline. +1
for the fix, -1 for the implementation.




------------------------------------------------------------------------

Thu, 28 Jul 2005 11:09:03 +0000 : wulff

Attachment: http://drupal.org/files/issues/locale.inc.patch (3.05 KB)

You are absolutely right. This patch fixes locale.inc.




------------------------------------------------------------------------

Thu, 28 Jul 2005 11:10:46 +0000 : wulff

Attachment: http://drupal.org/files/issues/drupal.css_0.patch (424 bytes)

...and this one adds the styles to drupal.css.




------------------------------------------------------------------------

Thu, 28 Jul 2005 11:17:03 +0000 : breyten

Better, but where did the CSS go? ;) Furthermore, I like semantic markup
better, ie. <em class="locale-untranslated"> instead of using spans.




------------------------------------------------------------------------

Thu, 28 Jul 2005 11:21:13 +0000 : robrechtj

+1 for the CSS/class solution.


maybe the class "locale-nowrap" could become a more general class
"nowrap" as this could be used in more locations, eg in drupal:


modules/statistics.module:        array('data' =>
format_date($log->timestamp, 'small'), 'nowrap' => 'nowrap'),
modules/statistics.module:        array('data' =>
format_date($log->timestamp, 'small'), 'nowrap' => 'nowrap'),
modules/statistics.module:      array('data' =>
format_date($log->timestamp, 'small'), 'nowrap' => 'nowrap'),


"locale-untranslated" is locale.module dependent, so that one is ok.




------------------------------------------------------------------------

Thu, 28 Jul 2005 12:13:10 +0000 : wulff

Attachment: http://drupal.org/files/issues/xhtml_fixes.zip (2.3 KB)

breyten: Agreed.


Updated patches with fixes for statistics.module attached.




------------------------------------------------------------------------

Thu, 28 Jul 2005 12:21:59 +0000 : robrechtj

You have put 'style' => 'nowrap' instead of 'class' => 'nowrap' on all
locations. Small thinko I suppose.
If that's fixed => +1 from me.




------------------------------------------------------------------------

Thu, 28 Jul 2005 12:31:30 +0000 : wulff

Attachment: http://drupal.org/files/issues/xhtml_fixes_0.zip (2.3 KB)

A thinko indeed. Fixed fixes attached.




------------------------------------------------------------------------

Thu, 28 Jul 2005 17:53:49 +0000 : drumm

I'm not sure if this is the right tag for this, but there is a del tag
which might be a better alternative to strike.
http://www.w3.org/TR/html401/struct/text.html#h-9.4


You can make patchfiles which include multiple files instead of making
a zip file which adds an extra step for reviewers.
cvs diff -uF^f misc/drupal.css includes/locale.inc.







More information about the drupal-devel mailing list