MERC-7830 region name localization support #140
Merged
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.
Dependencies
data-content-region-translation
attributepaper-handlebars
version to support new data attributepaper
version to support new parsing of region translationstranslation
from theme and generate manifest with new translation data.What? Why?
Region name localization support. This PR is to add
content-region-translation
data attribute if translation is provided in the html handlebars from the theme. This will be used to surface the correct translation on the front end (page builder) for a particular region.How was it tested?
Steps to test
(1) Pull down the
storefront-render
PR and run locally (or can run the container image)(2) Pull down
stencil-cli
PR and create theme with{{{region name="header_bottom" translation="i18n.RegionName.HeaderBottom"}}}
andi18n.RegionName.HeaderBottom
dummy translation withinschema.json
. EXAMPLE PROVIDED BELOW(3) Change store language to non english language (
chinese
andfrench
example provided)(4) Upload test theme, load page builder and load layers pane to see the correct language.
Example Region + Schema.json
Region
{{{region name="header_bottom" translation="i18n.RegionName.HeaderBottom"}}}
Schema.json
cc @bigcommerce/storefront-team