Skip to content

Commit 7a956ae

Browse files
committed
feat: Integrate accent
1 parent f06ad5d commit 7a956ae

File tree

8 files changed

+469
-1961
lines changed

8 files changed

+469
-1961
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,17 @@ To configure Keycloak:
272272
- NEXTAUTH_SECRET: Any string, can be "secret" locally
273273
274274
[keycloak-admin]: http://localhost:8080/admin/master/console/#/
275+
276+
## Translations
277+
278+
Translations are managed via [Accent](https://accent.interactivethings.io). Right now, you need to
279+
manually pull and push the translations. The process goes:
280+
281+
1. Edit components, add `<Trans />` and `t()`
282+
2. Run `yarn locales:extract` to write the `en/messages.po`
283+
3. Run `yarn locales:push --dry-run` to review what will be pushed to Accent
284+
4. Run `yarn locales:push` to push the new translations to Accent
285+
5. Edit the new messages in Accent web UI `yarn locales:browse`
286+
6. Run `yarn locales:pull` to get the messages.po for all translated languages
287+
288+
In the future, we might want to integrate further Accent so that it opens pull requests.

accent.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"apiUrl": "https://accent.interactivethings.io",
3+
"files": [
4+
{
5+
"namePattern": "file",
6+
"format": "gettext",
7+
"source": "app/locales/en/messages.po",
8+
"target": "app/locales/%slug%/%document_path%.po"
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)