Added compatibility with WPML - #3007
Open
girishpanchal30 wants to merge 3 commits into
Open
Conversation
Contributor
Bundle Size Diff
|
Contributor
|
Plugin build for 3e548cc is ready 🛎️!
|
Contributor
E2E TestsPlaywright Test Status: See serial and parallel matrix jobs Performance ResultsserverResponse: {"q25":399.72,"q50":416.53,"q75":431.42,"cnt":10}, firstPaint: {"q25":1364.52,"q50":1447.69,"q75":1518.22,"cnt":10}, domContentLoaded: {"q25":3694.38,"q50":3765.62,"q75":3791.93,"cnt":10}, loaded: {"q25":3697.36,"q50":3768.92,"q75":3795.32,"cnt":10}, firstContentfulPaint: {"q25":2123.78,"q50":2437.45,"q75":2782.7,"cnt":10}, firstBlock: {"q25":17602.79,"q50":17693.52,"q75":17822.59,"cnt":10}, type: {"q25":25.13,"q50":29.92,"q75":33.24,"cnt":10}, typeWithoutInspector: {"q25":26.89,"q50":28.83,"q75":31.44,"cnt":10}, typeWithTopToolbar: {"q25":34.77,"q50":38.52,"q75":41.27,"cnt":10}, typeContainer: {"q25":16.36,"q50":16.82,"q75":18.3,"cnt":10}, focus: {"q25":144.82,"q50":147.67,"q75":154.51,"cnt":10}, inserterOpen: {"q25":44.25,"q50":48.06,"q75":49.79,"cnt":10}, inserterSearch: {"q25":29.59,"q50":31.66,"q75":33.09,"cnt":10}, inserterHover: {"q25":5.48,"q50":5.85,"q75":6.23,"cnt":20}, loadPatterns: {"q25":1857.11,"q50":1895.62,"q75":1924.83,"cnt":10}, listViewOpen: {"q25":229.79,"q50":237.39,"q75":250.76,"cnt":10} |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds WPML translation configuration for Otter Blocks and Otter Pro block attributes.
Changes:
- Registers translatable attributes and rendered text for free blocks.
- Adds equivalent configuration for Pro blocks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
wpml-config.xml |
Configures WPML translation extraction for free blocks. |
plugins/otter-pro/wpml-config.xml |
Configures translation extraction for Pro blocks. |
Suppressed comments (3)
wpml-config.xml:57
- The textarea's editable
defaultValueis stored as the textarea text node (form/textarea/block.json:36-39andsave.js:43-45), but this configuration only extracts its placeholder. As a result, translated forms keep the source-language prefilled value.
<xpath>//textarea/@placeholder</xpath>
wpml-config.xml:34
- Image-based icon-list items expose an editable
iconAltand render it as<img alt>(icon-list/item/save.js:32-33), but only the visible item content is registered here. The resulting translated page retains source-language alternative text.
<key name="content" />
<xpath>//p[contains(@class, "wp-block-themeisle-blocks-icon-list-item-content")]</xpath>
wpml-config.xml:68
- The Review block lets authors edit
image.altand the server renderer emits that value (inc/render/class-review-block.php:125-135), but this nested text is not registered. Manual review images will retain source-language alt text after translation.
<key name="description" />
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
wpml-config.xml:105
- WPML normalizes sibling keys into a map keyed by
name, so this lateroptionsentry overwrites the nested declaration above it. Current multiple-choice values are arrays of{ content, isDefault }, which means their labels will not be exposed for translation. Keep only the nested declaration; it already supports extractingcontentfrom each option.
<key name="options" />
Soare-Robert-Daniel
approved these changes
Aug 31, 2026
selul
approved these changes
Sep 1, 2026
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.
Closes #2968
Summary
Added the
wpml-config.xmlfile to make the blocks translatable with WPML. The file contains the necessary configuration for WPML to recognize the blocks and their translatable attributes.Test instructions
Checklist before the final review
Why no test case
As the changes are to make the blocks compatible with WPML, they need to be tested with the WPML plugin installed and activated.