[wp-trac] [WordPress Trac] #6132: Error message in wp-blog-header.php can't be RTLed even if locale is set

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 21 15:20:00 UTC 2010


#6132: Error message in wp-blog-header.php can't be RTLed even if locale is set
------------------------------------+---------------------------------------
 Reporter:  RanYanivHartstein       |        Owner:  nbachiyski
     Type:  defect (bug)            |       Status:  reopened  
 Priority:  normal                  |    Milestone:  2.8       
Component:  i18n                    |      Version:  3.0       
 Severity:  normal                  |   Resolution:            
 Keywords:  has-patch dev-feedback  |  
------------------------------------+---------------------------------------
Changes (by RanYanivHartstein):

  * status:  closed => reopened
  * version:  => 3.0
  * resolution:  fixed =>


Comment:

 This problem still exists as of version 3.0.

 To reproduce this bug, you can download the latest version of WordPress
 Hebrew, from here: http://he.wordpress.org/wordpress-3.0-he_IL.zip

 Simply unzip and try to run it in your server. The standard "no wp-
 config.php file" error message will be displayed, translated to Hebrew,
 but not be RTLed. This applies to some other wp_die() error messages, but
 this is the easiest to reproduce.

 Since the "no wp-config.php file" error is actually the first stage of the
 automatic WordPress installer, this reflects poorly on WordPress when used
 in RTL locales.

 This happens because wp_die relies on the language_attributes() function
 to set the RTL attribute on the HTML tag. Because wp_die() can be called
 before  language_attributes() is loaded (indeed, it can be called the
 locale is even set), some error messages don't actually get RTLed.

 I'm including a patch with a possible fix. It replaces
 language_attributes() and adds an RTL attribute to the HTML tag when
 appropriate. It utilizes the same method to determine directionality as
 proposed by nbachiyski.

 This patch was tested on WordPress Hebrew 3.0, which is an RTL language.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/6132#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list