L20n/Features/Public vs Private

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


separate entities and attributes that are locally defined by the localizer from the ones that should be available to the developer


<_brandName {
  nominative: "Firefox",
  genitive: "Firefoksa"
  _gender: { mac: 'male', win: 'female' }
  accesskey: { mac: 'F', win: 'C'}

<about "About {{ _brandName.nominative }}">
<update[_brandName.._gender.win] {
  male: "{{ _brandName }} has been updated.  The update took {{ $updateTime }} seconds."
  female: "{{ _brandName..accesskey.mac }}"

We decided to aim for using "_" in front of an entity name or attribute name to indicate that it's a local entity/attribute.

Those will be referenced the same way, but will not be available to the developer. (e.g. the developer cannot ask for _brandName.._gender here).

For l10n-dom, the local attributes (_gender) will not be copied as DOM attributes to the target node.

This will enable us to compare locales skipping local entries.

For computed calls, the syntax will look like this:

<foo "value"
 _gender: "c">

<title "Hello {{ foo.["_gender"] }}">


  • open
  • stas - ok
  • gandalf - ok
  • pike - ok