diff options
author | Paul Oranje <p.oranje@xs4all.nl> | 2015-05-02 10:44:17 +0200 |
---|---|---|
committer | Paul Oranje <p.oranje@xs4all.nl> | 2015-05-02 10:44:17 +0200 |
commit | ae8e971eef2be269beab9465139869055918d878 (patch) | |
tree | 5314a2d5b494884271d8900cba6afc348952279b /build | |
parent | 4742d1c2112ace9d1299c69fb086c1646bb04911 (diff) | |
parent | 36879e9e8658601dc3e86ff9251da3fc3666efe0 (diff) |
Merge branch 'master' of https://github.com/openwrt/luci into proto=ipv6+aiccu+fixes
Diffstat (limited to 'build')
-rwxr-xr-x | build/i18n-sync.sh | 33 | ||||
-rwxr-xr-x | build/zoneinfo2lua.pl | 24 |
2 files changed, 16 insertions, 41 deletions
diff --git a/build/i18n-sync.sh b/build/i18n-sync.sh index 430e13f28d..d4f9666585 100755 --- a/build/i18n-sync.sh +++ b/build/i18n-sync.sh @@ -1,25 +1,18 @@ #!/bin/sh -for m in */*/Makefile; do - if grep -qE '^PO *=' $m; then - p="${m%/Makefile}" - t="$(sed -ne 's/^PO *= *//p' $m)" +[ -d ./build ] || { + echo "Execute as ./build/i18n-sync.sh" >&2 + exit 1 +} - case "$t" in - *\ *) - echo "WARNING: Cannot handle $p" >&2 - continue - ;; - *base*) - continue - ;; - esac +./build/mkbasepot.sh - if [ -f "po/templates/$t.pot" ]; then - ./build/i18n-scan.pl "$p" > "po/templates/$t.pot" - fi - fi -done +find . -name '*.pot' -and -not -name base.pot -and -not -name rrdtool.pot | \ + while read path; do + dir="${path%/po/templates/*}" + echo -n "Updating ${path#./} ... " + ./build/i18n-scan.pl "$dir" > "$path" + echo "done" + done -./build/mkbasepot.sh -./build/i18n-update.pl po +./build/i18n-update.pl diff --git a/build/zoneinfo2lua.pl b/build/zoneinfo2lua.pl index 4a90dae355..d3f0403263 100755 --- a/build/zoneinfo2lua.pl +++ b/build/zoneinfo2lua.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # zoneinfo2lua.pl - Make Lua module from /usr/share/zoneinfo -# Execute from within /usr/share/zoneinfo +# Execute from within root of Luci feed, usually feeds/luci # $Id$ use strict; @@ -51,16 +51,7 @@ open(O, "> $tzdout/tzdata.lua") || die "open($tzdout/tzdata.lua): $!\n"; print STDERR "Writing time zones to $tzdout/tzdata.lua ... "; print O <<HEAD; ---[[ -LuCI - Autogenerated Zoneinfo Module - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -]]-- +-- Licensed to the public under the Apache License 2.0. module "luci.sys.zoneinfo.tzdata" @@ -81,16 +72,7 @@ open (O, "> $tzdout/tzoffset.lua") || die "open($tzdout/tzoffset.lua): $!\n"; print STDERR "Writing time offsets to $tzdout/tzoffset.lua ... "; print O <<HEAD; ---[[ -LuCI - Autogenerated Zoneinfo Module - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -]]-- +-- Licensed to the public under the Apache License 2.0. module "luci.sys.zoneinfo.tzoffset" |