Fix crowdin paths

This commit is contained in:
Manav Rathi 2024-04-06 11:30:31 +05:30
parent 121df66ada
commit 8020d83ced
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -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:

View file

@ -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

View file

@ -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