Project:String Overrides
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

This is a very simple patch to fix the issue of xx replacing the language string:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="xx" lang="xx">
<meta http-equiv="content-language" content="xx" />

becomes:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="content-language" content="en" />

Not sure this is the right way since hard-coding en is quite ignorant.

AttachmentSize
stringoverrides.module.patch497 bytes

Comments

#1

Status:needs review» fixed

http://drupal.org/cvs?commit=112245

#2

Status:fixed» needs work

After applying this patch to v1.4, stings are no longer overridden.
The patch does fix the lang=xx issue, but seems to break the modules...

#3

Priority:normal» critical

I can confirm that this has broen string replacement.

#4

Title:Fix for lang="xx" issue» Breaking patch: lang="en"
Version:5.x-1.4» 5.x-1.5
Assigned to:Anonymous» Rob Loach

I've moved it back to xx in HEAD. Would you mind testing 5.x-1.x-dev? I'd like to get a "fixed" release out as soon as possible.

I'm not experiencing this issue, strangely. With or without the patch.

#5

I tested the latest dev version and it indeed fixes the problem.

Strange that you can't recreate this though. Drupal is on box with apache2, php5, mysql, with a pretty typical setup (ie no core patches). I guess the next thing to try would be a core install with no contrib modules, to see if there is a conflict happening somewhere.

#6

Title:Breaking patch: lang="en"» Replace lang="xx" with lang="en"
Version:5.x-1.5» 5.x-1.x-dev
Priority:critical» normal
Assigned to:Rob Loach» Anonymous
Status:needs work» active

We'll have to think of another solution to change "xx" reported in lang to "en".

#7

I presume this isn't working because it is being overridden by the core locale 'en'. Would it work if a regional language code (e.g. en-US) was supplied instead of just 'en'?

#8

Using "en-US" worked for me. Just using en fixed the xx problem, but caused the module to stop functioning even on the latest dev version. But en-US worked great.

#9

I have the same results. Changing "en" to "en-US" in the patch made it work. I would prefer to have "en" though as my site is in the UK - but keeping String Overrides happy is the priority here.

#10

Confirming the bug.

Traceback for validating that "en-US" is a valid code that can be used for xml:lang and lang document attributes:

XHTML 1.0: The lang and xml:lang Attributes
http://www.w3.org/TR/xhtml1/#C_7
XHTML 1.0: "lang" attributes are based on HTML 4
http://www.w3.org/TR/xhtml1/#ref-html4
Language information and text direction: Specifying the language of content: the lang attribute
http://www.w3.org/TR/1999/REC-html401-19991224/struct/dirlang.html#h-8.1
Basic HTML data types: Language codes
http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-langcode

...and finally:
Basic HTML data types: Language codes
http://www.w3.org/TR/1999/REC-html401-19991224/struct/dirlang.html#langc...

#11

Status:active» needs review

Awesome, got two patches for you guys to try out............. enus.patch just uses en-US, languagecode.patch allows you to choose what language to put in there.

AttachmentSize
enus.patch 745 bytes
languagecode.patch 2.22 KB

#12

Both patches applied cleanly and worked as advertised.

The patch to stringoverrides.admin.inc in languagecode.patch is missing an '@' in the t() call in the description though. Re-rolled to fix that.

AttachmentSize
stringoverrides.admin_.inc_.248284.patch 1.5 KB

#13

And another all-in-one reroll.

AttachmentSize
248284-languagecode.patch 1.91 KB

#14

Status:needs review» fixed

Thanks!
http://drupal.org/cvs?commit=410766

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.