Skip to content

fix: JS translation issue with translation plugins#73

Open
mi5t4n wants to merge 3 commits intodevelopfrom
feature/add-js-translation
Open

fix: JS translation issue with translation plugins#73
mi5t4n wants to merge 3 commits intodevelopfrom
feature/add-js-translation

Conversation

@mi5t4n
Copy link
Member

@mi5t4n mi5t4n commented Mar 6, 2026

Description

This PR addresses an issue where JavaScript strings weren't being translated.

How

  1. Install and activate Loco Translate plugin.
  2. Switch the site’s language to English (UK) by navigating to Settings > General > Language.
  3. Go to the Translate Loco and change the Carousel Settings text to Carousel Settings UK for the plugin.
  4. Go to Add new page and add the Carousel Block and check it's settings.

Before

Kazam_screencast_00001.mp4

After

Kazam_screencast_00000.mp4

Resolves - #72

@mi5t4n mi5t4n self-assigned this Mar 6, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 08:19
@mi5t4n mi5t4n changed the base branch from main to develop March 6, 2026 08:20
@mi5t4n mi5t4n requested review from danish17 and vishal4669 March 6, 2026 08:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-command as a Composer dev dependency and a pot script for generating the .pot file
  • Commits the auto-generated languages/carousel-kit.pot file containing all translatable strings (PHP and JS)
  • Updates composer.lock with 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.

@up1512001
Copy link
Member

@mi5t4n can you please rebase with latest develop branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants