Joe wrote:I have to ask a dumb question :oops: , but it will help me getting on with the translation of Chinese version. What I am wondering are (1) where is the resource_strings.cpp file and (2) what the file extract_resource_strings.pl for? Thanks for helping
These aren't dumb questions at all! The internationalization process is a bit complex and makes use of the makefiles produced by automake which aren't available under Windows. So it's a bit difficult to get a clear view of the process when running only Windows.
resource_strings.cpp is a dummy cpp file. It is located in src/celestia/res/ and generated by extract_resource_strings.pl. It contains the translatable strings from the resource file.
The catalog file celestia.pot is generated by running "make celestia.pot" in the po directory. resource_strings.cpp is a dependency of the celestia.pot target and it is generated by the rule defined in the file Rules-win-resource which is included in the makefile.
Once generated, resource_strings.cpp is then used as input to xgettext along with the other cpp source files defined in POTFILES.in.
So "make celestia.pot" does everything automatically:
* extract translatable strings from
-- the data files (data/data.cpp in Rules-data)
-- the resource file (src/celestia/res/resource_strings.cpp in Rules-win-resource)
-- the KDE gui definition files (src/celestia/kde/rc.cpp in Rules-kde)
* build celestia.pot from the source files defined in POTFILES.in
Then running "make update-po" updates the existing po files with the new strings added to celestia.pot.