Patch 9.0.1537

3 views
Skip to first unread message

Bram Moolenaar

unread,
May 10, 2023, 9:48:22 AM5/10/23
to vim...@googlegroups.com

Patch 9.0.1537
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)
Files: src/po/Makefile, src/po/tojavascript.vim, runtime/defaults.vim


*** ../vim-9.0.1536/src/po/Makefile 2023-03-16 21:01:16.333965399 +0000
--- src/po/Makefile 2023-05-10 14:46:59.604099292 +0100
***************
*** 204,213 ****
vim.desktop.in

PO_VIM_INPUTLIST = \
! ../../runtime/optwin.vim

PO_VIM_JSLIST = \
! optwin.js

$(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
# Convert the Vim scripts to (what looks like) Javascript
--- 204,215 ----
vim.desktop.in

PO_VIM_INPUTLIST = \
! ../../runtime/optwin.vim \
! ../../runtime/defaults.vim

PO_VIM_JSLIST = \
! optwin.js \
! defaults.js

$(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
# Convert the Vim scripts to (what looks like) Javascript
*** ../vim-9.0.1536/src/po/tojavascript.vim 2020-08-30 13:59:11.000000000 +0100
--- src/po/tojavascript.vim 2023-05-10 14:44:46.976255059 +0100
***************
*** 8,15 ****
for name in argv()[1:]
exe 'edit ' .. fnameescape(name)

! " Strip comments
g/^\s*"/s/.*//

" Write as .js file, xgettext recognizes them
exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
--- 8,16 ----
for name in argv()[1:]
exe 'edit ' .. fnameescape(name)

! " 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"
*** ../vim-9.0.1536/runtime/defaults.vim 2022-03-03 21:16:06.000000000 +0000
--- runtime/defaults.vim 2023-05-10 14:30:52.753727131 +0100
***************
*** 120,126 ****
au!
autocmd CmdwinEnter *
\ echohl Todo |
! \ echo 'You discovered the command-line window! You can close it with ":q".' |
\ echohl None
augroup END

--- 120,126 ----
au!
autocmd CmdwinEnter *
\ echohl Todo |
! \ echo gettext('You discovered the command-line window! You can close it with ":q".') |
\ echohl None
augroup END

*** ../vim-9.0.1536/src/version.c 2023-05-09 22:13:54.301928160 +0100
--- src/version.c 2023-05-10 14:47:15.620081172 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1537,
/**/

--
How To Keep A Healthy Level Of Insanity:
2. Page yourself over the intercom. Don't disguise your voice.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages