Fix and update translation template handling
This commit is contained in:
parent
a97264a090
commit
c7626bfda2
3 changed files with 38 additions and 11 deletions
|
@ -1,17 +1,17 @@
|
||||||
# List of source files containing translatable strings.
|
# List of source files containing translatable strings.
|
||||||
|
|
||||||
midori.desktop.in
|
midori.desktop.in
|
||||||
src/main.c
|
midori/main.c
|
||||||
src/midori-console.c
|
midori/midori-console.c
|
||||||
src/midori-browser.c
|
midori/midori-browser.c
|
||||||
src/midori-panel.c
|
midori/midori-panel.c
|
||||||
src/midori-trash.c
|
midori/midori-trash.c
|
||||||
src/midori-websettings.c
|
midori/midori-websettings.c
|
||||||
src/midori-webview.c
|
midori/midori-webview.c
|
||||||
src/midori-preferences.c
|
midori/midori-preferences.c
|
||||||
src/search.c
|
midori/search.c
|
||||||
src/sokoke.c
|
midori/sokoke.c
|
||||||
src/webSearch.c
|
midori/webSearch.c
|
||||||
katze/katze-throbber.c
|
katze/katze-throbber.c
|
||||||
katze/katze-utils.c
|
katze/katze-utils.c
|
||||||
katze/katze-xbel.c
|
katze/katze-xbel.c
|
||||||
|
|
|
@ -1,5 +1,31 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# WAF build script for midori
|
# WAF build script for midori
|
||||||
|
|
||||||
|
import Params
|
||||||
|
import pproc as subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
if bld.env ()['INTLTOOL_UPDATE']:
|
||||||
|
os.chdir ('./po')
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
size_old = os.stat ('midori.pot').st_size
|
||||||
|
except:
|
||||||
|
size_old = 0
|
||||||
|
subprocess.call (['intltool-update', '--pot'])
|
||||||
|
size_new = os.stat ('midori.pot').st_size
|
||||||
|
if size_new <> size_old:
|
||||||
|
Params.pprint ('YELLOW', "Updated po template.")
|
||||||
|
try:
|
||||||
|
intltool_update = subprocess.Popen (['intltool-update', '-r'],
|
||||||
|
stderr=subprocess.PIPE)
|
||||||
|
intltool_update.wait ()
|
||||||
|
Params.pprint ('YELLOW', "Updated translations.")
|
||||||
|
except:
|
||||||
|
Params.pprint ('RED', "Failed to update translations.")
|
||||||
|
except:
|
||||||
|
Params.pprint ('RED', "Failed to generate po template.")
|
||||||
|
os.chdir ('..')
|
||||||
|
|
||||||
obj = bld.create_obj ('intltool_po')
|
obj = bld.create_obj ('intltool_po')
|
||||||
obj.appname = 'midori'
|
obj.appname = 'midori'
|
||||||
|
|
1
wscript
1
wscript
|
@ -24,6 +24,7 @@ def configure (conf):
|
||||||
if not Params.g_options.disable_nls:
|
if not Params.g_options.disable_nls:
|
||||||
conf.check_tool ('intltool')
|
conf.check_tool ('intltool')
|
||||||
if conf.env['INTLTOOL'] and conf.env['POCOM']:
|
if conf.env['INTLTOOL'] and conf.env['POCOM']:
|
||||||
|
conf.find_program ('intltool-update', var='INTLTOOL_UPDATE')
|
||||||
nls = 'yes'
|
nls = 'yes'
|
||||||
conf.define ('ENABLE_NLS', 1)
|
conf.define ('ENABLE_NLS', 1)
|
||||||
conf.define ('MIDORI_LOCALEDIR', 'LOCALEDIR', 0)
|
conf.define ('MIDORI_LOCALEDIR', 'LOCALEDIR', 0)
|
||||||
|
|
Loading…
Reference in a new issue