use waf for generating and installing *.mo files
This commit is contained in:
parent
7cf5b21d13
commit
c4119ff60b
|
@ -15,5 +15,3 @@
|
||||||
/build
|
/build
|
||||||
*~
|
*~
|
||||||
*.pyc
|
*.pyc
|
||||||
po/*.mo
|
|
||||||
po/*.gmo
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include "../daemon/conf.h"
|
#include "../daemon/conf.h"
|
||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
|
|
||||||
#define GETTEXT_PACKAGE "gladish"
|
#define GETTEXT_PACKAGE "ladish"
|
||||||
|
|
||||||
#define ENABLE_NLS 1
|
#define ENABLE_NLS 1
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Set of available languages.
|
||||||
|
ru fr
|
12
wscript
12
wscript
|
@ -90,6 +90,7 @@ def configure(conf):
|
||||||
conf.load('compiler_cxx')
|
conf.load('compiler_cxx')
|
||||||
conf.load('boost')
|
conf.load('boost')
|
||||||
conf.load('python')
|
conf.load('python')
|
||||||
|
conf.load('intltool')
|
||||||
if parallel_debug:
|
if parallel_debug:
|
||||||
conf.load('parallel_debug')
|
conf.load('parallel_debug')
|
||||||
|
|
||||||
|
@ -590,16 +591,7 @@ def build(bld):
|
||||||
else:
|
else:
|
||||||
pprint('CYAN', "doxygen documentation already built.")
|
pprint('CYAN', "doxygen documentation already built.")
|
||||||
|
|
||||||
# Translations
|
bld(features='intltool_po', appname=APPNAME, podir='po', install_path="${LOCALE_DIR}")
|
||||||
# TODO: Rewrite using waf functionality
|
|
||||||
po_list = os.listdir('./po')
|
|
||||||
if po_list.__len__() > 0:
|
|
||||||
for po_list_item in po_list:
|
|
||||||
item = po_list_item.rsplit('.', 1)
|
|
||||||
if item[1] == "po":
|
|
||||||
pprint('CYAN', "Preparing translation '"+item[0]+"'")
|
|
||||||
os.system("msgfmt ./po/"+po_list_item+" -o ./po/"+item[0]+".mo")
|
|
||||||
bld.install_as(('${LOCALE_DIR}/'+item[0]+'/LC_MESSAGES/gladish.mo'), ('./po/'+item[0]+".mo"))
|
|
||||||
|
|
||||||
def get_tags_dirs():
|
def get_tags_dirs():
|
||||||
source_root = os.path.dirname(Utils.g_module.root_path)
|
source_root = os.path.dirname(Utils.g_module.root_path)
|
||||||
|
|
Loading…
Reference in New Issue