fix(i18n): add missing translation keys to 5 locale files - #3041
Larslllllll wants to merge 1 commit into
Conversation
Added the following missing translation keys identified in issue Chainlit#2993: - ar-SA.json: chat.favorites.remove - da-DK.json: chat.favorites.remove - de-DE.json: components.DatePickerInput - it.json: components.DatePickerInput - ko.json: components.DatePickerInput These keys were present in en-US.json but missing from other locale files, causing users on those locales to see fallback text instead of proper translations. Fixes Chainlit#2993
There was a problem hiding this comment.
5 issues found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/chainlit/translations/de-DE.json">
<violation number="1" location="backend/chainlit/translations/de-DE.json:255">
P2: The de-DE locale file gets `components.DatePickerInput.placeholder` keys with English values ("Pick a date" / "Pick a date range") verbatim from en-US.json. German users will still see untranslated English placeholder text, which defeats the PR's stated purpose of fixing missing translations for locale users. Translate the values, e.g. `single: "Datum auswählen"`, `range: "Datumsbereich auswählen"`.</violation>
</file>
<file name="backend/chainlit/translations/ar-SA.json">
<violation number="1" location="backend/chainlit/translations/ar-SA.json:75">
P2: The value added for `chat.favorites.remove` in `ar-SA.json` is the untranslated English string "Remove favorite" inside an otherwise fully Arabic locale file. The PR's own goal is for users on these locales to see translated text rather than a missing-key render, but this change makes Arabic users fall back to English instead of Arabic, so the fix is incomplete. Translate the value to Arabic (e.g. "إزالة المفضلة") rather than copying en-US.json's value.
Note: the sibling locales added proper translations for the same key (de-DE "Favorit entfernen", it "Rimuovi preferito", ko "즐겨찾기 제거"), confirming each locale file should carry its own translated string.</violation>
</file>
<file name="backend/chainlit/translations/it.json">
<violation number="1" location="backend/chainlit/translations/it.json:255">
P2: The added Italian `components.DatePickerInput.placeholder` values are copied verbatim from en-US.json as English text ("Pick a date" / "Pick a date range"). Every other locale (fr-FR, es, pt-PT, zh-CN, nl, ja) translates this key, so Italian users will see English placeholders. Provide Italian translations, e.g. "Scegli una data" and "Scegli un intervallo di date".</violation>
</file>
<file name="backend/chainlit/translations/da-DK.json">
<violation number="1" location="backend/chainlit/translations/da-DK.json:75">
P2: The value for chat.favorites.remove is added as the English string "Remove favorite" in the Danish locale file, while every other value in da-DK.json is Danish (e.g. "Fjern vedhæftning"). This key is used as an aria-label in FavoriteButton.tsx, so Danish users (especially screen-reader users) still receive English text, which is exactly the untranslated fallback this PR was meant to fix. Translate the value, e.g. "Fjern favorit". (ar-SA.json has the same problem but is a separate file in this PR.)</violation>
</file>
<file name="backend/chainlit/translations/ko.json">
<violation number="1" location="backend/chainlit/translations/ko.json:255">
P2: The `DatePickerInput` placeholders added to this locale file are English strings ("Pick a date"/"Pick a date range") copied from en-US.json, but `ko.json` is otherwise fully Korean. Every other locale that defines this key (fr-FR, ja, zh-CN, es, ar-SA, da-DK) translates these values, so Korean users will see English text in the date picker. This contradicts the PR's stated goal of showing localized text instead of a missing-key fallback. `lint_translations()` only checks key structure so this passes lint despite being untranslated. Translate the values, e.g. "날짜 선택"/"날짜 범위 선택".</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| }, | ||
| "DatePickerInput": { | ||
| "placeholder": { | ||
| "single": "Pick a date", |
There was a problem hiding this comment.
P2: The de-DE locale file gets components.DatePickerInput.placeholder keys with English values ("Pick a date" / "Pick a date range") verbatim from en-US.json. German users will still see untranslated English placeholder text, which defeats the PR's stated purpose of fixing missing translations for locale users. Translate the values, e.g. single: "Datum auswählen", range: "Datumsbereich auswählen".
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/chainlit/translations/de-DE.json, line 255:
<comment>The de-DE locale file gets `components.DatePickerInput.placeholder` keys with English values ("Pick a date" / "Pick a date range") verbatim from en-US.json. German users will still see untranslated English placeholder text, which defeats the PR's stated purpose of fixing missing translations for locale users. Translate the values, e.g. `single: "Datum auswählen"`, `range: "Datumsbereich auswählen"`.</comment>
<file context>
@@ -249,6 +249,12 @@
+ },
+ "DatePickerInput": {
+ "placeholder": {
+ "single": "Pick a date",
+ "range": "Pick a date range"
+ }
</file context>
| "single": "Pick a date", | |
| "single": "Datum auswählen", | |
| "range": "Datumsbereich auswählen" |
| "description": "ابدأ بإرسال رسالة وقم بتمييزها بنجمة أو ميّز رسالة من محادثاتك السابقة" | ||
| } | ||
| }, | ||
| "remove": "Remove favorite" |
There was a problem hiding this comment.
P2: The value added for chat.favorites.remove in ar-SA.json is the untranslated English string "Remove favorite" inside an otherwise fully Arabic locale file. The PR's own goal is for users on these locales to see translated text rather than a missing-key render, but this change makes Arabic users fall back to English instead of Arabic, so the fix is incomplete. Translate the value to Arabic (e.g. "إزالة المفضلة") rather than copying en-US.json's value.
Note: the sibling locales added proper translations for the same key (de-DE "Favorit entfernen", it "Rimuovi preferito", ko "즐겨찾기 제거"), confirming each locale file should carry its own translated string.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/chainlit/translations/ar-SA.json, line 75:
<comment>The value added for `chat.favorites.remove` in `ar-SA.json` is the untranslated English string "Remove favorite" inside an otherwise fully Arabic locale file. The PR's own goal is for users on these locales to see translated text rather than a missing-key render, but this change makes Arabic users fall back to English instead of Arabic, so the fix is incomplete. Translate the value to Arabic (e.g. "إزالة المفضلة") rather than copying en-US.json's value.
Note: the sibling locales added proper translations for the same key (de-DE "Favorit entfernen", it "Rimuovi preferito", ko "즐겨찾기 제거"), confirming each locale file should carry its own translated string.</comment>
<file context>
@@ -71,7 +71,8 @@
"description": "ابدأ بإرسال رسالة وقم بتمييزها بنجمة أو ميّز رسالة من محادثاتك السابقة"
- }
+ },
+ "remove": "Remove favorite"
},
"commands": {
</file context>
| "remove": "Remove favorite" | |
| " \"remove\": \"إزالة المفضلة\" |
| }, | ||
| "DatePickerInput": { | ||
| "placeholder": { | ||
| "single": "Pick a date", |
There was a problem hiding this comment.
P2: The added Italian components.DatePickerInput.placeholder values are copied verbatim from en-US.json as English text ("Pick a date" / "Pick a date range"). Every other locale (fr-FR, es, pt-PT, zh-CN, nl, ja) translates this key, so Italian users will see English placeholders. Provide Italian translations, e.g. "Scegli una data" and "Scegli un intervallo di date".
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/chainlit/translations/it.json, line 255:
<comment>The added Italian `components.DatePickerInput.placeholder` values are copied verbatim from en-US.json as English text ("Pick a date" / "Pick a date range"). Every other locale (fr-FR, es, pt-PT, zh-CN, nl, ja) translates this key, so Italian users will see English placeholders. Provide Italian translations, e.g. "Scegli una data" and "Scegli un intervallo di date".</comment>
<file context>
@@ -249,6 +249,12 @@
+ },
+ "DatePickerInput": {
+ "placeholder": {
+ "single": "Pick a date",
+ "range": "Pick a date range"
+ }
</file context>
| "description": "Start med at sende en prompt og markere den med en stjerne, eller vælg en prompt fra tidligere samtaler" | ||
| } | ||
| }, | ||
| "remove": "Remove favorite" |
There was a problem hiding this comment.
P2: The value for chat.favorites.remove is added as the English string "Remove favorite" in the Danish locale file, while every other value in da-DK.json is Danish (e.g. "Fjern vedhæftning"). This key is used as an aria-label in FavoriteButton.tsx, so Danish users (especially screen-reader users) still receive English text, which is exactly the untranslated fallback this PR was meant to fix. Translate the value, e.g. "Fjern favorit". (ar-SA.json has the same problem but is a separate file in this PR.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/chainlit/translations/da-DK.json, line 75:
<comment>The value for chat.favorites.remove is added as the English string "Remove favorite" in the Danish locale file, while every other value in da-DK.json is Danish (e.g. "Fjern vedhæftning"). This key is used as an aria-label in FavoriteButton.tsx, so Danish users (especially screen-reader users) still receive English text, which is exactly the untranslated fallback this PR was meant to fix. Translate the value, e.g. "Fjern favorit". (ar-SA.json has the same problem but is a separate file in this PR.)</comment>
<file context>
@@ -71,7 +71,8 @@
"description": "Start med at sende en prompt og markere den med en stjerne, eller vælg en prompt fra tidligere samtaler"
- }
+ },
+ "remove": "Remove favorite"
},
"commands": {
</file context>
| "remove": "Remove favorite" | |
| "remove": "Fjern favorit" |
| }, | ||
| "DatePickerInput": { | ||
| "placeholder": { | ||
| "single": "Pick a date", |
There was a problem hiding this comment.
P2: The DatePickerInput placeholders added to this locale file are English strings ("Pick a date"/"Pick a date range") copied from en-US.json, but ko.json is otherwise fully Korean. Every other locale that defines this key (fr-FR, ja, zh-CN, es, ar-SA, da-DK) translates these values, so Korean users will see English text in the date picker. This contradicts the PR's stated goal of showing localized text instead of a missing-key fallback. lint_translations() only checks key structure so this passes lint despite being untranslated. Translate the values, e.g. "날짜 선택"/"날짜 범위 선택".
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/chainlit/translations/ko.json, line 255:
<comment>The `DatePickerInput` placeholders added to this locale file are English strings ("Pick a date"/"Pick a date range") copied from en-US.json, but `ko.json` is otherwise fully Korean. Every other locale that defines this key (fr-FR, ja, zh-CN, es, ar-SA, da-DK) translates these values, so Korean users will see English text in the date picker. This contradicts the PR's stated goal of showing localized text instead of a missing-key fallback. `lint_translations()` only checks key structure so this passes lint despite being untranslated. Translate the values, e.g. "날짜 선택"/"날짜 범위 선택".</comment>
<file context>
@@ -249,6 +249,12 @@
+ },
+ "DatePickerInput": {
+ "placeholder": {
+ "single": "Pick a date",
+ "range": "Pick a date range"
+ }
</file context>
Description
Added missing translation keys to 5 locale files as identified in issue #2993:
Why this matters
These keys were present in
en-US.json(the ground truth perlint_translations()inbackend/chainlit/config.py) but missing from other locale files. Users on those locales were falling through to a missing-key render rather than seeing translated text.Testing
Closes #2993
Summary by cubic
Fixes #2993 by adding the missing
chat.favorites.removekey toar-SA.jsonandda-DK.json, and the missingcomponents.DatePickerInputkey tode-DE.json,it.json, andko.json, so users on those locales no longer see missing-key fallback text.en-US.jsonstructure; they'll need real translations later.Written for commit d4705c1. Summary will update on new commits.