feat(storefront): BCTHEME-613 Add translations for consent manager#4
Merged
BC-tymurbiedukhin merged 1 commit intobigcommerce:masterfrom Jun 30, 2021
Merged
Conversation
afbf173 to
ea4f902
Compare
19063f7 to
1109374
Compare
| const categoryPlaceholder = '[CATEGORY_NAME]' | ||
| const replaceWith = (category: string, phrase: string) => | ||
| phrase.replace(categoryPlaceholder, category) | ||
| const categoriesList = { |
There was a problem hiding this comment.
Could you please describe benefits of using this dictionary?
Author
There was a problem hiding this comment.
Only for taking category's names under one roof. So if we need to expand/modify categories in the future, we can look at them in one place and add/change them here without surfing through the file.
As I see you're offering to simplify it and use straightforward from translations like:
replaceWith(
translations.functional_category,
translations.allow_category_tracking
)
correct?
There was a problem hiding this comment.
For now not unified approach is used, for me simplified one (^^) looks better
yurytut1993
approved these changes
Jun 29, 2021
1109374 to
5edeec4
Compare
jairo-bc
approved these changes
Jun 29, 2021
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.
@BC-tymurbiedukhin, @yurytut1993
What?
This PR adds a translated phrases from theme to consent manager. There is also a fallback phrases in EN that will be caught in case there are no translations available. This will enable merchants to use custom phrases/translations (in case they need) for GDPR/CCPA feature we built to help merchants collect data privacy consent from shopper's on the storefront.
Why?
This is done under CEV project. There is also related PR on Cornerstone side that can be checked here and here
Jira tickets can be found here and there
Screenshots
Phrases are using prefix
lang_DE_only as an example for visualization.How can this change be undone in case of failure?
Revert this PR