Jump to content
  • 0
myzuhari

Cannot import my translation

Question

I tried to import my mother language but did not manage to complete it because I got an error "Validation failed for: mails/ms/lang.php". Anybody can solve my problem? Thanks in advance!

post-29214-0-65218900-1372994829_thumb.png

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Hello friends,

I have the same problem. I upgraded to PS 1.5.5.0 and I'm trying to import my translation. 

I also get Validation failed for: mails/sq/lang.php

I'm uploading a language pack manually

Any idea???

Share this post


Link to post
Share on other sites
  • 0
They've changed the paths of email templates in version 1.5.5.0

I had the same problem so I had to do everything manually.

 


It may also be that you do not have a complete translation, some row is missing. 

 

 

Share this post


Link to post
Share on other sites
  • 0

Thank you MacRoy for your reply.

I need my front and back office translated and you suggest to do everything manually. You are right, I have not a complete translation but I've tried before and the missing rows were not a problem in PS 1.5.3.1

Please, anyone, any other option available?

Share this post


Link to post
Share on other sites
  • 0

My friend, I'm using ps 1.5.5.0 and I have a sq.gzip file, meaning I'm using Albanian language. I guess you have never heard of Albania ;)))

 

Thank you for you feedback

Share this post


Link to post
Share on other sites
  • 0

I have the same problem just now....

 

I'm keep getting below error when I click "IMPORT A LANGUAGE PACK MANUALLY"  to default-bootstrap 

 

Validation failed for: mails/tw/lang.php

please help !!

Share this post


Link to post
Share on other sites
  • 0

I found the source of the problem. (My PrestaShop version is 1.5.6.2.)

 

Validation of translation fails during manual import if there are empty translation entries in the reported file. It may look like this:

 

In the file: ...\mails\tw\lang.php

$_LANGMAIL['Email verification'] = '';

In order to fix it for language xx:

 

1. Open translation pack (xx.gzip)

2. Within the file there is another file xx without extension. It's a TAR archive.

3. Find the problematic file In the xx TAR archive and fill missing translations (you may copy-paste English text, if you don't care about the actual translation).

4. Save the fixed file and put it back to the xx TAR archive.

5. Put xx TAR archive back to xx.gzip file.

 

Now you can import the language pack successfully.

 

P.S.

Depends on your software you may be able to edit files directly in the .gzip->TAR archive saving yourself unzipping/untaring and putting everything back. YMMV.

Edited by OzMerchant

Share this post


Link to post
Share on other sites
  • 0

I found the source of the problem. (My PrestaShop version is 1.5.6.2.)

 

Validation of translation fails during manual import if there are empty translation entries in the reported file. It may look like this:

 

In the file: ...\mails\tw\lang.php

$_LANGMAIL['Email verification'] = '';

In order to fix it for language xx:

 

1. Open translation pack (xx.gzip)

2. Within the file there is another file xx without extension. It's a TAR archive.

3. Find the problematic file In the xx TAR archive and fill missing translations (you may copy-paste English text, if you don't care about the actual translation).

4. Save the fixed file and put it back to the xx TAR archive.

5. Put xx TAR archive back to xx.gzip file.

 

Now you can import the language pack successfully.

 

P.S.

Depends on your software you may be able to edit files directly in the .gzip->TAR archive saving yourself unzipping/untaring and putting everything back. YMMV.

 

Hi,

 

I have the same problem... in my case I translated the whole shop in spanish at my local server and when I tried to import the translation at my hosting server then I get this anoying error.

 

I realized I had emtpy translation fields and I spent several hours translating them. But nos the error still persist...

 

So I tried to follow your solution but I'm a bit confused... I export the es.gzip file and when I open it with winrar I only see a file inside withou any extension. Anyway I can open the file and edit it with notepad.. but then what should I edit?

 

When I go to backoffice I see that at email translations there are 11 missing translations but I can't find them. I've opened all the emails templates one by one and I only have saw some empty subjects which I had already filled so now the lang.php from /mails and from theme/mails are filled. However the error still persist... So where is the problem??

 

Thanks :(

 

email.jpg

Edited by Antakarana

Share this post


Link to post
Share on other sites
  • 0

I realized I had emtpy translation fields and I spent several hours translating them. But nos the error still persist...

Empty translation fields in the BackOffice are OK. I think it's a bug in PrestaShop or some other malfunction that untranslated fields are copied into the language files.

 

The problem is when there are empty values for translation entries in the files.

 

So I tried to follow your solution but I'm a bit confused... I export the es.gzip file and when I open it with winrar I only see a file inside withou any extension. Anyway I can open the file and edit it with notepad.. but then what should I edit?

This file without extension is a TAR archive, which contains the whole directory with other files. Unzip this file on the disk and then open it with WinRAR again. (If I remember correctly, WinRAR can open TAR) files. If WinRAR is confused, then just add ".tar" extension to the file.

 

Now you should be able to open the TAR archive and see all the directories and files. Once you see the files, just navigate to the file that fails validation, then open it for edit (directly from WinRAR, if it supports this feature). If WinRAR cannot edit the file directly in the archive, then you have to untar everything on the disk first.

 

In the problematic file find all empty entries and add some text there, for example, copy English text.

 

Then you need to go all the way back: put the fixed file back to TAR archive; (don't forget to remove the extension, if you added it); put the TAR archive to ".gzip" file.

 

When I go to backoffice I see that at email translations there are 11 missing translations but I can't find them. I've opened all the emails templates one by one and I only have saw some empty subjects which I had already filled so now the lang.php from /mails and from theme/mails are filled. However the error still persist... So where is the problem??

 

 

I think the problem is in the file, which fails validation. The entry may be there, but the value is empty. In my case empty entries look like this:

 

$_LANGMAIL['Email verification'] = '';
Once I fixed all of them I could import the translation. Edited by OzMerchant

Share this post


Link to post
Share on other sites
  • 0

Empty translation fields in the BackOffice are OK. I think it's a bug in PrestaShop or some other malfunction that untranslated fields are copied into the language files.

 

The problem is when there are empty values for translation entries in the files.

 

 

This file without extension is a TAR archive, which contains the whole directory with other files. Unzip this file on the disk and then open it with WinRAR again. (If I remember correctly, WinRAR can open TAR) files. If WinRAR is confused, then just add ".tar" extension to the file.

 

Now you should be able to open the TAR archive and see all the directories and files. Once you see the files, just navigate to the file that fails validation, then open it for edit (directly from WinRAR, if it supports this feature). If WinRAR cannot edit the file directly in the archive, then you have to untar everything on the disk first.

 

In the problematic file find all empty entries and add some text there, for example, copy English text.

 

Then you need to go all the way back: put the fixed file back to TAR archive; (don't forget to remove the extension, if you added it); put the TAR archive to ".gzip" file.

 

 

 

I think the problem is in the file, which fails validation. The entry may be there, but the value is empty. In my case empty entries look like this:

 

$_LANGMAIL['Email verification'] = '';
Once I fixed all of them I could import the translation.

 

 

Thank you for your detailed answer. I hope it helps me in the next time... I finally lost my patience and just translated everything again... <_<

Share this post


Link to post
Share on other sites

×