Skip to content

Add MaterialCraft catalog migrated from its Rust translation table - #256

Open
MorionTutoriales wants to merge 1 commit into
storytold:mainfrom
MorionTutoriales:feat/materialcraft-catalogs-210
Open

MorionTutoriales wants to merge 1 commit into
storytold:mainfrom
MorionTutoriales:feat/materialcraft-catalogs-210

Conversation

@MorionTutoriales

@MorionTutoriales MorionTutoriales commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Part of storytold/materialcraft#210.

MaterialCraft still uses an Arabic Rust translation table. This PR migrates that snapshot to the shared catalogs as the prerequisite for a separate application runtime cutover.

Changes

  • Add locales/ar/materialcraft.tsv: 351 app rows, with 49 identical existing common rows reused. All 400 original Arabic translations resolve identically.
  • Add tools/export_materialcraft.py and migration instructions. Reuse the accepted Rust-table extraction/parity helpers through optional app and locale parameters; TextureCraft defaults remain unchanged.
  • Add five tests covering app isolation, differing shared overrides, read-only checks, changed/missing translations and real rustc extraction.
  • Record source, licensing, unchanged wording, tooling assistance and native-review status in ATTRIBUTION.md.

Source snapshot: storytold/materialcraft@b73facdc7b8b5ce102cd9e14d964058a15182dc0, MIT OR Apache-2.0.

No common catalog, existing app catalog, application code or CI workflow is changed. English remains source text. The unmerged Hebrew catalog/font PRs storytold/materialcraft#197 and #198 are outside this snapshot; the runtime cutover must resync any locale work merged meanwhile.

Validation

On Windows with Python 3 and Rust 1.99.1:

  • MaterialCraft export --check: all 400 original rows resolve identically at the source SHA.
  • TextureCraft export --check: all 9,099 original translations remain identical with the parameterized helpers.
  • python -m unittest discover -s tools: 46 passed.
  • cargo test --workspace: 49 passed, no failures.
  • cargo fmt --all --check: passed.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.

This PR does not close the MaterialCraft issue. After it is merged, the application PR will pin the actual accepted commit, integrate the runtime and run native, WebAssembly and visual checks. Hosted CI has not been run locally.

Summary by CodeRabbit

  • Documentation

    • Added guidance on the MaterialCraft Arabic catalog migration, including translation parity rules and steps required before a future runtime cutover.
    • Documented the upstream source, available locale, validation commands, and attribution details.
  • Chores

    • Added catalog migration and check support for MaterialCraft.
    • Shared translations are reused when identical, while differing MaterialCraft translations remain as app-specific overrides.
    • Added checks that detect missing or changed translations without modifying catalog files.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The shared catalog exporter now accepts configurable languages, app names, and display names. A new CLI runs the exporter for MaterialCraft’s Arabic catalog. Tests cover overrides, check mode, and Rust extraction. New documentation and attribution record the migration source and validation details.

Changes: MaterialCraft catalog migration

Layer / File(s) Summary
Configurable export and regression coverage
tools/export_texturecraft.py, tools/test_export_materialcraft.py
The exporter accepts language mappings and app-specific catalog settings. Tests check shared-row omission, retained overrides, unchanged files in check mode, translation errors, and Arabic extraction.
MaterialCraft CLI and migration records
tools/export_materialcraft.py, docs/materialcraft-migration.md, ATTRIBUTION.md
The CLI configures the exporter for MaterialCraft and Arabic. The documentation and attribution describe the source revision, catalog handling, and validation requirements.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • storytold/craft-i18n#243: Adds the shared exporter functions that this change extends with language and app configuration.

Suggested reviewers: benandez, fredapps

Merge Risk: Minimal · up to ae1c9

This change adds an Arabic MaterialCraft catalog and migration tooling without changing application code or existing catalogs. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add MaterialCraft catalog migrated from its Rust translation table" matches the main change. The PR adds an Arabic MaterialCraft catalog (locales/ar/materialcraft.tsv, excluded from the sum…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add MaterialCraft catalog migrated from its Rust translation table" matches the main change. The PR adds an Arabic MaterialCraft catalog (locales/ar/materialcraft.tsv, excluded from the summary but described in the objectives) migrated from the Rust translation table, along with the export tooling, documentation, tests, and attribution. The title is specific and concise, and it names the primary change. It does not mention the shared-helper parameter changes, but those are supporting work.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 74e7770 and ae1c994.

Files ignored due to path filters: 1

  • locales/ar/materialcraft.tsv is excluded by !**/*.tsv
Files selected for processing: 5

  • ATTRIBUTION.md
  • docs/materialcraft-migration.md
  • tools/export_materialcraft.py
  • tools/export_texturecraft.py
  • tools/test_export_materialcraft.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

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