]> git.sesse.net Git - vlc/blobdiff - share/lua/intf/rc.lua
Experimental lua gettext support.
[vlc] / share / lua / intf / rc.lua
index 1a105662de5da294e3db31ea7ee5548debb6478f..af78f4ce04efd35ab35cb24f2ca54268cbadf971 100644 (file)
@@ -61,12 +61,15 @@ skip2 = function(foo) return skip(skip(foo)) end
 setarg = common.setarg
 strip = common.strip
 
+_ = vlc.gettext._
+N_ = vlc.gettext.N_
+
 --[[ Setup default environement ]]
 env = { prompt = "> ";
         width = 70;
         autocompletion = 1;
         autoalias = 1;
-        welcome = "Remote control interface initialized. Type `help' for help.";
+        welcome = _("Remote control interface initialized. Type `help' for help.");
         flatplaylist = 0;
       }
 
@@ -87,7 +90,7 @@ function set_env(name,client,value)
     if value then
         local var,val = split_input(value)
         if val then
-            s = string.gsub(val,"\"(.*)\"","%1")
+            local s = string.gsub(val,"\"(.*)\"","%1")
             if type(client.env[var])==type(1) then
                 client.env[var] = tonumber(s)
             else