Gettext, boost::locale and android port
Moderator: Forum Moderators
Gettext, boost::locale and android port
I've seen that in the latest dev release (1.11.19) the gettext.cpp implementation has been replaced by gettext_boost.cpp, which uses boost::locale.
Since building boost::locale for android is quite a pain, for now I've reverted build to gettext.cpp, which is still there.
Is this a good solution or is gettext.cpp going to be abandoned?
Since building boost::locale for android is quite a pain, for now I've reverted build to gettext.cpp, which is still there.
Is this a good solution or is gettext.cpp going to be abandoned?
Re: Gettext, boost::locale and android port
alep:
You might want to look at the dev-list emails for more info. But I'll try to summarize.
We replaced the uses of libintl, because it turns out that it isn't fully cross platform -- building wesnoth on mingw32 cross-compiler for windows results in binaries that choke on filepaths with non-ascii characters.
I have no idea what the android ports do, or if android even supports paths with non-ascii characters. My guess is that probably this isn't an issue for android, but if it is and you want the translations to work for international users then afaik you need to use boost::locale.
The 1.12 release has to support both filesystem.cpp and gettext.cpp, in order to support pandora, and OS X with version < 10.6. There's currently no one afaik who can get filesystem but not locale, but nothing should be particularly broken to use filesystem_boost.cpp and gettext.cpp.
I think ultimately we do plan to abandon filesystem.cpp and gettext.cpp eventually.
You might want to look at the dev-list emails for more info. But I'll try to summarize.
We replaced the uses of libintl, because it turns out that it isn't fully cross platform -- building wesnoth on mingw32 cross-compiler for windows results in binaries that choke on filepaths with non-ascii characters.
I have no idea what the android ports do, or if android even supports paths with non-ascii characters. My guess is that probably this isn't an issue for android, but if it is and you want the translations to work for international users then afaik you need to use boost::locale.
The 1.12 release has to support both filesystem.cpp and gettext.cpp, in order to support pandora, and OS X with version < 10.6. There's currently no one afaik who can get filesystem but not locale, but nothing should be particularly broken to use filesystem_boost.cpp and gettext.cpp.
I think ultimately we do plan to abandon filesystem.cpp and gettext.cpp eventually.
Re: Gettext, boost::locale and android port
the gettext_locale.cpp exists because the libintl based version doesn't really work with unicodepaths on windows.
There is no reason against maintining gettext.cpp and gettext_boost.cpp both. This shouldn't be hard because: 1) the gettext(-_boost).cpp files are not really complicated and 2) we expect that we only have to change them very rarely.
But its different for the filesystem_boost.cpp/filesystem.cpp files. In this case the files are not that trivial and we might want to change them regulary. So expect that somewhen there will only be filesystem_boost.cpp.
There is no reason against maintining gettext.cpp and gettext_boost.cpp both. This shouldn't be hard because: 1) the gettext(-_boost).cpp files are not really complicated and 2) we expect that we only have to change them very rarely.
But its different for the filesystem_boost.cpp/filesystem.cpp files. In this case the files are not that trivial and we might want to change them regulary. So expect that somewhen there will only be filesystem_boost.cpp.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Gettext, boost::locale and android port
Thank you all for the quick answer. Boost::filesystem is not a problem, so for now I think I'll go for the quick solution: filesystem_boost.cpp and gettext.cpp.