TRANSLATORS howto

Derek Atkins warlord at MIT.EDU
Tue Jun 3 14:00:53 CDT 2003


Nice job!  I do have a few comments:

Jon Lapham <lapham at extracta.com.br> writes:

> 1) Get the source from CVS
> 
> The first thing to do is to download the latest STABLE branch of gnucash
> from CVS and get it to compile.  Do not use the HEAD branch, since the text
> in the HEAD branch changes so much, it would be a waste of time to translate 
> it.  Do not worry, when the HEAD branch becomes stable, the existing 
> translations in the STABLE branch will be merged.  Your work will not be lost.
> 
> Login (password is "guest") to the CVS server:
> cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot login
> 
> FIXME: stable branch, not HEAD.
> cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot update gnucash

Does this work?  I didn't think you could "update" before you "checkout"?
Regardless, what I would suggest is:

 cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot checkout \
        -rgnucash-1-8-branch gnucash

This will checkout the 1.8 stable branch (as opposed to HEAD).  You
should make sure you've got the correct branch-name (although it only
changes once every year or two when we've got a new major stable
release tree).

> ==============================================================================
> 2) Mailing lists
> 
> You should subscribe to 2 mailing lists: gnucash-devel and gnucash-patches.
> 
> To subscribe, go the the gnucash web site, and follow the links to the 
> mailing lists:
> http://www.gnucash.org/
> http://www.gnucash.org/en/lists.phtml
> 
> The gnucash-devel mailing list is a good place to send technical questions 
> you have about doing the translations.  The gnucash-patches list is where 
> you will send your updated translation files.

Users should also know about #gnucash on irc.gnome.org; a bunch of
developers hang out there, too.  Basically, it's another resource for
asking questions.

> ==============================================================================
> 4) Compile 
> 
> Before starting to work on your translations, I suggest making sure you can 
> compile the gnucash source code.  This way you can get your system set up 
> correctly with all the development packages you need.  It is a good idea
> to actually run gnucash with your new translations because it is quite 
> helpful to see the phrases in the context of the running program.
> 
> Enter the gnucash directory and run the autogen.sh script.  We will
> enable debugging because it may be handly later for tracking down problems.
> 
> cd gnucash
> ./autogen.sh --enable-debug

The user should be directed to the README.cvs file for more detailed
instructions.  In particular, any "configure" options should be
supplied to autogen, and users should NOT run "configure" by hand.

Also, I would suggest that users NOT use the default prefix...  I
would recommend people use --prefix=/opt/gnucash-1.8.  This will
install gnucash into /opt/gnucash-1.8/bin/gnucash, but it also allows
the user to easily remove ALL gnucash installed files with a simple
'rm' command.  It also allows you to easily have multiple versions of
gnucash installed and they wont interfere with each other.

> If autogen complains about missing development packages, find them on your
> favorite OS distribution, install it, and try to re-run the autogen command.
> Eventually, you should be able to get autogen to run without any error 
> messages.
> 
> Note: there are some warnings that spew forth during autogen.  Do not worry
> about them, apparently they are normal.

Of particular note, users should ONLY run "autogen" and "make".  They
should NOT run aclocal, autoconf, configure, or any other programs,
EVEN IF THE AUTOGEN OUTPUT SUGGESTS THAT THEY DO.  This is important,
and has caused a lot of confusion.  Unfortunately the auto tools
complain and cause bogus warnings.

> Next, compile gnucash:
> 
> make
> 
> ==============================================================================
> 5) Install and run
> 
> To install (assuming "make" completed without any problems) you must be 
> root.  By default, the files will be installed under the /usr/local/
> directory.  This is handy because it shouldn't interfere with the version
> of gnucash which comes with your OS.
> 
> su - 
> make install
> 
> After installation, insure that it works by running (as a normal user,
> no need to be root here):
> 
> /usr/local/bin/gnucash

If they use a non-default prefix then this will be different.
I recommend /opt/gnucash-1.8/bin/gnucash.

> It is a good idea to use absolute paths like this to insure you run 
> the proper gnucash executable.  To run your OS pre-installed version of
> gnucash, usually you can type:
> 
> /usr/bin/gnucash

note that if you do have a "system" gnucash, it's _possible_ that
there might be some interference.  It's unlikely, but it is possible.

> In either case, you can easily switch between the various languages the 
> gnucash has available by placing the LANG env var before the call to the
> executable:
> 
> LANG=pt_BR /usr/local/bin/gnucash
> 

[snip]

> If you see any "Gtk-CRITICAL" messages while running gnucash, it is probably
> because you translated a string differently than how it exists in some other
> gnome library.  You must discover which string you tranlated differently, and
> change the translation to exactly match that of the gnome libraries.
> 
> To do this, you need to run gnucash under gdb:
> 
> LANG=XXXX /usr/local/bin/gnucash-env gdb /usr/bin/guile

Note that these paths will depend on your prefix.

> Then, from within gdb, issue:
> run -e main -s /usr/local/libexec/gnucash/overrides/gnucash --g-fatal-warnings
> 
> Eventually, gnucash should crash (becuase of the --g-fatal-warnings 
> directive), when it does, issue from within gdb:
> 
> backtrace
> 
> You should see some output that looks like this:
> 
> #0  0xffffe002 in ?? ()
> #1  0x42028a73 in abort () from /lib/tls/libc.so.6
> #2  0x4019d3d8 in g_logv () from /usr/lib/libglib-1.2.so.0
> #3  0x4019d414 in g_log () from /usr/lib/libglib-1.2.so.0
> #4  0x40500fdd in gtk_type_check_object_cast () from 
> /usr/lib/libgtk-1.2.so.0
> #5  0x407292e5 in gnc_mdi_tweak_menus (mc=0x825adb0) at gnc-mdi-utils.c:574
> #6  0x40729d13 in gnc_mdi_child_changed_cb (mdi=0x8266fd8, prev_child=0x0,
>      data=0x8265fd8) at gnc-mdi-utils.c:861
> 
> Notice position #5 which has "gnc_mdi_tweak_menus at 
> gnc-mdi-utils.c:574"?  Open that source file and find line 574:
> 
> 573:  widget = gnc_mdi_child_find_menu_item(mc, "_View/_Toolbar");
> 574:  gtk_signal_handler_block_by_data(GTK_OBJECT(widget), info);
> 
> So, the problem is with the translation of "_View/_Toolbar".  The "/" is a 
> menu seperator, so you now know that the problem is with either the 
> translation of "_View" or "_Toolbar".  By switching to an English gnucash
> and looking through your .po file, you should be able to find the problem.
> Change the offending translation to whatever you see in the gnucash app.

The translation has to include the proper underscores...

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list