Closed Bug 960077 Opened 10 years ago Closed 8 years ago

L20N fails to localize some nodes on Android 4.3 for Galaxy S3

Categories

(L20n :: JS Library, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: linke_z, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.68 Safari/537.36 OPR/19.0.1326.26 (Edition Next)

Steps to reproduce:

Updated Samsung Galaxy S3 from 4.1.2 to 4.3 and suddenly the app stopped showing the vast majority of the texts that are supposed to be localized. I didn't change anything on the code, I am using beta 4 of the javascript library.


Actual results:

It's kind of hard to describe, but the vast majority of localized nodes are empty.


Expected results:

Localized nodes should feature the text in the system browser's default language.
The issue was related to your method getElementByPath, it does not work under the conditions I posted above. I managed to solve this by replacing that call with the following: 
var sourceChild = sourceNode.getElementsByTagName(path.replace(/[^a-z]/gi, "")); 
instead of 
var sourceChild = getElementByPath(path, sourceNode); 

I should note that unlike L20N 1.0 RC the data-required-msg attribute is respected on this version of the library, the messages I put on those attributes are shown when validation fails for an input instead of just showing a message that says that #inputid is required.
We have documented the browser compatibility for the current version of l20n in bug 1280681.

Resolving this bug as WORKSFORME, as both Android and L20n have changed drastically since.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.