Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "smartling/wordpress-connector",
"license": "GPL-2.0-or-later",
"version": "3.9.15",
"version": "3.9.16",
"description": "",
"type": "wordpress-plugin",
"repositories": [
Expand Down
132 changes: 118 additions & 14 deletions inc/config/media-attachment-rules.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,55 @@
parameters:
known.attachment.rules: #built-in wordpress and Smartling-specific
- "@image.id.related.attachment"
- "@image.id.related.content"
- "@media-text.media-id.related.attachment"
- "@smartling.lock.id.copy"
- "@acf.editor.mode"
- "@acf.name"
- "@wordpress.editor.mode"
- "@image.align"
- "@image.height"
- "@image.id"
- "@image.id.related.content"
- "@image.lightbox"
- "@image.link.destination"
- "@image.scale"
- "@image.size.slug"
- "@image.width"
- "@media-text.media-id"
- "@smartling.lock.id"
- "@wordpress.background.color"
- "@wordpress.class.name"
- "@wordpress.font.size"
- "@wordpress.layout"
- "@wordpress.style"
- "@wordpress.width"

services:
image.id.related.attachment:
acf.editor.mode:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "acf/.+"
- "mode"
- "copy"

acf.name:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "acf/.+"
- "name"
- "copy"

image.align:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "align"
- "copy"

image.height:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "height"
- "copy"

image.id:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
Expand All @@ -22,30 +63,93 @@ services:
- ""
- "coreImage"

media-text.media-id.related.attachment:
image.lightbox:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "lightbox"
- "copy"

image.link.destination:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "linkDestination"
- "copy"

image.scale:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "scale"
- "copy"

image.size.slug:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "sizeSlug"
- "copy"

image.width:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/image"
- "width"
- "copy"

media-text.media-id:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/media-text"
- "mediaId"
- "related|attachment"

smartling.lock.id.copy:
smartling.lock.id:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- ".+"
- "smartlingLockId"
- "copy"

acf.name:
wordpress.background.color:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "acf/.+"
- "name"
- "core/.+"
- "backgroundColor"
- "copy"

wordpress.editor.mode:
wordpress.class.name:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "acf/.+"
- "mode"
- "core/.+"
- "className"
- "copy"

wordpress.font.size:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/.+"
- "fontSize"
- "copy"

wordpress.layout:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/.+"
- "layout"
- "copy"

wordpress.style:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/.+"
- "style"
- "copy"

wordpress.width:
class: Smartling\Helpers\GutenbergReplacementRule
arguments:
- "core/.+"
- "width"
- "copy"
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: translation, localization, localisation, translate, multilingual, smartlin
Requires at least: 5.5
Tested up to: 6.6.2
Requires PHP: 8.0
Stable tag: 3.9.15
Stable tag: 3.9.16
License: GPLv2 or later

Translate content in WordPress quickly and seamlessly with Smartling, the industry-leading Translation Management System.
Expand Down Expand Up @@ -62,6 +62,9 @@ Additional information on the Smartling Connector for WordPress can be found [he
3. Track translation status within WordPress from the Submissions Board. View overall progress of submitted translation requests as well as resend updated content.

== Changelog ==
= 3.9.16 =
* Exclude WordPress built in style editor strings from translation

= 3.9.15 =
* Add expert setting to skip ACF filter `acf_parse_save_blocks` removal. Defaults to on.

Expand Down
2 changes: 1 addition & 1 deletion smartling-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Smartling Connector
* Plugin URI: https://www.smartling.com/products/automate/integrations/wordpress/
* Description: Integrate your WordPress site with Smartling to upload your content and download translations.
* Version: 3.9.15
* Version: 3.9.16
* Author: Smartling
* Author URI: https://www.smartling.com
* License: GPL-2.0+
Expand Down
32 changes: 16 additions & 16 deletions tests/IntegrationTests/testdata/wp-690-expected.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- wp:te/container {"style":"[ú~k-s~éctí~óñ-~prím~árý]","divider":"4","backgroundId":31468,"backgroundUrl":"https://www.example.com/wp-content/uploads/2021/11/1.jpg","backgroundStyle":"[ú~k-sé~ctíó~ñ-bá~ckgr~óúñd~-ímá~gé-l~íght]"} -->
<section class="wp-block-te-container uk-section uk-section-primary uk-position-relative te-divider-gradient-waves-colored"><div class="te-divider uk-container"><hr /></div><div class="uk-section-background uk-position-cover"><div class="uk-section-background-image uk-section-background-image-light"><img data-srcset="https://www.example.com/wp-content/uploads/2021/11/1.jpg" loading="lazy" /></div></div><div class="uk-container "><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"[5~0%]"} -->
<div class="wp-block-columns"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:heading {"level":1,"className":"uk-margin-xsmall-bottom","teMarginBottom":"[ú~k-m~árgí~ñ-xs~máll~-bót~tóm]"} -->
<h1 class="uk-margin-xsmall-bottom" id="h-ai-cloud-for">[L~óré~m íp~súm]</h1>
<!-- /wp:heading -->
Expand All @@ -16,7 +16,7 @@ <h1 class="uk-margin-remove-top">[D~ólór]</h1>
<!-- wp:acf/te-buttons {"id":"[b~lóc~k_61~9227~cé44~558]","name":"acf/te-buttons","data":{"primary_button_type":"[ú~rl]","_primary_button_type":"field_5efaf2980abf2","primary_button_color":"[p~rím~árý]","_primary_button_color":"field_5efb0fdbafdd9","primary_button_icon":"","_primary_button_icon":"field_5efaf2980ac2e","primary_button_text":"[R~éqúé~st á D~émó]","_primary_button_text":"field_5efaf2980ac57","primary_button_url":"https://www.example.com/request-a-demo/healthcare/","_primary_button_url":"field_5efaf2980ac79","primary_button":"","_primary_button":"field_5efaf29807ca2","aux_button_type":"[ú~rl]","_aux_button_type":"field_5efaf29818767","aux_button_shape":"[s~écóñ~dárý]","_aux_button_shape":"field_5efaf37cadc0e","aux_button_color":"[p~rím~árý]","_aux_button_color":"field_5efb1018afdda","aux_button_icon":"[p~láý-~círc~lé-s~máll]","_aux_button_icon":"field_5efaf9fd9bf4a","aux_button_text":"[W~átc~h á D~émó]","_aux_button_text":"field_5efaf2981878d","aux_button_url":"https://www.example.com/resources/lorem-ipsum/","_aux_button_url":"field_5efaf298187ae","aux_button":"","_aux_button":"field_5efaf298175a4"},"align":"","mode":"preview"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"[5~0%]"} -->
<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:embed {"url":"https://example.wistia.com/medias/lmjdojemp7","type":"rich","providerNameSlug":"embed-handler"} -->
<figure class="wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler"><div class="wp-block-embed__wrapper">
[h~ttps~://é~xámp~lé.w~ístí~á.có~m/mé~díás~/lmj~dójé~mp7]
Expand All @@ -30,8 +30,8 @@ <h1 class="uk-margin-remove-top">[D~ólór]</h1>

<!-- wp:te/container {"className":"uk-padding-xlarge-bottom"} -->
<section class="wp-block-te-container uk-section uk-section-default uk-padding-xlarge-bottom" id="ai-cloud"><div class="te-divider uk-container"><hr /></div><div class="uk-container "><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"[6~6.6~6%]"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:image {"id":30035,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-reset"} -->
<div class="wp-block-columns"><!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:image {"id":30035,"sizeSlug":"large","linkDestination":"none","className":"is-style-reset"} -->
<figure class="wp-block-image size-large is-style-reset"><img src="https://www.example.com/wp-content/uploads/2021/09/decor.svg" alt="[d~écór]" class="wp-image-30035" /></figure>
<!-- /wp:image -->

Expand All @@ -44,7 +44,7 @@ <h2 class="uk-margin-small-top">[L~óré~m Íp~súm]</h2>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"[3~3.3~3%]"} -->
<!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:acf/card-resource {"id":"[b~lóc~k_61~9234~é7áf~287]","name":"acf/card-resource","data":{"resource":31337,"_resource":"field_6079385ff9132"},"align":"","mode":"preview"} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></section>
Expand All @@ -53,7 +53,7 @@ <h2 class="uk-margin-small-top">[L~óré~m Íp~súm]</h2>
<!-- wp:te/container -->
<section class="wp-block-te-container uk-section uk-section-default"><div class="te-divider uk-container"><hr /></div><div class="uk-container "><!-- wp:te/grid {"columns":4} -->
<div class="wp-block-te-grid uk-grid uk-child-width-1-1 uk-child-width-1-4@m"><!-- wp:group -->
<div class="wp-block-group"><!-- wp:image {"id":31211,"width":53,"height":52,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-icon"} -->
<div class="wp-block-group"><!-- wp:image {"id":31211,"width":53,"height":52,"sizeSlug":"large","linkDestination":"none","className":"is-style-icon"} -->
<figure class="wp-block-image size-large is-resized is-style-icon"><img src="https://www.example.com/wp-content/uploads/2021/11/hand-holding-heart-healthcare.svg" alt="[h~áñd ~hóld~íñg h~éár~t héá~lthc~áré]" class="wp-image-31211" width="53" height="52" /></figure>
<!-- /wp:image -->

Expand All @@ -67,7 +67,7 @@ <h5 class="uk-margin-xsmall-bottom uk-margin-xsmall-top"><strong>[É~xcép~téú
<!-- /wp:group -->

<!-- wp:group -->
<div class="wp-block-group"><!-- wp:image {"id":13760,"width":52,"height":52,"sizeSlug":"[f~úll]","linkDestination":"[ñ~óñé]","className":"is-style-icon"} -->
<div class="wp-block-group"><!-- wp:image {"id":13760,"width":52,"height":52,"sizeSlug":"full","linkDestination":"none","className":"is-style-icon"} -->
<figure class="wp-block-image size-full is-resized is-style-icon"><img src="https://www.example.com/wp-content/uploads/2019/12/accelerate-gear-refresh-spin.svg" alt="[á~ccél~érát~é géá~r réf~résh ~spíñ]" class="wp-image-13760" width="52" height="52" /></figure>
<!-- /wp:image -->

Expand All @@ -81,7 +81,7 @@ <h5 class="uk-margin-xsmall-bottom uk-margin-xsmall-top"><strong>[V~ólúp~tás]
<!-- /wp:group -->

<!-- wp:group -->
<div class="wp-block-group"><!-- wp:image {"id":31212,"width":52,"height":52,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-icon"} -->
<div class="wp-block-group"><!-- wp:image {"id":31212,"width":52,"height":52,"sizeSlug":"large","linkDestination":"none","className":"is-style-icon"} -->
<figure class="wp-block-image size-large is-resized is-style-icon"><img src="https://www.example.com/wp-content/uploads/2021/11/dark.svg" alt="[d~árk]" class="wp-image-31212" width="52" height="52" /></figure>
<!-- /wp:image -->

Expand All @@ -95,7 +95,7 @@ <h5 class="uk-margin-xsmall-bottom uk-margin-xsmall-top"><strong>[B~láñ~dít~
<!-- /wp:group -->

<!-- wp:group -->
<div class="wp-block-group"><!-- wp:image {"id":31213,"width":52,"height":52,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-icon"} -->
<div class="wp-block-group"><!-- wp:image {"id":31213,"width":52,"height":52,"sizeSlug":"large","linkDestination":"none","className":"is-style-icon"} -->
<figure class="wp-block-image size-large is-resized is-style-icon"><img src="https://www.example.com/wp-content/uploads/2021/11/-dark.svg" alt="[d~árk]" class="wp-image-31213" width="52" height="52" /></figure>
<!-- /wp:image -->

Expand All @@ -115,7 +115,7 @@ <h5 class="uk-margin-xsmall-bottom uk-margin-xsmall-top"><strong>[É~t hár~úm
<!-- /wp:te/container -->

<!-- wp:te/container -->
<section class="wp-block-te-container uk-section uk-section-default" id="use-cases"><div class="te-divider uk-container"><hr /></div><div class="uk-container "><!-- wp:image {"align":"center","id":30294,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-reset"} -->
<section class="wp-block-te-container uk-section uk-section-default" id="use-cases"><div class="te-divider uk-container"><hr /></div><div class="uk-container "><!-- wp:image {"align":"center","id":30294,"sizeSlug":"large","linkDestination":"none","className":"is-style-reset"} -->
<div class="wp-block-image is-style-reset"><figure class="aligncenter size-large"><img src="https://www.example.com/wp-content/uploads/2021/10/decor.svg" alt="[d~écór]" class="wp-image-30294" /></figure></div>
<!-- /wp:image -->

Expand All @@ -140,7 +140,7 @@ <h3 class="has-text-align-center uk-margin-small-top">[S~éd d~ó éíú~smód ~

<!-- wp:te/container {"style":"[ú~k-s~éctí~óñ-~prím~árý]","backgroundId":31227,"backgroundUrl":"https://www.example.com/wp-content/uploads/2021/11/Healthcare_use-cases.jpg"} -->
<section class="wp-block-te-container uk-section uk-section-primary uk-position-relative"><div class="te-divider uk-container"><hr /></div><div class="uk-section-background uk-position-cover"><div class="uk-section-background-image undefined"><img data-srcset="https://www.example.com/wp-content/uploads/2021/11/cases.jpg" loading="lazy" /></div></div><div class="uk-container "><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"[5~0%]"} -->
<div class="wp-block-columns"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:heading -->
<h2>[D~úís ~áúté ~írúr~é dól~ór íñ ~répr~éhéñ~dérí~t íñ v~ólúp~táté ~vél~ít és~sé cí~llúm ~dóló~ré éú ~fúgí~át ñú~llá p~áríá~túr]</h2>
<!-- /wp:heading -->
Expand All @@ -154,7 +154,7 @@ <h2>[D~úís ~áúté ~írúr~é dól~ór íñ ~répr~éhéñ~dérí~t íñ v~ó
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"[5~0%]"} -->
<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:acf/te-accordion {"id":"[b~lóc~k_61~8d78~á5d2~7c0]","name":"acf/te-accordion","data":{"mode":"[ú~k-á~ccór~díó~ñ-mú~téd]","_mode":"field_618d7ca0397ec","items_0_title":"[Ó~mñís]","_items_0_title":"field_618d78042037c","items_0_text":"[í~sté ñ~átús ~érró~r sít ~vólú~ptát~ém ác~cúsá~ñtíú~m dól~órém~qúé l~áúdá~ñtíú~m, tó~tám r~ém áp~éríá~m, éá~qúé í~psá q~úáé á~b íll~ó íñv~éñtó~ré vé~rítá~tís é~t qúá~sí ár~chít~éctó ~béát~áé ví~táé d~íctá ~súñt ~éxpl~ícáb~órñ]","_items_0_text":"field_618d781e2037d","items_1_title":"[C~láí~ms]","_items_1_title":"field_618d78042037c","items_1_text":"[Ñ~émó é~ñím í~psám ~vólú~ptát~ém qú~íá vó~lúpt~ás sí~t ásp~érñá~túr á~út ód~ít áú~t fúg~ít, s~éd qú~íá có~ñséq~úúñt~úr má~gñí d~ólór~és éó~s qúí ~rátí~óñé v~ólúp~táté~m séq~úí ñé~scíú~ñtrñ]","_items_1_text":"field_618d781e2037d","items_2_title":"[Ñ~éqúé]","_items_2_title":"field_618d78042037c","items_2_text":"[p~órró ~qúís~qúám ~ést, ~qúí d~ólór~ém íp~súm q~úíá d~ólór ~sít á~mét(\u0026lt;~á hré~f=\u0026quot;ht~tps:~//ww~w.éx~ámpl~é.có~m/cú~stóm~érs/~cáré~/\u0026quot;\u0026gt;éxá~mplé\u0026lt;\u0026lt;~/á\u0026gt;). ~Cóñs~écté~túr, ~(67%~) ádí~písc~í vél~ít, s~éd qú~íá ñó~ñ ñúm~qúám ~éíús ~módí ~témp~órá \u0026quot;í~ñcíd~úñt\u0026quot; ú~t \u0026quot;láb~óré\u0026quot; é~t dól~óré m~ágñá~m álí~qúám ~qúáé~rát v~ólúp~táté~m.rñ]","_items_2_text":"field_618d781e2037d","items":3,"_items":"field_618d77da2037b"},"align":"","mode":"edit"} /-->

<!-- wp:paragraph -->
Expand All @@ -166,8 +166,8 @@ <h2>[D~úís ~áúté ~írúr~é dól~ór íñ ~répr~éhéñ~dérí~t íñ v~ó

<!-- wp:te/container -->
<section class="wp-block-te-container uk-section uk-section-default" id="video-demo"><div class="te-divider uk-container"><hr /></div><div class="uk-container "><!-- wp:columns {"className":"uk-flex-middle"} -->
<div class="wp-block-columns uk-flex-middle"><!-- wp:column {"width":"[5~0%]"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:image {"id":30294,"sizeSlug":"[l~árgé]","linkDestination":"[ñ~óñé]","className":"is-style-reset"} -->
<div class="wp-block-columns uk-flex-middle"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:image {"id":30294,"sizeSlug":"large","linkDestination":"none","className":"is-style-reset"} -->
<figure class="wp-block-image size-large is-style-reset"><img src="https://www.example.com/wp-content/uploads/2021/10/decor.svg" alt="[d~écór]" class="wp-image-30294" /></figure>
<!-- /wp:image -->

Expand All @@ -182,8 +182,8 @@ <h3 class="uk-margin-small-top">[Ú~t éñí~m ád m~íñím~á véñ~íám]</h3
<!-- wp:acf/te-buttons {"id":"[b~lóc~k_61~8cfd~4151~77á]","name":"acf/te-buttons","data":{"primary_button_type":"[ú~rl]","_primary_button_type":"field_5efaf2980abf2","primary_button_color":"[p~rím~árý]","_primary_button_color":"field_5efb0fdbafdd9","primary_button_icon":"[p~láý-~círc~lé-s~máll]","_primary_button_icon":"field_5efaf2980ac2e","primary_button_text":"[W~átch ~thé V~ídéó]","_primary_button_text":"field_5efaf2980ac57","primary_button_url":"https://www.example.com/resources/","_primary_button_url":"field_5efaf2980ac79","primary_button":"","_primary_button":"field_5efaf29807ca2","aux_button_type":"disabled","_aux_button_type":"field_5efaf29818767","aux_button":"","_aux_button":"field_5efaf298175a4"},"align":"","mode":"preview"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"[5~0%]"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:image {"id":31486,"sizeSlug":"[f~úll]","linkDestination":"[ñ~óñé]","className":"is-style-default"} -->
<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:image {"id":31486,"sizeSlug":"full","linkDestination":"none","className":"is-style-default"} -->
<figure class="wp-block-image size-full is-style-default"><img src="https://www.example.com/wp-content/uploads/2021/11/-a.jpg" alt="[á ~1]" class="wp-image-31486" /></figure>
<!-- /wp:image --></div>
<!-- /wp:column --></div>
Expand Down
Loading