enupal / translate

Translate your website templates and plugins into multiple languages for Craft CMS. Bulk translation with Google Translate or Yandex.
https://enupal.com/craft-plugins/translate
Other
11 stars 2 forks source link

[bug] Plugin translations are saved to site.php file #39

Open piotrpog opened 4 years ago

piotrpog commented 4 years ago

Today i tried to overwrite some freeform translation of freeform plugin through control panel. This caused all freeform translations appearing in my translations/pl/site.php file, instead translations/pl/freeform.php file. Then i reverted changes to file using git, and saved translations of some other plugin. This caused both freeform and this other plugin translations to be appended to site.php file.

andrelopez commented 4 years ago

Hi @piotrpog could you please provide the next info?

piotrpog commented 4 years ago

@andrelopez This is my system info:

Application Info PHP version 7.2.1 OS version WINNT 10.0 Database driver & version MySQL 5.5.5 Image driver & version GD 7.2.1 Craft edition & version Craft Pro 3.5.15.1 Yii version 2.0.38 Twig version 2.12.5 Guzzle version 6.5.5

Plugins Comments 1.6.6 Cookies 1.1.12 CP Field Inspect 1.2.3 Craft Commerce 3.2.12 Craft Image helpers 1.0.4 Element API 2.6.0 Element Link 1.0.2 Embedded Assets 2.4.3 Feed Me 4.3.1 Freeform 3.9.4 Imager X v3.2.5 Incognito Field 1.2.0 Instagram Feed 1.0.5 Named routes 1.0.5 Navigation 1.4.3 Redactor 2.8.3 Redactor Custom Styles 3.0.4 SEOmatic 3.3.22 Sprig 1.0.3 Static file manager 1.2 Tłumaczenia 2.0.0

andrelopez commented 4 years ago

@piotrpog thanks for following, could you please confirm your Enupal Translate version? (can't see it in the list)

piotrpog commented 4 years ago

@andrelopez Its 2.0.0 - I changed plugin menu name to custom name and it seems it changed here too :)

andrelopez commented 4 years ago

Hi @piotrpog on your Craft CMS dashboard please go to Enupal Translate -> Settings -> Plugins and enable Create Plugin's translation folder and try again.

However, this will create the translations in the vendors/plugin/translations folder and will probably be overridden in the next update of the plugin. (This feature was thinking on plugin developers, so they can add easily translations of their plugins)

Also, the current behavior if the Create Plugin's translation folder setting is disabled should create the plugin-handle.php file in the Craft translations folder instead of adding the translations in the site.php file. I'll mark this as a bug, thanks for reporting