Fix crowdin paths
This commit is contained in:
parent
121df66ada
commit
8020d83ced
3 changed files with 6 additions and 6 deletions
2
.github/workflows/web-crowdin.yml
vendored
2
.github/workflows/web-crowdin.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
# Run workflow when web's en-US/translation.json is changed
|
# Run workflow when web's en-US/translation.json is changed
|
||||||
- "web/apps/photos/public/locales/en-US/translation.json"
|
- "web/packages/next/locales/en-US/translation.json"
|
||||||
# Or the workflow itself is changed
|
# Or the workflow itself is changed
|
||||||
- ".github/workflows/web-crowdin.yml"
|
- ".github/workflows/web-crowdin.yml"
|
||||||
schedule:
|
schedule:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
|
|
||||||
files:
|
files:
|
||||||
- source: /apps/photos/public/locales/en-US/translation.json
|
- source: /packages/next/locales/en-US/translation.json
|
||||||
translation: /apps/photos/public/locales/%locale%/translation.json
|
translation: /packages/next/locales/%locale%/translation.json
|
||||||
|
|
|
@ -4,7 +4,7 @@ We use Crowdin for translations, and the `i18next` library to load these at
|
||||||
runtime.
|
runtime.
|
||||||
|
|
||||||
Within our project we have the _source_ strings - these are the key value pairs
|
Within our project we have the _source_ strings - these are the key value pairs
|
||||||
in the `public/locales/en-US/translation.json` file in each app.
|
in the `packages/next/locales/en-US/translation.json` file.
|
||||||
|
|
||||||
Volunteers can add a new _translation_ in their language corresponding to each
|
Volunteers can add a new _translation_ in their language corresponding to each
|
||||||
such source key-value to our
|
such source key-value to our
|
||||||
|
@ -25,8 +25,8 @@ from Crowdin, but these two should be no-ops.
|
||||||
|
|
||||||
## Adding a new string
|
## Adding a new string
|
||||||
|
|
||||||
- Add a new entry in `public/locales/en-US/translation.json` (the **source
|
- Add a new entry in `packages/next/locales/en-US/translation.json` (the
|
||||||
`translation.json`**).
|
**source `translation.json`**).
|
||||||
- Use the new key in code with the `t` function
|
- Use the new key in code with the `t` function
|
||||||
(`import { t } from "i18next"`).
|
(`import { t } from "i18next"`).
|
||||||
- During the next sync, the workflow will upload this source item to Crowdin's
|
- During the next sync, the workflow will upload this source item to Crowdin's
|
||||||
|
|
Loading…
Reference in a new issue