* luci/applications/uvc_streamer:
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 5 Sep 2008 19:25:10 +0000 (19:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 5 Sep 2008 19:25:10 +0000 (19:25 +0000)
- display streaming address in map description
- sync translation
- add credits

applications/luci-uvc_streamer/luasrc/controller/uvc_streamer.lua
applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.lua
applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.xml
applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.lua
applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.xml
applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua

index a1f2296..1766c2b 100644 (file)
@@ -1,3 +1,18 @@
+--[[
+
+LuCI UVC Streamer
+(c) 2008 Yanira <forum-2008@email.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
 module("luci.controller.uvc_streamer", package.seeall)
 
 function index()
 module("luci.controller.uvc_streamer", package.seeall)
 
 function index()
index 21cbfa5..b340fd4 100644 (file)
@@ -2,4 +2,4 @@ framespersecond = 'Bilder pro Sekunde'
 resolution = 'Auflösung'
 settings = 'Konfiguration'
 uvc_streamer = 'Webcam Stream'
 resolution = 'Auflösung'
 settings = 'Konfiguration'
 uvc_streamer = 'Webcam Stream'
-uvc_streamer_desc = 'Linux-UVC Webcam Konfiguration. Im Browser z.B. http://192.168.1.1:8080/ laden.'
+uvc_streamer_desc = 'Linux-UVC Webcam Konfiguration. Im Browser z.B. <a href="http://%s:%i/">http://%s:%i/</a> laden.'
index 3151781..1d7b946 100644 (file)
@@ -6,6 +6,6 @@
 <i18n:msg xml:id="resolution">Auflösung</i18n:msg>
 <i18n:msg xml:id="settings">Konfiguration</i18n:msg>
 <i18n:msg xml:id="uvc_streamer">Webcam Stream</i18n:msg>
 <i18n:msg xml:id="resolution">Auflösung</i18n:msg>
 <i18n:msg xml:id="settings">Konfiguration</i18n:msg>
 <i18n:msg xml:id="uvc_streamer">Webcam Stream</i18n:msg>
-<i18n:msg xml:id="uvc_streamer_desc">Linux-UVC Webcam Konfiguration. Im Browser z.B. http://192.168.1.1:8080/ laden.</i18n:msg>
+<i18n:msg xml:id="uvc_streamer_desc">Linux-UVC Webcam Konfiguration. Im Browser z.B. <a href="http://%s:%i/">http://%s:%i/</a> laden.</i18n:msg>
 
 </i18n:msgs>
 
 </i18n:msgs>
index b791bd9..e56eacc 100644 (file)
@@ -2,4 +2,4 @@ framespersecond = 'Frames per second'
 resolution = 'Resolution'
 settings = 'Settings'
 uvc_streamer = 'Webcam streaming'
 resolution = 'Resolution'
 settings = 'Settings'
 uvc_streamer = 'Webcam streaming'
-uvc_streamer_desc = 'Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://192.168.1.1:8080/'
+uvc_streamer_desc = 'Configure your Linux-UVC compatible webcam. Point your browser to e.g. <a href="http://%s:%i/">http://%s:%i/</a>'
index b607809..5d20d21 100644 (file)
@@ -6,6 +6,6 @@
 <i18n:msg xml:id="resolution">Resolution</i18n:msg>
 <i18n:msg xml:id="settings">Settings</i18n:msg>
 <i18n:msg xml:id="uvc_streamer">Webcam streaming</i18n:msg>
 <i18n:msg xml:id="resolution">Resolution</i18n:msg>
 <i18n:msg xml:id="settings">Settings</i18n:msg>
 <i18n:msg xml:id="uvc_streamer">Webcam streaming</i18n:msg>
-<i18n:msg xml:id="uvc_streamer_desc">Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://192.168.1.1:8080/</i18n:msg>
+<i18n:msg xml:id="uvc_streamer_desc">Configure your Linux-UVC compatible webcam. Point your browser to e.g. <a href="http://%s:%i/">http://%s:%i/</a></i18n:msg>
 
 </i18n:msgs>
 
 </i18n:msgs>
index 7c8e4bd..2054185 100644 (file)
@@ -1,6 +1,30 @@
-m = Map("uvc-streamer", translate("uvc_streamer"), translate("uvc_streamer_desc"))
+--[[
 
 
-s = m:section(TypedSection, "uvc-streamer", translate("settings"))
+LuCI UVC Streamer
+(c) 2008 Yanira <forum-2008@email.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
+-- find current lan address and port of first uvc_streamer config section
+local uci  = luci.model.uci.cursor_state()
+local addr = uci:get("network", "lan", "ipaddr")
+local port
+
+uci:foreach( "uvc_streamer", "uvc_streamer",
+       function(section) port = port or tonumber(section.port) end )
+
+m = Map("uvc_streamer", translate("uvc_streamer"),
+       translatef("uvc_streamer_desc", nil, addr, port, addr, port))
+
+s = m:section(TypedSection, "uvc_streamer", translate("settings"))
 s.addremove = false
 s.anonymous = true
 
 s.addremove = false
 s.anonymous = true