.mo files removed from svn

Money Manager Ex Development related posts for both Android and Desktop

Moderator: Renato

Post Reply
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

.mo files removed from svn

Post by Vadim »

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.
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: .mo files removed from svn

Post by elliswr »

How does this affect Xcode builders?
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: .mo files removed from svn

Post by Vadim »

I do not have Mac, so you can answer yourself :-)
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: .mo files removed from svn

Post by elliswr »

Ok, XCode does not automatically generate the .mo files. How do you accomplish this in MSVC?
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: .mo files removed from svn

Post by Nikolay »

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
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: .mo files removed from svn

Post by elliswr »

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
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: .mo files removed from svn

Post by Vadim »

Folder mmex\runtime\en has few makefiles which can help to generate .mo files. You can try GNUmakefile.
make -f GNUmakefile
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: .mo files removed from svn

Post by elliswr »

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.
elliswr
Super MMEX User
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX

Re: .mo files removed from svn

Post by elliswr »

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