View Issue Details

IDProjectCategoryView StatusLast Update
0002050DarkRadiantGUIpublic21.12.2010 12:18
Reportermattn Assigned Togreebo  
Status closedResolutionfixed 
Product Version1.0.2 
Target Version1.3.0Fixed in Version1.3.0 
Summary0002050: I18N
DescriptionPlease add gettext support to the GUI - if you would prepare it the way you like it, i would offer my help to mark all strings for translation and also offer some translations.
TagsNo tags attached.
Attached Files
radiant_i18n.h (1,067 bytes)   
 * @file radiant_i18n.h

Copyright (C) 1999-2006 Id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.

This file is part of GtkRadiant.

GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GtkRadiant is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GtkRadiant; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#ifndef RADIANT_I18N_H
#define RADIANT_I18N_H

#define GETTEXT_PACKAGE "uforadiant"
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>

#ifndef C_
#define C_(context,text) _(text)

radiant_i18n.h (1,067 bytes)   




21.12.2009 17:10

administrator   ~0002784

I don't know much about this - any tutorials or best practice examples?


21.12.2009 17:59

updater   ~0002788

we've just done the following in uforadiant:
    /** @todo support system wide locale dirs */
    bindtextdomain(GETTEXT_PACKAGE, "i18n");
    /* set encoding to utf-8 to prevent errors for Windows */
    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");

    gtk_init(&argc, &argv);

    /* reset some locale settings back to standard c
     * this is e.g. needed for parsing float values from textfiles */
    setlocale(LC_NUMERIC, "C");
    setlocale(LC_TIME, "C");

now you only have to use #include <glib/gi18n-lib.h> and you are ready to mark strings as translatable.


22.12.2009 16:46

administrator   ~0002790

Something worthwile to investigate for the next release, though I can't make any promises.


10.04.2010 14:24

updater   ~0002985

great to see you are working on it.


10.04.2010 15:19

administrator   ~0002986

I'm almost ready, I just have to figure out how to organize stuff in such a way that .po files can be edited collaboratively. I want to have a web-based interface for translating strings with support for .po files. So far I checked out "simplepo" and "etrans", but the sourceforge web servers don't play along.

I'll probably put the interface on my own webspace at

That, and marking all the strings for translation are the only tasks left, with the former being quite a lot of work.


10.04.2010 16:15

updater   ~0002987

the xml strings are included in the string search, too?

i've never tried a web based approach - but i've heard that launchpad has a quite good interface for this.


10.04.2010 17:16

administrator   ~0002988

No, the XML strings are not yet considered, I'll have to come up with something with regards to menus and toolbars.

I've launched a small webinterface here:

Here the translation entries can be edited online and I can download the .po file to generate the .mo and include them in a release. If new strings are added, I just re-upload an existing .po file and the changes get merged into the database. Quite convenient, but the interface for editing the strings themselves is a bit awkward.


10.04.2010 18:18

administrator   ~0002989

Hm, extracting stuff from XML files using xgettext is a bit of a problem it seems.


11.04.2010 06:24

administrator   ~0002990

And done. There is a python script available in tools/i18n which generates the POT file based on the C++ sources and certain XML file content.


16.04.2010 15:58

administrator   ~0002991

I think we're set now. The translation portal can be found at, see you there. :)


17.04.2010 14:55

updater   ~0002992

great - maybe you can import some of the translated strings from here (msgmerge)

Issue History

Date Modified Username Field Change
21.12.2009 09:04 mattn New Issue
21.12.2009 17:10 greebo Note Added: 0002784
21.12.2009 17:10 greebo Status new => acknowledged
21.12.2009 17:59 mattn Note Added: 0002788
21.12.2009 17:59 mattn File Added: radiant_i18n.h
22.12.2009 16:46 greebo Note Added: 0002790
22.12.2009 16:46 greebo Status acknowledged => confirmed
22.12.2009 16:46 greebo Target Version => 1.2.0
10.03.2010 11:49 greebo Target Version 1.2.0 => 1.2.1
09.04.2010 14:27 greebo Status confirmed => assigned
09.04.2010 14:27 greebo Assigned To => greebo
10.04.2010 14:24 mattn Note Added: 0002985
10.04.2010 15:19 greebo Note Added: 0002986
10.04.2010 16:15 mattn Note Added: 0002987
10.04.2010 17:16 greebo Note Added: 0002988
10.04.2010 18:18 greebo Note Added: 0002989
11.04.2010 06:24 greebo Note Added: 0002990
16.04.2010 15:58 greebo Note Added: 0002991
16.04.2010 15:58 greebo Status assigned => resolved
16.04.2010 15:58 greebo Fixed in Version => 1.3.0
16.04.2010 15:58 greebo Resolution open => fixed
17.04.2010 14:55 mattn Note Added: 0002992
21.12.2010 12:18 greebo Status resolved => closed