Mobile/Fennec/Android/Multilocale Builds: Difference between revisions

no edit summary
(Created page with "Firefox for Android provides a locale switching system (which allows you to override the system locale). We ship with a large number of locales, however local builds default t...")
 
No edit summary
Line 11: Line 11:
   MOZILLA_CENTRAL=~/moz/hg/mozilla-central # edit to reflect current clone
   MOZILLA_CENTRAL=~/moz/hg/mozilla-central # edit to reflect current clone
   L10NBASEDIR=~/moz/hg/l10n # edit to reflect where your l10n checkouts will go
   L10NBASEDIR=~/moz/hg/l10n # edit to reflect where your l10n checkouts will go
  LANGS='ar zh-CN zh-TW pl de' # edit this to reflect your locale list
    
    
  LOCALES=$MOZILLA_CENTRAL/multilocale-conf
   mkdir -p $L10NBASEDIR
   mkdir -P $L10NBASEDIR
   pushd $L10NBASEDIR
   pushd $L10NBASEDIR
   while read loc; do if ! [ -d "$loc" ]; then hg clone "http://hg.mozilla.org/releases/l10n/mozilla-aurora/$loc"; fi; done < $LOCALES
   for loc in $LANGS; do if ! [ -d "$loc" ]; then hg clone "http://hg.mozilla.org/releases/l10n/mozilla-aurora/$loc"; fi; done
* set up your mozconfig to include the following:
* set up your mozconfig to include the following:
** Note: only full (non-artifact builds are supported)
** '''Note: only full (non-artifact builds are supported).'''
   mk_add_options 'export MOZ_CHROME_MULTILOCALE=en-US ar zh-CN zh-TW de pl' # start with en-US, and add your desired locales from (2)
   mk_add_options 'export MOZ_CHROME_MULTILOCALE=en-US ar zh-CN zh-TW de pl' # start with en-US, and add your desired locales from (2)
   # Use absolute paths.
   # Use absolute paths.
   mk_add_options 'export L10NBASEDIR=/Users/andrzejhunt/ff/hg/l10n' # should match L10NBASEDIR from earlier
   mk_add_options 'export L10NBASEDIR=/Users/andrzejhunt/moz/hg/l10n' # should match L10NBASEDIR from earlier
   ac_add_options --with-l10n-base=/Users/andrzejhunt/ff/hg/l10n
   ac_add_options --with-l10n-base=/Users/andrzejhunt/moz/hg/l10n
* build using |mach build|
* build using |mach build|
* build and merge the localisations:
* build and merge the localisations:
** edit the list below to include all your desired locales (do NOT include en-US, that was already built during |mach build|)
** edit the list below to include all your desired locales (do NOT include en-US, that was already built during |mach build|), and replace the mozilla-central path with your own checkout path
   for loc in ar pl de zh-TW; do  make -C objdir-frontend/mobile/android/locales merge-$loc LOCALE_MERGEDIR=/Users/andrzejhunt/ff/fx3/objdir-frontend/merge-$loc; make -C objdir-frontend/mobile/android/locales chrome-$loc LOCALE_MERGEDIR=/Users/andrzejhunt/ff/fx3/objdir-frontend/merge-$loc; done && ./mach package
   for loc in ar pl de zh-TW; do  make -C objdir-frontend/mobile/android/locales merge-$loc LOCALE_MERGEDIR=/Users/andrzejhunt/ff/fx3/objdir-frontend/merge-$loc; make -C objdir-frontend/mobile/android/locales chrome-$loc LOCALE_MERGEDIR=/Users/andrzejhunt/moz/hg/mozilla-central/objdir-frontend/merge-$loc; done && ./mach package
* |mach package| && |mach install| to test
* |mach package| && |mach install| to test


46

edits