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

Line 30: Line 30:


== Localization templates ==
== Localization templates ==
<code>po</code> localizations are often started based on a <code>po</code> template or <code>pot</code> file. These templates are simply <code>po</code files with all blank <code>msgstr</code>'s.
Ubiquity includes a handy localization template tool to create these initial templates for you. Just go to the Ubiquity command list, and click on the "get localization template" link next to a command feed. If no such link is showing up, it means that that feed was not bundled with Ubiquity and thus does not currently support localization.
You can also get many of the <code>pot</code> files pre-generated from the Ubiquity hg repository. If you already [[Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial|get your Ubiquity from the source]], you'll find the templates in <code>ubiquity/localization/templates</code>. Else, you can get them [https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/tip/ubiquity/localization/templates from our hg server].
When you start working on a localization, make sure to add your contact and credit information to the header. Each Ubiquity <code>po</code> file begins with a header that looks like this:
  # social.po
  #
  # Localizers:
  # Masahiko Imanaka <chimantaea_mirabilis@yahoo.co.jp>
This is from the Japanese <code>po</code> file for <code>social.js</code>, <code>social.po</code>. You'll see a line called "Localizers:". Add a new line (or replace the dummy line) below that and add your name, followed by your email address in <braces>.


== Examples ==
== Examples ==


== Formatting templates ==
== Formatting templates ==
308

edits