Jump to content

Getting the internationalization branch to build on more than one machine


Recommended Posts

Small return : with Github Leper on a new ubuntu installation, all is perfect until /0ad/binaries/system/test which is OK, but as Gallaecio warns in item 4 of its first post the /0ad/binaries/system/pyrogenesis return a "Segmentation fault (core dumped)"

I'll keep looking, but any idea is welcome ;)
Edited by Loki72
Link to comment
Share on other sites

For reproducibility (Problem solved, this process works with the latest version of leper):

Installations general dependencies

$ sudo apt-get install build-essential libboost-dev libboost-filesystem-dev   \    libboost-signals-dev libcurl4-gnutls-dev libenet-dev libgloox-dev       \    libjpeg-dev libminiupnpc-dev libmozjs185-dev libnvtt-dev libogg-dev     \    libopenal-dev libpng-dev libsdl-dev libvorbis-dev libwxgtk2.8-dev       \    libxcursor-dev libxml2-dev subversion zlib1g-dev

Installations specific dependencies for i18n

$ sudo apt-get install git cmake libicu-dev

Clone your Git

$ git clone -b i18n https://github.com/leper/0ad.git

Build tinygettext

$ cd /home/loki/0ad/libraries/source/tinygettext/$ '/home/loki/0ad/libraries/source/tinygettext/build.sh'

Build 0AD

$ cd /home/loki/0ad/build/workspaces$ ./update-workspaces.sh -j4$ cd gcc$ make -j4

Test

$ '/home/loki/0ad/binaries/system/test'Running 289 tests.................................................................................................................................................................................................................................................................................................OK!

---------------------------------------------------------------------------------------

gdb (if I understand what you asked me)

  Reveal hidden contents

Edited by Loki72
Link to comment
Share on other sites

  On 14/02/2014 at 2:59 AM, Loki72 said:

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff66fb036 in tinygettext::Dictionary::translate(std::map<std::string, std::vector<std::string, std::allocator<std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > > > const&, char const*) () from /home/loki/0ad/binaries/system/libtinygettext.so

I believe I had the same issue (I can't say for sure because I'm on another computer now, but I recall that the segfault was in a 'translate' function too) when I tried to run https://github.com/leper/0ad/tree/i18n with Russian localization on Ubuntu 12.04 a few days ago. It worked fine with the English locale though. Also I was able to run an older version of the branch from the Gallaecio's repo with the Russian locale as I reported before.
Link to comment
Share on other sites

Hi fcXSanya,

Version Gallaecio worked for me between 28 September 2013 and 29 October 2013 (date found on this forum) with the same comment as you, but I never able to make it work since. Moreover, it was two days after:

  On 25/10/2013 at 7:03 PM, fcxSanya said:

I successfully built it on Ubuntu 12.04 a month ago (not sure if something has changed since then) ...

I will stay some time with the deposition of Leper (if it can help), because his version seems more "clean" (dependencies), and Gallaecio seems unavailable at this time. But against, I'm not sure I understand your :

  On 14/02/2014 at 10:26 AM, fcxSanya said:

Also I was able to run an older version of the branch from the Gallaecio's repo ...

Do I understand that you know how to find a version (of Gallaecio) anterior to 29 October 2013 ? Upgrade to the current version ? (the goal is to have the most advanced translation for alpha 16)

Edited by Loki72
Link to comment
Share on other sites

  On 14/02/2014 at 11:09 AM, Loki72 said:

I will stay some time with the deposition of Leper (if it can help), because his version seems more "clean" (dependencies), and Gallaecio seems unavailable at this time.

  On 14/02/2014 at 11:09 AM, Loki72 said:

Do I understand that you know how to find a version (of Gallaecio) prior to 29 October 2013 ? Upgrade to the current version ? (the goal is to have the most advanced translation for alpha 16)

As far I as understand all development is happening in the leper's repository now, so that's what we should use. But it can be useful to checkout older commits (via 'git checkout <commit-hash>' or via git-bisect) to find the last working revision.
Link to comment
Share on other sites

I was just testing: http://stackoverflow.com/questions/3489173/how-to-clone-git-repository-with-specific-revision-changeset, but work on an outdated version could create more problems than solution :(

I'll wait Leper to know what he thinks about
http://www.wildfiregames.com/forum/index.php?showtopic=17747&page=2#entry285178, before trying anything else, it's safer :)

Link to comment
Share on other sites

  On 21/02/2014 at 7:07 PM, Lion.Kanzen said:

Is near to finished this feature? :o?

It has been "near to finished" for a long time. But with every bug that's found, we get nearer to the finish.

One of the main problems is the UI. Lots of buttons are given a certain size, so the English string fits, but in a lot of other languages, the size becomes too small to hold the text.

Another problem is our fonts system. We support most characters that are based on Latin, but for other languages (Arab, Chinese, Hindi, ...), we don't have the right fonts, and it just get rendered as a bunch of question marks.

Link to comment
Share on other sites

Hi,

As GunChleoc: I just built and Launched the leper branch in Ubuntu 13.10 - A big thank you (Leper ...) for fixing this problem ;)

But as Lion.Kanzen (apparently), I have no other choice than "English (United States)" in "Tools and Options"> "Language"

I tried several things (after looking in /home/loki/0ad/binaries/data/config), such as changing file /home/loki/0ad/binaries/data/mods/public/l10n/.tx/config file or /home/loki/0ad/binaries/data/l10n/.tx/config file to point to the French .po, replace the fr.po that I found by those transifex, but without success :(

Without being oppressive, but being so close to a major advanced (in my opinion), how can we put the desired .po ? :)

Edit :

I had not read

  On 21/02/2014 at 9:24 PM, sanderd17 said:

It has been "near to finished" for a long time. But with every bug that's found, we get nearer to the finish.

One of the main problems is the UI. Lots of buttons are given a certain size, so the English string fits, but in a lot of other languages, the size becomes too small to hold the text.

Another problem is our fonts system. We support most characters that are based on Latin, but for other languages (Arab, Chinese, Hindi, ...), we don't have the right fonts, and it just get rendered as a bunch of question marks.

It is now possible to switch from a Latin language to another (even with space problem) ?

  • Like 1
Link to comment
Share on other sites

Slap me with a wet noodle, I had grabbed the wrong branch. I knew this was too easy :lol2:

Maybe add the complete git checkout code to the first post of this thread, for idiots like me?

git clone https://github.com/leper/0ad.git -b i18n <dir>

I have a problem compiling now - make doesn't find libicu-dev, although I did grab it from the Software Center. Or maybe I have the wrong version, it's 4.8 on Ubuntu LTS 12.04. So, I downloaded libicu version 52_1 (ICU4C) and compiled and installed. I still get the error messages though, maybe I need to tell the compiler where the installation path is? I don't know how to do that though.

Here's some of error messages:

<snip>==== Building test (release) ====Creating obj/test_Releaseprecompiled.htest_FixedVector2D.cpp../../../binaries/system/libengine.a(L10n.o): In function `~L10n':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:52: undefined reference to `icu_52::Locale::~Locale()'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getCurrentLocale()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:59: undefined reference to `icu_52::Locale::Locale(icu_52::Locale const&)'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getSupportedLocaleCodes()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:83: undefined reference to `icu_52::Locale::getBaseName() const'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:81: undefined reference to `icu_52::Locale::getBaseName() const'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getCurrentLocale()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:59: undefined reference to `icu_52::Locale::Locale(icu_52::Locale const&)'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getCurrentLocaleIndex()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:120: undefined reference to `icu_52::Locale::getBaseName() const'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:120: undefined reference to `icu_52::Locale::getBaseName() const'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:120: undefined reference to `icu_52::Locale::~Locale()'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getCurrentLocale()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:59: undefined reference to `icu_52::Locale::Locale(icu_52::Locale const&)'../../../binaries/system/libengine.a(L10n.o): In function `L10n::getCurrentLocaleIndex()':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:123: undefined reference to `icu_52::Locale::~Locale()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:126: undefined reference to `icu_52::Locale::getUS()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:120: undefined reference to `icu_52::Locale::~Locale()'../../../binaries/system/libengine.a(L10n.o): In function `L10n::parseDateTime(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, icu_52::Locale const&)':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:195: undefined reference to `icu_52::StringPiece::StringPiece(char const*)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:195: undefined reference to `icu_52::UnicodeString::fromUTF8(icu_52::StringPiece const&)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:196: undefined reference to `icu_52::StringPiece::StringPiece(char const*)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:196: undefined reference to `icu_52::UnicodeString::fromUTF8(icu_52::StringPiece const&)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:198: undefined reference to `icu_52::UMemory::operator new(unsigned long)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:198: undefined reference to `icu_52::SimpleDateFormat::SimpleDateFormat(icu_52::UnicodeString const&, icu_52::Locale const&, UErrorCode&)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:202: undefined reference to `icu_52::UnicodeString::~UnicodeString()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:202: undefined reference to `icu_52::UnicodeString::~UnicodeString()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:202: undefined reference to `icu_52::UnicodeString::~UnicodeString()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:202: undefined reference to `icu_52::UnicodeString::~UnicodeString()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:198: undefined reference to `icu_52::UMemory::operator delete(void*)'../../../binaries/system/libengine.a(L10n.o): In function `UnicodeString':/usr/local/include/unicode/unistr.h:3613: undefined reference to `vtable for icu_52::UnicodeString'../../../binaries/system/libengine.a(L10n.o): In function `L10n::createDateTimeInstance(L10n::DateTimeType, icu_52::DateFormat::EStyle, icu_52::Locale const&)':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:360: undefined reference to `icu_52::DateFormat::createDateTimeInstance(icu_52::DateFormat::EStyle, icu_52::DateFormat::EStyle, icu_52::Locale const&)'../../../binaries/system/libengine.a(L10n.o): In function `L10n::localizeDateTime(double const&, L10n::DateTimeType, icu_52::DateFormat::EStyle)':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:210: undefined reference to `icu_52::DateFormat::format(double, icu_52::UnicodeString&) const'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:212: undefined reference to `icu_52::CheckedArrayByteSink::CheckedArrayByteSink(char*, int)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:213: undefined reference to `icu_52::UnicodeString::toUTF8(icu_52::ByteSink&) const'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:217: undefined reference to `icu_52::CheckedArrayByteSink::~CheckedArrayByteSink()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:217: undefined reference to `icu_52::UnicodeString::~UnicodeString()'../../../binaries/system/libengine.a(L10n.o): In function `L10n::createDateTimeInstance(L10n::DateTimeType, icu_52::DateFormat::EStyle, icu_52::Locale const&)':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:353: undefined reference to `icu_52::DateFormat::createDateInstance(icu_52::DateFormat::EStyle, icu_52::Locale const&)'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:356: undefined reference to `icu_52::DateFormat::createTimeInstance(icu_52::DateFormat::EStyle, icu_52::Locale const&)'../../../binaries/system/libengine.a(L10n.o): In function `L10n::localizeDateTime(double const&, L10n::DateTimeType, icu_52::DateFormat::EStyle)':~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:217: undefined reference to `icu_52::CheckedArrayByteSink::~CheckedArrayByteSink()'~/0ad/leper/build/workspaces/gcc/../../../source/i18n/L10n.cpp:217: undefined reference to `icu_52::UnicodeString::~UnicodeString()'../../../binaries/system/libengine.a(L10n.o): In function `UnicodeString':/usr/local/include/unicode/unistr.h:3613: undefined reference to `vtable for icu_52::UnicodeString'<snip>~/0ad/leper/build/workspaces/gcc/../../../source/gui/scripting/ScriptFunctions.cpp:715: undefined reference to `icu_52::Locale::getUS()'collect2: ld returned 1 exit statusmake[1]: *** [../../../binaries/system/pyrogenesis] Error 1make: *** [pyrogenesis] Error 2make: *** Waiting for unfinished jobs....test_Matrix3d.cpptest_MD5.cpp<snip>

If the problem is that my Ubuntu is too old, I'll wait until the next LTS release in April before I try again, because my computer doesn't like Ubuntu Saucy,

Edited by GunChleoc
Link to comment
Share on other sites

Hi,

I just tested:

  On 22/02/2014 at 12:41 AM, leper said:

Place the engine po file as xx_XX.engine.po in binaries/data/l10n/ and the public po file as xx_XX.public.po in binaries/data/mods/public/l10n/. (with xx_XX being your locale code (eg fr, de or pt_PT))

And it works :)

I am not available this afternoon (one of my Ramirezis - a Amazonian fish - looks sick, so I have to mount a hospital aquarium), but I look at it tonight.
In any case, all my congratulations for the progress of internationalization ;)

GunChleoc:

On ubuntu 13.10, I installed the libicu-dev (and thus its dependence libicu48) by default with the command:
sudo apt-get install git cmake libicu-dev

(see http://www.wildfiregames.com/forum/index.php?s=607441b0b473b681320f37d1a3185316&showtopic=17747&page=2#entry285178)

For information, this is the "4.8.1.1-12ubuntu2" version.

Edited by Loki72
Link to comment
Share on other sites

  On 22/02/2014 at 11:17 AM, leper said:

The error message you posted is because your installed (and compiled ones) are in /usr/local/. It would be more interesting what the errors are with just the libicu-dev package (and the other version removed).

I don't know how to remove this now, because make uninstall only tells me that it has no target. How do you remove something that has been built and installed from source rather than the Software Center? Can I just rm them without damaging the system?

The libicu-dev that comes with my system is libicu-dev 4.8.1.1-3ubuntu0.1, so it's strange that it finds stuff in Loki's version but not in mine.

In /usr/local/lib, I have these files:

libicudata.solibicudata.so.52libicudata.so.52.1libicui18n.solibicui18n.so.52libicui18n.so.52.1libicuio.solibicuio.so.52libicuio.so.52.1libicule.solibicule.so.52libicule.so.52.1libiculx.solibiculx.so.52libiculx.so.52.1libicutest.solibicutest.so.52libicutest.so.52.1libicutu.solibicutu.so.52libicutu.so.52.1libicuuc.solibicuuc.so.52libicuuc.so.52.1
Link to comment
Share on other sites

GunChleoc,
I do not know if this will help, but to uninstall cleanly, I use "synaptic" and not the software center.

In synaptic, there is the "complete removal" option, which should remove the desired package, but also the configuration files that remain in case you decide to reinstall the package (I think those installed directly by sources are present too, but I'm not sure).

There are also a bunch of filters that can be very useful (broken packages or packages you manually installed ...)

Maybe you should uninstall it completely before installing the version of the official repositories. It is only one track, but I could not help you more, sorry.
Edited by Loki72
Link to comment
Share on other sites

I ran

sudo checkinstall -D --pkgname icu52.1 --pkgversion 52.1 make install

and then I was able to remove everything with synaptic. I then installed the libicu-dev again that comes with Ubuntu and the compile process went though. You guys rock! :)

Then I did this:

  On 22/02/2014 at 12:41 AM, leper said:

Place the engine po file as xx_XX.engine.po in binaries/data/l10n/ and the public po file as xx_XX.public.po in binaries/data/mods/public/l10n/. (with xx_XX being your locale code (eg fr, de or pt_PT))

And presto pronto, there's my language!

I also managed to start a game without any crashes. My Linux machine is too slow to play a game, but it is enough to do a lot of in-game string testing :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...