Report: Translation Block inconsistency
-
Setup for debug reference:
For instance, I have a Woocommerce product translation needs, to simplify the explanation, just focus on post content.For the theme rendering, it just use the Woocommerce default template with default WordPress function “the_content()” to render the post content(description).
The default language is set to be zh_HK and the secondary language is en_US.
Version: WP 5.8.3/TRP 2.1.8Step to reproduce:
I tried by testing a small portion text in post content.
The text is “雞手語戊卜視日木收許您,寫上海裏夕成實因戊山里抓,瓜坡示夏友三再兄比說浪事采遠手哪。冰那訴會林清十。到現乞反息七喝家多飛美文亭兔。”In the template, I wrap it with
<div class="translation-block"> <?php the_content(); ?> </div>
In the editor preview(default language, zh_HK in this example), select the text to translate.
The text appear to the box on the left hand side become.
<p>雞手語戊卜視日木收許您,寫上海裏夕成實因戊山里抓,瓜坡示夏友三再兄比說浪事采遠手哪。冰那訴會林清十。到現乞反息七喝家多飛美文亭兔。</p>
In the To English place, type ‘test’ and save the translation.
Then I change the language on the left hand side dropdown box to English.
The content supposed to be ‘test’ is untranslated. If trying to select the text to translate. Found that Translate Press recognise it as<trp-post-container data-trp-post-id='4918'><p>雞手語戊卜視日木收許您,寫上海裏夕成實因戊山里抓,瓜坡示夏友三再兄比說浪事采遠手哪。冰那訴會林清十。到現乞反息七喝家多飛美文亭兔。</p> </trp-post-container>
Because there is an extra wrapper to the content, Translate Press did not translate it and recognise it as different text for translation.
I wonder if it is an intended design or not. Not sure which one is intended but the inconsistency will confuse the end operator who update the content of the page.
Because it is translated in Default Language but then untranslated in the target language.
- The topic ‘Report: Translation Block inconsistency’ is closed to new replies.