Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,32 @@
8. Exchange with translators: an XLSX workbook, CSV files or XLIFF 1.2 and 2.0 files, exported with a choice of tables, languages, and all entries or only missing or outdated ones. Keys are written `Shop.Purchase`, so renaming a file or sheet changes nothing.
9. Imports that change translations only, never keys: a preview lists every new, updated, outdated, confirmed and rejected text before anything is written, each compiled like the files, and the whole import is one step Undo can take back. The source text in the file becomes the fingerprint, so a translation of an older text arrives outdated.
10. An LLM handoff: missing or outdated entries copied as a text bundle with rules for the model, its plural forms included, and the model's reply imported from the clipboard, with no API keys.
11. Bindings that update text on every language switch without allocating, and messages that are formatted again only when their arguments change.
12. Live reload: saving a table file updates bound text at once, in Play Mode and Edit Mode.
13. A Scene view overlay that picks the preview language. Components preview their text live in Edit Mode through `EditModePreview`, and scenes and prefabs always save the text they were authored with.
14. Rename, move and delete entries across every language at once. Moved entries keep working through `@formerly Table.Entry`, at runtime and in generated code.
15. Tables loaded on demand: `@loading OnDemand` tables stay in memory only while bindings or `HoldTable` handles use them, and follow every language switch while they do.
16. Streaming delivery: `@delivery Streaming` tables ship in StreamingAssets and load without blocking the main thread, through UnityWebRequest on Android and WebGL.
17. Fan translations and mods: `FolderTableSource` compiles `.lang` files from a folder at runtime, `RegisterLanguage` adds new languages, and sources asked first patch shipped languages entry by entry.
18. Plural rules and number formats for every CLDR 48 locale, built in without `CultureInfo`, with digits and separators each language can override.
19. Fallback languages loaded only for tables a translation leaves gaps in, so a complete translation costs no extra memory.
20. `ReactiveText` for view models and data binding, and `BindCharacters` for text that updates without allocating, such as TextMeshPro's.
21. Import checks that report problems at their line and column, check every translation against its source text and the plural forms of its language, and suggest the key an orphan most likely meant.
22. *Show source change* finds the source text an outdated translation was made from in git, and marks the words that changed.
23. One canonical layout for table files, written by every tool, with keys in natural order, such as `Line9` before `Line10`.
24. Creating a catalog asks for its source language and culture, and checks the culture against CLDR.
25. Lock-free lookups from any thread, with language switches applied all at once on the main thread, and rapid switches sharing what they load.
26. Missing keys shown as `[Table.Key]` in every build and reported once, and failures that never throw into game code.
27. Unity integration: `UnityHost`, tables packed into builds, the editor reading table files directly, and `EntryReference` and `CatalogReference` Inspector fields.
28. Quick Start and TextMeshPro samples, the TextMeshPro component previewing its text in Edit Mode.
11. Pseudo-localization: a `Pseudo` language made from the source text, accented, a third longer and bracketed, so hardcoded text, truncation and overflow show before any translation exists. The editor previews it, Play Mode and development builds list it, and release builds never ship it.
12. Character sets, `Tools/ReactiveLocalizer/Character Sets`: every character a language can show, the fallback text of missing entries and number symbols included, copied or saved for TextMeshPro's Font Asset Creator.
13. Bindings that update text on every language switch without allocating, and messages that are formatted again only when their arguments change.
14. Live reload: saving a table file updates bound text at once, in Play Mode and Edit Mode.
15. A Scene view overlay that picks the preview language. Components preview their text live in Edit Mode through `EditModePreview`, and scenes and prefabs always save the text they were authored with.
16. Rename, move and delete entries across every language at once. Moved entries keep working through `@formerly Table.Entry`, at runtime and in generated code.
17. Tables loaded on demand: `@loading OnDemand` tables stay in memory only while bindings or `HoldTable` handles use them, and follow every language switch while they do.
18. Streaming delivery: `@delivery Streaming` tables ship in StreamingAssets and load without blocking the main thread, through UnityWebRequest on Android and WebGL.
19. Fan translations and mods: `FolderTableSource` compiles `.lang` files from a folder at runtime, `RegisterLanguage` adds new languages, and sources asked first patch shipped languages entry by entry.
20. Plural rules and number formats for every CLDR 48 locale, built in without `CultureInfo`, with digits and separators each language can override.
21. Fallback languages loaded only for tables a translation leaves gaps in, so a complete translation costs no extra memory.
22. `ReactiveText` for view models and data binding, and `BindCharacters` for text that updates without allocating, such as TextMeshPro's.
23. Import checks that report problems at their line and column, check every translation against its source text and the plural forms of its language, and suggest the key an orphan most likely meant.
24. *Show source change* finds the source text an outdated translation was made from in git, and marks the words that changed.
25. One canonical layout for table files, written by every tool, with keys in natural order, such as `Line9` before `Line10`.
26. Creating a catalog asks for its source language and culture, and checks the culture against CLDR.
27. Lock-free lookups from any thread, with language switches applied all at once on the main thread, and rapid switches sharing what they load.
28. Missing keys shown as `[Table.Key]` in every build and reported once, and failures that never throw into game code.
29. Unity integration: `UnityHost`, tables packed into builds, the editor reading table files directly, and `EntryReference` and `CatalogReference` Inspector fields.
30. Quick Start and TextMeshPro samples, the TextMeshPro component previewing its text in Edit Mode.

### Known issues

1. Pseudo-localization, character sets and the remaining samples, Google Sheets sync among them, aren't available yet.
1. The remaining samples, the TextMeshPro font coverage check and Google Sheets sync among them, aren't available yet.
2. Undo keeps whole copies of the table files each edit changes, so many edits of one very large table take a lot of memory.
3. Spreadsheet applications take CSV texts starting with = for formulas, so exchange XLSX with spreadsheets; formula errors in an imported CSV are rejected.
4. XLIFF 1.2 can't hold control characters, so entries with one are left out of it and reported; XLIFF 2.0 and XLSX keep them.
5. Tables delivered by custom sources, such as Addressables, have no pseudo version, so pseudo-localization shows their source text.
6. Character sets can't know text that arguments bring at runtime, such as player names; the window adds printable ASCII or extra characters for it.
24 changes: 16 additions & 8 deletions Concept/ReactiveLocalizer (design specification).md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Purchase [3fa2c1] = Купить

### 12.5 Scene view overlay

The overlay switches the preview language, and every bound text in the open scenes updates live in Edit Mode. Entry field previews and the table window's preview use the same language.
The overlay switches the preview language, the pseudo language included (section 14), and every bound text in the open scenes updates live in Edit Mode. Entry field previews and the table window's preview use the same language.

1. **Components opt in through `EditModePreview`.** Outside Play Mode it hands out one localizer per catalog in the preview language. It falls back to the catalog's source language when the catalog lacks that one. Those localizers are disposed before Play Mode and before scripts reload.
2. **Preview text is never saved.** A component showing it registers with `EditModePreview.Track`. Before its scene or prefab saves, the component puts its authored text back, and it shows the preview again right after. Text typed over the preview counts as the new authored text.
Expand All @@ -410,7 +410,7 @@ The overlay switches the preview language, and every bound text in the open scen
### 12.6 Menus

1. `Window/ReactiveLocalizer/Tables`, whose *Exchange* menu exports the open table or the whole catalog and imports files and replies.
2. `Tools/ReactiveLocalizer/…`: *Validate*, *Export…*, *Import File…*, *Import Folder…*, *Import LLM Reply*, and in later steps character sets and the agent guide.
2. `Tools/ReactiveLocalizer/…`: *Validate*, *Export…*, *Import File…*, *Import Folder…*, *Import LLM Reply*, *Character Sets…*, and in a later step the agent guide.
3. `Assets/Create/ReactiveLocalizer/…` (catalog, table). Creating a catalog asks for its name, source language, culture and display name, and checks the culture against CLDR. Creating the first table of a project without a catalog asks the same first.

## 13. Exchange formats
Expand Down Expand Up @@ -447,11 +447,18 @@ The overlay switches the preview language, and every bound text in the open scen

## 14. Developer tools

1. **Pseudo-localization:** a virtual language generated on the fly from the source text and never stored in files.
1. It's accented so hardcoded strings stand out, padded by about 35% so overflow shows up, and bracketed so truncation and glued-together strings are obvious.
2. ICU syntax, rich text tags and escapes stay intact.
3. It's available in the editor preview and in development builds, and excluded from release builds.
2. **Character sets:** for each language, the exact set of characters any table can display (literal text, plural forms, number symbols, digits, without rich text tags). They're exported to a file or the clipboard for TextMeshPro's Font Asset Creator.
1. **Pseudo-localization:** a virtual language named `Pseudo`, made from the source text and never stored in files.
1. It's accented so hardcoded strings stand out, padded by about 35% with words so overflow shows up, and bracketed so truncation and glued-together strings are obvious: `Buy now` shows as `[Bûý ñöŵ one]`.
2. ICU syntax, rich text tags and escapes stay intact. The accented letters all come from Latin-1 and Latin Extended-A, which nearly every font has, so letters without such a form stay plain, and so do other scripts, which still get the padding and brackets.
3. It writes and counts like the source language, whose culture and number symbols it takes, and falls back to it.
4. Each table's pseudo text is compiled as a translation of its source-language file, so the same checks prove it keeps every argument, and it has every key and alias.
5. The editor's preview always offers it. Play Mode and development builds have it as one more language of every catalog, so a language picker lists it, unless the project settings turn that off. Release builds never have it.
6. A catalog that defines a language named `Pseudo` itself keeps that language and gets no pseudo language.
7. Tables delivered by a custom source, such as Addressables, have no pseudo version, so they show their source text.
2. **Character sets** (`Tools/ReactiveLocalizer/Character Sets…`): for each language, the exact set of characters any table can display.
1. That's the language's own text, the fallback text its missing entries show, every plural and select form, its digits and number symbols, without rich text tags or control and formatting characters. Argument names and select keywords never show, so they don't count.
2. Picking several languages gives the set a font they share needs. Printable ASCII and extra characters can be added for text that arguments bring at runtime, such as player names.
3. The set is copied to the clipboard or saved as a text file in code point order, for the *Custom Characters* or *Characters from File* options of TextMeshPro's Font Asset Creator. `CharacterSets.Collect` is the editor API behind it.
3. **Font coverage check** (TextMeshPro sample): lists every character a language's assigned font would render as an empty box.

## 15. Samples
Expand Down Expand Up @@ -493,7 +500,8 @@ Each sample is a thin adapter with its own folder and asmdef. Code that integrat
| Runtime languages | `RegisterLanguage` |
| Table sources | `EmbeddedTableSource`, `StreamingTableSource`, `FolderTableSource`, and in samples `AddressablesTableSource` |
| Inspector fields | `EntryReference`, `CatalogReference`, `[EntryCatalog(typeof(...))]` |
| Editor authoring API | `EntryAuthoring` |
| Editor authoring API | `EntryAuthoring`, `CharacterSets` |
| Developer tools (authoring) | `PseudoLocalization`, `CharacterSet` |
| Exchange (authoring) | `ExportBook`, `CsvExchange`, `XlsxExchange`, `XliffExchange`, `LlmHandoff`, `ImportedFile`, `ImportPlanner`, `ImportPlan` |
| Generated code | `LocalizationKeys`, `LocalizationLanguages` |
| Sample access point | `GlobalLocalizer.Instance` |
Expand Down
Loading
Loading