Gettext, boost::locale and android port

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
alep
Android Port Maintainer
Posts: 160
Joined: June 24th, 2013, 6:22 am

Gettext, boost::locale and android port

Post by alep »

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?
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Gettext, boost::locale and android port

Post by iceiceice »

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.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: Gettext, boost::locale and android port

Post by gfgtdf »

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.
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.
alep
Android Port Maintainer
Posts: 160
Joined: June 24th, 2013, 6:22 am

Re: Gettext, boost::locale and android port

Post by alep »

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.
Post Reply