When I tried to open with poEdit file pl_PL-gallery_core.po from outdated polish translation for gallery 1.5x (pl_PL-1.5.2.tar.gz) I got this error:
Failed to convert file contents to Unicode.
What to do with this?
How to edit?
Jens
--
Last Gallery v1 Developer and v1 translation manager.
kglog
Joined: 2006-10-02
Posts: 3
Posted: Tue, 2006-10-03 05:13
I use windows version of poEdit 1.3.5.
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Tue, 2006-10-03 12:35
If you look into the po files with an normal text editor (wordpad, notepad, Ultraedit etc.) you see the charset the file was made with.
Are you using the same?
Jens
--
Last Gallery v1 Developer and v1 translation manager.
kglog
Joined: 2006-10-02
Posts: 3
Posted: Tue, 2006-10-03 14:38
Unfortunately no. I see special characters in the place wehere i should have special polish letters.
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Tue, 2006-10-03 16:24
Switch to the same charset in poEdit like written in the po file.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Wed, 2006-10-11 15:51
I have the same problem when using poEdit win32 1.3.5 to open modules/core/po/zh_CN.po.
I tried to switch poEdit to my language, it prompted me to restart poEdit to make the change take effect. However, after I closed and reopened poEdit, the interface is still in English.
Another interesting issue is that if I try to open other languages' po files, say "en_GB.po" the error message changes to "couldn't load file en_GB.po, it is probably corrupted". It seems that poEdit is working on my language mode, but just can't convert po files to Unicode.
I've thoroughly read the translation docs on codex.gallery2.org. So I went on to try Xemacs. I had no trouble to open zh_CN.po files with Xemacs, but there are another 2 issues with Xemacs.
1. the translated strings shown in the po files don't look like my language in UTF-8,
2. when I tried to compile the po file to mo file, Xemacs prompted me "Bad command or file name".
I did install gettext binaries of Windows version, but don't know whether I still need to install gmake or not. If so, where can I download the Windows version gmake?
I do think Gallery2 is the best photo album script, however, the translation issue is a big headache. I'm not a PHP guy, however, I've played with quite a number of open source PHP scripts with multilingual support, such as osCommerce, Xoops, and etc. It's quite common to adjust the original translation to fit the user's need, and I have no problem with editing other scipts' translated files, since they are plain .php files, all I need to do is open the language.php file with a text editor like UltraEdit32, make the changes, save the file, and upload it to the server to replace the original file.
But for Gallery2, I've spent days on figuring out how to be able to modify the language files as I wish to, and no luck till now. Please forgive my abruptness, I really don't think it makes any sense to inpliment such a complicated multilingual system into Gallery2. And I don't think the translation of my language is good enough, that's why I have to make some modification to the language files.
Anyways, since the translation team here is able to tackle with po and mo files, I'd appreciate your help on my problems mentioned above, or further details the translation docs on codex.gallery2.org to make it work for everyone who wants to make changes to the language files.
My computer is running Widnowx XP. I've installed poEdit 1.3.5 and Xemacs 21.4.19, as well as gettext binaries. My Glallery2 version is 2.1.2.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-10-11 16:10
It's not clear from above what problem you have with poEdit. As Tim_j says above, the important setting is the character set. It sounds like you're hoping poEdit itself is localized?
To use the translation makefiles on windows, try http://cygwin.com/
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Thu, 2006-10-12 03:59
OK, let me restate my problem.
My purpose is to modify some zh_CN.po files. I tried two editors recommended by the codex's localization doc, namely poEdit and XEmacs, however, both of them have problems.
poEdit:
When open zh_CN.po, it prompts "Failed to convert file to Unicode".
I followed the instruction of kglog and tried to change the language setting of the UI interface, but after restart poEdit, the interface is still in English, not changed to my language.
However, when open other .po files, say en_GB.po, with poEdit, the error message is "couldn't load file en_GB.po, it is probably corrupted". It seems that poEdit is working under my language mode, but just can't convert po files to Unicode.
XEmacs:
Able to open zh_CN.po, but the translation strings don't look like my language in UTF-8 format. When I tried to compile the edited .po file to .mo file by the command "make install po=zh_CN", it prompted "Bad command or file name", or "No files need saving".
Summary
poEdit: can't open zh_CN.po for editing
XEmacs: can't compile .po to .mo
Hope I make it clear enough this time.
mindless, thank you for your recommendation on cygwin.com. I wanna make sure which problem of mine this software will help and whether I should download and install all their packages or not. Please clarify, many thanks!
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-10-12 15:36
I've never used poEdit, maybe Tim_j or someone else can comment there.
cygwin will help with po->mo. rather than doing this directly in XEmacs you would do 'make install PO=zh_CN' to compile po->mo.
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2006-10-12 16:06
Hello drewneon,
i also use poEdit (Version 1.3.5 on Windows XP).
My native language is german and since 1.3.5 of PoEdit the interface language here is also not changing.
But i consider this as a minor "problem".
I have no problem opening and editing zh_CN.po from the core module.
Also en_GB.po works fine here.
I would like you to send me your zh_CN.po file so i can test it here. Please zip (or rar) it and send it via email to: jens AT peino DOT de
Gallery uses gettext because its a very fast method for translation and it is very comfortable. It handles so called "plural forms" which other way of translation doesn't.
For example German End english have 2 plural forms. Turkish just 1. Russian has 4 ...
So you edit the plain text .po file which is compiled into a .mo file. This is a binary file and thus a reason for the speed.
Also gettext methods are implemented into PHP, another speed advantage.
Greetings,
Jens
--
Last Gallery v1 Developer and v1 translation manager.
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Fri, 2006-10-13 02:58
Hi Tim
Thanks for your reply and glad to know that you are on the same OS as I do.
The po files are unzipped directly from the downloaded Gallery2 package. However, I've send them to you via e-mail anyway. I don't think these po files have any problem, since I'm able to open them with XEmacs. I wonder whether you installed some software to cooperate with poEdit or not, or any settings are required to have poEdit functioning properly under Windows XP.
The consideration of "plural forms" does make some sense, it's easily ignored by me since we don't have plural forms in our language. However, I can't feel the speed advantage of gettext. Those scripts using normal .php files as language files are not slow to me at all.
Quote:
I've never used poEdit, maybe Tim_j or someone else can comment there.
cygwin will help with po->mo. rather than doing this directly in XEmacs you would do 'make install PO=zh_CN' to compile po->mo.
Hi mindless,
May I know which package of cygwin handles po->mo compile? You know there's a long list of packages when installing cygwin. Thanks again.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2006-10-13 05:20
sorry, don't know the cygwin details.. see the requirements in the localization docs. if you have cmdline PHP already then maybe you just need 'make'
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Tue, 2006-10-17 03:52
Tim_j, have you received my e-mail?
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Tue, 2006-10-17 06:59
I did and answered.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Tue, 2006-10-17 11:55
Sorry, but I didn't receive your reply e-mail. Would you please resend it?
drewneon
Joined: 2006-09-12
Posts: 6
Posted: Fri, 2006-10-20 01:19
Tim_j, I still haven't received your e-mail yet. Maybe there's some problem between our mail boxes. Would you please do me a favor to post your reply e-mail here? Thanks
scribe
Joined: 2006-10-25
Posts: 1
Posted: Wed, 2006-10-25 11:38
Hey,
I got exactly the same problem and it's really annoying. "Failed to convert file contents to Unicode".
Now I read some of your answers but I can't seem to understand how to fix it. How do I change the charset in poedit and so on?
Thanks.
BTW, the translation language is Swedish.
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2006-10-25 12:00
hello,
in the meanwhile i got the same issue with german.
Currently i am a little busy at work. I will try to investigate at the weekend.
My guess is, that its an poEdit 1.3.5 issue. I will try an older version and see if that works.
If it does, i will write a bug report to the poEdit developers. If not ... i will search for the reason.
You (scribe, or drewneon) could do the same of course ;)
Greetings,
Jens
--
Last Gallery v1 Developer and v1 translation manager.
inecho
Joined: 2006-12-13
Posts: 1
Posted: Wed, 2006-12-13 23:39
Hi there,
I had the same problems with Poedit and I posted how to workaround the problem at www.p2p-online.com frontpage. Hope it could help
Iran
Wallach
Joined: 2007-03-21
Posts: 2
Posted: Wed, 2007-03-21 00:17
kglog wrote:
When I tried to open with poEdit file pl_PL-gallery_core.po from outdated polish translation for gallery 1.5x (pl_PL-1.5.2.tar.gz) I got this error:
Failed to convert file contents to Unicode.
What to do with this?
How to edit?
Hi there! That´s from a Notepad/WinXP+PoEdit1.3.6. PRoblem apears at loading/saving. Is there a workaround?
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: authconfig 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-12-12 21:06+0100\n"
"PO-Revision-Date: 1999-04-13 11:56-04:00\n"
"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
"Language-Team: Romanian <ro@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8-bit\n"
Wallach
Joined: 2007-03-21
Posts: 2
Posted: Wed, 2007-03-21 00:19
How can I set up the catalog dialog window in PoEdit so that I could write Romanian (I am using a DE/EN/RO keyboard)?
Tim_j
Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2007-03-21 09:48
Hello,
poEdit 1.3.5 and 1.3.6 have a problem with saving.
There are two solutions currently.
1.) Use poEdit 1.3.4
2.) Use "save as" and save under a different name. Then rename it to the correct filename.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
youtube
Joined: 2007-03-03
Posts: 1
Posted: Wed, 2007-03-21 20:42
mindless wrote:
I've never used poEdit, maybe Tim_j or someone else can comment there.
cygwin will help with po->mo. rather than doing this directly in XEmacs you would do 'make install PO=zh_CN' to compile po->mo.
Posts: 6818
Which editor did you use to edit the file ?
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 3
I use windows version of poEdit 1.3.5.
Posts: 6818
If you look into the po files with an normal text editor (wordpad, notepad, Ultraedit etc.) you see the charset the file was made with.
Are you using the same?
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 3
Unfortunately no. I see special characters in the place wehere i should have special polish letters.
Posts: 6818
Switch to the same charset in poEdit like written in the po file.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 6
I have the same problem when using poEdit win32 1.3.5 to open modules/core/po/zh_CN.po.
I tried to switch poEdit to my language, it prompted me to restart poEdit to make the change take effect. However, after I closed and reopened poEdit, the interface is still in English.
Another interesting issue is that if I try to open other languages' po files, say "en_GB.po" the error message changes to "couldn't load file en_GB.po, it is probably corrupted". It seems that poEdit is working on my language mode, but just can't convert po files to Unicode.
I've thoroughly read the translation docs on codex.gallery2.org. So I went on to try Xemacs. I had no trouble to open zh_CN.po files with Xemacs, but there are another 2 issues with Xemacs.
1. the translated strings shown in the po files don't look like my language in UTF-8,
2. when I tried to compile the po file to mo file, Xemacs prompted me "Bad command or file name".
I did install gettext binaries of Windows version, but don't know whether I still need to install gmake or not. If so, where can I download the Windows version gmake?
I do think Gallery2 is the best photo album script, however, the translation issue is a big headache. I'm not a PHP guy, however, I've played with quite a number of open source PHP scripts with multilingual support, such as osCommerce, Xoops, and etc. It's quite common to adjust the original translation to fit the user's need, and I have no problem with editing other scipts' translated files, since they are plain .php files, all I need to do is open the language.php file with a text editor like UltraEdit32, make the changes, save the file, and upload it to the server to replace the original file.
But for Gallery2, I've spent days on figuring out how to be able to modify the language files as I wish to, and no luck till now. Please forgive my abruptness, I really don't think it makes any sense to inpliment such a complicated multilingual system into Gallery2. And I don't think the translation of my language is good enough, that's why I have to make some modification to the language files.
Anyways, since the translation team here is able to tackle with po and mo files, I'd appreciate your help on my problems mentioned above, or further details the translation docs on codex.gallery2.org to make it work for everyone who wants to make changes to the language files.
My computer is running Widnowx XP. I've installed poEdit 1.3.5 and Xemacs 21.4.19, as well as gettext binaries. My Glallery2 version is 2.1.2.
Posts: 8601
It's not clear from above what problem you have with poEdit. As Tim_j says above, the important setting is the character set. It sounds like you're hoping poEdit itself is localized?
To use the translation makefiles on windows, try http://cygwin.com/
Posts: 6
OK, let me restate my problem.
My purpose is to modify some zh_CN.po files. I tried two editors recommended by the codex's localization doc, namely poEdit and XEmacs, however, both of them have problems.
poEdit:
When open zh_CN.po, it prompts "Failed to convert file to Unicode".
I followed the instruction of kglog and tried to change the language setting of the UI interface, but after restart poEdit, the interface is still in English, not changed to my language.
However, when open other .po files, say en_GB.po, with poEdit, the error message is "couldn't load file en_GB.po, it is probably corrupted". It seems that poEdit is working under my language mode, but just can't convert po files to Unicode.
XEmacs:
Able to open zh_CN.po, but the translation strings don't look like my language in UTF-8 format. When I tried to compile the edited .po file to .mo file by the command "make install po=zh_CN", it prompted "Bad command or file name", or "No files need saving".
Summary
poEdit: can't open zh_CN.po for editing
XEmacs: can't compile .po to .mo
Hope I make it clear enough this time.
mindless, thank you for your recommendation on cygwin.com. I wanna make sure which problem of mine this software will help and whether I should download and install all their packages or not. Please clarify, many thanks!
Posts: 8601
I've never used poEdit, maybe Tim_j or someone else can comment there.
cygwin will help with po->mo. rather than doing this directly in XEmacs you would do 'make install PO=zh_CN' to compile po->mo.
Posts: 6818
Hello drewneon,
i also use poEdit (Version 1.3.5 on Windows XP).
My native language is german and since 1.3.5 of PoEdit the interface language here is also not changing.
But i consider this as a minor "problem".
I have no problem opening and editing zh_CN.po from the core module.
Also en_GB.po works fine here.
I would like you to send me your zh_CN.po file so i can test it here. Please zip (or rar) it and send it via email to: jens AT peino DOT de
Gallery uses gettext because its a very fast method for translation and it is very comfortable. It handles so called "plural forms" which other way of translation doesn't.
For example German End english have 2 plural forms. Turkish just 1. Russian has 4 ...
So you edit the plain text .po file which is compiled into a .mo file. This is a binary file and thus a reason for the speed.
Also gettext methods are implemented into PHP, another speed advantage.
Greetings,
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 6
Hi Tim
Thanks for your reply and glad to know that you are on the same OS as I do.
The po files are unzipped directly from the downloaded Gallery2 package. However, I've send them to you via e-mail anyway. I don't think these po files have any problem, since I'm able to open them with XEmacs. I wonder whether you installed some software to cooperate with poEdit or not, or any settings are required to have poEdit functioning properly under Windows XP.
The consideration of "plural forms" does make some sense, it's easily ignored by me since we don't have plural forms in our language. However, I can't feel the speed advantage of gettext. Those scripts using normal .php files as language files are not slow to me at all.
Hi mindless,
May I know which package of cygwin handles po->mo compile? You know there's a long list of packages when installing cygwin. Thanks again.
Posts: 8601
sorry, don't know the cygwin details.. see the requirements in the localization docs. if you have cmdline PHP already then maybe you just need 'make'
Posts: 6
Tim_j, have you received my e-mail?
Posts: 6818
I did and answered.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 6
Sorry, but I didn't receive your reply e-mail. Would you please resend it?
Posts: 6
Tim_j, I still haven't received your e-mail yet. Maybe there's some problem between our mail boxes. Would you please do me a favor to post your reply e-mail here? Thanks
Posts: 1
Hey,
I got exactly the same problem and it's really annoying. "Failed to convert file contents to Unicode".
Now I read some of your answers but I can't seem to understand how to fix it. How do I change the charset in poedit and so on?
Thanks.
BTW, the translation language is Swedish.
Posts: 6818
hello,
in the meanwhile i got the same issue with german.
Currently i am a little busy at work. I will try to investigate at the weekend.
My guess is, that its an poEdit 1.3.5 issue. I will try an older version and see if that works.
If it does, i will write a bug report to the poEdit developers. If not ... i will search for the reason.
You (scribe, or drewneon) could do the same of course ;)
Greetings,
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 1
Hi there,
I had the same problems with Poedit and I posted how to workaround the problem at www.p2p-online.com frontpage. Hope it could help
Iran
Posts: 2
Hi there! That´s from a Notepad/WinXP+PoEdit1.3.6. PRoblem apears at loading/saving. Is there a workaround?
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: authconfig 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-12-12 21:06+0100\n"
"PO-Revision-Date: 1999-04-13 11:56-04:00\n"
"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
"Language-Team: Romanian <ro@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8-bit\n"
Posts: 2
How can I set up the catalog dialog window in PoEdit so that I could write Romanian (I am using a DE/EN/RO keyboard)?
Posts: 6818
Hello,
poEdit 1.3.5 and 1.3.6 have a problem with saving.
There are two solutions currently.
1.) Use poEdit 1.3.4
2.) Use "save as" and save under a different name. Then rename it to the correct filename.
Jens
--
Last Gallery v1 Developer and v1 translation manager.
Posts: 1