Closed
Bug 1083103
Opened 11 years ago
Closed 10 years ago
es-AR country codes in product-details are unicode escaped for javascript
Categories
(www.mozilla.org :: Product Details, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1018447
People
(Reporter: pascalc, Assigned: Sylvestre)
References
Details
Attachments
(1 file)
334.33 KB,
image/png
|
Details |
See screenshot, the country list is unicode escaped for js. Since the data in Product-details was imported from toolkit, that is probably because the country name were inserted at a time when our properties files couldn't be in UTF8.
We should unescape country names at json generation so as to generate country lists that are suitable in a non-JS context (there may be other locales affected, haven't checked).
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → sledru
Assignee | ||
Comment 1•11 years ago
|
||
With this patch (as suggested by Pascal on IRC):
Index: export_json.php
===================================================================
--- export_json.php (révision 133155)
+++ export_json.php (copie de travail)
@@ -21,7 +21,7 @@
*/
function writefile($filename, $data)
{
- file_put_contents(JSONDIR.$filename, json_encode($data, JSON_PRETTY_PRINT));
+ file_put_contents(JSONDIR.$filename, json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
}
/** Locale Details */
This fixes some of the problems but not all of them.
For example, es-AR json files:
$ svn diff json/regions/es-AR.json
Index: json/regions/es-AR.json
===================================================================
--- json/regions/es-AR.json (révision 133155)
+++ json/regions/es-AR.json (copie de travail)
@@ -193,7 +193,7 @@
"vc": "Saint Vincent and the Grenadines",
"ws": "Samoa",
"as": "Samoa Americana",
- "bl": "San Bartolom\u00e9",
+ "bl": "San Bartolomé",
"sm": "San Marino",
"pm": "San Pedro y Miquelon",
"sh": "Santa Helena",
On the overall aspect, I think this might have some side effects on projects using the json files.
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•