From: Steven Barth Date: Wed, 23 Jul 2008 11:13:33 +0000 (+0000) Subject: i18n: Added dynamic registration for translations X-Git-Tag: 0.8.0~591 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4deb48622868cfbf6b7d9a8f710df16825aec664;p=oweals%2Fluci.git i18n: Added dynamic registration for translations --- diff --git a/i18n/english/ipkg/postinst b/i18n/english/ipkg/postinst new file mode 100755 index 000000000..24cf8dd2d --- /dev/null +++ b/i18n/english/ipkg/postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-i18n-english ) && rm -f /etc/uci-defaults/luci-i18n-english +} diff --git a/i18n/english/root/etc/uci-defaults/luci-i18n-english b/i18n/english/root/etc/uci-defaults/luci-i18n-english new file mode 100755 index 000000000..506d6ef93 --- /dev/null +++ b/i18n/english/root/etc/uci-defaults/luci-i18n-english @@ -0,0 +1,6 @@ +#!/bin/sh +uci batch <<-EOF + set luci.languages.en=English + commit luci +EOF + diff --git a/i18n/french/ipkg/postinst b/i18n/french/ipkg/postinst new file mode 100755 index 000000000..e220e4dca --- /dev/null +++ b/i18n/french/ipkg/postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-i18n-french ) && rm -f /etc/uci-defaults/luci-i18n-french +} diff --git a/i18n/french/root/etc/uci-defaults/luci-i18n-french b/i18n/french/root/etc/uci-defaults/luci-i18n-french new file mode 100755 index 000000000..3a6f8c200 --- /dev/null +++ b/i18n/french/root/etc/uci-defaults/luci-i18n-french @@ -0,0 +1,6 @@ +#!/bin/sh +uci batch <<-EOF + set luci.languages.fr=Français + commit luci +EOF + diff --git a/i18n/german/ipkg/postinst b/i18n/german/ipkg/postinst new file mode 100755 index 000000000..c5af66287 --- /dev/null +++ b/i18n/german/ipkg/postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-i18n-german ) && rm -f /etc/uci-defaults/luci-i18n-german +} diff --git a/i18n/german/root/etc/uci-defaults/luci-i18n-german b/i18n/german/root/etc/uci-defaults/luci-i18n-german new file mode 100755 index 000000000..26a928fae --- /dev/null +++ b/i18n/german/root/etc/uci-defaults/luci-i18n-german @@ -0,0 +1,6 @@ +#!/bin/sh +uci batch <<-EOF + set luci.languages.de=Deutsch + commit luci +EOF + diff --git a/libs/web/root/etc/config/luci b/libs/web/root/etc/config/luci index 76375eafe..43c484a8f 100644 --- a/libs/web/root/etc/config/luci +++ b/libs/web/root/etc/config/luci @@ -34,9 +34,6 @@ config event uci_oncommit option ntpclient "/sbin/luci-reload ntpclient" config internal languages - option de "Deutsch" - option en "English" - option fr "Français" config internal sauth option sessionpath "/tmp/.lucisessions"