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

Contradiction in translation for modules #324

Closed lmeyer1 closed 1 year ago

lmeyer1 commented 2 years ago

It looks like the specs are contradictory in regards to the translation of modules:

In Installed module translations is written:

This catalogue is to be filtered by keeping only the translation domains whose name starts with "Modules.Nameofthemodule".

In Export Installed module translations is written:

Note: this export may include core translation domains if they are used by the module's files. However, only the wordings used by the module are to be included in the exported file.

fr-FR
├── ModulesymoduleAdmin.fr-FR.xlf
├── ModuleMymoduleShop.fr-FR.xlf
├── ShopNotificationsError.fr-FR.xlf
└── ...

ShopNotificationsError is explicitly stated in the example.

These two texts are contradictory. In fact, while translating, the core wordings (Shop and Admin) are not shown for translation. But when exporting the files, the spec expects them to be exported. The real behavior is that modules always ignore core domains (Shop and Admin).

Considerations I think the current behavior is correct. Modules may use existing core translations (Shop and Admin). But I cannot imagine a use case when it would be legitimate that a module translation overrides or extends wordings of domains other than Modules.

Proposed correction I think in Export Installed module translations the note cited above should be removed. Also the example should be corrected to:

fr-FR
├── ModulesMymoduleAdmin.fr-FR.xlf
├── ModulesMymoduleShop.fr-FR.xlf
└── ...