* Added OpenWRT package for english translation (incomplete)
authorSteven Barth <steven@midlink.org>
Sun, 1 Jun 2008 12:22:47 +0000 (12:22 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 1 Jun 2008 12:22:47 +0000 (12:22 +0000)
* libs/core: Fixed indentation of luci.util.strip_bytecode

contrib/package/luci/Makefile
libs/core/luasrc/util.lua

index d0c924af6e18242194528cb10b8ab0cdd583de5b..975c13025a8e743a698d3ec251167aff45bb841b 100644 (file)
@@ -48,6 +48,12 @@ define Package/luci/fftemplate
   DEPENDS:=+luci-mod-freifunk
 endef
 
+define Package/luci/i18ntemplate
+  $(call Package/luci/libtemplate)
+  SUBMENU:=LuCI - Translations
+  DEPENDS:=+luci-web
+endef
+
 define Package/luci/thtemplate
   $(call Package/luci/libtemplate)
   SUBMENU:=LuCI - Themes
@@ -297,7 +303,7 @@ define Package/luci-sgi-webuci/install
        $(call Package/luci/install/template,$(1),libs/sgi-webuci)
 endef
 
-### Templates ###
+### Themes ###
 define Package/luci-theme-fledermaus
   $(call Package/luci/fftemplate)
   DEPENDS:=+luci-web
@@ -317,6 +323,17 @@ define Package/luci-theme-openwrt/install
        $(call Package/luci/install/template,$(1),themes/openwrt.org)
 endef
 
+### Translations ###
+define Package/luci-i18n-english
+  $(call Package/luci/i18ntemplate)
+  TITLE:=English (incomplete)
+endef
+
+define Package/luci-i18n-english/install
+       $(call Package/luci/install/template,$(1),i18n/english)
+endef
+
+
 
 ### Compile ###
 ifneq ($(CONFIG_PACKAGE_luci-core),)
@@ -373,6 +390,10 @@ ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
        PKG_SELECTED_MODULES+=themes/openwrt.org
 endif
 
+ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
+       PKG_SELECTED_MODULES+=i18n/english
+endif
+
 
 $(eval $(call BuildPackage,luci-core))
 $(eval $(call BuildPackage,luci-cbi))
@@ -395,3 +416,5 @@ $(eval $(call BuildPackage,luci-sgi-webuci))
 
 $(eval $(call BuildPackage,luci-theme-fledermaus))
 $(eval $(call BuildPackage,luci-theme-openwrt))
+
+$(eval $(call BuildPackage,luci-i18n-english))
index 0a30b163a4b0cb61a314d69813a2ae3373529f90..d79f93b1d4d684dc218e9084e8e2720b0ea9ed41 100644 (file)
@@ -200,16 +200,16 @@ function strip_bytecode(dump)
                                val = val * 256 + dump:byte(i + n - 1)
                        end
                        return val, i + l
-               end
+               end
        else
-       subint = function(dump, i, l)
-               local val = 0
-            for n = 1, l, 1 do
-                val = val * 256 + dump:byte(i + n - 1)
-            end
-            return val, i + l
-        end
-    end
+               subint = function(dump, i, l)
+                       local val = 0
+                       for n = 1, l, 1 do
+                               val = val * 256 + dump:byte(i + n - 1)
+                       end
+                       return val, i + l
+               end
+       end
     
        local strip_function
        strip_function = function(dump)