Localizing Firefox OS (B2G)

430 views Asked by At

I am trying to install a new locale in Firefox OS, but I am not sure if I am following the steps well.

  1. Firstly, I tried to use Mercurial to download the desired locale: It didn't work for me, Mercurial says that access is denied, so I had to download the ZIP manually.

    hg clone ssh://hg.mozilla.org/gaia-l10n/es locales/es

  2. Secondly, unzipped it in B2G/gaia/locales/ and renamed the directory from es-7c2fcf6d1348/ to 'es'.

  3. Thirdly, I have edited B2G/gaia/locales/dev_languages.json in order to enable the desired language and I have set the following environment variables:

    export LOCALE_BASEDIR=$PWD/locales/

    export LOCALES_FILE=$PWD/locales/languages_dev.json

    export GAIA_DEFAULT_LOCALE=es

  4. At last, I flash Gaia into my mobile device doing "make reset-gaia".

    sudo NTFU=0 DOGFOOD=0 PRODUCTION=1 REMOTE_DEBUGGER=1 DEBUG=1 make reset-gaia

I expected to see the spanish language installed in the device, but it is not available. Am I missing anything?

By the way, is there any way to fix the Mercurial error?

3

There are 3 answers

2
Pike On BEST ANSWER

Re the hg error, you'll want to clone via http:// instead of ssh://, then you'll be fine. You want to make sure that the branch you're using matches the one of the gaia version you're trying to work on.

The Spanish community works on transifex, https://www.transifex.com/accounts/profile/willyaranda/ has the various projects.

As for getting your local copy onto a device, flod maintains https://l10n.etherpad.mozilla.org/gaia-multilocale, that should be up-to-date. (Disclaimer, it did go through some data-loss and was buggy lately, etherpad problems)

0
willyaranda On

this is my .userconfig file, which is on my b2g root:


     gll  /  b2g  1.2  cat .userconfig                                                                                                             master 
    #export GECKO_OBJDIR=/Volumes/Trabajo/repos/mozilla-central/objdir-gonk
    #export GECKO_PATH=/Volumes/Trabajo/repos/mozilla-central/

    export REMOTE_DEBUGGER=1
    export DEVICE_DEBUG=1
    export MOZILLA_OFFICIAL=1
    export PRODUCTION=1

    ## Gaia
    export GAIA_DEFAULT_LOCALE=es
    export LOCALE_BASEDIR='/b2g/gaia-locales-1.2/'
    export LOCALES_FILE='/b2g/languages_propio.json'

    ## Gecko
    export L10NBASEDIR='/b2g/gecko-locales-1.2/'
    export MOZ_CHROME_MULTILOCALE="es-ES eu ca gl pt-BR"
    export PATH="$PATH:/b2g/compare-locales/scripts"
    export PYTHONPATH="/b2g/compare-locales/lib"

    export CC='ccache /usr/bin/gcc-4.6'
    export CXX='ccache /usr/bin/g++-4.6'
    export CCACHE_DIR='/b2g/.ccache'

where locales_propio.json is as follows:

     gll  /  b2g  1.2  cat ../languages_propio.json

{ "ca" : "Català", "en-US" : "English (US)", "es" : "Español", "eu" : "Euskara", "gl" : "Galego", "pt-BR" : "Portugués (BR)" }

Here, you can add your Gaia constants, as you can see.

You must clone your locales in your LOCALE_BASEDIR, depending on the branch:

https://hg.mozilla.org/releases/gaia-l10n/v1_2/ https://hg.mozilla.org/gaia-l10n/

Cheers,

Guillermo

1
gasolin On

here's a gist help you customize your locales and keyboard dictionaries

https://gist.github.com/timdream/7716684