Closed
Bug 1132038
Opened 10 years ago
Closed 10 years ago
Allow values to be empty
Categories
(Firefox OS Graveyard :: Gaia::L10n, defect)
Firefox OS Graveyard
Gaia::L10n
Tracking
(b2g-v2.2 fixed, b2g-master fixed)
RESOLVED
FIXED
2.2 S6 (20feb)
People
(Reporter: stas, Assigned: zbraniecki)
Details
Attachments
(2 files)
1.77 KB,
patch
|
stas
:
review+
|
Details | Diff | Splinter Review |
46 bytes,
text/x-github-pull-request
|
bajaj
:
approval-gaia-v2.2+
|
Details | Review |
The grammar doesn't currently allow entity values to be empty:
http://l20n.github.io/spec/grammar.html
Should it? Should we also allow attributes to be empty? Should we possibly allow this in an explicit way by introducing a None keyword?
(Related to this is bug 816884.)
Assignee | ||
Comment 1•10 years ago
|
||
I'm in favor of empty values. I'm against "None" keyword.
Reporter | ||
Comment 2•10 years ago
|
||
I think the summary of this bug is misleading, I'm sorry about that. I meant to say "allow no values to be specified" as opposed to "allow values that are an empty string". Zibi, is this how you understood this bug?
Assignee | ||
Comment 3•10 years ago
|
||
Yes, but I believe that the l20n has two forms:
<id attr: ""> is:
- no value
- attr is ""
<id "" attr: ""> is:
- value is ""
- attr is ""
you can't define attr or value to be None and I'd like us to try to avoid having to add it.
That translates to .properties:
`id = ` being:
<id "">
and `id.attr =` being:
<id attr="">
Do you agree?
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•10 years ago
|
||
Sth like this looks like should do the trick
Attachment #8563076 -
Flags: review?(stas)
Comment 5•10 years ago
|
||
Reporter | ||
Comment 6•10 years ago
|
||
(In reply to Zibi Braniecki [:gandalf] from comment #3)
> <id attr: ""> is:
> - no value
> - attr is ""
Should this implicit None value also work for entities with no attributes?
<id>
?
> That translates to .properties:
>
> `id = ` being:
>
> <id "">
>
> and `id.attr =` being:
>
> <id attr="">
>
> Do you agree?
Yeah, I think this makes sense. This means that there is no way to define a None value for an entity in properties. When we convert roperties to l20n, all empty values will become "" values in l20n.
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8563076 [details] [diff] [review]
patch
Review of attachment 8563076 [details] [diff] [review]:
-----------------------------------------------------------------
r=me, thanks for adding the tests!
I think we should also update the grammar spec when we're clear on the L20n syntax.
Attachment #8563076 -
Flags: review?(stas) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Commit: https://github.com/mozilla-b2g/gaia/commit/c0e7938b28c6e4116c6b4a97e3e5d487d92dd6d6
Merge: https://github.com/mozilla-b2g/gaia/commit/9cfa310aef6d5fc798f1db0ee9dc4e7ef3e7b152
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Component: General → Gaia::L10n
Product: L20n → Firefox OS
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8563086 [details] [review]
[gaia] zbraniecki:1132038-l10n-allows-values-to-be-empty > mozilla-b2g:master
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): ---
[User impact] if declined: Devs will have to workaround this for 2.2
[Testing completed]: l20n tests, gaia-try
[Risk to taking this patch] (and alternatives if risky): minimal, it's a one char relaxing change for a regexp
[String changes made]: none
Attachment #8563086 -
Flags: approval-gaia-v2.2?
Updated•10 years ago
|
Attachment #8563086 -
Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
Assignee | ||
Comment 11•10 years ago
|
||
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•