Skip to content

Commit

Permalink
change locales/ to a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Aug 13, 2021
1 parent d76d5f3 commit ff26e9f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 271 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
working_directory: /dockerflow
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- setup_remote_docker

- run:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "privaterelay/locales"]
path = privaterelay/locales
url = [email protected]:mozilla-l10n/fx-private-relay-l10n.git
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please refer to our [coding standards](docs/coding-standards.md) information for
1. Clone and change to the directory:

```sh
git clone https://github.com/mozilla/fx-private-relay.git
git clone --recurse-submodules https://github.com/mozilla/fx-private-relay.git
cd fx-private-relay
```

Expand Down Expand Up @@ -83,6 +83,44 @@ Please refer to our [coding standards](docs/coding-standards.md) information for
python manage.py runserver
```

### Working with translations
#### Getting the latest translations
We use a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
for translated message files. The `--recurse-submodules` step of installation
should bring the message files into your working directory already, but you may
want also want to udpate the translations after install. The easiest way to do
that is:

* `git submodule update --remote`

#### Add/update messages for translation
The `privaterelay/locales` directory is a git repository like any other, so to
make changes to the messages:

1. Make whatever changes you need in `privaterelay/locales/en` as you work.

2. `cd privaterelay/locales/en`

3. `git branch message-updates-yyyymmdd`

4. `git push -u origin message-updates-yyyymmdd`

You can then open a pull request from the `message-updates-yyyymmdd` branch to
[the l10n repo](https://github.com/mozilla-l10n/fx-private-relay-l10n) `main` branch.

#### Commit translations for release
To commit updates to the app's translations (e.g., before a release), we need
to commit this submodule update. So, if the updated translations are ready to
be committed into the app, you can `git add` the submodule just like any other
file:
* `git add privaterelay/locales`
You can then commit and push to set the app repository to the updated version
of the translations submodule:
* `git push`
#### Recommended: Enable Firefox Accounts authentication
To enable Firefox Accounts authentication on your local server, you can use the
"Firefox Private Relay local dev" OAuth app on accounts.stage.mozaws.net.
Expand Down
1 change: 1 addition & 0 deletions privaterelay/locales
Submodule locales added at f0fe22
270 changes: 0 additions & 270 deletions privaterelay/locales/en-US/app.ftl

This file was deleted.

0 comments on commit ff26e9f

Please sign in to comment.