On Tue, Jun 30, 2009 at 3:24 PM, Nebojša Ćirić<[email protected]> wrote:
> 2009/6/30 Aaron Boodman <[email protected]>
>>
>> Thanks for sending this out, I'm excited to see i18n happen for
>> extensions. Here are some thoughts:
>>
>> * I think it makes sense to use a flat file for the message
>> definitions. They don't have any structure, they are just a list of
>> name/value pairs. Each line could just be of the form
>> <key><space><message>. I could also see us using JSON, as we use it in
>> many other places, but it is a bit overkill. JSON also has the problem
>> that quotes have to be escaped.
>
> Flat files are usually formatted as key<TAB>value1<TAB>...<CR>. I would hate
> to see people using SPACEs instead of TABs... Also, it's hard to extend
> format later on since it's pretty rigid.

Ok, on second thought, I guess JSON is more consistent. If we want to
allow ourselves extensibility in the future, we need to have an
nesting level in the format. So it can't just be, eg,

{
  "greeting": "hallo!",
  "exit": "goodbye"
}

It needs to be:

{
  "strings": {
    "greeting": "hallo!",
    "exit": "goodbye"
  }
}

Also, unrelated. Many i18n frameworks have the ability to specify a
comment about a string, so that translators know what it is intended
to be used for. This seems like something we should have.

- a

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to