Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: README.md

Issue 29322413: Issue 2750 - [Support other languages] Apply Firefox's translations (Closed)
Patch Set: Refined README again. Created July 27, 2015, 10:18 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mobile/android/base/locales/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index 97d156ea41666f4cfd5162b9d6777f4e3990fa39..06d470f17b8c7df65505d6bd1a7e77795a44c722 100644
--- a/README.md
+++ b/README.md
@@ -24,5 +24,106 @@ to disable the CrashReporter.
(Follow-up issue: https://issues.adblockplus.org/ticket/2490)
+Creating a multilocale build
+----------------------------
+
+### Preparations ###
+
+1. Create a folder outside of the Adblock Browser repo, e.g `abb-multi`
+2. Change into `abb-multi` and clone mozharness via:
+
+ hg clone http://hg.mozilla.org/build/mozharness -r FENNEC_39_0_1_RELEASE
+
+3. Symlink the adblockbrowser repo into `abb-multi`, e.g.:
+
+ ln -s ../adblockbrowser adblockbrowser
+
+4. Copy your `mozconfig` from `adblockbrowser` to `abb-multi`, e.g.:
+
+ cp adblockbrowser/mozconfig ./mozconfig
+
+5. Create a copy of the build configuration, e.g.:
+
+ cp mozharness/configs/multi_locale/standalone_mozilla-central.py abb-multi-cfg.py
+
+### Configuration ###
+
+Apply the following changes to `abb-multi-cfg.py`:
+
+* Change `BUILD_DIR = "mozilla-central"` to `BUILD_DIR = "adblockbrowser"`
+* Make sure `OBJDIR = "objdir-droid"` matches your build output
+ folder
+* Change `L10N_REPO_PATH` to point to `releases/l10n/mozilla-release`
+* If your `mozconfig` is not called `mozconfig`, change `MOZCONFIG`
+* **Remove the repository pulling part** from `config`.
+ The code to remove looks like this:
+
+ "repos": [{
+ "repo": "https://hg.mozilla.org/%s" % REPO_PATH,
+ "tag": "default",
+ "dest": BUILD_DIR,
+ }],
+* Change `"hg_l10n_tag"` in `config` from `default` to `FENNEC_39_0_1_RELEASE`
+* You might want to remove the `"backup-objdir"` build step if you do
+ not want your objdir to be backed up. Keep in mind that you then need to
+ clobber for a single-locale build.
+
+An example configuration could look like this:
+
+ import os
+ # The name of the directory we'll pull our source into.
+ BUILD_DIR = "adblockbrowser"
+ # This is everything that comes after https://hg.mozilla.org/
+ # e.g. "releases/mozilla-aurora"
+ REPO_PATH = "mozilla-central"
+ # This is where the l10n repos are (everything after https://hg.mozilla.org/)
+ # for mozilla-central, that's "l10n-central".
+ # For mozilla-aurora, that's "releases/l10n/mozilla-aurora"
+ L10N_REPO_PATH = "releases/l10n/mozilla-release"
+ # Currently this is assumed to be a subdirectory of your build dir
+ OBJDIR = "obj-android"
+ # Set this to mobile/xul for XUL Fennec
+ ANDROID_DIR = "mobile/android"
+ # Absolute path to your mozconfig.
+ # By default it looks at "./mozconfig"
+ MOZCONFIG = os.path.join(os.getcwd(), "mozconfig")
+
+ config = {
+ "work_dir": ".",
+ "log_name": "multilocale",
+ "objdir": OBJDIR,
+ "locales_file": "%s/%s/locales/maemo-locales" % (BUILD_DIR, ANDROID_DIR),
+ "locales_dir": "%s/locales" % ANDROID_DIR,
+ "ignore_locales": ["en-US", "multi"],
+ "l10n_repos": [{
+ "repo": "https://hg.mozilla.org/build/compare-locales",
+ "tag": "RELEASE_AUTOMATION"
+ }],
+ "hg_l10n_base": "https://hg.mozilla.org/%s" % L10N_REPO_PATH,
+ "hg_l10n_tag": "default",
+ "l10n_dir": "l10n",
+ "merge_locales": True,
+ "mozilla_dir": BUILD_DIR,
+ "mozconfig": MOZCONFIG,
+ "default_actions": [
+ "pull-locale-source",
+ "build",
+ "package-en-US",
+ "restore-objdir",
+ "add-locales",
+ "package-multi",
+ "summary",
+ ],
+ }
+
+### Building ###
+
+For performing the multilocale build, invoke
+
+ ./mozharness/scripts/multil10n.py --cfg abb-multi-cfg.py
+
+from inside `abb-multi`. The resulting build is located in
+`BUILD_DIR/OBJ_DIR/dist/`
[1]: https://wiki.mozilla.org/Mobile/Fennec/Android
+
« no previous file with comments | « no previous file | mobile/android/base/locales/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld