summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-27 08:14:24 +0000
committerSteven Barth <steven@midlink.org>2008-05-27 08:14:24 +0000
commitb8124f18f88fe11158eb122a1e362cfbd512cf4f (patch)
tree2d7e9044ddb656c83de73415240c4ded59622389
parentd4399bf6189977336a94795f25986fb89a22a5e7 (diff)
* Separated the MVC-Webframework from core
* Separated i18n from core to prepare translations
-rw-r--r--contrib/package/luci/Makefile23
-rw-r--r--core/src/i18n/default.en14
-rw-r--r--i18n/english/Makefile2
-rw-r--r--i18n/english/src/i18n/cbi.en (renamed from core/src/i18n/cbi.en)0
-rw-r--r--web/Makefile2
-rw-r--r--web/root/etc/config/luci (renamed from core/root/etc/config/luci)0
-rw-r--r--web/root/www/resources/cbi.js (renamed from core/root/www/resources/cbi.js)0
-rw-r--r--web/src/cbi.lua (renamed from core/src/cbi.lua)0
-rw-r--r--web/src/config.lua (renamed from core/src/config.lua)0
-rw-r--r--web/src/dispatcher.lua (renamed from core/src/dispatcher.lua)5
-rw-r--r--web/src/http.lua (renamed from core/src/http.lua)0
-rw-r--r--web/src/i18n.lua (renamed from core/src/i18n.lua)0
-rw-r--r--web/src/template.lua (renamed from core/src/template.lua)0
-rw-r--r--web/src/view/cbi/dvalue.htm (renamed from core/src/view/cbi/dvalue.htm)0
-rw-r--r--web/src/view/cbi/footer.htm (renamed from core/src/view/cbi/footer.htm)0
-rw-r--r--web/src/view/cbi/full_valuefooter.htm (renamed from core/src/view/cbi/full_valuefooter.htm)0
-rw-r--r--web/src/view/cbi/full_valueheader.htm (renamed from core/src/view/cbi/full_valueheader.htm)0
-rw-r--r--web/src/view/cbi/fvalue.htm (renamed from core/src/view/cbi/fvalue.htm)0
-rw-r--r--web/src/view/cbi/header.htm (renamed from core/src/view/cbi/header.htm)0
-rw-r--r--web/src/view/cbi/lvalue.htm (renamed from core/src/view/cbi/lvalue.htm)0
-rw-r--r--web/src/view/cbi/map.htm (renamed from core/src/view/cbi/map.htm)0
-rw-r--r--web/src/view/cbi/mvalue.htm (renamed from core/src/view/cbi/mvalue.htm)0
-rw-r--r--web/src/view/cbi/nsection.htm (renamed from core/src/view/cbi/nsection.htm)0
-rw-r--r--web/src/view/cbi/tblsection.htm (renamed from core/src/view/cbi/tblsection.htm)0
-rw-r--r--web/src/view/cbi/tiny_valuefooter.htm (renamed from core/src/view/cbi/tiny_valuefooter.htm)0
-rw-r--r--web/src/view/cbi/tiny_valueheader.htm (renamed from core/src/view/cbi/tiny_valueheader.htm)0
-rw-r--r--web/src/view/cbi/tsection.htm (renamed from core/src/view/cbi/tsection.htm)0
-rw-r--r--web/src/view/cbi/ucisection.htm (renamed from core/src/view/cbi/ucisection.htm)0
-rw-r--r--web/src/view/cbi/value.htm (renamed from core/src/view/cbi/value.htm)0
-rw-r--r--web/src/view/cbi/valuefooter.htm (renamed from core/src/view/cbi/valuefooter.htm)0
-rw-r--r--web/src/view/cbi/valueheader.htm (renamed from core/src/view/cbi/valueheader.htm)0
-rw-r--r--web/src/view/error404.htm (renamed from core/src/view/error404.htm)0
-rw-r--r--web/src/view/error500.htm (renamed from core/src/view/error500.htm)0
-rw-r--r--web/src/view/footer.htm (renamed from core/src/view/footer.htm)0
-rw-r--r--web/src/view/header.htm (renamed from core/src/view/header.htm)0
35 files changed, 26 insertions, 20 deletions
diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile
index 2458ebd28..c75247b55 100644
--- a/contrib/package/luci/Makefile
+++ b/contrib/package/luci/Makefile
@@ -46,19 +46,32 @@ endef
define Package/luci
$(call Package/luci/template)
MENU:=1
- DEPENDS:=+lua +luaposix +luci-addons
+ DEPENDS:=+lua +luaposix
endef
-define Package/luci/conffiles
+define Package/luci/install
+ $(call Package/luci/install/template,$(1),core)
+endef
+
+
+### Web Packages ###
+define Package/luci-web
+ $(call Package/luci/template)
+ DEPENDS:=luci +luci-addons
+ TITLE:=LuCI - Webframework
+endef
+
+define Package/luci-web/conffiles
/etc/config/luci
endef
-define Package/luci/install
- $(call Package/luci/install/template,$(1),core)
+define Package/luci-web/install
+ $(call Package/luci/install/template,$(1),web)
$(call Package/luci/install/template,$(1),themes/fledermaus)
endef
+
### Community Packages ###
define Package/luci-ff-halle
@@ -111,7 +124,7 @@ endef
define Package/luci-mod-admin-core
$(call Package/luci/template)
- DEPENDS:=luci
+ DEPENDS:=luci +luci-web
TITLE:=Core administrative pages
endef
diff --git a/core/src/i18n/default.en b/core/src/i18n/default.en
deleted file mode 100644
index d76b770e9..000000000
--- a/core/src/i18n/default.en
+++ /dev/null
@@ -1,14 +0,0 @@
-add = "Add"
-save = "Save"
-reset = "Reset"
-
-load = "Load"
-webif = "Webinterface"
-public = "Public"
-admin = "Administration"
-apply = "Apply"
-changes = "Changes"
-revert = "Revert"
-
-config = "Configuration"
-path = "Path" \ No newline at end of file
diff --git a/i18n/english/Makefile b/i18n/english/Makefile
new file mode 100644
index 000000000..81a96f6a8
--- /dev/null
+++ b/i18n/english/Makefile
@@ -0,0 +1,2 @@
+include ../../build/config.mk
+include ../../build/module.mk \ No newline at end of file
diff --git a/core/src/i18n/cbi.en b/i18n/english/src/i18n/cbi.en
index 6069cec45..6069cec45 100644
--- a/core/src/i18n/cbi.en
+++ b/i18n/english/src/i18n/cbi.en
diff --git a/web/Makefile b/web/Makefile
new file mode 100644
index 000000000..5e64bcd1f
--- /dev/null
+++ b/web/Makefile
@@ -0,0 +1,2 @@
+include ../build/config.mk
+include ../build/module.mk \ No newline at end of file
diff --git a/core/root/etc/config/luci b/web/root/etc/config/luci
index 87170a9b1..87170a9b1 100644
--- a/core/root/etc/config/luci
+++ b/web/root/etc/config/luci
diff --git a/core/root/www/resources/cbi.js b/web/root/www/resources/cbi.js
index a3a47aa45..a3a47aa45 100644
--- a/core/root/www/resources/cbi.js
+++ b/web/root/www/resources/cbi.js
diff --git a/core/src/cbi.lua b/web/src/cbi.lua
index b7097b5d9..b7097b5d9 100644
--- a/core/src/cbi.lua
+++ b/web/src/cbi.lua
diff --git a/core/src/config.lua b/web/src/config.lua
index 854b12814..854b12814 100644
--- a/core/src/config.lua
+++ b/web/src/config.lua
diff --git a/core/src/dispatcher.lua b/web/src/dispatcher.lua
index 103260c48..175f0dcb0 100644
--- a/core/src/dispatcher.lua
+++ b/web/src/dispatcher.lua
@@ -127,7 +127,10 @@ function dispatch()
tpl.viewns.uploadctrl = luci.http.dispatcher_upload()
tpl.viewns.media = luci.config.main.mediaurlbase
tpl.viewns.resource = luci.config.main.resourcebase
-
+
+ -- Load default translation
+ require("luci.i18n").loadc("default")
+
if c and type(c.target) == "function" then
dispatched = c
diff --git a/core/src/http.lua b/web/src/http.lua
index fa8821c5a..fa8821c5a 100644
--- a/core/src/http.lua
+++ b/web/src/http.lua
diff --git a/core/src/i18n.lua b/web/src/i18n.lua
index 3a8a9a6c7..3a8a9a6c7 100644
--- a/core/src/i18n.lua
+++ b/web/src/i18n.lua
diff --git a/core/src/template.lua b/web/src/template.lua
index 369aa0a30..369aa0a30 100644
--- a/core/src/template.lua
+++ b/web/src/template.lua
diff --git a/core/src/view/cbi/dvalue.htm b/web/src/view/cbi/dvalue.htm
index f54667def..f54667def 100644
--- a/core/src/view/cbi/dvalue.htm
+++ b/web/src/view/cbi/dvalue.htm
diff --git a/core/src/view/cbi/footer.htm b/web/src/view/cbi/footer.htm
index 2acf710cd..2acf710cd 100644
--- a/core/src/view/cbi/footer.htm
+++ b/web/src/view/cbi/footer.htm
diff --git a/core/src/view/cbi/full_valuefooter.htm b/web/src/view/cbi/full_valuefooter.htm
index 6151a3a66..6151a3a66 100644
--- a/core/src/view/cbi/full_valuefooter.htm
+++ b/web/src/view/cbi/full_valuefooter.htm
diff --git a/core/src/view/cbi/full_valueheader.htm b/web/src/view/cbi/full_valueheader.htm
index 062efa2dd..062efa2dd 100644
--- a/core/src/view/cbi/full_valueheader.htm
+++ b/web/src/view/cbi/full_valueheader.htm
diff --git a/core/src/view/cbi/fvalue.htm b/web/src/view/cbi/fvalue.htm
index b609f1d4f..b609f1d4f 100644
--- a/core/src/view/cbi/fvalue.htm
+++ b/web/src/view/cbi/fvalue.htm
diff --git a/core/src/view/cbi/header.htm b/web/src/view/cbi/header.htm
index 4229aaf0d..4229aaf0d 100644
--- a/core/src/view/cbi/header.htm
+++ b/web/src/view/cbi/header.htm
diff --git a/core/src/view/cbi/lvalue.htm b/web/src/view/cbi/lvalue.htm
index f1ae5a093..f1ae5a093 100644
--- a/core/src/view/cbi/lvalue.htm
+++ b/web/src/view/cbi/lvalue.htm
diff --git a/core/src/view/cbi/map.htm b/web/src/view/cbi/map.htm
index 835393c1c..835393c1c 100644
--- a/core/src/view/cbi/map.htm
+++ b/web/src/view/cbi/map.htm
diff --git a/core/src/view/cbi/mvalue.htm b/web/src/view/cbi/mvalue.htm
index bed66e569..bed66e569 100644
--- a/core/src/view/cbi/mvalue.htm
+++ b/web/src/view/cbi/mvalue.htm
diff --git a/core/src/view/cbi/nsection.htm b/web/src/view/cbi/nsection.htm
index fff597ad0..fff597ad0 100644
--- a/core/src/view/cbi/nsection.htm
+++ b/web/src/view/cbi/nsection.htm
diff --git a/core/src/view/cbi/tblsection.htm b/web/src/view/cbi/tblsection.htm
index df16efbed..df16efbed 100644
--- a/core/src/view/cbi/tblsection.htm
+++ b/web/src/view/cbi/tblsection.htm
diff --git a/core/src/view/cbi/tiny_valuefooter.htm b/web/src/view/cbi/tiny_valuefooter.htm
index e65ebb6c0..e65ebb6c0 100644
--- a/core/src/view/cbi/tiny_valuefooter.htm
+++ b/web/src/view/cbi/tiny_valuefooter.htm
diff --git a/core/src/view/cbi/tiny_valueheader.htm b/web/src/view/cbi/tiny_valueheader.htm
index b9b26bd6a..b9b26bd6a 100644
--- a/core/src/view/cbi/tiny_valueheader.htm
+++ b/web/src/view/cbi/tiny_valueheader.htm
diff --git a/core/src/view/cbi/tsection.htm b/web/src/view/cbi/tsection.htm
index 37b18b5d4..37b18b5d4 100644
--- a/core/src/view/cbi/tsection.htm
+++ b/web/src/view/cbi/tsection.htm
diff --git a/core/src/view/cbi/ucisection.htm b/web/src/view/cbi/ucisection.htm
index 0abc37e7c..0abc37e7c 100644
--- a/core/src/view/cbi/ucisection.htm
+++ b/web/src/view/cbi/ucisection.htm
diff --git a/core/src/view/cbi/value.htm b/web/src/view/cbi/value.htm
index 31bf38f77..31bf38f77 100644
--- a/core/src/view/cbi/value.htm
+++ b/web/src/view/cbi/value.htm
diff --git a/core/src/view/cbi/valuefooter.htm b/web/src/view/cbi/valuefooter.htm
index bc9d1b127..bc9d1b127 100644
--- a/core/src/view/cbi/valuefooter.htm
+++ b/web/src/view/cbi/valuefooter.htm
diff --git a/core/src/view/cbi/valueheader.htm b/web/src/view/cbi/valueheader.htm
index 8d9802f57..8d9802f57 100644
--- a/core/src/view/cbi/valueheader.htm
+++ b/web/src/view/cbi/valueheader.htm
diff --git a/core/src/view/error404.htm b/web/src/view/error404.htm
index 60daee2cb..60daee2cb 100644
--- a/core/src/view/error404.htm
+++ b/web/src/view/error404.htm
diff --git a/core/src/view/error500.htm b/web/src/view/error500.htm
index 8af22e8f2..8af22e8f2 100644
--- a/core/src/view/error500.htm
+++ b/web/src/view/error500.htm
diff --git a/core/src/view/footer.htm b/web/src/view/footer.htm
index c8506ac5c..c8506ac5c 100644
--- a/core/src/view/footer.htm
+++ b/web/src/view/footer.htm
diff --git a/core/src/view/header.htm b/web/src/view/header.htm
index 5f876781f..5f876781f 100644
--- a/core/src/view/header.htm
+++ b/web/src/view/header.htm