.mo files removed from svn

Page 1 of 1
9 posts
.mo files removed from svn

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Hi,
I have removed *.mo files from mmex/runtime/en. We must not add any files to svn which can be generated from others files in source tree. All .mo files now generate during build process from .po files. This done for VC++ solution and for bakefile build scripts. If you add new .po file, you should add new record to the mmex/runtime/en/i18n.bkl.
Re: .mo files removed from svn

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
How does this affect Xcode builders?
Re: .mo files removed from svn

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
I do not have Mac, so you can answer yourself :-)
Re: .mo files removed from svn

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Ok, XCode does not automatically generate the .mo files. How do you accomplish this in MSVC?
Re: .mo files removed from svn

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Hi,

It's should be msgfmt tool available in the system.

Windows user example:
Usage: C:\Program Files\Poedit\bin\msgfmt.exe [OPTION] filename.po ...
Generate binary message catalog from textual translation description.

So...
% dpkg -S /sw/bin/msgfmt
gettext-tools: /sw/bin/msgfmt

% dpkg -S /sw/bin/xgettext
gettext-tools: /sw/bin/xgettext

% dpkg -S /sw/bin/ngettext
gettext-bin: /sw/bin/ngettext

So make sure gettext-tools and gettext-bin are installed, and make sure /sw/bin is in your path (which it will be if you source /sw/bin/init.sh ).

Copy/pasted from here:
http://forums.macosxhints.com/archive/i ... 72591.html
Re: .mo files removed from svn

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Here's a script for doing this in xcode, you'll just need to make sure you have the paths correct. Cheers
Code: Select all
cd /Users/PATH_TO_TRUNK/trunk/mmex/runtime/en

rm *.mo
/Developer/Tools/msgfmt -o arabic.mo arabic.po
/Developer/Tools/msgfmt -o bulgarian.mo bulgarian.po
/Developer/Tools/msgfmt -o chinese_chs.mo chinese_chs.po
/Developer/Tools/msgfmt -o chinese_zh.mo chinese_zh.po
/Developer/Tools/msgfmt -o croation.mo croation.po
/Developer/Tools/msgfmt -o czech.mo czech.po
/Developer/Tools/msgfmt -o dutch.mo dutch.po
/Developer/Tools/msgfmt -o dutch_be.mo dutch_be.po
/Developer/Tools/msgfmt -o english-uk.mo english-uk.po
/Developer/Tools/msgfmt -o english.mo english.po
/Developer/Tools/msgfmt -o french.mo french.po
/Developer/Tools/msgfmt -o german.mo german.po
/Developer/Tools/msgfmt -o greek.mo greek.po
/Developer/Tools/msgfmt -o hebrew.mo hebrew.po
/Developer/Tools/msgfmt -o hungarian.mo hungarian.po
/Developer/Tools/msgfmt -o indonesian.mo indonesian.po
/Developer/Tools/msgfmt -o italian.mo italian.po
/Developer/Tools/msgfmt -o latvian.mo latvian.po
/Developer/Tools/msgfmt -o norwegian.mo norwegian.po
/Developer/Tools/msgfmt -o polish.mo polish.po
/Developer/Tools/msgfmt -o portuguese.mo portuguese.po
/Developer/Tools/msgfmt -o portuguese_portugal.mo portuguese_portugal.po
/Developer/Tools/msgfmt -o romanian.mo romanian.po
/Developer/Tools/msgfmt -o russian.mo russian.po
/Developer/Tools/msgfmt -o serbo-croatian.mo serbo-croatian.po
/Developer/Tools/msgfmt -o slovak.mo slovak.po
/Developer/Tools/msgfmt -o Slovenian.mo Slovenian.po
/Developer/Tools/msgfmt -o spanish.mo spanish.po
/Developer/Tools/msgfmt -o swedish.mo swedish.po
/Developer/Tools/msgfmt -o tamil.mo tamil.po
/Developer/Tools/msgfmt -o turkish.mo turkish.po
/Developer/Tools/msgfmt -o ukrainian.mo ukrainian.po
/Developer/Tools/msgfmt -o vietnamese.mo vietnamese.po
Re: .mo files removed from svn

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Folder mmex\runtime\en has few makefiles which can help to generate .mo files. You can try GNUmakefile.
make -f GNUmakefile
Re: .mo files removed from svn

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Thanks

That will be nice and I can set a new Run Scripts Buildphase to do this each time I build. Just gotta make sure that msgfmt is in my PATH (which I forget how to add it to my PATH).

I'll test it out tomorrow.
Re: .mo files removed from svn

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Okay, got it to work. Adding msgfmt to your $PATH is not enough to get the Xcode user script to work. Apparently Xcode has a different .profile from the currently logged in user. So to do this:
Code: Select all
#!/bin/sh

cd /Users/USERNAME/PATH_TO_SOURCE_TREE/trunk/mmex/i18n
export PATH="$PATH:/Developer/Tools"
make -f GNUmakefile


Now I can add this to the a new build phase and it will do this every time I build.
Page 1 of 1
Who is online

Users browsing this forum: No registered users and 12 guests

cron