Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations not saved correctly with placeholder (ph) tags #4762

Open
ljubisham opened this issue May 27, 2016 · 1 comment
Open

Translations not saved correctly with placeholder (ph) tags #4762

ljubisham opened this issue May 27, 2016 · 1 comment
Milestone

Comments

@ljubisham
Copy link

ljubisham commented May 27, 2016

Translated strings are not saved correctly when there is a ph (placeholder) tag in source string.
Here is the example string before translation...

      <trans-unit datatype="plaintext" id="tu-25783">
        <source>The system is archiving the <ph id="bn-25785" ctype="x-bn-meth" assoc="both">[asis,Horde]</ph> data to the “<ph id="bn-25787" ctype="x-bn-var" assoc="both">[_1]</ph>” file.</source>
        <target>The system is archiving the <ph id="bn-25785" ctype="x-bn-meth" assoc="both">[asis,Horde]</ph> data to the “<ph id="bn-25787" ctype="x-bn-var" assoc="both">[_1]</ph>” file.</target>
      </trans-unit>

Here is the string after translation and pootle sync_stores command. This is what's saved in translation file...

      <trans-unit datatype="plaintext" id="tu-58" approved="yes">
        <source>The system is archiving the <ph id="bn-60" ctype="x-bn-meth" assoc="both">[asis,Horde]</ph> data to the “<ph id="bn-62" ctype="x-bn-var" assoc="both">[_1]</ph>” file.</source>
        <target state="translated">Sistem arhivira [asis,Horde] podatke u fajl “[_1]”.<ph id="bn-60" ctype="x-bn-meth" assoc="both">[asis,Horde]</ph> data to the “<ph id="bn-62" ctype="x-bn-var" assoc="both">[_1]</ph>” file.</target>
      </trans-unit>

The target string contains raw functions extracted from ph tags and everything after opening ph tag appended as-is to the target string.

@ljubisham ljubisham changed the title Translations not saved correctly with placeholder (ph) tags #bug Translations not saved correctly with placeholder (ph) tags May 27, 2016
@phlax phlax added this to the 2.8.0 milestone May 27, 2016
@dwaynebailey dwaynebailey modified the milestones: 2.8.1, 2.8.0 May 27, 2016
@dwaynebailey
Copy link
Member

Notes for future:

  • This may overlap and need more support in Translate Toolkit
  • Pootle doesn't currently have a good model for inserting and editing placeables.
  • It might just be that we need to deserialise and reserialise into proper XML when we work on XLIFF in Pootle, at least at a first level.

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

No branches or pull requests

3 participants