Closed Bug 1132038 Opened 10 years ago Closed 10 years ago

Allow values to be empty

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect)

defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S6 (20feb)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: stas, Assigned: zbraniecki)

Details

Attachments

(2 files)

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.)
I'm in favor of empty values. I'm against "None" keyword.
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?
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: nobody → gandalf
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
Sth like this looks like should do the trick
Attachment #8563076 - Flags: review?(stas)
(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.
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+
Component: General → Gaia::L10n
Product: L20n → Firefox OS
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?
Attachment #8563086 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
Target Milestone: --- → 2.2 S6 (20feb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: