diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/add-to-chrome.md | 18 | ||||
-rw-r--r-- | docs/translating-guide.md | 26 |
2 files changed, 34 insertions, 10 deletions
diff --git a/docs/add-to-chrome.md b/docs/add-to-chrome.md index ea5213182..9c321a1a6 100644 --- a/docs/add-to-chrome.md +++ b/docs/add-to-chrome.md @@ -1,14 +1,12 @@ ## Add Custom Build to Chrome -Open `Settings` > `Extensions`. - -Check "Developer mode". - -At the top, click `Load Unpacked Extension`. - -Navigate to your `metamask-plugin/dist/chrome` folder. - -Click `Select`. +* Open `Settings` > `Extensions`. +* Check "Developer mode". +* Alternatively, use the URL `chrome://extensions/` in your address bar +* At the top, click `Load Unpacked Extension`. +* Navigate to your `metamask-plugin/dist/chrome` folder. +* Click `Select`. +* Change to your locale via `chrome://settings/languages` +* Restart the browser and test the plugin in your locale You now have the plugin, and can click 'inspect views: background plugin' to view its dev console. - diff --git a/docs/translating-guide.md b/docs/translating-guide.md new file mode 100644 index 000000000..ae2dfecd3 --- /dev/null +++ b/docs/translating-guide.md @@ -0,0 +1,26 @@ +# 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 automatically see if you are missing any phrases to translate, we have a script you can run (if you know how to use the command line). The script is: + +``` +node development/verify-locale-strings.js $YOUR_LOCALE +``` + +Where `$YOUR_LOCALE` is your [locale string](https://r12a.github.io/app-subtags/), i.e. the name of your language folder. + +To verify that your translation works in the app, you will need to [build a local copy](https://github.com/MetaMask/metamask-extension#building-locally) of MetaMask. You will need to change your browser language, your operating system language, and restart your browser (sorry it's so much work!). + |