L10n:B2G/Langpacks

From MozillaWiki
Jump to: navigation, search

Language packages for Firefox OS allow users to extend the language coverage on their device without the need of re-flashing the entire system.

Background

In 2.2 Langpacks will be distributed via a special page on the Marketplace. They will submitted to the Marketplace by the L10n team and will be automatically signed. Langpacks are unprivileged apps.

Implementation

Testing using Marketplace Stage

  1. Flash a mozilla-central or mozilla-b2g37_v2_2 Engineering build from pvt
  2. Check out the master or v2.2 branch in your Gaia clone
  3. curl http://informationisart.com/langpacks/testing.patch | git apply
    • Enables "Use Marketplace reviewer certs"
    • Changes the names of the Marketplace apps
  4. make reset-gaia
  5. Connect to the Internet on the device
  6. Open Settings > Language > Get More Languages
  7. Choose Marketplace Stage
  8. Install a langpack
  9. Go back to Settings and choose the newly installed language


Testing using the get-more-languages app

For testing custom-built langpacks, it's best to use the get-more-languages app deployed to your server preferably under its own subdomain. An example instance can be seen at http://get-more-languages.informationisart.com/ (or shorter: http://bit.ly/langpacks).

On your server:

  1. Deploy get-more-languages under its own domain.
  2. Edit langpacks/*/*.webapp and change package_path to match your domain.

On your computer:

  1. Clone Gaia master or v2.2
  2. echo 'user_pref("dom.apps.allow_unsigned_langpacks", true);' >> build/config/custom-prefs.js
  3. make production

On your device:

  1. Connect to the Internet on the device
  2. Navigate to your instance of get-more-languages
  3. Either install langpacks directly from the webpage, or…
  4. Tap "(Install this app)"
  5. Open Settings > Language > Get More Languages
  6. Choose Get More Languages to handle the activity

Code & Examples


See also