Jump to content

Cannot import my translation


Recommended Posts

  • 2 months later...

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?

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...
  • 3 months later...

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 (see edit history)
Link to comment
Share on other sites

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 (see edit history)
Link to comment
Share on other sites

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 (see edit history)
Link to comment
Share on other sites

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... <_<

Link to comment
Share on other sites

  • 10 months later...
×
×
  • Create New...