This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Correctly load JS translations from WC core #5910
Merged
Merged
Conversation
This file contains 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
Aljullu
added
type: bug
The issue/PR concerns a confirmed bug.
focus: i18n
The issue/PR is related to internationalization.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
labels
Feb 21, 2022
rubikuserbot
requested review from
a team and
frontdevde
and removed request for
a team
February 21, 2022 15:41
Since this is Cart & Checkout related, I assigned it to you (@mikejolley) for review. Hope you don't mind. 🙂 |
Size Change: -1.78 kB (0%) Total Size: 815 kB
ℹ️ View Unchanged
|
mikejolley
approved these changes
Feb 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Aljullu Code looks good but there was an issue causing translations not to work because the scripts were output too early. I added the wp-i18n
dependency which fixed it.
tarhi-saad
pushed a commit
that referenced
this pull request
Feb 26, 2022
* Correctly load JS translations from WC core * Needs wp-i18n dependency to load later Co-authored-by: Mike Jolley <[email protected]>
This was referenced Mar 1, 2022
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: i18n
The issue/PR is related to internationalization.
type: bug
The issue/PR concerns a confirmed bug.
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.
While doing some testing, I noticed translations of JS files were not correctly loaded in some locales. The locale needed to have the strings translated in WC core but not in WC Blocks.
Manual Testing
/wp-admin/options-general.php
) and select a language which has WC core translation at 100% but WC Blocks' at 0%. (I tested withCatalà
)./wp-admin/update-core.php
), scroll down and update the language translations.Deutsch
,Español
orFrançais
) and verify translations are still loaded correctly (you will need to go to the updates screen again).Changelog