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]
|
||||
paths:
|
||||
# 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
|
||||
- ".github/workflows/web-crowdin.yml"
|
||||
schedule:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||
|
||||
files:
|
||||
- source: /apps/photos/public/locales/en-US/translation.json
|
||||
translation: /apps/photos/public/locales/%locale%/translation.json
|
||||
- source: /packages/next/locales/en-US/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.
|
||||
|
||||
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
|
||||
such source key-value to our
|
||||
|
@ -25,8 +25,8 @@ from Crowdin, but these two should be no-ops.
|
|||
|
||||
## Adding a new string
|
||||
|
||||
- Add a new entry in `public/locales/en-US/translation.json` (the **source
|
||||
`translation.json`**).
|
||||
- Add a new entry in `packages/next/locales/en-US/translation.json` (the
|
||||
**source `translation.json`**).
|
||||
- Use the new key in code with the `t` function
|
||||
(`import { t } from "i18next"`).
|
||||
- During the next sync, the workflow will upload this source item to Crowdin's
|
||||
|
|
Loading…
Reference in a new issue