i18n: Add Rust language support - #1031
livecodes-ci[bot] wants to merge 2 commits into
Conversation
Deploying livecodes with
|
| Latest commit: |
d3f06cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8b24e9c7.livecodes.pages.dev |
| Branch Preview URL: | https://i18n-live-codes-rust.livecodes.pages.dev |
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Size Change: 0 B Total Size: 1.13 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Important
This Lokalise pull adds the Rust (Wasm) strings correctly, but the same sync regressed other tooltips: it deletes every zigWasm.* key (and templates.starter.zig-wasm) in all 17 locales, truncates the go.link/java.link "LiveCodes Documentation" + starter-template entries in 11–12 locales, and returns badly mangled markup for three hi/ur strings. These need fixing in Lokalise as well as in the repo, or the next .i18n-update-pull will re-introduce them.
Reviewed changes
rustWasmtranslations added —rustWasm.desc/link/nameandtemplates.starter.rust-wasmadded to all 17 non-English locales; tag sequences matchen[1..10].zigWasmtranslations deleted — allzigWasm.*keys andtemplates.starter.zig-wasmremoved from every locale whileenand the app still define Zig (Wasm).go.link/java.linktruncated — trailing "LiveCodes Documentation" and starter-template entries dropped in most locales.hi/urstrings mangled — pseudo-tags and broken markup incsharpWasm.link,java.link,jinja.link.- Storybook comment stripped —
storybook/solid/src/solid.tsloses aneslint-disabledirective.
⚠️ zigWasm tooltip translations and starter label deleted from every locale
The pull removes zigWasm.desc/zigWasm.link/zigWasm.name from all 17 locales and drops templates.starter.zig-wasm from their translation.lokalise.json/.ts. Zig (Wasm) is still a supported language and en still supplies these strings, so after merge every non-English user loses the translated Zig tooltip (silently falling back to English) and the starter-template label. Since the deletion originates in Lokalise, restoring only the repo files will not stick — the source keys must be kept/re-added there too.
Technical details
# `zigWasm`/`zig-wasm` keys removed from all locales
## Affected sites
- `src/livecodes/i18n/locales/*/language-info.lokalise.json` — `zigWasm.desc|link|name` deleted (17 locales)
- `src/livecodes/i18n/locales/*/language-info.ts` — matching `zigWasm` block deleted (17 locales)
- `src/livecodes/i18n/locales/*/translation.lokalise.json` + `translation.ts` — `templates.starter.zig-wasm` deleted (17 locales)
## Why they must stay
- `src/livecodes/i18n/locales/en/language-info.lokalise.json:1087` and `en/language-info.ts:467` still define `zigWasm`
- `src/livecodes/html/language-info.html:346-350` still renders `language-info:zigWasm.name|desc|link`
- `src/livecodes/languages/languages.ts:158` still registers `zigWasm`
- `src/livecodes/templates/starter/index.ts:126` still registers `zigWasmStarter`
- `src/livecodes/i18n/locales/en/translation.lokalise.json:2843` still defines `templates.starter.zig-wasm`
## Required outcome
- Restore `zigWasm.*` and `templates.starter.zig-wasm` in all 17 locales (or fix the Lokalise key set so the pull stops removing them and then re-pull).
## Open questions for the human
- Is Zig (Wasm) intentionally being retired in favour of Rust? If not, the Lokalise project needs the keys re-added; otherwise every future `.i18n-update-pull` repeats this.openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
| }, | ||
| "csharpWasm.link": { | ||
| "translation": "<tag-1> <tag-2>सी# भाषा दस्तावेज़ीकरण</tag-2> </tag-1> <tag-3> <tag-4>एक्स को वाई मिनटों में सीखें, जहां एक्स=सी#</tag-4> </tag-3> <tag-5> <tag-6>लाइवकोड दस्तावेज़ीकरण</tag-6> </tag-5> <tag-7> <tag-8>स्टार्टर टेम्पलेट लोड करें</tag-8> </tag-7>" | ||
| "translation": "<tag-1> <tag-2> सी# भाषा दस्तावेज़ीकरण </tag-2> टैग-2 </tag-1> <tag-3> <tag-4> एक्स को वाई मिनटों में सीखें, जहां एक्स=सी# </tag-4> > </टैग </tag-3> > <tag-5> <tag-6> लाइवकोड दस्तावेज़ीकरण </tag-6> </ <tag-7> </tag-5> <टैग-7> <tag-8> स्टार्टर टेम्पलेट लोड करें </tag-8> </tag-7>" |
There was a problem hiding this comment.
This string came back from Lokalise with pseudo-tags and broken markup (टैग-2, > </टैग, <टैग-7>), so the C# tooltip renders garbled text and drops links. The numeric open-tag order is unchanged, which is why a sequence-only check misses it.
The same class of corruption also hits hi java.link (line 286) and jinja.link (line 304), plus ur java.link (line 165) and jinja.link (line 175).
Technical details
# Mangled `link` strings in `hi`/`ur`
## Affected sites
- `src/livecodes/i18n/locales/hi/language-info.lokalise.json:136` — `csharpWasm.link`
- `src/livecodes/i18n/locales/hi/language-info.lokalise.json:286` — `java.link`
- `src/livecodes/i18n/locales/hi/language-info.lokalise.json:304` — `jinja.link`
- `src/livecodes/i18n/locales/ur/language-info.lokalise.json:165` — `java.link`
- `src/livecodes/i18n/locales/ur/language-info.lokalise.json:175` — `jinja.link`
- mirror in each sibling `language-info.ts`
## Required outcome
- Each `link` value must keep the same well-formed `<tag-N>...</tag-N>` structure as `en`; `abstractifyHTML` in `src/livecodes/i18n/utils.ts` only matches ASCII `tag-\d+`, so any mangled variant silently drops the corresponding `<li>`/`<a>` and the starter button.
## Suggested approach
- Re-translate / repair in Lokalise (the source of these corrupt strings) and re-pull, then confirm each value against the `en` layout. Editing only the repo files here will be overwritten by the next pull.| }, | ||
| "go.link": { | ||
| "translation": "<tag-1><tag-2>Go Website</tag-2></tag-1> <tag-3><tag-4>Go Dokumentation</tag-4></tag-3> <tag-5> <tag-6>GopherJS Repository</tag-6> </tag-5> <tag-7> <tag-8>Lerne X in Y Minuten, wobei X=Go</tag-8> </tag-7> <tag-9> <tag-10>LiveCodes Dokumentation</tag-10> </tag-9> <tag-11> <tag-12>Starter-Vorlage laden</tag-12> </tag-11>" | ||
| "translation": "<tag-1><tag-2>Go Website</tag-2></tag-1> <tag-3><tag-4>Go Dokumentation</tag-4></tag-3> <tag-5> <tag-6>GopherJS Repository</tag-6> </tag-5> <tag-7> <tag-8>Lerne X in Y Minuten, wobei X=Go</tag-8> </tag-7> <tag-9><tag-10>Starter-Vorlage laden</tag-10></tag-9>" |
There was a problem hiding this comment.
The new go.link stops at <tag-10>, dropping the en trailing <tag-11> <tag-12>LiveCodes Documentation / Load starter template pair (en/language-info.lokalise.json:321). The visible result is that the documentation link disappears and the data-template="go" starter button is not rendered at all.
Technical details
# `go.link` truncated to 10 tags (en has 12)
## Affected sites (17 → 12)
- `ar`, `de`, `es`, `fa`, `fr`, `hi`, `it`, `ja`, `pt`, `ru`, `ur`, `zh-CN` `language-info.lokalise.json` `go.link`
- each sibling `language-info.ts` `go.link`
- okay in `bn`, `hu`, `id`, `nl`, `tr`
## Required outcome
- Restore the two trailing entries (`<tag-11> <tag-12>` → `<li>` + `a[data-template="go"]`) so the docs link and starter button return.
## Suggested approach
- Repair in Lokalise and re-pull; verify every locale's `go.link` tag sequence is `1..12`.| }, | ||
| "java.link": { | ||
| "translation": "<tag-1> <tag-2>Offizielle Java-Website</tag-2> </tag-1> <tag-3> <tag-4> DoppioJVM</tag-4> </tag-3> <tag-5> <tag-6> Lernen Sie X in Y Minuten, wobei X=java</tag-6> </tag-5> <tag-7> <tag-8>LiveCodes Dokumentation</tag-8> </tag-7> <tag-9> <tag-10> Laden Sie die Startvorlage</tag-10> </tag-9>" | ||
| "translation": "<tag-1> <tag-2>Offizielle Java-Website</tag-2> </tag-1> <tag-3> <tag-4> DoppioJVM</tag-4> </tag-3> <tag-5> <tag-6> Lernen Sie X in Y Minuten, wobei X=java</tag-6> </tag-5> <tag-7> <tag-8> Laden Sie die Startvorlage</tag-8> </tag-7>" |
There was a problem hiding this comment.
The new java.link stops at <tag-8>, dropping the en trailing <tag-9> <tag-10>LiveCodes Documentation / Load starter template pair (en/language-info.lokalise.json:381), so the docs link and data-template="java" starter button vanish from the Java tooltip.
Technical details
# `java.link` truncated to 8 tags (en has 10)
## Affected sites (17 → 11)
- `ar`, `de`, `es`, `fr`, `hi`, `it`, `ja`, `pt`, `ru`, `ur`, `zh-CN` `language-info.lokalise.json` `java.link`
- each sibling `language-info.ts` `java.link`
- okay in `bn`, `fa`, `hu`, `id`, `nl`, `tr`
## Required outcome
- Restore the two trailing entries (`<tag-9> <tag-10>`) so the docs link and starter button return.
## Suggested approach
- Repair in Lokalise and re-pull; verify every locale's `java.link` tag sequence is `1..10`.| import type { Component, JSX } from 'solid-js'; | ||
| import { createPlayground } from 'livecodes'; | ||
| // eslint-disable-next-line import/order | ||
There was a problem hiding this comment.
This replaces // eslint-disable-next-line import/order with whitespace — an unrelated artifact of the Lokalise pull. Restore the comment; without it the deliberately ordered type import below trips import/order whenever storybook eslint runs.




What type of PR is this? (check all applicable)
Description
i18n Actions:
.i18n-update-pullLocalization pulled from Lokalise.
i18n/live-codes/rustRelated Tickets & Documents