Permalink
Browse files

patch 8.0.1773: dialog messages are not translated

Problem:    Dialog messages are not translated.
Solution:   Add N_() and _() where needed. (Sergey Alyoshin)
  • Loading branch information...
brammool committed Apr 29, 2018
1 parent 29ce409 commit c36651b4b946333dce0a916326d821d2562cf39d
Showing with 26 additions and 19 deletions.
  1. +2 −1 src/diff.c
  2. +2 −1 src/ex_cmds2.c
  3. +4 −2 src/ex_docmd.c
  4. +1 −1 src/message.c
  5. +2 −2 src/po/Make_cyg.mak
  6. +2 −2 src/po/Make_ming.mak
  7. +1 −1 src/po/Make_mvc.mak
  8. +2 −2 src/po/Makefile
  9. +2 −1 src/quickfix.c
  10. +2 −0 src/version.c
  11. +6 −6 src/vim.h
@@ -909,7 +909,8 @@ ex_diffpatch(exarg_T *eap)
if (cmdmod.browse)
{
browseFile = do_browse(0, (char_u *)_("Patch file"),
eap->arg, NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL);
eap->arg, NULL, NULL,
(char_u *)_(BROWSE_FILTER_ALL_FILES), NULL);
if (browseFile == NULL)
return; /* operation cancelled */
eap->arg = browseFile;
@@ -4140,7 +4140,8 @@ ex_source(exarg_T *eap)
char_u *fname = NULL;
fname = do_browse(0, (char_u *)_("Source Vim script"), eap->arg,
NULL, NULL, BROWSE_FILTER_MACROS, NULL);
NULL, NULL,
(char_u *)_(BROWSE_FILTER_MACROS), NULL);
if (fname != NULL)
{
cmd_source(fname, eap);
@@ -9619,7 +9619,8 @@ ex_redir(exarg_T *eap)
browseFile = do_browse(BROWSE_SAVE,
(char_u *)_("Save Redirection"),
fname, NULL, NULL, BROWSE_FILTER_ALL_FILES, curbuf);
fname, NULL, NULL,
(char_u *)_(BROWSE_FILTER_ALL_FILES), curbuf);
if (browseFile == NULL)
return; /* operation cancelled */
vim_free(fname);
@@ -9845,7 +9846,8 @@ ex_mkrc(
eap->cmdidx == CMD_mksession ? (char_u *)_("Save Session") :
# endif
(char_u *)_("Save Setup"),
fname, (char_u *)"vim", NULL, BROWSE_FILTER_MACROS, NULL);
fname, (char_u *)"vim", NULL,
(char_u *)_(BROWSE_FILTER_MACROS), NULL);
if (browseFile == NULL)
goto theend;
fname = browseFile;
@@ -4057,7 +4057,7 @@ do_browse(
}
else
fname = gui_mch_browse(flags & BROWSE_SAVE,
title, dflt, ext, initdir, filter);
title, dflt, ext, initdir, (char_u *)_(filter));
/* We hang around in the dialog for a while, the user might do some
* things to our files. The Win32 dialog allows deleting or renaming
@@ -130,11 +130,11 @@ all: $(MOFILES)
first_time:
$(XGETTEXT) --default-domain=$(LANGUAGE) \
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
$(LANGUAGES):
$(XGETTEXT) --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
$(MV) $(PACKAGE).po $(PACKAGE).pot
$(CP) $@.po $@.po.orig
$(MV) $@.po $@.po.old
@@ -139,11 +139,11 @@ all: $(MOFILES)
first_time:
$(XGETTEXT) --default-domain=$(LANGUAGE) \
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
$(LANGUAGES):
$(XGETTEXT) --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
$(MV) $(PACKAGE).po $(PACKAGE).pot
$(CP) $@.po $@.po.orig
$(MV) $@.po $@.po.old
@@ -119,7 +119,7 @@ INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
all: $(MOFILES)
files:
$(LS) $(LSFLAGS) ..\*.c ..\if_perl.xs ..\GvimExt\gvimext.cpp ..\globals.h ..\if_py_both.h > .\files
$(LS) $(LSFLAGS) ..\*.c ..\if_perl.xs ..\GvimExt\gvimext.cpp ..\globals.h ..\if_py_both.h ..\vim.h > .\files
first_time: files
set OLD_PO_FILE_INPUT=yes
@@ -281,10 +281,10 @@ distclean: clean
checkclean:
rm -f *.ck
$(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h
$(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h ../vim.h
cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 \
*.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h
*.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h vim.h
mv -f ../$(PACKAGE).po $(PACKAGE).pot
update-po: $(LANGUAGES)
@@ -4115,7 +4115,8 @@ ex_cfile(exarg_T *eap)
if (cmdmod.browse)
{
char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg,
NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL);
NULL, NULL,
(char_u *)_(BROWSE_FILTER_ALL_FILES), NULL);
if (browse_file == NULL)
return;
set_string_option_direct((char_u *)"ef", -1, browse_file, OPT_FREE, 0);
@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1773,
/**/
1772,
/**/
@@ -2186,16 +2186,16 @@ typedef enum {
#ifdef FEAT_BROWSE
# ifdef BACKSLASH_IN_FILENAME
# define BROWSE_FILTER_MACROS \
(char_u *)"Vim macro files (*.vim)\t*.vim\nAll Files (*.*)\t*.*\n"
# define BROWSE_FILTER_ALL_FILES (char_u *)"All Files (*.*)\t*.*\n"
(char_u *)N_("Vim macro files (*.vim)\t*.vim\nAll Files (*.*)\t*.*\n")
# define BROWSE_FILTER_ALL_FILES (char_u *)N_("All Files (*.*)\t*.*\n")
# define BROWSE_FILTER_DEFAULT \
(char_u *)"All Files (*.*)\t*.*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVB code (*.bas, *.frm)\t*.bas;*.frm\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
(char_u *)N_("All Files (*.*)\t*.*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVB code (*.bas, *.frm)\t*.bas;*.frm\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n")
# else
# define BROWSE_FILTER_MACROS \
(char_u *)"Vim macro files (*.vim)\t*.vim\nAll Files (*)\t*\n"
# define BROWSE_FILTER_ALL_FILES (char_u *)"All Files (*)\t*\n"
(char_u *)N_("Vim macro files (*.vim)\t*.vim\nAll Files (*)\t*\n")
# define BROWSE_FILTER_ALL_FILES (char_u *)N_("All Files (*)\t*\n")
# define BROWSE_FILTER_DEFAULT \
(char_u *)"All Files (*)\t*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
(char_u *)N_("All Files (*)\t*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n")
# endif
# define BROWSE_SAVE 1 /* flag for do_browse() */
# define BROWSE_DIR 2 /* flag for do_browse() */

0 comments on commit c36651b

Please sign in to comment.