[vlc-devel] [PATCH 2/2] vlsub: improving messages.

Rafael Waldo Delgado Doblas lord.rafa at gmail.com
Sun Nov 15 21:56:16 CET 2015


---
 share/lua/extensions/VLSub.lua | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/share/lua/extensions/VLSub.lua b/share/lua/extensions/VLSub.lua
index 1eefa59..1fdbf86 100644
--- a/share/lua/extensions/VLSub.lua
+++ b/share/lua/extensions/VLSub.lua
@@ -158,6 +158,7 @@ local options = {
     
     mess_success = 'Success',
     mess_error = 'Error',
+    mess_warn = 'Warning',
     mess_no_response = 'Server not responding',
     mess_unauthorized = 'Request unauthorized',
     mess_expired = 'Session expired, retrying',
@@ -168,6 +169,7 @@ local options = {
     mess_not_found2 = 'File not found (illegal character?)',
     mess_no_selection = 'No subtitles selected',
     mess_save_fail = 'Unable to save subtitles',
+    mess_save_warn = 'Unable to save subtitles in file folder, using config folder',
     mess_click_link = 'Click here to open the file',
     mess_complete = 'Research complete',
     mess_no_res = 'No result',
@@ -1696,7 +1698,7 @@ function download_subtitles()
   elseif openSub.conf.dirPath then
     tmp_dir = openSub.conf.dirPath
     
-    message = "<br>"..error_tag(lang["mess_save_fail"].."  "..
+    message = "<br>"..warn_tag(lang["mess_save_warn"].."  "..
     "<a href='"..vlc.strings.make_uri(openSub.conf.dirPath).."'>"..
     lang["mess_click_link"].."</a>")
   else
@@ -1721,7 +1723,7 @@ function download_subtitles()
     if openSub.conf.dirPath then
       target =  openSub.conf.dirPath..slash..subfileName
       message = "<br>"..
-        error_tag(lang["mess_save_fail"].."  "..
+        warn_tag(lang["mess_save_warn"].."  "..
         "<a href='"..vlc.strings.make_uri(
           openSub.conf.dirPath).."'>"..
           lang["mess_click_link"].."</a>")
@@ -1835,6 +1837,11 @@ function error_tag(str)
   lang["mess_error"]..":</b></span> "..str..""
 end
 
+function warn_tag(str)
+  return "<span style='color:#CF0'><b>"..
+  lang["mess_warn"]..":</b></span> "..str..""
+end
+
             --[[ Network utils]]--
 
 function get(url)
-- 
2.1.4



More information about the vlc-devel mailing list