Changeset 875f8496f34c03c50ebd077fe94b3f4187dda497
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r71c1784
|
r875f849
|
|
| 46 | 46 | |
| 47 | 47 | #define GETTEXT_PACKAGE "gladish" |
| 48 | | #define PACKAGE_LOCALE_DIR "/usr/share/locale" |
| 49 | 48 | |
| 50 | 49 | #define ENABLE_NLS 1 |
| … |
… |
|
| 85 | 84 | int main(int argc, char** argv) |
| 86 | 85 | { |
| 87 | | #ifdef ENABLE_NLS |
| 88 | | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); |
| | 86 | #if ENABLE_NLS |
| | 87 | bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); |
| 89 | 88 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); |
| 90 | 89 | textdomain (GETTEXT_PACKAGE); |
-
|
ree24750
|
r875f849
|
|
| 221 | 221 | |
| 222 | 222 | 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')) |
| 223 | 224 | |
| 224 | 225 | # write some parts of the configure environment to the config.h file |
| 225 | 226 | conf.define('DATA_DIR', conf.env['DATA_DIR']) |
| | 227 | conf.define('LOCALE_DIR', conf.env['LOCALE_DIR']) |
| 226 | 228 | conf.define('PACKAGE_VERSION', VERSION) |
| 227 | 229 | conf.define('DBUS_NAME_BASE', DBUS_NAME_BASE) |
| … |
… |
|
| 598 | 600 | pprint('CYAN', "Preparing translation '"+item[0]+"'") |
| 599 | 601 | 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")) |
| 601 | 603 | |
| 602 | 604 | def get_tags_dirs(): |