aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-03-10 03:18:43 +0800
committerDan Finlay <dan@danfinlay.com>2018-03-10 03:18:43 +0800
commit174f57b4646b3d320850c6286189a146cf0e23b0 (patch)
tree47bad520f0a433c054997c8db1e97a882035e8c4
parent09dae760bc9ec5b2288d0719acbf7e2c949c8fbb (diff)
downloadtangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar.gz
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar.bz2
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar.lz
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar.xz
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.tar.zst
tangerine-wallet-browser-174f57b4646b3d320850c6286189a146cf0e23b0.zip
Document process of adding a new translation
-rw-r--r--README.md1
-rw-r--r--docs/translating-guide.md18
2 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index d45b73778..278357c23 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,7 @@ To write tests that will be run in the browser using QUnit, add your test files
- [How to add custom build to Chrome](./docs/add-to-chrome.md)
- [How to add custom build to Firefox](./docs/add-to-firefox.md)
- [How to develop a live-reloading UI](./docs/ui-dev-mode.md)
+- [How to add a new translation to MetaMask](./docs/translating-guide.md)
- [Publishing Guide](./docs/publishing.md)
- [How to develop an in-browser mocked UI](./docs/ui-mock-mode.md)
- [How to live reload on local dependency changes](./docs/developing-on-deps.md)
diff --git a/docs/translating-guide.md b/docs/translating-guide.md
new file mode 100644
index 000000000..62d444b5a
--- /dev/null
+++ b/docs/translating-guide.md
@@ -0,0 +1,18 @@
+# MetaMask Translation Guide
+
+The MetaMask browser extension supports new translations added in the form of new locales files added in `app/_locales`.
+
+- [The MDN Guide to Internationalizing Extensions](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Internationalization)
+
+## Adding a new Language
+
+Each supported language is represented by a folder in `app/_locales` whose name is that language's subtag ([look up a language subtag using this tool](https://r12a.github.io/app-subtags/)).
+
+Inside that folder there should be a `messages.json` file that follows the specified format. An easy way to start your translation is to first duplicate `app/_locales/en/messages.json` (the english translation), and then update the `message` key for each in-app message.
+
+That's it! When MetaMask is loaded on a computer with that language set as the system language, they will see your translation instead of the default one.
+
+## Testing
+
+To verify that your translation works, you will need to [build a local copy](https://github.com/MetaMask/metamask-extension#building-locally) of MetaMask.
+