Labs/Ubiquity/Ubiquity 0.5 Command Localization Tutorial: Difference between revisions

Jump to navigation Jump to search
Line 98: Line 98:
Note however that there are instances in some languages where you would actually want to localize the two contexts' strings separately: for example, suppose the source language does not mark tense or aspect, but your target language does. A status message in that language may be the same in cases where the action is about to be done (in the <code>preview</code>) and when it was completed (in the <code>execute</code>) and you would thus want to translate these strings differently in the different (future/past) contexts.
Note however that there are instances in some languages where you would actually want to localize the two contexts' strings separately: for example, suppose the source language does not mark tense or aspect, but your target language does. A status message in that language may be the same in cases where the action is about to be done (in the <code>preview</code>) and when it was completed (in the <code>execute</code>) and you would thus want to translate these strings differently in the different (future/past) contexts.


== Formatting templates ==
=== Localizing formatting templates ===


Localizable strings will often contain variable references and other code in {curly braces}, following the [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavaScript Templates] format. For example, you may see a string like this:
Localizable strings will often contain variable references and other code in {curly braces}, following the [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavaScript Templates] format. For example, you may see a string like this:
308

edits

Navigation menu