Skip to content

fix(i18n): bring Hebrew (he) locale to full key parity with English#670

Open
yosef-chai wants to merge 1 commit into
fathah:mainfrom
yosef-chai:feat/he-i18n-parity
Open

fix(i18n): bring Hebrew (he) locale to full key parity with English#670
yosef-chai wants to merge 1 commit into
fathah:mainfrom
yosef-chai:feat/he-i18n-parity

Conversation

@yosef-chai

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #530 (which added the Hebrew locale). Since that PR merged, the English source gained new strings that were never added to Hebrew, so the he locale had drifted to 1184/1261 keys — 77 missing. Those keys silently fell back to English for Hebrew users. This PR restores full key parity (1261/1261) and adds a guard so it can't regress.

What changed

1. Translate the 77 missing keys (matching the existing he terminology and second-person-plural register, with placeholders/markup preserved and brand/technical identifiers kept in Latin):

Namespace Keys Area
chat 10 clarify dialog (clarify.*), searchModels, queued-message counters (queuedCount/Attachment/Cancel)
constants 41 AIML API & AtlasCloud providers + the Auxiliary Tasks model-config panel (auxiliary*)
agents 12 profile appearance, danger zone, image upload (editAppearance, dangerZone, deleteProfile*, …)
models 9 model registry browser (registry*, browseRegistry, allProviders)
navigation 2 showRecentSessions / hideRecentSessions
common 2 done, edit
setup / sessions / gateway 1 each localPresets.atlascloud, closeTab, setupFirst

2. Fix a stale brand stringcommon.appName was still "Hermes Agent"; every other locale already uses "Hermes One". Updated to match.
(Note: gateway.subtitle and install.installingHermes intentionally keep "Hermes Agent" because the English source still uses it there.)

3. Add a regression testindex.test.ts now asserts the he locale is at full key parity with en, so future English-side additions that miss Hebrew are caught in CI.

Verification

  • npm run typecheck — passes
  • npm test — passes (incl. the new parity test)
  • npm run lint — 0 errors
  • Locale key count: en 1261 / he 1261, 0 missing, 0 stale

Notes

  • Translation-only change plus one test; no runtime/app code touched.
  • All {{interpolation}} placeholders and inline markup are preserved; RTL marks added where a string begins with a Latin token or {{name}}, consistent with existing he strings.

The he locale drifted behind the English source after fathah#530: 77 keys added
to en were missing in Hebrew, so those strings fell back to English.

- Translate the 77 missing keys, matching the existing he terminology and
  second-person-plural register: chat clarify dialog + queued-message
  counters, model registry browser, profile appearance / danger zone,
  AIML API & AtlasCloud providers, and the auxiliary-task model config.
- Fix a stale brand string: common.appName "Hermes Agent" -> "Hermes One"
  (every other locale already uses "Hermes One").
- Add a regression test asserting he stays at full key parity with en, so
  future drift is caught in CI.

he is now at 1261/1261 keys. Placeholders and inline markup preserved;
brand/technical identifiers kept in Latin. typecheck, lint and tests pass.
@greptile-apps

greptile-apps Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR brings the Hebrew (he) locale from 1184/1261 keys up to full parity with English by adding 77 missing translations across 9 files, corrects the stale common.appName value, and adds a CI regression test that prevents future drift.

  • 77 missing keys added across chat, constants, agents, models, navigation, common, sessions, gateway, and setup namespaces — all interpolation placeholders and markup preserved, RTL marks applied consistently, brand/technical identifiers kept in Latin.
  • common.appName fixed from \"Hermes Agent\" to \"Hermes One\" to match every other locale.
  • Parity test added in index.test.ts that asserts every English key exists in the Hebrew locale, guarding against future omissions in CI.

Confidence Score: 4/5

Translation-only change with no runtime code touched; safe to merge.

All 77 added Hebrew strings have correct key names, preserved interpolation placeholders, and consistent RTL treatment. The one minor gap is that the new parity test only checks English→Hebrew completeness and will not catch stale Hebrew keys that no longer have an English counterpart.

index.test.ts — the parity assertion is one-directional; worth considering adding the reverse check to catch future stale keys.

Important Files Changed

Filename Overview
src/shared/i18n/index.test.ts Adds flattenKeys helper and a one-directional parity test (en→he only); reverse direction (stale he keys) is not covered.
src/shared/i18n/locales/he/agents.ts Adds 14 missing keys (editAppearance, dangerZone, deleteProfile*, uploadImage, etc.); all placeholders and key names match the English source exactly.
src/shared/i18n/locales/he/chat.ts Adds searchModels, the full clarify.* sub-object, and three queued* keys; interpolation placeholders preserved correctly and RTL mark added where appropriate.
src/shared/i18n/locales/he/common.ts Fixes stale appName ("Hermes Agent" → "Hermes One") to match every other locale, and adds done and edit keys.
src/shared/i18n/locales/he/constants.ts Adds 41 missing keys: AIML API provider card, AtlasCloud provider card, and the entire auxiliary* block; consistent with existing Hebrew terminology.
src/shared/i18n/locales/he/models.ts Adds 9 model-registry keys (allProviders, browseRegistry, registry*); RTL mark correctly prepended to registryAdded whose resolved string would begin with a Latin {{name}}.
src/shared/i18n/locales/he/navigation.ts Adds showRecentSessions and hideRecentSessions; translations are direct and consistent with existing sidebar keys.
src/shared/i18n/locales/he/sessions.ts Adds single missing key closeTab; clean and correct.
src/shared/i18n/locales/he/gateway.ts Adds single missing key setupFirst; translation is natural and contextually accurate.
src/shared/i18n/locales/he/setup.ts Adds localPresets.atlascloud: "AtlasCloud"; brand name correctly kept in Latin, matching pattern of all other preset keys.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["index.test.ts\n(new parity test)"] --> B["flattenKeys(resources.en.translation)"]
    A --> C["flattenKeys(resources.he.translation)"]
    B --> D{"en keys ⊆ he keys?"}
    C --> D
    D -- "missing keys found" --> E["Test FAILS ❌\n(CI blocks merge)"]
    D -- "all keys present" --> F["Test PASSES ✅"]

    subgraph "he locale files updated"
        G["common.ts\n+done, +edit\nappName fixed"]
        H["chat.ts\n+searchModels\n+clarify.*\n+queued*"]
        I["constants.ts\n+aimlapi, +atlascloud\n+auxiliary* (31 keys)"]
        J["agents.ts\n+editAppearance\n+dangerZone\n+deleteProfile*"]
        K["models.ts\n+registry* (9 keys)"]
        L["navigation.ts\n+show/hideRecentSessions"]
        M["sessions.ts +closeTab\ngateway.ts +setupFirst\nsetup.ts +atlascloud"]
    end
Loading

Reviews (1): Last reviewed commit: "fix(i18n): bring Hebrew (he) locale to f..." | Re-trigger Greptile

Comment on lines +51 to +59
it("keeps the he locale at full key parity with en", () => {
const enKeys = flattenKeys(
resources.en.translation as Record<string, unknown>,
);
const heKeys = new Set(
flattenKeys(resources.he.translation as Record<string, unknown>),
);
expect(enKeys.filter((key) => !heKeys.has(key))).toEqual([]);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 One-directional parity check

The test only asserts that every en key exists in he, but it does not check the reverse — so stale he-only keys (translations added to Hebrew but later removed from English, or mistakenly named keys) will accumulate silently without being caught. Over time this can lead to dead entries in the Hebrew locale with no CI signal. Adding a reverse check, heKeys.filter(k => !enKeys.has(k)), would catch this class of drift before it compounds.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant