diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-28 11:25:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 11:25:29 +0800 |
commit | 685ff3ee7247c5118fd8ef1c229af60066a4fcb4 (patch) | |
tree | 231d1be8bd319797096033e5197ef9d04da848c2 /runtime/doc | |
parent | f44ad753801d881f5352c9182167ced18e79e456 (diff) | |
parent | bbbcd5393dc1ad02effc87d55665412ffaa19cc8 (diff) | |
download | rneovim-685ff3ee7247c5118fd8ef1c229af60066a4fcb4.tar.gz rneovim-685ff3ee7247c5118fd8ef1c229af60066a4fcb4.tar.bz2 rneovim-685ff3ee7247c5118fd8ef1c229af60066a4fcb4.zip |
Merge pull request #20832 from zeertzjq/vim-8.2.1544
vim-patch:8.2.{1544,1585}: cannot translate messages in a Vim script
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/builtin.txt | 14 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 2c00f755be..cf12ec7568 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -220,6 +220,7 @@ gettabvar({nr}, {varname} [, {def}]) gettabwinvar({tabnr}, {winnr}, {name} [, {def}]) any {name} in {winnr} in tab page {tabnr} gettagstack([{nr}]) Dict get the tag stack of window {nr} +gettext({text}) String lookup translation of {text} getwininfo([{winid}]) List list of info about each window getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window getwinposx() Number X coord in pixels of Vim window @@ -3584,6 +3585,19 @@ gettagstack([{winnr}]) *gettagstack()* Can also be used as a |method|: > GetWinnr()->gettagstack() + +gettext({text}) *gettext()* + Translate String {text} if possible. + This is mainly for use in the distributed Vim scripts. When + generating message translations the {text} is extracted by + xgettext, the translator can add the translated message in the + .po file and Vim will lookup the translation when gettext() is + called. + For {text} double quoted strings are preferred, because + xgettext does not understand escaping in single quoted + strings. + + getwininfo([{winid}]) *getwininfo()* Returns information about windows as a |List| with Dictionaries. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index d2db967c97..6d139643d6 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -639,6 +639,7 @@ String manipulation: *string-functions* execute() execute an Ex command and get the output win_execute() like execute() but in a specified window trim() trim characters from a string + gettext() lookup message translation List manipulation: *list-functions* get() get an item without error for wrong index |