PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.21k stars 4.81k forks source link

Translation theme export bad xlf files #18665

Closed clotairer closed 4 years ago

clotairer commented 4 years ago

Describe the bug

We folow the documentation to export theme translations https://devdocs.prestashop.com/1.7/themes/reference/theme-translation/ But when we export the theme we found partial translations.

Probably not related to #15791

Expected behavior

Generate a correct file xlf file.

Steps to Reproduce

Steps to reproduce the behavior:

Please note :

  1. Install a defaut prestashop 1.7.6.4 with classic theme

  2. Install our theme issue in attached file (simple child of classic theme) child_classic.zip

  3. Go to the translation manager to translate the child classic theme. translate the first sentence and not the second.

  4. Export your theme.

You'll see 2 files: image

We think the PrestaShop should generate something like that on ShopChildclassic.fr-FR.xlf without other file) :

<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="/var/www/prestashop/admin" source-language="fr-FR" target-language="fr-FR" datatype="plaintext">
    <body>
      <trans-unit id="0a40d090851aca6d8f7eae0066fe5c2e">
        <source>My classic translation</source>
        <target>Ma traduction en français</target>
        <note>Line: </note>
      </trans-unit>
      <trans-unit id="e7274d66e562f869f08ba8eee7c83e64">
        <source>My second translation not in DB</source>
        <target>My second translation not in DB</target>
        <note>Line: </note>
      </trans-unit>
    </body>
  </file>
</xliff>

Note: we have a PR to fix according to our suggested behaviour.

Additional information

khouloudbelguith commented 4 years ago

Hi @clotaire202,

Thanks for your report. Here's just a PR: https://github.com/PrestaShop/PrestaShop/pull/18293 still in progress to fix the issue. We are awre of this issue, it is added to our debug roadmap. Your ticket is a duplicate of #16555 So, I close it. Thanks!

khouloudbelguith commented 4 years ago

Duplicate of #16555