Prestashop: Cannot translate texts after creating a new language

Created on 4 Jun 2019  路  11Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
After creating a new language Malagasy (iso code mg-mg), I cannot translate any texts, nothing happens.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'International' / ''Translates
  2. Click on 'Backoffice' for example to try to translate in Malagasy and choose the language 'Malagasy'
  3. Scroll down to '....' : Select an item to translate and click on
  4. See error :: there's no error but nothing happens then I cannot continue.

Screenshots
If applicable, add screenshots or screenrecords to help explain your problem.

Additionnal information
PrestaShop version: 1.7.5.1
PHP version: PHP 5.6.33-0+deb8u1

1.7.5.2 1.7.6.0 BO Bug Fixed Minor Translations

All 11 comments

Yes, you can add the Malagasy language in the BO through the localization option and then add it as a new language, afterwards you will start translating strings through the 'Modify translations' section.

My personal suggestion you join the Official translation project at https://crowdin.com/project/prestashop-official for the Malagasy language, and if it is not there, ask for the add up.

As for your case, I suspect that you are missing some required PHP drivers, have you checked the system requirements http://doc.prestashop.com/display/PS17/What+you+need+to+get+started ?

Hi @rabtaray,

I manage to reproduce the issue with PS:1.7.5.2 and PS:1.7.6.0beta1
After creating the Malagasy language and go to International => Translations => Modify translations=> select the Malagasy language => Modify
=> I get this error (See screenshot)
Capture du 2019-06-07 15-49-14

I鈥檒l add this to the debug roadmap so that it鈥檚 fixed.
Thanks!

Hi @rabtaray,

I manage to reproduce the issue with PS:1.7.5.2 and PS:1.7.6.0beta1
After creating the Malagasy language and go to International => Translations => Modify translations=> select the Malagasy language => Modify
=> I get this error (See screenshot)
Capture du 2019-06-07 15-49-14

I鈥檒l add this to the debug roadmap so that it鈥檚 fixed.
Thanks!

Hi Mariem,
I met this error message before. Try to use iso code 'mg-mg' in lowercase. I got the message because I wrote mg-MG instead of.

Yes, you can add the Malagasy language in the BO through the localization option and then add it as a new language, afterwards you will start translating strings through the 'Modify translations' section.

My personal suggestion you join the Official translation project at https://crowdin.com/project/prestashop-official for the Malagasy language, and if it is not there, ask for the add up.

As for your case, I suspect that you are missing some required PHP drivers, have you checked the system requirements http://doc.prestashop.com/display/PS17/What+you+need+to+get+started ?

Hi @OneDotIT ,
thank you for your response. I'll check all my configurations first.
I met the crowdin team a few days ago and they created the project at the following link https://crowdin.com/project/prestashop-official/mg# so I can start transllating PS.

Hi,

I have the same issue with PS1.7.6.0beta1 & PS1.7.5.2.
image
When I try to translate the BO with the language created, I have the same exception
image

Thanks!

Hello again,
I have debugged the issue.

It seems PrestaShop pre-identifies the 2-characters ISO code's, and using that to identify the language tag, which is a component of the language name and region, i.e 'fr->fr-FR', and to note, the language tag represent the translation folder and where the localization strings are located.

the supported ISO code's location:
/app/Resources/legacy-to-standard-locales.json

Appending the _mg_ language and region _MG_ as like have solved the initial case:

.....
"zh": "zh-CN",
"mg": "mg-MG"
}

But still, per version 1.7.6.0-beta1, the folder mg-MG has to be created (a nice error pop-up would appear on the top right).

@OneDotIT, thanks for your feedback.
Would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/PrestaShop/tree/develop
Thank you!

@OneDotIT, thanks for your PR.
You need to add your language in this file also: https://github.com/PrestaShop/PrestaShop/blob/develop/app/Resources/all_languages.json

Thanks!

@khouloudbelguith
Thank you for the mention.
@rabtaray, would you confirm the localization ? This is an example:

    "name": "丕賱賱睾丞 丕賱毓乇亘賷丞 (Arabic)",
    "iso_code": "ar",
    "date_format_lite": "Y-m-d",
    "date_format_full": "Y-m-d H:i:s",
    "is_rtl": "1",
    "language_code": "ar-sa",
    "locale": "ar-SA"

Hi @OneDotIT

"name": "Malagasy",
"iso_code": "mg",
"date_format_lite": "d-m-Y",
"date_format_full": "d-m-Y H:i:s",
"is_rtl": "0",
"language_code": "mg-mg",
"locale": "mg-MG"

Thank you.

Thank you khouloud.

I suspect the file _all_languages.json_ is what build the drop menu while selecting a language in BO.

Was this page helpful?
0 / 5 - 0 ratings