Add RTL localization skill to themes catalog - #122
Open
kevintann11 wants to merge 2 commits into
Open
Conversation
Adds themes/rtl-localization: a public-facing skill for making a storefront render right-to-left for an RTL-language market (Arabic, Hebrew, Persian, Urdu). It sets dir from the active locale, converts CSS to logical properties, hand-fixes direction-encoding components (carousels, icons, image/text splits, breadcrumbs), and can serve a per-country RTL template via the exposed theme-template and region-rule APIs. Registered in manifest.json with its three reference files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… flow Corrects the skill after review: - Targets file-based themes only (shared layouts/theme.liquid + sections/*), not the API template clone — guessing the surface risked orphan templates. - Layout localization (dir + CSS logical properties on the shared theme) is the invariant that always runs; mirroring never copies sections. - Adds a Phase 0 interactive flow that asks the user same-content-mirrored vs different-content instead of assuming; a variant template is created only when different content is explicitly requested, and it reuses shared sections. - Updates the manifest description to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new RTL localization skill under
themes/for making a Fluid storefront render right-to-left for an RTL-language market (Arabic, Hebrew, Persian/Farsi, Urdu, and other RTL scripts).This complements the existing
translating-theme-languagesskill: that one translates copy, this one handles layout direction.How it works
Approach A — direction-aware, no duplicated markup:
dirfrom the active locale, convert physical CSS to logical properties so the layout mirrors automatically.4-5. Per-country variant (optional) — clone the template and bind it to a country with a region rule.
Everything runs against the exposed public API (
/api/application_theme_templates,/api/theme_region_rules,/api/v2025-06/sitemap) using{{company.api_base}}.Files
themes/rtl-localization/SKILL.mdthemes/rtl-localization/references/direction-map.md— the RTL language setthemes/rtl-localization/references/special-sections.md— exception-component checklist + bidithemes/rtl-localization/references/fluid.md— the exposed API endpoints, params, scopesmanifest.json— registered the skill + its referencesValidation
python3 scripts/validate_catalog.pyandpython3 -m unittest discover -s scripts -p 'test_*.py'both pass locally (43 skills, 7 workflows).🤖 Generated with Claude Code