-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Add Custom Build to Chrome | ||
|
||
* 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 `MOACMask/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Add Custom Build to Firefox | ||
|
||
Go to the url `about:debugging`. | ||
|
||
Click the button `Load Temporary Add-On`. | ||
|
||
Select the file `dist/firefox/manifest.json`. | ||
|
||
You can optionally enable debugging, and click `Debug`, for a console window that logs all of MOACMask's processes to a single console. | ||
|
||
If you have problems debugging, try connecting to the IRC channel `#webextensions` on `irc.mozilla.org`. | ||
|
||
For longer questions, use the StackOverfow tag `firefox-addons`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Adding Custom Networks | ||
|
||
To add another network to our dropdown menu, make sure the following files are adjusted properly: | ||
|
||
``` | ||
app/scripts/config.js | ||
app/scripts/lib/buy-eth-url.js | ||
app/scripts/lib/config-manager.js | ||
ui/app/app.js | ||
ui/app/components/buy-button-subview.js | ||
ui/app/components/drop-menu-item.js | ||
ui/app/components/network.js | ||
ui/app/components/transaction-list-item.js | ||
ui/app/config.js | ||
ui/app/css/lib.css | ||
ui/lib/account-link.js | ||
ui/lib/explorer-link.js | ||
``` | ||
|
||
You will need: | ||
+ The network ID | ||
+ An RPC Endpoint url | ||
+ An explorer link | ||
+ CSS for the display icon | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
### Developing on Dependencies | ||
|
||
To enjoy the live-reloading that `gulp dev` offers while working on the `web3-provider-engine` or other dependencies: | ||
|
||
1. Clone the dependency locally. | ||
2. `npm install` in its folder. | ||
3. Run `npm link` in its folder. | ||
4. Run `npm link $DEP_NAME` in this project folder. | ||
5. Next time you `npm start` it will watch the dependency for changes as well! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# MOACMask Translation Guide | ||
|
||
The MOACMask 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 (example: `app/_locales/es/`). (look up a language subtag using the [r12a "Find" tool](https://r12a.github.io/app-subtags/) or this [wikipedia list](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)). | ||
- Inside that folder there should be a `messages.json`. | ||
- An easy way to start your translation is to first **make a copy** of `app/_locales/en/messages.json` (the english translation), and then **translate the `message` key** for each in-app message. | ||
- **The `description` key** is just to add context for what the translation is about, it **does not need to be translated**. | ||
- Add the language to the [locales index](https://github.com/MOACMask/blob/master/app/_locales/index.json) `app/_locales/index.json` | ||
|
||
|
||
That's it! When MOACMask 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 (example: `es`), i.e. the name of your language folder. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Running UI Dev Mode | ||
|
||
You can run `npm run ui`, and your browser should open a live-reloading demo version of the plugin UI. | ||
|
||
Some actions will crash the app, so this is only for tuning aesthetics, but it allows live-reloading styles, which is a much faster feedback loop than reloading the full extension. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### Developing on UI with Mocked Background Process | ||
|
||
You can run `npm run mock` and your browser should open a live-reloading demo version of the plugin UI, just like the `npm run ui`, except that it tries to actually perform all normal operations. | ||
|
||
It does not yet connect to a real blockchain (this could be a good test feature later, connecting to a test blockchain), so only local operations work. | ||
|
||
You can reset the mock ui at any time with the `Reset` button at the top of the screen. | ||
|