Closed
Bug 1131515
Opened 10 years ago
Closed 10 years ago
Running multilocale.js on node.js
Categories
(Firefox OS Graveyard :: Gaia::Build, defect, P1)
Firefox OS Graveyard
Gaia::Build
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rickychien, Assigned: gduan)
References
Details
Attachments
(2 files)
No description provided.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gduan
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8576423 [details] [review]
[gaia] cctuan:1131515 > mozilla-b2g:master
Hi Ricky,
I've checked diffs between node/xpc HEAD/HEAD^1 with PRODUCTION=1 and it looks good.
I did some workarounds due to old version of jsdom-nogyp:
1. document.head => document.querySelector('head')
2. jsdom.jsdom(content) => jsdom.jsdom(content, jsdom.level(3, 'core'))
3. define Setter for outerHTML
Attachment #8576423 -
Flags: review?(ricky060709)
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8576423 [details] [review]
[gaia] cctuan:1131515 > mozilla-b2g:master
I found some of these diff results are different compared between xpcshell/node version. Such as
< <input id="modal-dialog-prompt-input">
---
> <input id="modal-dialog-prompt-input" type="text">
or
< <!DOCTYPE html>
---
> <!DOCTYPE HTML>
...
However, it's fine since I guess there is a different DOM parsing mechanism using in jsdom.
Attachment #8576423 -
Flags: review?(ricky060709) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•10 years ago
|
||
backout my patch: https://github.com/mozilla-b2g/gaia/commit/217e40fd1091399cc0d07b13054b07574c311133
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
The interesting part is , when build goes with new patch under node, command like below
make LOCALES_FILE=build/test/resources/locales/languages.json LOCALE_BASEDIR=build/test/resources/locales
will generate all translated zh-CN.json but xpc doesn't. XPC only generate partial translated zh-CN.json.
I believe the result from node should be correct.
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8576544 [details] [review]
[gaia] cctuan:1131515 > mozilla-b2g:master
Hi Ricky,
pb fixed, and tbpl passed. please kindly check.
issues are as below,
1. filter for utils.ls will check full path of each file, so we should consider put scanning target's file path to do the filter.
2. some ES6 fixed for node env
Attachment #8576544 -
Flags: review?(ricky060709)
Reporter | ||
Comment 9•10 years ago
|
||
Comment on attachment 8576544 [details] [review]
[gaia] cctuan:1131515 > mozilla-b2g:master
Finally we found that root cause of Gb failure.
PR looks fine to me, r=me. Some of nits have been leaved on Github, please fix it before landing.
Attachment #8576544 -
Flags: review?(ricky060709) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Thanks,
push to master again:
https://github.com/mozilla-b2g/gaia/commit/78d80e8138d7efdbac42453776a4bfa0f48bee59
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 11•10 years ago
|
||
Hey George, it seems that your patch regressed multilocale - bug 1147332.
From my initial analysis, you can easily reproduce it doing:
APP=system make profile LOCALES_FILE=./locales/languages_my.json LOCALE_BASEDIR=../gaia-l10n/master/
The source of the problem is that this line:
var resFile = utils.getFile(utils.joinPath.apply(null, paths));
does not work.
In particular, "utils.joinPath.apply(null, paths)" does not concatenate the array of strings into a single path string.
For example, this array: [/Volumes/projects/gaia/apps/system,/fxa,locales/fxa.en-US.properties]
Results in: "/fxa/locales/fxa.en-US.properties" instead of "/Volumes/projects/gaia/apps/system/fxa/locales/fxa.en-US.properties".
Reverting this change to "var resFile = utils.getFile.apply(null, paths);" solves the problem.
Do you want to backout your patch or can you work on a follow up?
Blocks: 1147332
Flags: needinfo?(gduan)
Assignee | ||
Comment 12•10 years ago
|
||
Thanks Zibi, I've created a patch in bug 1147332,
could you please help to check if it could solve this issue? Thanks.
https://github.com/mozilla-b2g/gaia/pull/29159
Flags: needinfo?(gduan) → needinfo?(gandalf)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(gandalf)
Reporter | ||
Updated•9 years ago
|
Priority: -- → P1
Summary: Running multilocale.js and l10n.js on node.js → Running multilocale.js on node.js
You need to log in
before you can comment on or make changes to this bug.
Description
•