java2dev Posted October 4, 2016 Share Posted October 4, 2016 (edited) I received the following error by mail : PHP errors: Your module must be developed in English and then translated. e.g: Official syncronization manager © 2016 Functional errors: - Installation errors: - Our comments: This is an automatic declination. How could I proceed in this case? files to duplicate?Methods to change? Edited October 4, 2016 by java2dev (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted October 5, 2016 Share Posted October 5, 2016 Make sure all your code and comments are written in English. Also, make sure strings like 'Official syncronization manager © 2016' are not hardcoded and are translatable by writing them as $this->l('Official syncronization manager © 2016') in a PHP file or {l s='Official syncronization manager © 2016' mod='your_module_directory'} in a TPL file. Link to comment Share on other sites More sharing options...
java2dev Posted October 5, 2016 Author Share Posted October 5, 2016 Hi, thanks for your answer. I've used the method $this->l('some string') or $obj->l('some string') and it's work, I've verified in Localization->Module translate all the strings in the list and all of them are translatable. I don't use TPL file, I have one like test but is in english and written like you said. What you mean with hardcoded? I have to translate the strings to spanish for example if I want to use it (backend)? Link to comment Share on other sites More sharing options...
rocky Posted October 5, 2016 Share Posted October 5, 2016 You should set up your Back Office with both English and Spanish installed. Go to the Localization > Installed module translations and make sure every string in your module is listed on the left in English. Also, check the spelling and grammar of all the translations. For example, syncronization should be synchronization. If you've done it correctly, PrestaShop should accept your module or reject it with another issue Link to comment Share on other sites More sharing options...
java2dev Posted October 5, 2016 Author Share Posted October 5, 2016 (edited) I have just translated the english string to spanish in localization. but I don't know if that generate a file that I have to add to my zip? I've corrected the gramaticale words, all of them are correct. So I translate click on save for every Module block in localization. I've read that there is like a file es.php but I didn't find it. http://doc.prestashop.com/display/PS16/Module+translation I found it in translation folder. Thanks again. Edited October 5, 2016 by java2dev (see edit history) Link to comment Share on other sites More sharing options...
java2dev Posted October 5, 2016 Author Share Posted October 5, 2016 (edited) I received again the same mail. I translated all strings and generated a file es.php , when I've submited the zip I saw a us flag and spanish so I think everything is ok, but I've received the same mail . Any help? I've read this http://doc.prestashop.com/display/PS16/Module+translation but I want to understand the difference between (what I'm using) $this->l() and $this->module->l('My string', 'filename') Edited October 5, 2016 by java2dev (see edit history) Link to comment Share on other sites More sharing options...
java2dev Posted October 5, 2016 Author Share Posted October 5, 2016 I've seen that the fields when the module is installed remain in english language , but the module in the list module have the description in spanish. I don't understand why. and when I put translate this module to spanish prestashop sends me to localizacion and there I have all traslations saved yet Link to comment Share on other sites More sharing options...
rocky Posted October 6, 2016 Share Posted October 6, 2016 Make sure you have make your description translatable in your module's constructor: $this->description = $this->l('Your English module description'); Link to comment Share on other sites More sharing options...
java2dev Posted October 6, 2016 Author Share Posted October 6, 2016 I've translated all the strings in all php files using this->l() but I still receive the same mail with same message Your module must be developed in English and then translated. e.g: Official Linio synchronization manager © 2016 Linio I have two doubt. 1st why the mails are not specific , there exist some validator to try for this kind of issue. 2nd I have to do this for the config.xml? and in the mail is just an example? Thanks for your help Link to comment Share on other sites More sharing options...
rocky Posted October 6, 2016 Share Posted October 6, 2016 Have you run your module through the PrestaShop Validator here? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now