i18n: Added dynamic registration for translations
authorSteven Barth <steven@midlink.org>
Wed, 23 Jul 2008 11:13:33 +0000 (11:13 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 23 Jul 2008 11:13:33 +0000 (11:13 +0000)
i18n/english/ipkg/postinst [new file with mode: 0755]
i18n/english/root/etc/uci-defaults/luci-i18n-english [new file with mode: 0755]
i18n/french/ipkg/postinst [new file with mode: 0755]
i18n/french/root/etc/uci-defaults/luci-i18n-french [new file with mode: 0755]
i18n/german/ipkg/postinst [new file with mode: 0755]
i18n/german/root/etc/uci-defaults/luci-i18n-german [new file with mode: 0755]
libs/web/root/etc/config/luci

diff --git a/i18n/english/ipkg/postinst b/i18n/english/ipkg/postinst
new file mode 100755 (executable)
index 0000000..24cf8dd
--- /dev/null
@@ -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 (executable)
index 0000000..506d6ef
--- /dev/null
@@ -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 (executable)
index 0000000..e220e4d
--- /dev/null
@@ -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 (executable)
index 0000000..3a6f8c2
--- /dev/null
@@ -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 (executable)
index 0000000..c5af662
--- /dev/null
@@ -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 (executable)
index 0000000..26a928f
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+uci batch <<-EOF
+       set luci.languages.de=Deutsch
+        commit luci
+EOF
+       
index 76375eafea59ca01a83250a48b8196344f0a7dca..43c484a8fd793bde47f32ef6f14c0fe4a0a9d053 100644 (file)
@@ -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"