* Separated the MVC-Webframework from core
authorSteven Barth <redacted>
Tue, 27 May 2008 08:14:24 +0000 (08:14 +0000)
committerSteven Barth <redacted>
Tue, 27 May 2008 08:14:24 +0000 (08:14 +0000)
* Separated i18n from core to prepare translations

35 files changed:
contrib/package/luci/Makefile
core/src/i18n/default.en [deleted file]
i18n/english/Makefile [new file with mode: 0644]
i18n/english/src/i18n/cbi.en [moved from core/src/i18n/cbi.en with 100% similarity]
web/Makefile [new file with mode: 0644]
web/root/etc/config/luci [moved from core/root/etc/config/luci with 100% similarity]
web/root/www/resources/cbi.js [moved from core/root/www/resources/cbi.js with 100% similarity]
web/src/cbi.lua [moved from core/src/cbi.lua with 100% similarity]
web/src/config.lua [moved from core/src/config.lua with 100% similarity]
web/src/dispatcher.lua [moved from core/src/dispatcher.lua with 98% similarity]
web/src/http.lua [moved from core/src/http.lua with 100% similarity]
web/src/i18n.lua [moved from core/src/i18n.lua with 100% similarity]
web/src/template.lua [moved from core/src/template.lua with 100% similarity]
web/src/view/cbi/dvalue.htm [moved from core/src/view/cbi/dvalue.htm with 100% similarity]
web/src/view/cbi/footer.htm [moved from core/src/view/cbi/footer.htm with 100% similarity]
web/src/view/cbi/full_valuefooter.htm [moved from core/src/view/cbi/full_valuefooter.htm with 100% similarity]
web/src/view/cbi/full_valueheader.htm [moved from core/src/view/cbi/full_valueheader.htm with 100% similarity]
web/src/view/cbi/fvalue.htm [moved from core/src/view/cbi/fvalue.htm with 100% similarity]
web/src/view/cbi/header.htm [moved from core/src/view/cbi/header.htm with 100% similarity]
web/src/view/cbi/lvalue.htm [moved from core/src/view/cbi/lvalue.htm with 100% similarity]
web/src/view/cbi/map.htm [moved from core/src/view/cbi/map.htm with 100% similarity]
web/src/view/cbi/mvalue.htm [moved from core/src/view/cbi/mvalue.htm with 100% similarity]
web/src/view/cbi/nsection.htm [moved from core/src/view/cbi/nsection.htm with 100% similarity]
web/src/view/cbi/tblsection.htm [moved from core/src/view/cbi/tblsection.htm with 100% similarity]
web/src/view/cbi/tiny_valuefooter.htm [moved from core/src/view/cbi/tiny_valuefooter.htm with 100% similarity]
web/src/view/cbi/tiny_valueheader.htm [moved from core/src/view/cbi/tiny_valueheader.htm with 100% similarity]
web/src/view/cbi/tsection.htm [moved from core/src/view/cbi/tsection.htm with 100% similarity]
web/src/view/cbi/ucisection.htm [moved from core/src/view/cbi/ucisection.htm with 100% similarity]
web/src/view/cbi/value.htm [moved from core/src/view/cbi/value.htm with 100% similarity]
web/src/view/cbi/valuefooter.htm [moved from core/src/view/cbi/valuefooter.htm with 100% similarity]
web/src/view/cbi/valueheader.htm [moved from core/src/view/cbi/valueheader.htm with 100% similarity]
web/src/view/error404.htm [moved from core/src/view/error404.htm with 100% similarity]
web/src/view/error500.htm [moved from core/src/view/error500.htm with 100% similarity]
web/src/view/footer.htm [moved from core/src/view/footer.htm with 100% similarity]
web/src/view/header.htm [moved from core/src/view/header.htm with 100% similarity]

index 2458ebd28bf51726201a05dd20b0336d5b1f3d2d..c75247b55faf3547437929d44d95df4e74b8743d 100644 (file)
@@ -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 (file)
index d76b770..0000000
+++ /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 (file)
index 0000000..81a96f6
--- /dev/null
@@ -0,0 +1,2 @@
+include ../../build/config.mk
+include ../../build/module.mk
\ No newline at end of file
diff --git a/web/Makefile b/web/Makefile
new file mode 100644 (file)
index 0000000..5e64bcd
--- /dev/null
@@ -0,0 +1,2 @@
+include ../build/config.mk
+include ../build/module.mk
\ No newline at end of file
similarity index 100%
rename from core/src/cbi.lua
rename to web/src/cbi.lua
similarity index 100%
rename from core/src/config.lua
rename to web/src/config.lua
similarity index 98%
rename from core/src/dispatcher.lua
rename to web/src/dispatcher.lua
index 103260c48503876c98b908caf5f4f51ff744e6c3..175f0dcb0b5d3712d650ed28ede198d6ee212b25 100644 (file)
@@ -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
similarity index 100%
rename from core/src/http.lua
rename to web/src/http.lua
similarity index 100%
rename from core/src/i18n.lua
rename to web/src/i18n.lua
similarity index 100%
rename from core/src/template.lua
rename to web/src/template.lua
git clone https://git.99rst.org/PROJECT