PrestaShopCorp / bpostshm

3 stars 5 forks source link

Translate module description + carrier names & description #3

Closed Stigmi closed 9 years ago

Stigmi commented 10 years ago

Hi, It seems impossible to have the description of the carrier module translated (we need support from 1.4 to 1.6). Same goes for the name and description of the carriers.

Is there a special trick or workaround to fix this or is this a permanent issue? Thank you

Quetzacoalt91 commented 10 years ago

Hi @Stigmi,

That's strange you could not get these translations. As far I know, there are issue about this. I had a look on bpostshm.php (l.50) and the $this-l(...) is properly used.

Do you find your translations when you try to edit them in the AdminTranslations controller ?

Stigmi commented 10 years ago

Yes, translations work fine in the backoffice, we get the key and the translation is there.

We'll try this kind of workaround for carrier description: $this->_config = array( 'name' => 'bpost', 'id_tax_rules_group' => 0, 'url' => '', 'active' => true, 'deleted' => 0, 'shipping_handling' => false, 'range_behavior' => 0, 'is_module' => true, 'delay' => array( 'fr' => 'Avec Bpost, Faites-vous livrer là où vous le souhaitez.', 'nl' => 'Met Bpost, levert u waar u maar wilt.', 'en' => 'With Bpost, do you deliver wherever you want.', ), 'shipping_external' => true, 'external_module_name' => $this->name, 'need_range' => true );

Quetzacoalt91 commented 10 years ago

Why not, you won't be the only one to do this. :)

https://github.com/PrestaShop/boxdropshipment/blob/cf7871bae57fc83c10202345a85a6a10c0bc0dce/lib/BoxdropCarrier.class.php#L73-L86