Closed
Bug 1020231
Opened 10 years ago
Closed 10 years ago
AST produced by parser should be a list of nodes, not a dictionary
Categories
(Firefox OS Graveyard :: Gaia::L10n, defect, P3)
Firefox OS Graveyard
Gaia::L10n
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Assigned: zbraniecki)
References
Details
Currently, the AST produced by the parser is a dictionary of string ids. Consider:
foo=Foo
bar=Bar
bar.attr=Attr
This currently becomes:
{ foo: 'Foo', bar: { _: 'Bar', attr: 'Attr' }}
I propose we change it to:
[{id: 'foo', _: 'Foo'}, {id: 'bar', _: 'Bar', attr:'Attr'}]
This will allow the AST to correctly represent cases where a duplicate id is found, which can then be handled by Locale or Context instances.
In order to reduce the memory footprint, the Locale's AST which is serialized to JSON on buildtime should probably remain unchanged.
Assignee | ||
Updated•10 years ago
|
Priority: -- → P3
Reporter | ||
Comment 1•10 years ago
|
||
Let's land the first part of bug 1022859 before working on this.
Depends on: 1022859
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•10 years ago
|
||
Zibi fixed this in bug 1081040:
https://github.com/l20n/l20n.js/commit/8b45ed11c81185084e0ace3cb80c68b110bc7d2d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•