Closed Bug 380575 Opened 17 years ago Closed 11 years ago

Clarify the usefulness of trailing letters in the l20n spec, or whack 'em

Categories

(L20n :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Unassigned)

Details

[migrating from email conversation]

In the l20n grammar ( http://people.mozilla.com/~axel/l20n/grammar.html ), the expander is defined as:

 	'${' expression '}' ('s' | 'i') ;

I'm curious what the 's' and 'i' represent.  I suspect 'string' and 'int' but I don't understand how that would be beneficial to us.  If they aren't useful, I'd suggest removing them.
I actually don't think we really need them - and we should try to keep the grammar as simple as possible while still fulfilling its requirements.

Do we have any requirements that make them necessary? Do we have use cases where they are strictly needed?

I haven't seen any yet, but Axel might know more :)
I have put them in because all other printf-like formats have them.

I'm not sure that 's' and 'i' are enough, though, they're really placeholders for some wider discussion on how much of printf we should support. http://docs.python.org/lib/typesseq-strings.html has more on what python does. We should think about precision and width specifiers, too.
In the series of "back from dead"

Axel: do we want to make a final decision on this now?
I'm not set about placeable formats, I could go for {{ var|filter }} like in django, too. Where the 's' and 'i' are basically filters.
Component: Other → General
Product: Mozilla Localizations → L20n
fixed long ago http://l20n.github.io/spec/grammar.html
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.