PrestaShop / prestashop-specs

Project specifications for PrestaShop's Core features and native modules
https://build.prestashop-project.org/prestashop-specs/
Other
32 stars 26 forks source link

Translation export files: clarification on purpose and current working #327

Open lmeyer1 opened 2 years ago

lmeyer1 commented 2 years ago

Current state This is how the translation for the theme works now

I expect the xlf files for the theme to contain 2 translations, the one I added and the one I changed the wording, but the xlf files contain all the 200 texts of the theme.

Under The exported package it is written:

Note: If a given wording is not translated, then the original wording should be used as translation in the exported file.

This note is about not translated wordings. It is not about wordings that are translated, but not overridden.

The two options when overriding wording The translation of themes is special, because the theme translation is overriding the core translation. This problem is not related to BO and FO-core translations. For modules that have an official translation in app/Resources/translations, the translation overriding the core translation, like for themes. Thus, in the following, you can read also module every time theme is used.

If we translate a theme, most of the wordings are already present in the core translation. There will be few wordings specific to the theme, and there will be some translations that will be adapted.

  1. All texts: As for now, the exported xlf files may contain all texts used in the theme, and their translations.
  2. Only specific: The exported xlf files may contain only texts either specific to the theme or overridden core translations.

Purpose of the xlf files As far as I understand, the purpose of the exported xlf files is twofold:

Comparing the two options Only specific has in my opinion several advantages over All texts:

What are your thoughts about this?