fix: JS translation issue with translation plugins#73
Open
fix: JS translation issue with translation plugins#73
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a JavaScript string translation issue that prevented translation plugins like Loco Translate from discovering and translating JS strings in the Carousel Kit WordPress plugin. It adds the wp-cli/i18n-command tooling and commits a generated .pot file containing all translatable strings from both PHP and compiled JS sources.
Changes:
- Adds
wp-cli/i18n-commandas a Composer dev dependency and apotscript for generating the.potfile - Commits the auto-generated
languages/carousel-kit.potfile containing all translatable strings (PHP and JS) - Updates
composer.lockwith the new dependency and transitive dependency version bumps
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
composer.json |
Adds wp-cli/i18n-command dev dependency and pot composer script for generating the .pot file |
languages/carousel-kit.pot |
New auto-generated POT file with all translatable strings from PHP and compiled JS sources |
composer.lock |
Lock file updated with new WP-CLI packages and transitive dependency version bumps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@mi5t4n can you please rebase with latest develop branch? |
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.
Description
This PR addresses an issue where JavaScript strings weren't being translated.
How
English (UK)by navigating toSettings > General > Language.Translate Locoand change theCarousel Settingstext toCarousel Settings UKfor the plugin.Add new pageand add theCarousel Blockand check it's settings.Before
Kazam_screencast_00001.mp4
After
Kazam_screencast_00000.mp4
Resolves - #72