Changeset 875f8496f34c03c50ebd077fe94b3f4187dda497

Show
Ignore:
Timestamp:
12/19/10 13:25:20 (2 years ago)
Author:
Nikita Zlobin <cook60020tmp@…>
Children:
7cf5b21d13c51379f83c4657e38c20e0127efb48
Parents:
b733d298146dd1255c9ba062fe985defec61dd7e
git-author:
Nikita Zlobin <cook60020tmp@mail.ru> / 2010-12-19T16:24:55Z+0500
git-committer:
Nikita Zlobin <cook60020tmp@mail.ru> / 2010-12-19T16:25:20Z+0500
Message:

i18n: Configurable locale dir

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gui/main.c

    r71c1784 r875f849  
    4646 
    4747#define GETTEXT_PACKAGE "gladish" 
    48 #define PACKAGE_LOCALE_DIR "/usr/share/locale" 
    4948 
    5049#define ENABLE_NLS 1 
     
    8584int main(int argc, char** argv) 
    8685{ 
    87   #ifdef ENABLE_NLS 
    88     bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 
     86  #if ENABLE_NLS 
     87    bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); 
    8988    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 
    9089    textdomain (GETTEXT_PACKAGE); 
  • wscript

    ree24750 r875f849  
    221221 
    222222    conf.env['DATA_DIR'] = os.path.normpath(os.path.join(conf.env['PREFIX'], 'share', APPNAME)) 
     223    conf.env['LOCALE_DIR'] = os.path.normpath(os.path.join(conf.env['PREFIX'], 'share', 'locale')) 
    223224 
    224225    # write some parts of the configure environment to the config.h file 
    225226    conf.define('DATA_DIR', conf.env['DATA_DIR']) 
     227    conf.define('LOCALE_DIR', conf.env['LOCALE_DIR']) 
    226228    conf.define('PACKAGE_VERSION', VERSION) 
    227229    conf.define('DBUS_NAME_BASE', DBUS_NAME_BASE) 
     
    598600          pprint('CYAN', "Preparing translation '"+item[0]+"'") 
    599601          os.system("msgfmt ./po/"+po_list_item+" -o ./po/"+item[0]+".mo") 
    600           bld.install_as(('${PREFIX}/share/locale/'+item[0]+'/LC_MESSAGES/gladish.mo'), ('./po/'+item[0]+".mo")) 
     602          bld.install_as(('${LOCALE_DIR}/'+item[0]+'/LC_MESSAGES/gladish.mo'), ('./po/'+item[0]+".mo")) 
    601603 
    602604def get_tags_dirs():