L20n/Toolbox: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 111: Line 111:
=== Entity properties ===
=== Entity properties ===


In L20n context, an entity is an object that may contain a value and a list of key-value pairs of properties:
In L20n context, an entity is an object that may contain a value and a list of key-value pairs of properties.
 
This allows developers to bundle all localization messages related to a single UI unit and it allows developers and localizers to provide additional information on the entity.


<pre style="color:blue">
<pre style="color:blue">
Line 132: Line 134:
<pre style="color:blue">
<pre style="color:blue">
<button l10n_id="buttonClick"/>
<button l10n_id="buttonClick"/>
</pre>
An entity may reference properties of other entities:
<pre style="color:blue">
<buttonClick "Click me"
tooltip: "If you click me, I'll give you a kiss"
accesskey: "c"
label: "Press this button:">
<buttonHelp: "In order to press the button use ctrl+{{buttonClick.accesskey}}">
</pre>
=== Per-locale customizations ===
L20n allows localizers to customize their entities and add new ones in the scope of their own locale.
en-US:
<pre style="color:blue">
<brandName "GMail">
<loadedInfo "{{brandName}} has loaded your message">
</pre>
pl:
<pre style="color:blue">
<brandName "GMail">
<loadedInfo "{{brandName}} has loaded your message">
</pre>
</pre>
Confirmed users
1,016

edits

Navigation menu