L20n/Features/String ID

From MozillaWiki
< L20n‎ | Features
Jump to: navigation, search


goal

enable defining ID as a string to emulate basic gettext-like key-value pair lists.

examples

This would enable gettext-like workflow where the developer stores strings directly in the source code wrapped in a function which turns the string into a key that is being matched in resource file with a localized value. If this is missing, the key itself (English string) is returned.

Proposed syntax:

<"Hello World" "Witaj Swiecie">

or, for multi lines:

<"""
Welcome to the new
<span>World</span>
"""

"""
Witaj w nowym
<span>swiecie</span>
""">

This is much simpler than L20n/Features/Value_ID as it only allows to use of simple strings as ids. In this respect, it's much closer to the L20n/Features/String_keys. If the developer wants to go further (expanders, plurals, hashes etc.), she needs to assign a proper id to the element.


status

  • stas - ?
  • gandalf - for
  • pike - ?