I am a Chinese and I dicide to do some Drupal translation. And also I would like to learn how to translate a module. The reason is that it's often that there's some error in the current translation. Some of them are very easy to be corrected by doing some text modification in PoEdit. However some of them are difficult for me. I spent the past 3 hours trying to correct a translation problem in the user module, but failed, :(
The problem is as following:
I found my site is still displaying "Create new account" in the "Uesr login" block while "reset password" is in Chinese correctly.
I did some investigation and found that in the PO file, the string is "Create a new account", and there are some similar errors.
My first thought was that I can correct the problem by modifying the original in the PO file. But this is not possible. Or it won't work.
Another way is that I modify the php files replacing "Create new account" with "Create a new account". I think this might work. But it is clear that this is not a good way even if it works.
The next solution comes to my mind is that I should create new PO files from the php files. I downloaded gettext for windows and spent more 2 hours trying to get POT files from the php file. I was able to get a PO file from the source. But I think there're too many strings in the PO file because I use the "-a" in the option "Language specific options". I tried the --keyword opinion but failed to generate a PO file.
I know that starting from drupal 6 there's a POT file delivered with the module. But I found this is not true for the user core module. I did not check if this is also the case for the other core modules.
So I would like to know how I can generate a POT file from the module source PHP files. Can you help me?
Comments
Translation template extractor
You could try the Translation template extractor module - http://drupal.org/project/potx
I think it should do want you want.
You can also search for and translate individual strings using admin/build/translate/search on your site.
localization client is
localization client is probably the module that you need for on screen translations.
Here is a translation server for Simplified Chinese if that is your language.
Listed here
Thanks for the information
The replied information is very useful. I think I will use both of the modules mentioned above.