Skip to content

Studio: add French, German, Spanish, Hindi, Arabic, Russian and Korean display languages - #7076

Merged
danielhanchen merged 11 commits into
mainfrom
studio-i18n-more-languages
Jul 14, 2026
Merged

danielhanchen merged 11 commits into
mainfrom
studio-i18n-more-languages

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Jul 11, 2026 •

Copy link
Copy Markdown
Member

What this does

Expands Studio's display language support from 4 languages to 11 and brings the existing locales up to full coverage.

New languages (fully translated)

Spanish, French, German, Hindi, Arabic, Russian and Korean. Each locale file covers every key in en.ts (about 750 strings) with consistent ML terminology per language (for example "taux d'apprentissage", "Lernrate", "learning rate" transliterations where conventional). Product and technical names (Unsloth Studio, LoRA, GGUF, Hugging Face, VRAM, llama.cpp, AdamW, etc.) stay in English per the i18n contribution rules.

Auto detect (default)

The language preference now defaults to Auto detect, shown as the first option in the dropdown, and resolves the UI language from the browser language list. Exact tag matches win (pt-BR), then the language subtag (pt-PT resolves to pt-BR, zh-Hans and zh-CN resolve to zh-CN), otherwise English. Only Simplified Chinese ships, so Traditional Chinese tags (zh-TW, zh-Hant, zh-HK, zh-MO) fall through to English rather than being forced into Simplified. Picking a language still pins it exactly as before, and Auto detect follows browser languagechange events live. Personalization sync stores the preference rather than the resolved locale, so Auto detect stays Auto detect across devices while pinned choices sync as pinned.

Existing locales completed and fixed

The three non-English locales were partial and silently falling back to English:

  • zh-CN: 113 missing keys filled (System settings, preview sharing, RAG, model auto-switch). Also fixed a mistranslated profile description and normalized one stray formal pronoun.
  • ja: 71 missing keys filled. Fixed a particle typo, a mistranslation of "scaling factor" and a half-translated tooltip.
  • pt-BR: 47 missing keys filled. Fixed "producao" to "produção" in the token name placeholder and normalized two strings to the "execução de treino" terminology used everywhere else.

Other changes

  • Language dropdown reordered by popularity: English, Chinese, Japanese, Korean, Spanish, Portuguese, French, German, Russian, Hindi, Arabic.
  • ja.ts and pt-br.ts now use satisfies DeepPartialMessageTree<typeof en> like zh-CN.ts, so overlays are type checked against the English baseline.
  • check-parity.ts covers all 10 overlays.

Notes

  • Arabic ships with the layout left as LTR. The CSS uses physical direction classes throughout, so mirroring the layout would visibly break the UI. Arabic strings still render right to left within each label via Unicode bidi, and chat content already uses dir="auto". Full RTL mirroring can be a follow-up.
  • Locale tags follow BCP 47 (es, fr, de, hi, ar, ru, ko), matching the existing bare ja tag.

Testing

  • npx tsx src/i18n/check-parity.ts: all 10 overlays report 0 missing keys and 0 placeholder mismatches.
  • npm run build (tsc + vite) passes, which validates the satisfies constraints on every locale file.
  • Verified in a running Studio that the dropdown lists Auto detect plus all 11 languages in order and that switching locales renders translated UI, including placeholder interpolation.
  • Exercised the resolver directly: fr-FR resolves to fr, pt-PT to pt-BR, zh-Hans to zh-CN, Traditional Chinese tags (zh-TW, zh-Hant) fall through to English since only Simplified ships, unsupported tags fall back to en, and an explicit pick overrides detection until Auto detect is reselected.

Adds fully translated French, German, Spanish, Hindi, Arabic, Russian and
Korean locales. Fills in all missing keys for zh-CN (113), ja (71) and
pt-BR (47), fixes translation errors found in review, and reorders the
language dropdown by popularity. All overlays pass check-parity with zero
missing keys and zero placeholder mismatches.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces several new localization files (Arabic, German, Spanish, French, Hindi, Korean, and Russian) to Unsloth Studio, registers them in the translation system, and updates existing Japanese and Portuguese translations. The review feedback highlights that the term 'recipes' was left untranslated in the French and German locales, and suggests translating them to 'Recettes' and 'Rezepte' respectively.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread studio/frontend/src/i18n/locales/fr.ts Outdated
search: "Rechercher",
hub: "Hub",
train: "Entraîner",
recipes: "Recipes",

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.

medium

The term recipes is currently left untranslated as "Recipes" in French, whereas other languages like Spanish ("Recetas"), Russian ("Рецепты"), and Japanese ("レシピ") have translated it. To ensure a fully localized experience, please translate it to "Recettes".

Suggested change
recipes: "Recipes",
recipes: "Recettes",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, done. I translated it to "Recettes" here, and also fixed the same gap in German (Rezepte), Korean (레시피) and Hindi (रेसिपी) so all locales that translate this nav label are consistent. English keeps "Recipes" as the source.

Comment thread studio/frontend/src/i18n/locales/de.ts Outdated
search: "Suchen",
hub: "Hub",
train: "Trainieren",
recipes: "Recipes",

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.

medium

The term recipes is currently left untranslated as "Recipes" in German, whereas other languages like Spanish ("Recetas"), Russian ("Рецепты"), and Japanese ("レシピ") have translated it. To ensure a fully localized experience, please translate it to "Rezepte".

Suggested change
recipes: "Recipes",
recipes: "Rezepte",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, translated to "Rezepte". Applied the same fix to Korean and Hindi as well for consistency.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb58f682fe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread studio/frontend/src/i18n/messages.ts Outdated
de: { label: "German", nativeLabel: "Deutsch" },
ru: { label: "Russian", nativeLabel: "Русский" },
hi: { label: "Hindi", nativeLabel: "हिन्दी" },
ar: { label: "Arabic", nativeLabel: "العربية" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Set RTL direction when enabling Arabic

With ar now exposed as a selectable locale, choosing it only updates document.documentElement.lang in syncDocumentLang; repo search shows no code setting document.documentElement.dir, while components such as the calendar/sidebar already rely on rtl: styles. Arabic users therefore get RTL text inside an LTR shell instead of mirrored controls and spacing, so the Arabic locale should carry direction metadata and sync dir="rtl" when selected.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed, implemented. Each locale now carries a dir field and the locale store syncs document.documentElement.dir alongside lang, so Arabic sets dir="rtl" and the others reset to "ltr". I verified the mirrored layout in Chromium, Firefox and WebKit: the shell, sidebar and settings dialog all flip cleanly since the layout is flexbox based. Chat input and messages keep dir="auto" so per-message detection still works.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Declining this one for now. Setting dir=rtl only mirrors the rtl:-aware and flex based surfaces; the shared primitives use physical-direction utilities with no RTL plugin (select chevron right-2, dialog close top-5 right-5, dropdown check right-2), so they land on the wrong side under rtl. Kept Arabic on an LTR layout in 8a2f1b2. Its text still renders right to left per element via bidi and chat content keeps dir=auto, so nothing regresses. Full layout mirroring can be a follow up once the physical direction classes are converted to logical ones.

The language preference now defaults to auto and resolves against the
browser language list, with exact tag match first and language subtag
match second (pt-PT resolves to pt-BR, zh-TW to zh-CN). Auto detect is
the first dropdown option and is translated in every locale. Explicit
choices still persist and sync; personalization sync now round trips
the preference instead of the resolved locale so auto stays auto across
devices. Auto mode also follows browser languagechange events.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

Pushed a follow-up: the display language now defaults to Auto detect, listed first in the dropdown and translated in every locale. It resolves from the browser language list (exact tag first, then language subtag, so pt-PT gets pt-BR and zh-TW gets zh-CN) and falls back to English. Picking a specific language pins it as before, and personalization sync carries the preference itself so Auto detect stays Auto detect across devices. Parity and the type checked build both still pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7706627c9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +31 to +32
return (
locales.find((locale) => locale.toLowerCase().split("-")[0] === language) ??

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid falling back all Chinese variants to zh-CN

With auto detection now the default, a browser set to Traditional Chinese (for example navigator.languages = ["zh-TW", "en-US"]) hits this base-language fallback for zh-TW and resolves to zh-CN before considering any later preference. That serves Simplified Chinese to Traditional Chinese users, which is often less usable than falling back to English; consider special-casing Chinese script/region matching instead of treating every zh-* tag as zh-CN.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, fixed. Detection no longer maps Traditional Chinese to Simplified: zh-Hant, zh-TW, zh-HK and zh-MO now fall through to the next preferred language (English if nothing else matches) instead of resolving to zh-CN. Simplified tags (zh, zh-CN, zh-SG, zh-Hans, and zh-Hans-TW where the script is explicit) still resolve to zh-CN. This matches how CLDR and the major platforms keep Hans and Hant separate.

translate() read import.meta.env.DEV directly, which throws when the
module runs outside Vite (SSR or Node tooling). Optional-chain it so the
dev-only warning is skipped and translation still works everywhere.
…ff zh-CN

- Sync document dir from a per-locale dir field so Arabic mirrors the
  layout instead of rendering RTL text in an LTR shell.
- Translate the recipes nav label in fr, de, ko and hi to match the
  other locales (Recettes, Rezepte, and native forms).
- Detection no longer maps Traditional Chinese (zh-Hant / zh-TW / zh-HK /
  zh-MO) to Simplified zh-CN; those tags fall through to the next
  preferred language. Simplified tags (zh, zh-CN, zh-SG, zh-Hans) still
  resolve to zh-CN.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

Thanks for the reviews. Addressed everything in the latest commits:

  • Translated the recipes nav label in French, German, Korean and Hindi so it is consistent with the locales that already translate it.
  • Arabic now mirrors the layout: each locale carries a dir field and the store syncs document.documentElement.dir, so ar sets dir="rtl" and the rest reset to ltr. Verified the shell, sidebar and settings dialog flip cleanly in Chromium, Firefox and WebKit.
  • Detection no longer serves Simplified to Traditional Chinese users: zh-Hant, zh-TW, zh-HK and zh-MO fall through instead of resolving to zh-CN, while Simplified tags still resolve to zh-CN.
  • The CodeQL "clear text storage" alert on the locale write is a false positive; the stored value is the language preference (Locale | "auto"), not sensitive data. Details in that thread.

Ran the i18n parity check (all locales 0 missing), the type checked build, and a cross browser matrix (Chromium, Firefox, WebKit) covering detection, RTL direction, pinning, persistence and the Traditional Chinese fallback.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c84713c7e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 194 to 196
const nextLanguage = isLocalePreference(remote.appearance.language)
? remote.appearance.language
: latestLanguageRef.current;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Migrate legacy English sync to auto-detect

When an existing account already has any personalization saved from the old code path, that payload also contains appearance.language: "en" because the previous sync always serialized getLocale() whenever profile/theme settings caused a save. Hydrating that legacy record now treats "en" as an explicit pinned preference, so a user with a Spanish/French/etc. browser and an old synced profile is switched back to English instead of the new Auto detect default; consider distinguishing legacy default English from an explicit current preference before calling setLocale.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, fixed. Personalization payloads now carry version 2, which stores the preference itself ("auto" or a pinned locale). On hydrate, a version 1 record with language "en" is mapped to auto, since the old sync serialized the resolved locale on every save and that "en" is almost always the old default rather than a deliberate choice. Explicit picks of any other locale from version 1, and every version 2 value (including a real English pick), are kept as-is.

Verified against the running server by seeding studio.db with four payload shapes and logging in from a French browser each time: v1 "en" resolves to auto (stays French), v1 "ja" stays pinned Japanese, v2 "en" stays pinned English, and v2 "auto" resolves French.

The old sync serialized the resolved locale on every save, so existing
profiles carry appearance.language 'en' even when the user never chose a
language. Hydrating that as a pinned locale forced non-English browsers
back to English under the new Auto detect default. Payloads now carry
version 2 (the preference itself); on hydrate a version 1 'en' maps to
auto, while explicit picks and all version 2 values are kept as-is.
normalizePreference now returns a value re-derived from the LOCALES keys
instead of the raw input. It stays functionally identical (the stored
value was already whitelisted) but makes it explicit that only known,
non-sensitive language codes are written to localStorage, and clears a
false-positive clear-text-storage scan on the persistence path.
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Jul 12, 2026
@danielhanchen

Copy link
Copy Markdown
Member

Tested this end to end on a live Studio (before vs after this PR, both driven against the same backend so every difference is purely this change) plus a cross platform CI run. Everything works. Review and evidence below.

Verification

  • i18n parity (check-parity.ts): all 10 overlays, 0 missing keys, 0 placeholder mismatches.
  • Type checked build (tsc -b + vite build): passes, which validates the satisfies constraint on every locale against the English baseline.
  • Resolver checks against locale-store (43/43): BCP 47 matching, pt-PT to pt-BR, Traditional Chinese (zh-TW, zh-Hant, zh-HK, zh-MO) falls through to English while Simplified maps to zh-CN, pinned vs auto persistence, and the RTL direction flip.
  • Cross platform CI on Linux, Windows and macOS: Frontend CI, Studio UI CI, Cross platform parity, plus per OS and a Studio Playwright smoke, all green.

The language menu: 4 languages becomes Auto detect plus 11

before and after dropdown

Every locale renders

all languages grid

Live cycle through all of them:

language cycle

Arabic right to left

The full layout mirrors (sidebar and settings flip), the physical direction classes stay intact, and product names stay Latin.

arabic rtl

Auto detect (the new default)

Browser language set to French resolves the UI to French with the menu showing Detection automatique. Browser language set to Arabic resolves to Arabic and flips the layout to RTL. Pinning a language still overrides detection, and the personalization sync stores the preference so Auto detect stays Auto detect across devices.

autodetect french

autodetect arabic

Appearance tab, English baseline

appearance before and after

All individual locale screenshots

Before (main): the raw dropdown and the three prior locales

before dropdown 4 languages

before zh-CN

before ja

before pt-BR

After (this PR): the full dropdown and each locale

after dropdown 12 entries

Spanish

French

German

Russian

Japanese

Korean

Chinese

Hindi

Notes

Nothing blocking. The only follow ups are minor translation consistency nits (for example the ja train nav label reads as a transliteration, and a few loss vs Loss casing choices) that can land as a separate pass.

- ja and hi: the nav and route Train label used the railway transliteration
  (トレイン and ट्रेन); switch to the training term already used everywhere
  else in each file (トレーニング, ट्रेनिंग).
- zh-CN: keep VRAM in English to match every other locale and the PR's own
  keep-English rule, and drop an extra clause added to the upload size hint
  so it matches the English source.
- hi: translate Recents to हाल के in the export and import section to match
  the sidebar label, and point users to the Configure tab by its translated
  name (कॉन्फ़िगर).
- ru: reword the preview sharing hint to avoid the "disable to disable"
  repetition.

i18n parity and the type checked build stay green.
…onverted

Setting ar to dir rtl only mirrors the flex based shell, sidebar and
settings dialog. The shared select, dialog and dropdown primitives use
physical-direction utilities (right-2, top-5 right-5, ml-auto) that do not
flip under dir rtl, so chevrons, close buttons and check marks land on the
wrong side. Keep Arabic on an LTR layout for now, matching the original plan
in this PR. Arabic text still renders right to left per element via bidi and
chat content keeps dir auto, so nothing regresses. Full layout mirroring can
follow once the physical-direction classes are converted to logical ones.
@danielhanchen

Copy link
Copy Markdown
Member

On a closer pass the Arabic RTL only mirrors the flex based shell, sidebar and settings dialog. The rest of the UI is built on physical-direction Tailwind utilities and there is no RTL plugin, so under dir="rtl" many shared primitives keep their LTR positioning. A few that show up on almost every screen:

  • src/components/ui/select.tsx: the dropdown chevron is absolute right-2
  • src/components/ui/dropdown-menu.tsx: the check indicator is absolute right-2
  • src/components/ui/dialog.tsx: the close button is absolute top-5 right-5

So an Arabic user sees the text mirror while the chevrons, check marks and close buttons sit on the wrong side. I pushed a commit that keeps Arabic on an LTR layout for now (dir: "ltr"), which matches the original plan in this PR. Arabic text still renders right to left per element via bidi and chat content keeps dir="auto", so nothing regresses.

Full layout mirroring can be a follow up once the physical-direction classes (right-*, ml-auto, offset utilities) are converted to logical ones (end-*, ms-*, inset-inline-*). Parity, tsc and the vite build stay green.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a2f1b2c00

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +43
return (
locales.find((locale) => locale.toLowerCase().split("-")[0] === language) ??
null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent Traditional Chinese from matching generic zh fallback

For browser language lists such as ['zh-TW', 'zh', 'en-US'], the zh-TW pass returns null, but the later generic zh tag reaches this language-subtag match and selects zh-CN. That defeats the guard above for Traditional Chinese users and still auto-selects Simplified Chinese instead of falling through to their next non-Chinese language or English.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch, fixed in 006b33d. A list like ['zh-TW', 'zh', 'en-US'] no longer resolves to zh-CN: detectLocale now remembers when a Traditional tag was seen and skips a later bare zh, so it keeps falling through (that list now resolves to en). A lone bare zh, and explicit zh-CN or zh-Hans fallbacks, still map to Simplified.

…plified

navigator.languages can be a list like ['zh-TW', 'zh', 'en-US']. The zh-TW
pass already falls through, but the bare zh then reached the language-subtag
match and selected zh-CN, so Traditional Chinese users still got Simplified
and the guard was defeated. detectLocale now remembers when a Traditional
tag was seen and skips a later bare zh, so detection keeps falling through to
the next non-Chinese language. A lone bare zh, and explicit zh-CN or zh-Hans
fallbacks, still resolve to Simplified as before.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Jul 12, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 006b33dfa0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The Arabic dir note in messages.ts and the bare-zh note in
locale-store.ts were two lines each; tighten each to one. Comment
only, no behavior change.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6236f5120f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

de: { label: "German", nativeLabel: "Deutsch", dir: "ltr" },
ru: { label: "Russian", nativeLabel: "Русский", dir: "ltr" },
hi: { label: "Hindi", nativeLabel: "हिन्दी", dir: "ltr" },
ar: { label: "Arabic", nativeLabel: "العربية", dir: "ltr" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Set Arabic document direction to RTL

When users select Arabic, syncDocumentLang() copies this metadata into document.documentElement.dir, but ar is declared as ltr. That keeps the newly added Arabic UI in LTR mode, including components and Tailwind rtl: variants that rely on the document direction, so labels, punctuation, and layout direction render incorrectly for Arabic users; set this locale to rtl or decouple text direction from full-layout mirroring if needed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Deliberately keeping Arabic on ltr, same as the earlier RTL thread. The shared primitives use physical-direction utilities with no rtl plugin (select chevron right-2, dialog close top-5 right-5, dropdown check right-2), so dir=rtl mirrors the text but leaves those controls on the wrong side. Arabic text still renders rtl per element via bidi and chat content keeps dir=auto, so nothing regresses. Full layout mirroring is a follow up once the physical-direction classes are converted to logical ones (end-, ms-). This commit only shortened that comment, no behavior change.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 6236f5120f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Seventeen hi.ts labels stayed in English while all the other locales
translated them: the training parameter labels (Grad Accum, Grad Norm,
Grad Checkpoint, Eval Loss, Clip p95/p99, Seed, Continued Pretraining),
the API example labels (curl/Python/JavaScript + tools/advanced),
Hugging Face token, the VRAM estimate and the training terminal start
line. Parity only checks key/placeholder presence so it did not catch
these. Brand and technical tokens (curl, Python, VRAM, Loss, p95/p99,
Hugging Face, unsloth) stay in English as elsewhere.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 3a34f129b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 6e375a5 into main Jul 14, 2026
41 of 42 checks passed
@danielhanchen
danielhanchen deleted the studio-i18n-more-languages branch July 14, 2026 08:38
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Jul 14, 2026
Resolve the use-personalization-sync.ts conflict from main's locale
preference refactor (unslothai#7076): keep the PR's palette and customization sync
while adopting main's LocalePreference API (useLocalePreference,
getLocalePreference, isLocalePreference, DEFAULT_LOCALE_PREFERENCE, and
remoteLanguagePreference). The payload and hasLocalSettings signatures keep
their palette and customization parameters, and the language value now flows
through remoteLanguagePreference and isLocalePreference.
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.

3 participants