From 8020d83ced336cb6fd115c3b38edf8e9f7883204 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 6 Apr 2024 11:30:31 +0530 Subject: [PATCH] Fix crowdin paths --- .github/workflows/web-crowdin.yml | 2 +- web/crowdin.yml | 4 ++-- web/docs/translations.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/web-crowdin.yml b/.github/workflows/web-crowdin.yml index f834e62f3..d98685065 100644 --- a/.github/workflows/web-crowdin.yml +++ b/.github/workflows/web-crowdin.yml @@ -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: diff --git a/web/crowdin.yml b/web/crowdin.yml index 0079be91d..b7ae68bc6 100644 --- a/web/crowdin.yml +++ b/web/crowdin.yml @@ -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 diff --git a/web/docs/translations.md b/web/docs/translations.md index f06ab7c6c..e48b34363 100644 --- a/web/docs/translations.md +++ b/web/docs/translations.md @@ -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