Localizing Firefox OS

Firefox OSは人類が利用可能な最高のテクノロジー、Webを基盤とするモバイルオペレーティングシステムです. OSコード向けであるGecko レンダリングエンジン(Boot2Gecko)と携帯電話向けにユーザが相互利用可能なインターフェイスおよびアプリケーション(Gaia)の2大機能で構成されどちらもFirefox OSの起動、利用に必要不可欠なものです。このガイドではFirefox OS のローカル化、特にGaia インターフェイスとアプリケーションにおいて、いかに簡単なものであるかをお見せしましょう。まず、お使いのコンピューターのセットアップ、Gaia Stringのローカライズ化、最後にl10nテストの実施方法という順でサポートを進めていきます。



GNU make

 ソースコードからビルドを生成するのに役立つ細かなツールです. デスクトップ L10nのテスト準備ができれば、大変重宝するでしょう。 ダウンロードとインス トール作業は容易でGNUのウエブサイトから直接行えます。MacOSZXユーザで あればXCodeおよびXCode コマンドラインツールをアップルストアからインス トールする必要があります。

gitは Gaiaソースコードを保存するために使用されるバージョンコントロールシステムです。gitのダウンロードおよびインストールは容易で ウエブサイトから直接行うことができます。
Python はプログラミング言語でありL10nテスト用のFirefox OSビルド生成に貢献します。
Mercurial (hg)
Mercurial (hg) はもうひとつのバージョンコントロールシステムです。 l10nの利用に際し、ロケールリポジトリをはじめとするGaiaの安定したバージョンを管理します。
compare-locales は Pythonのスクリプトのひとつで、ローカル化にあたっての作業評価や、diffと呼ばれる、すでにローカル化済のマテリアルからローカル化のための新しい内容を切り離すのに使用します。 ダウンロードおよびインストールは容易でcompare-locales ウィキページから直接行うことができます。なお、これはGaiaのローカライズにあたってコマンドラインもしくはテキストエディタを使用する場合のみ必要となります。Pootle, Transifex やPontoonなどのツールを使用する場合、インストール不要です。
  1. コマンドラインユーティリティにおいて, Gaiaのソースとlocalized stringsの保存先を指定します。 
  2. hgで 以下のコマンドを使ってen-US リポジトリのコピーを作ります。
    hg clone https://hg.mozilla.org/gaia-l10n/en-US
  3. 以下のコマンドを使ってロケールリポジトリのコピーを作ります。
    hg clone https://hg.mozilla.org/gaia-l10n/your-locale-code
  4. 最後に このコマンドを入力して en-US レポジトリに対するロケールリポジトリのdiffを生成します。
    compare-dirs en-US your-locale-code

Now you should have a diff of untranslated strings ready for you to translate! Please note that if you're starting a new localization of Firefox OS, you do not need to create a diff as all strings are new strings to be translated.

Translating Gaia strings

The workflow for translating Gaia strings largely depends upon the tools you're using to translate. This part of the process is similar to the regular translation phase for other Mozilla products. The Translation Phase page of the Localization Quick Start Guide contains a list of all the tools used to translate strings within Mozilla products along with tutorials on how to translate with those tools. This page will be useful to you whether you're part of a l10n team trying to decide what tool to use to translate Gaia strings or you're looking for the right tutorial for the tool your team currently uses.

L10n testing for Firefox OS

There are two main methods for performing l10n testing on Firefox OS: desktop builds and mobile builds. Currently, the desktop method is the most widely used method for l10n testing.

Desktop l10n testing

  1. Download and install the latest boot2gecko nightly desktop build by visiting http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g18/and downloading the package that corresponds to your operating system. Look for the packages that contain the word localizer in them. This indicates that the build has all of the locales listed on languages-all.json enabled.
  2. Clone the latest version of Gaia by navigating to the directory on your desktop where you would like it to download and entering this command in the command line utility: git clone git://github.com/mozilla-b2g/gaia.git
  3. If your team is localizing Firefox OS for the first time, you'll need to enable your locale. If not, grab yourself a drink while everyone else enables their locale.
    1. While in the command line, navigate inside your gaia clone and run this command to clone your locale's repo: hg clone ssh://hg.mozilla.org/gaia-l10n/your-locale-code
    2. Open the languages.json file located in the shared/resources directory in the gaia repository you just cloned.
    3. Add your locale information according to this format: "en-US" : "English (US)", and save the file.
    4. Finally, run the command: make multilocale This enables your locale on your desktop build.
  4. Create your Gaia profile by running this command: DEBUG=1 make -C gaia profile
  5. Finally, you can run Firefox OS with your locale profile and begin testing. Do this by entering this command: b2g/b2g -profile gaia/profile. If you're using Mac OS X, run this command: /Applications/B2G.app/Contents/MacOS/b2g -profile gaia/profile
  6. To update your desktop builds, simply navigate to your Gaia repo clone and enter this command: git pull

Mobile l10n testing

This section will grow as more devices that support Firefox OS become available to localizers. Please also refer to next section: What to look for when l10n testing

Here are some links to bugzilla in order to give you examples of bugs that have been encountered while using the phones. This will give you an idea of where to look at for bugs as well as an example in filing these kinds of bugs.

Localization-specific bugs

General rules when filing a Localization bug:

  • if the bug is specific to the language, then file under the Mozilla Localization (under Other Products) and cc the localizer. Don't forget to flag your bug with the appropriate tracking flag
  • if it's not specific to the language, file under FirefoxOS Product, and cc the localizer. Don't forget to flag your bug with the appropriate tracking flag
  • If you are in doubt, file under FirefoxOS Product, and cc the localizer. Don't forget to flag your bug with the appropriate tracking flag

For those of you who use Moztrap, looking at the existing test cases under the FirefoxOS "localization" tags and seeing if you can pass the tests on your device is also a good way to test FirefoxOS localizations.

B2g non-localization bugs

NOTE: be careful when filing bugs for Geeksphones as they generate their own builds! The current builds shipped by Geeksphone still suffer from a number of bugs that are already fixed on our side. Until they start using blobs closer to ours, the Keon and Peak will likely suffer from the same bugs. So if you are going to file a bug in Bugzilla, please do the following prior to anything:


What to look for when l10n testing

Localization testing for a mobile operating system has some similarites to localization testing for a desktop application. Here are some guidelines on what to look for when performing localization testing on your work:

  1. See if your translations fit inside UI text elements.
  2. Ensure that the tone, style, and terminology are consistant throughout the entire product.
  3. Look for untranslated English strings in the UI. These may be hard-coded into Gaia or they may caused by element ID errors.
  4. Make sure that time and dates display according your regions standards.

Now you're ready to start localizing! So open up your favorite l10n tool and go for it! As always, if you have questions that are not covered in this document, please send them to the mozilla.dev.l10n newsgroup.

Document Tags and Contributors

Contributors to this page: kanako
最終更新者: kanako,