From 5b3929b321a88fdb3402d69324a24ae0828bd2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 6 Sep 2021 13:32:04 +0200 Subject: api: add split of string and shell arguments in evaluation of expressions Split of string: ${split:number,separators,flags,xxx} Split of shell arguments: ${split_shell:number,xxx} --- po/tr.po | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'po/tr.po') diff --git a/po/tr.po b/po/tr.po index 0720ce37e..d32e8bc18 100644 --- a/po/tr.po +++ b/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: 2021-08-31 22:27+0200\n" +"POT-Creation-Date: 2021-09-06 13:29+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -1689,23 +1689,25 @@ msgid "" " 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n" " 8. a repeated string (format: \"repeat:count,string\")\n" " 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n" -" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function " +" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n" +" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n" +" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function " "\"color\")\n" -" 11. a modifier (format: \"modifier:name,data,string\")\n" -" 12. an info (format: \"info:name,arguments\", arguments are optional)\n" -" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx" +" 13. a modifier (format: \"modifier:name,data,string\")\n" +" 14. an info (format: \"info:name,arguments\", arguments are optional)\n" +" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx" "\" or \"base_decode:base,xxx\")\n" -" 14. current date/time (format: \"date\" or \"date:format\")\n" -" 15. an environment variable (format: \"env:XXX\")\n" -" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false" +" 16. current date/time (format: \"date\" or \"date:format\")\n" +" 17. an environment variable (format: \"env:XXX\")\n" +" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false" "\")\n" -" 17. result of an expression with parentheses and operators + - * / // % ** " +" 19. result of an expression with parentheses and operators + - * / // % ** " "(format: \"calc:xxx\")\n" -" 18. a random integer number (format: \"random:min,max\")\n" -" 19. a translated string (format: \"translate:xxx\")\n" -" 20. an option (format: \"file.section.option\")\n" -" 21. a local variable in buffer\n" -" 22. a hdata name/variable (the value is automatically converted to " +" 20. a random integer number (format: \"random:min,max\")\n" +" 21. a translated string (format: \"translate:xxx\")\n" +" 22. an option (format: \"file.section.option\")\n" +" 23. a local variable in buffer\n" +" 24. 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" @@ -1746,6 +1748,14 @@ msgid "" " /eval -n ${rev:Hello} ==> olleH\n" " /eval -n ${repeat:5,-} ==> -----\n" " /eval -n ${length:test} ==> 4\n" +" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n" +" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n" +" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n" +" /eval -n ${split:random,,,abc,def,ghi} ==> def\n" +" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n" +" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n" +" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n" +" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n" " /eval -n ${calc:(5+2)*3} ==> 21\n" " /eval -n ${random:0,10} ==> 3\n" " /eval -n ${base_encode:64,test} ==> dGVzdA==\n" -- cgit v1.2.3