To: vim-dev@vim.org Subject: Patch 6.1.373 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.373 Problem: The default page header for printing is not translated. Solution: Add _() around the two places where "Page" is used. (Mike Williams) Translate the default value of the 'titleold' and 'printheader' options. Files: src/ex_cmds2.c, src/option.c *** ../vim61.372/src/ex_cmds2.c Sat Mar 8 22:44:59 2003 --- src/ex_cmds2.c Sat Mar 8 15:13:45 2003 *************** *** 2873,2879 **** } else #endif ! sprintf((char *)tbuf, "Page %d", pagenum); prt_set_fg(COLOR_BLACK); prt_set_bg(COLOR_WHITE); --- 2876,2882 ---- } else #endif ! sprintf((char *)tbuf, _("Page %d"), pagenum); prt_set_fg(COLOR_BLACK); prt_set_bg(COLOR_WHITE); *************** *** 4471,4478 **** /*ARGSUSED*/ int ! mch_print_begin_page(msg) ! char_u *msg; { int page_num[2]; --- 4474,4481 ---- /*ARGSUSED*/ int ! mch_print_begin_page(str) ! char_u *str; { int page_num[2]; *** ../vim61.372/src/option.c Sat Mar 8 20:33:32 2003 --- src/option.c Sun Mar 9 14:49:28 2003 *************** *** 284,289 **** --- 284,290 ---- #define P_FLAGLIST 0x20000L/* list of single-char flags */ #define P_SECURE 0x40000L/* cannot change in modeline or secure mode */ + #define P_GETTEXT 0x80000L/* expand default value with _() */ /* * options[] is initialized here. *************** *** 530,543 **** (char_u *)&p_cb, PV_NONE, # ifdef FEAT_XCLIPBOARD {(char_u *)"autoselect,exclude:cons\\|linux", ! (char_u *)0L}}, # else ! {(char_u *)"", (char_u *)0L}}, # endif #else (char_u *)NULL, PV_NONE, ! {(char_u *)"", (char_u *)0L}}, #endif {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL, (char_u *)&p_ch, PV_NONE, {(char_u *)1L, (char_u *)0L}}, --- 531,545 ---- (char_u *)&p_cb, PV_NONE, # ifdef FEAT_XCLIPBOARD {(char_u *)"autoselect,exclude:cons\\|linux", ! (char_u *)0L} # else ! {(char_u *)"", (char_u *)0L} # endif #else (char_u *)NULL, PV_NONE, ! {(char_u *)"", (char_u *)0L} #endif + }, {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL, (char_u *)&p_ch, PV_NONE, {(char_u *)1L, (char_u *)0L}}, *************** *** 1069,1078 **** (char_u *)NULL, PV_NONE, #endif #ifdef __sgi ! {(char_u *)TRUE, (char_u *)0L}}, #else ! {(char_u *)FALSE, (char_u *)0L}}, #endif {"iminsert", "imi", P_NUM|P_VI_DEF, (char_u *)&p_iminsert, PV_IMI, #ifdef B_IMODE_IM --- 1071,1081 ---- (char_u *)NULL, PV_NONE, #endif #ifdef __sgi ! {(char_u *)TRUE, (char_u *)0L} #else ! {(char_u *)FALSE, (char_u *)0L} #endif + }, {"iminsert", "imi", P_NUM|P_VI_DEF, (char_u *)&p_iminsert, PV_IMI, #ifdef B_IMODE_IM *************** *** 1561,1570 **** {(char_u *)NULL, (char_u *)0L} #endif }, ! {"printheader", "pheader", P_STRING|P_VI_DEF, #ifdef FEAT_PRINTER (char_u *)&p_header, PV_NONE, ! {(char_u *)"%<%f%h%m%=Page %N", (char_u *)0L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} --- 1564,1573 ---- {(char_u *)NULL, (char_u *)0L} #endif }, ! {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT, #ifdef FEAT_PRINTER (char_u *)&p_header, PV_NONE, ! {(char_u *)N_("%<%f%h%m%=Page %N"), (char_u *)0L} #else (char_u *)NULL, PV_NONE, {(char_u *)NULL, (char_u *)0L} *************** *** 1651,1660 **** {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, #ifdef FEAT_SCROLLBIND (char_u *)&p_sbo, PV_NONE, #else (char_u *)NULL, PV_NONE, #endif ! {(char_u *)"ver,jump", (char_u *)0L}}, {"sections", "sect", P_STRING|P_VI_DEF, (char_u *)&p_sections, PV_NONE, {(char_u *)"SHNHH HUnhsh", (char_u *)0L}}, --- 1654,1665 ---- {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, #ifdef FEAT_SCROLLBIND (char_u *)&p_sbo, PV_NONE, + {(char_u *)"ver,jump", (char_u *)0L} #else (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif ! }, {"sections", "sect", P_STRING|P_VI_DEF, (char_u *)&p_sections, PV_NONE, {(char_u *)"SHNHH HUnhsh", (char_u *)0L}}, *************** *** 1909,1918 **** {"tagbsearch", "tbs", P_BOOL|P_VI_DEF, (char_u *)&p_tbs, PV_NONE, #ifdef VMS /* binary searching doesn't appear to work on VMS */ ! {(char_u *)0L, (char_u *)0L}}, #else ! {(char_u *)TRUE, (char_u *)0L}}, #endif {"taglength", "tl", P_NUM|P_VI_DEF, (char_u *)&p_tl, PV_NONE, {(char_u *)0L, (char_u *)0L}}, --- 1914,1924 ---- {"tagbsearch", "tbs", P_BOOL|P_VI_DEF, (char_u *)&p_tbs, PV_NONE, #ifdef VMS /* binary searching doesn't appear to work on VMS */ ! {(char_u *)0L, (char_u *)0L} #else ! {(char_u *)TRUE, (char_u *)0L} #endif + }, {"taglength", "tl", P_NUM|P_VI_DEF, (char_u *)&p_tl, PV_NONE, {(char_u *)0L, (char_u *)0L}}, *************** *** 1991,2004 **** (char_u *)NULL, PV_NONE, #endif {(char_u *)85L, (char_u *)0L}}, ! {"titleold", NULL, P_STRING|P_VI_DEF, #ifdef FEAT_TITLE (char_u *)&p_titleold, PV_NONE, #else (char_u *)NULL, PV_NONE, #endif ! {(char_u *)N_("Thanks for flying Vim"), ! (char_u *)0L}}, {"titlestring", NULL, P_STRING|P_VI_DEF, #ifdef FEAT_TITLE (char_u *)&p_titlestring, PV_NONE, --- 1997,2012 ---- (char_u *)NULL, PV_NONE, #endif {(char_u *)85L, (char_u *)0L}}, ! {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT, #ifdef FEAT_TITLE (char_u *)&p_titleold, PV_NONE, + {(char_u *)N_("Thanks for flying Vim"), + (char_u *)0L} #else (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} #endif ! }, {"titlestring", NULL, P_STRING|P_VI_DEF, #ifdef FEAT_TITLE (char_u *)&p_titlestring, PV_NONE, *************** *** 2580,2586 **** */ for (opt_idx = 0; !istermoption(&options[opt_idx]); opt_idx++) { ! p = option_expand(opt_idx, NULL); if (p != NULL && (p = vim_strsave(p)) != NULL) { *(char_u **)options[opt_idx].var = p; --- 2588,2598 ---- */ for (opt_idx = 0; !istermoption(&options[opt_idx]); opt_idx++) { ! if ((options[opt_idx].flags & P_GETTEXT) ! && options[opt_idx].var != NULL) ! p = _(*(char_u **)options[opt_idx].var); ! else ! p = option_expand(opt_idx, NULL); if (p != NULL && (p = vim_strsave(p)) != NULL) { *(char_u **)options[opt_idx].var = p; *** ../vim61.372/src/version.c Sun Mar 9 14:35:27 2003 --- src/version.c Sun Mar 9 15:02:46 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 373, /**/ -- The average life of an organization chart is six months. You can safely ignore any order from your boss that would take six months to complete. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///