Fabien Cazenave schrieb:
> Do you mean that this part of the l20n work is not stable yet?
> Are these l10n-id and {{arguments}} syntaxes still likely to change?
> If yes, there’s been a major misunderstanding here.
No, I had some fear that we are establishing a different resource format
along with this and that switching to a proper resource format later
might need us to change this again as until then it will have been
firmly connected with a specific resource standard. I might be
over-cautious there, though.
>>> • the *.properties format, already in use by most Mozilla projects.
>>
>> Only that it's not. the [] with different languages is neither in the
>> original Java .properties format, nor in the Mozilla-style UTF-8-forced
>> .properties format.
>
> It is Mozilla-style *.properties files, at least for our l10n
> contributors:
https://github.com/fabi1cazenave/gaia-l10n
The [tag] parts are non-standard and so it falls through in every
parsing attempt by an existing parser for .properties. It's a new,
non-standard extension to the format.
> We need a way to have multi-locale files, using [language] separators
> makes sense (imho), that’s how *.ini files are built.
This is not the .ini format, though. You could make it that, but then it
wouldn't be .properties. ;-)
> The point of this thread is precisely to discuss the l10n API, not the
> l10n resource format.
OK, that's good, then.
> FTR, I have spent enough time writing a “LOL” parser to ensure that
> every “LOL” feature could be expressed in a YAML form, a JSON form… or
> even a *.properties form (i.e. in a form that would be
> backward-compatible with *.properties).
Sure, it would never follow any of those standards fully, it would
always resemble it mostly but break it in some obvious and some subtle
ways. Exactly because of that the choice was to use something that is a
*different* format, so to not have parsers for it be extension to
existing parsers than then break in subtle ways or fall over completely.
But this is a discussion for wherever the resource format discussion is
going on, let's take it out of here until we have something we all can
be happy with.
>> The HTML-facing and JS-facing APIs are important and probably ready for
>> going through the WebAPI group, though, and we should discuss only those
>> here right now, not caring how .get() gets its data or how stuff is
>> stored in the resource file.
>
> I can’t agree more with that, that’s precisely the goal of this thread.
> As I wrote in a previous message, I’d also like to discuss the <link/>
> part
Er, sure, that's part of the HTML-facing part, right, and so within what
I said? I meant let's keep the actual format (including the file
extension and precise MIME type) of the resource files out of the webapi
discussion for now (as so far we only have a temporary solution and are
still working on consensus on a long-term one).
Robert Kaiser