core: add hide of chars in string in evaluation of expressions
The syntax is: ${hide:char,string}. All chars in string are replaced with char (which can be one or more chars).
This commit is contained in:
parent
9d849db85a
commit
f62f759c3d
@ -17,6 +17,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
=== New features
|
||||
|
||||
* core: add hide of chars in string in evaluation of expressions
|
||||
* core: add arraylists, improve speed of completions (about 50x faster)
|
||||
* core: move bar item "scroll" between buffer name and lag in default bar items
|
||||
of status bar
|
||||
|
14
po/cs.po
14
po/cs.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1422,11 +1422,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1447,6 +1448,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
15
po/de.po
15
po/de.po
@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-09-21 19:48+0100\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <weechatter@arcor.de>\n"
|
||||
@ -1464,6 +1464,7 @@ msgstr "evaluierter Ausdruck"
|
||||
msgid "[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -c: evaluate as condition: use operators and parentheses, return a "
|
||||
@ -1496,11 +1497,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1521,6 +1523,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/es.po
14
po/es.po
@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1460,11 +1460,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1485,6 +1486,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
29
po/fr.po
29
po/fr.po
@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"PO-Revision-Date: 2014-10-08 22:23+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-10-16 20:44+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@ -1474,11 +1474,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1499,6 +1500,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
@ -1544,12 +1546,14 @@ msgstr ""
|
||||
"${variable}, la variable pouvant être, par ordre de priorité :\n"
|
||||
" 1. une chaîne avec les caractères échappés (format : \"esc:xxx\" ou \"\\xxx"
|
||||
"\")\n"
|
||||
" 2. une couleur (format : \"color:xxx\")\n"
|
||||
" 3. une info (format : \"info:nom,paramètres\", les paramètres sont "
|
||||
" 2. une chaîne avec des caractères à cacher (format : \"hide:caractère,"
|
||||
"chaîne\")\n"
|
||||
" 3. une couleur (format : \"color:xxx\")\n"
|
||||
" 4. une info (format : \"info:nom,paramètres\", les paramètres sont "
|
||||
"optionnels)\n"
|
||||
" 4. une option (format : \"fichier.section.option\")\n"
|
||||
" 5. une variable locale du tampon\n"
|
||||
" 6. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
|
||||
" 5. une option (format : \"fichier.section.option\")\n"
|
||||
" 6. une variable locale du tampon\n"
|
||||
" 7. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
|
||||
"par défaut \"window\" et \"buffer\" pointent vers la fenêtre et le tampon "
|
||||
"courants.\n"
|
||||
"Le format du hdata peut être le suivant :\n"
|
||||
@ -1573,6 +1577,7 @@ msgstr ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Exemples (conditions) :\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/hu.po
14
po/hu.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1353,11 +1353,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1378,6 +1379,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/it.po
14
po/it.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1440,11 +1440,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1465,6 +1466,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
15
po/ja.po
15
po/ja.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-09-20 23:10+0900\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
|
||||
@ -1407,6 +1407,7 @@ msgstr "式を評価"
|
||||
msgid "[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -c: evaluate as condition: use operators and parentheses, return a "
|
||||
@ -1439,11 +1440,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1464,6 +1466,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
15
po/pl.po
15
po/pl.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-09-14 00:18+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1442,6 +1442,7 @@ msgstr "przetwórz wyrażenie"
|
||||
msgid "[-n] <expression> || [-n] -c <expression1> <operator> <expression2>"
|
||||
msgstr "[-n] <wyrażenie> || [-n] -c <wyrażenie1> <operator> <wyrażenie2>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" -n: display result without sending it to buffer (debug mode)\n"
|
||||
" -c: evaluate as condition: use operators and parentheses, return a "
|
||||
@ -1474,11 +1475,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1499,6 +1501,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/pt_BR.po
14
po/pt_BR.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1477,11 +1477,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1502,6 +1503,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/ru.po
14
po/ru.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 11:46+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1375,11 +1375,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1400,6 +1401,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
14
po/tr.po
14
po/tr.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-07-25 07:50+0200\n"
|
||||
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1210,11 +1210,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1235,6 +1236,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2014-10-08 22:22+0200\n"
|
||||
"POT-Creation-Date: 2014-10-16 20:40+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -1214,11 +1214,12 @@ msgid ""
|
||||
"Some variables are replaced in expression, using the format ${variable}, "
|
||||
"variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted to string), "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are optional)\n"
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted to string), "
|
||||
"by default \"window\" and \"buffer\" point to current window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
" hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
|
||||
@ -1239,6 +1240,7 @@ msgid ""
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
@ -7192,12 +7192,13 @@ command_init ()
|
||||
"Some variables are replaced in expression, using the format "
|
||||
"${variable}, variable can be, by order of priority:\n"
|
||||
" 1. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
|
||||
" 2. a color (format: \"color:xxx\")\n"
|
||||
" 3. an info (format: \"info:name,arguments\", arguments are "
|
||||
" 2. a string with chars to hide (format: \"hide:char,string\")\n"
|
||||
" 3. a color (format: \"color:xxx\")\n"
|
||||
" 4. an info (format: \"info:name,arguments\", arguments are "
|
||||
"optional)\n"
|
||||
" 4. an option (format: \"file.section.option\")\n"
|
||||
" 5. a local variable in buffer\n"
|
||||
" 6. a hdata name/variable (the value is automatically converted "
|
||||
" 5. an option (format: \"file.section.option\")\n"
|
||||
" 6. a local variable in buffer\n"
|
||||
" 7. a hdata name/variable (the value is automatically converted "
|
||||
"to string), by default \"window\" and \"buffer\" point to current "
|
||||
"window/buffer.\n"
|
||||
"Format for hdata can be one of following:\n"
|
||||
@ -7220,6 +7221,7 @@ command_init ()
|
||||
" /eval -n ${window.buffer.full_name} ==> core.weechat\n"
|
||||
" /eval -n ${window.buffer.number} ==> 1\n"
|
||||
" /eval -n ${\\t} ==> <tab>\n"
|
||||
" /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
|
||||
"\n"
|
||||
"Examples (conditions):\n"
|
||||
" /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "wee-hook.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-color.h"
|
||||
#include "../gui/gui-window.h"
|
||||
@ -238,10 +239,11 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
struct t_config_option *ptr_option;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
char str_value[64], *value, *pos, *pos1, *pos2, *hdata_name, *list_name;
|
||||
char *tmp, *info_name;
|
||||
const char *ptr_value, *ptr_arguments;
|
||||
char *tmp, *info_name, *hide_char, *hidden_string;
|
||||
const char *ptr_value, *ptr_arguments, *ptr_string;
|
||||
struct t_hdata *hdata;
|
||||
void *pointer;
|
||||
int i, length_hide_char, length, index;
|
||||
|
||||
pointers = (struct t_hashtable *)(((void **)data)[0]);
|
||||
extra_vars = (struct t_hashtable *)(((void **)data)[1]);
|
||||
@ -260,14 +262,44 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
if ((text[0] == '\\') && text[1] && (text[1] != '\\'))
|
||||
return string_convert_escaped_chars (text);
|
||||
|
||||
/* 3. look for a color */
|
||||
/* 3. hide chars: replace all chars by a given char */
|
||||
if (strncmp (text, "hide:", 5) == 0)
|
||||
{
|
||||
hidden_string = NULL;
|
||||
ptr_string = strchr (text + 5,
|
||||
(text[5] == ',') ? ';' : ',');
|
||||
if (!ptr_string)
|
||||
return strdup ("");
|
||||
hide_char = string_strndup (text + 5, ptr_string - text - 5);
|
||||
if (hide_char)
|
||||
{
|
||||
length_hide_char = strlen (hide_char);
|
||||
length = utf8_strlen (ptr_string + 1);
|
||||
hidden_string = malloc ((length * length_hide_char) + 1);
|
||||
if (hidden_string)
|
||||
{
|
||||
index = 0;
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
memcpy (hidden_string + index, hide_char,
|
||||
length_hide_char);
|
||||
index += length_hide_char;
|
||||
}
|
||||
hidden_string[length * length_hide_char] = '\0';
|
||||
}
|
||||
free (hide_char);
|
||||
}
|
||||
return (hidden_string) ? hidden_string : strdup ("");
|
||||
}
|
||||
|
||||
/* 4. look for a color */
|
||||
if (strncmp (text, "color:", 6) == 0)
|
||||
{
|
||||
ptr_value = gui_color_get_custom (text + 6);
|
||||
return strdup ((ptr_value) ? ptr_value : "");
|
||||
}
|
||||
|
||||
/* 4. look for an info */
|
||||
/* 5. look for an info */
|
||||
if (strncmp (text, "info:", 5) == 0)
|
||||
{
|
||||
ptr_value = NULL;
|
||||
@ -287,7 +319,7 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
return strdup ((ptr_value) ? ptr_value : "");
|
||||
}
|
||||
|
||||
/* 5. look for name of option: if found, return this value */
|
||||
/* 6. look for name of option: if found, return this value */
|
||||
if (strncmp (text, "sec.data.", 9) == 0)
|
||||
{
|
||||
ptr_value = hashtable_get (secure_hashtable_data, text + 9);
|
||||
@ -320,7 +352,7 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
}
|
||||
}
|
||||
|
||||
/* 6. look for local variable in buffer */
|
||||
/* 7. look for local variable in buffer */
|
||||
ptr_buffer = hashtable_get (pointers, "buffer");
|
||||
if (ptr_buffer)
|
||||
{
|
||||
@ -329,7 +361,7 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
return strdup (ptr_value);
|
||||
}
|
||||
|
||||
/* 7. look for hdata */
|
||||
/* 8. look for hdata */
|
||||
value = NULL;
|
||||
hdata_name = NULL;
|
||||
list_name = NULL;
|
||||
|
@ -28,6 +28,7 @@ extern "C"
|
||||
#include "src/core/wee-config.h"
|
||||
#include "src/core/wee-hashtable.h"
|
||||
#include "src/core/wee-version.h"
|
||||
#include "src/gui/gui-color.h"
|
||||
#include "src/plugins/plugin.h"
|
||||
}
|
||||
|
||||
@ -182,6 +183,8 @@ TEST(Eval, EvalExpression)
|
||||
CHECK(extra_vars);
|
||||
|
||||
POINTERS_EQUAL(NULL, eval_expression (NULL, NULL, NULL, NULL));
|
||||
|
||||
/* test with simple strings */
|
||||
WEE_CHECK_EVAL("", "");
|
||||
WEE_CHECK_EVAL("a b c", "a b c");
|
||||
WEE_CHECK_EVAL("$", "$");
|
||||
@ -189,8 +192,32 @@ TEST(Eval, EvalExpression)
|
||||
WEE_CHECK_EVAL("}", "}");
|
||||
WEE_CHECK_EVAL("", "${}");
|
||||
WEE_CHECK_EVAL("", "${xyz}");
|
||||
|
||||
/* test value from extra_vars */
|
||||
WEE_CHECK_EVAL("value", "${test}");
|
||||
|
||||
/* test escaped chars */
|
||||
WEE_CHECK_EVAL("\t", "${\\t}");
|
||||
WEE_CHECK_EVAL("\t", "${esc:\t}");
|
||||
|
||||
/* test hidden chars */
|
||||
WEE_CHECK_EVAL("********", "${hide:*,password}");
|
||||
WEE_CHECK_EVAL("\u2603\u2603\u2603", "${hide:${esc:\u2603},abc}");
|
||||
|
||||
/* test color */
|
||||
WEE_CHECK_EVAL(gui_color_get_custom ("green"), "${color:green}");
|
||||
WEE_CHECK_EVAL(gui_color_get_custom ("*214"), "${color:*214}");
|
||||
|
||||
/* test info */
|
||||
WEE_CHECK_EVAL(version_get_version (), "${info:version}");
|
||||
|
||||
/* test option */
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"%d", CONFIG_INTEGER(config_look_scroll_amount));
|
||||
WEE_CHECK_EVAL(str_value, "${weechat.look.scroll_amount}");
|
||||
WEE_CHECK_EVAL(str_value, "${${window.buffer.name}.look.scroll_amount}");
|
||||
|
||||
/* test hdata */
|
||||
WEE_CHECK_EVAL("x", "x${buffer.number");
|
||||
WEE_CHECK_EVAL("x${buffer.number}1",
|
||||
"x\\${buffer.number}${buffer.number}");
|
||||
@ -198,12 +225,6 @@ TEST(Eval, EvalExpression)
|
||||
WEE_CHECK_EVAL("1", "${window.buffer.number}");
|
||||
WEE_CHECK_EVAL("core.weechat", "${buffer.full_name}");
|
||||
WEE_CHECK_EVAL("core.weechat", "${window.buffer.full_name}");
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"%d", CONFIG_INTEGER(config_look_scroll_amount));
|
||||
WEE_CHECK_EVAL(str_value, "${weechat.look.scroll_amount}");
|
||||
|
||||
/* test nested variables */
|
||||
WEE_CHECK_EVAL(str_value, "${${window.buffer.name}.look.scroll_amount}");
|
||||
|
||||
hashtable_free (extra_vars);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user