i18n: Added dynamic registration for translations

This commit is contained in:
Steven Barth 2008-07-23 11:13:33 +00:00
parent f10b0e58e2
commit 4deb486228
7 changed files with 30 additions and 3 deletions

4
i18n/english/ipkg/postinst Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
[ -n "${IPKG_INSTROOT}" ] || {
( . /etc/uci-defaults/luci-i18n-english ) && rm -f /etc/uci-defaults/luci-i18n-english
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
uci batch <<-EOF
set luci.languages.en=English
commit luci
EOF

4
i18n/french/ipkg/postinst Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
[ -n "${IPKG_INSTROOT}" ] || {
( . /etc/uci-defaults/luci-i18n-french ) && rm -f /etc/uci-defaults/luci-i18n-french
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
uci batch <<-EOF
set luci.languages.fr=Français
commit luci
EOF

4
i18n/german/ipkg/postinst Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
[ -n "${IPKG_INSTROOT}" ] || {
( . /etc/uci-defaults/luci-i18n-german ) && rm -f /etc/uci-defaults/luci-i18n-german
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
uci batch <<-EOF
set luci.languages.de=Deutsch
commit luci
EOF

View 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"