Skip to content

Begin Nepali localization - #1205

Closed
AJT14-cmd wants to merge 2 commits into
wordplaydev:mainfrom
AJT14-cmd:nepali-locale
Closed

AJT14-cmd wants to merge 2 commits into
wordplaydev:mainfrom
AJT14-cmd:nepali-locale

Conversation

@AJT14-cmd

Copy link
Copy Markdown
Contributor

Context

Begins the Nepali (ne-NP) localization. The term and token
sections are manually translated. Other entries retain their $?
English fallback text and still require translation and review.

Related issues

  • Related Issue # 1204

Verification

  • Ran Prettier on ne-NP.json
  • Ran the locale verifier
  • All 2,870 unit tests pass

Checklist

  • Translate term and token in ne-NP.json
  • Translate remaining locale sections
  • Translate tutorial
  • Add emoji annotations
  • Translate how-to content

amyjko added a commit that referenced this pull request Jun 29, 2026
First full Claude translation of Nepali: locale strings, complete + quick
tutorials, 27 how-tos, and CLDR-derived emoji names. Validated: $?=0 across
locale and both tutorials, no marker accumulation. Glossary words and embedded
how-to code came back in English (Claude's tendency for Nepali technical
vocabulary, not a pipeline defect) and are left for the human Nepali translator
to refine. (#1204, #1205)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tiaL-ops pushed a commit to tiaL-ops/wordplay that referenced this pull request Jul 2, 2026
…etadata

Make emoji generation part of the translation run, and remove the one-off
LocaleToCLDR map by deriving CLDR annotation codes from canonical language
metadata.

- start.ts now generates a locale's {locale}-emojis.json in-process during a
  translate/override run (best-effort; a CLDR/network failure warns and the run
  continues), so a new/updated locale gets emojis without a separate step.
- Convert scripts/generate-emojis.mjs → src/util/verify-locales/generateEmojis.ts:
  a typed module that imports SupportedLocales + getCLDRCandidates directly
  (no regex-parsing, no hardcoded map), writes via writeFormatted (Prettier-clean,
  write-if-changed), and exports generateEmojisForLocale + a CLI entry.
- LanguageCode.ts: add `cldr` (base override, tl→fil) and `cldrByRegion` (script
  overrides, zh→zh_Hant for TW/HK/MO) to LanguageMetadata, plus getCLDRCandidates
  that derives the per-locale candidate list. This also fixes locales the hand
  map had missed/mistyped (sv-SE, bn-BD, id-ID, ro-RO, pt-PT) which silently fell
  back to English emoji names.
- Enable Nepali (ne-NP) in DraftLocales (wordplaydev#1204/wordplaydev#1205).
- npm: locales-emojis → tsx; delete the old .mjs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@amyjko

amyjko commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this, @AJT14-cmd, and I'm sorry it sat open so long.

Nepali is on the site. It shipped in c946044, with the interface, the tutorials, the how-tos and the emoji names. You started that, and it's live for Nepali readers now.

Because it landed on main separately, this branch can no longer be merged, and I want to be precise about why rather than just closing it:

  • main's ne-NP.json now has about 5,500 strings; this branch has about 3,700, and most of them are still $? — the marker meaning "not translated yet". Merging would replace Nepali text with English placeholders.
  • The branch is also built on an older shape of the files. It still has ui.collaborate.role.collaborators, for example, which main has since renamed to role.collaborate.

Your hand-written translations are not lost. 103 of them are in #1402, with you as co-author. Several fix places where the machine translation had plainly failed — main has been shipping these in the token names that appear all through the editor and the guide:

Path What main shows today What you wrote
token.Function $~function प्रकार्य
token.SetOpen $~set/map खुला समुच्चय खोल्ने
token.EvalOpen $~evaluation खुला मूल्याङ्कन खोल्ने
token.Access $~property पहुँच गुणमा पहुँच

Two things I couldn't carry over, so you know where they went:

  • 50 term.* strings. That section no longer exists in the English source, so there's nowhere in the current files to put them.
  • token.URL and ui.localize.emotion. These had no marker, but the text was still the English. npm run locales flagged both when I first tried to include them — an unmarked English string would ship as though it were Nepali.

If you'd like to keep going, the most useful thing now is review, not translation. Almost all 5,500 Nepali strings are marked $~, meaning a machine wrote them and no person has checked them — and as the table above shows, the machine left English in the middle of Nepali sentences in places. You can edit any string from inside the site at https://wordplay.dev/localize, which opens a pull request for you; there's no need to clone anything or work with git unless you want to. Your token.* fixes are exactly the kind of correction that's needed.

Closing in favour of #1402. Thank you again — and if you'd rather reopen this and bring the branch up to date yourself, say so and I'll leave it to you.

@amyjko amyjko closed this Sep 16, 2026
amyjko added a commit that referenced this pull request Sep 16, 2026
Nepali landed on main in c946044 as a machine translation while #1205 sat
open, so the branch cannot be merged: it is structurally older and mostly `$?`
placeholders, and merging it would replace working Nepali with English. But 103
of its strings were written by hand, and in places where the machine translation
had failed outright — main has been shipping `token.Function` as "$~function",
`token.SetOpen` as "$~set/map खुला" and `token.Access` as "$~property पहुँच",
Latin script and all, in the names Nepali readers see throughout the editor and
the guide.

Those 103 are taken here and #1205 is closed pointing at this. Two further
filters, each of which the verifier or the schema would otherwise have caught:
50 hand-written `term.*` strings are dropped because en-US no longer has that
key, and two unmarked values (`token.URL`, `ui.localize.emotion`) are dropped
because they are still the English — an unmarked English string is what
`checkUntranslated` exists to find, and salvaging one would ship English as
Nepali.

The strings carry no write status, which is what keeps a later translation run
from overwriting a person's work with a machine's.

Co-Authored-By: Anuj Jung Thapa <anujcaeli@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants