]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1537: message for opening the cmdline window is not translated v9.0.1537
authorBram Moolenaar <Bram@vim.org>
Wed, 10 May 2023 13:47:50 +0000 (14:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 May 2023 13:47:50 +0000 (14:47 +0100)
Problem:    Message for opening the cmdline window is not translated.
Solution:   Add gettext() and scan the defaults script for text to be
            translated.  (closes #12371)

runtime/defaults.vim
src/po/Makefile
src/po/tojavascript.vim
src/version.c

index f1d5cd1edf9d2789bfa9354fc5247f835cfba5ce..f449c6e1e93cb8be4bf4dfaa76551995b78f5add 100644 (file)
@@ -120,7 +120,7 @@ if 1
     au!
     autocmd CmdwinEnter *
          \ echohl Todo | 
-         \ echo 'You discovered the command-line window! You can close it with ":q".' |
+         \ echo gettext('You discovered the command-line window! You can close it with ":q".') |
          \ echohl None
   augroup END
 
index 9dfbc34e7443b3b10356c4d2c3025597443358b8..fbe474b949c28027f847a38cb5f20cfc0d2225e5 100644 (file)
@@ -204,10 +204,12 @@ PO_INPUTLIST = \
        vim.desktop.in
 
 PO_VIM_INPUTLIST = \
-       ../../runtime/optwin.vim
+       ../../runtime/optwin.vim \
+       ../../runtime/defaults.vim
 
 PO_VIM_JSLIST = \
-       optwin.js
+       optwin.js \
+       defaults.js
 
 $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
        # Convert the Vim scripts to (what looks like) Javascript
index 7868570be75b188450e33d6cfb0b522f60b6aad1..8b0dd736d50c1c68bb82851ed5cab2d13664ff41 100644 (file)
@@ -8,8 +8,9 @@ set shortmess+=A
 for name in argv()[1:]
   exe 'edit ' .. fnameescape(name)
 
-  " Strip comments
+  " Strip comments, also after :set commands.
   g/^\s*"/s/.*//
+  g/^\s*set .*"/s/.*//
 
   " Write as .js file, xgettext recognizes them
   exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
index c8daf71c8ccbfda3b72f3ece597d6a545bf2b0b0..3a7dcb8278974c3e81561e3089bed0f0f8585bba 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1537,
 /**/
     1536,
 /**/