Patch 9.0.1572
Problem: Error messages are not translated.
Solution: Add _().
Files: src/main.c, src/crypt.c, src/gui_photon.c, src/netbeans.c,
src/os_unix.c, src/terminal.c
*** ../vim-9.0.1571/src/main.c 2023-05-11 22:25:37.677434047 +0100
--- src/main.c 2023-05-20 16:11:43.094698303 +0100
***************
*** 3198,3204 ****
{
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL)
!= OK)
! emsg(e_failed_to_source_defaults);
}
else if (STRCMP(parmp->use_vimrc, "NONE") == 0
|| STRCMP(parmp->use_vimrc, "NORC") == 0)
--- 3198,3204 ----
{
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL)
!= OK)
! emsg(_(e_failed_to_source_defaults));
}
else if (STRCMP(parmp->use_vimrc, "NONE") == 0
|| STRCMP(parmp->use_vimrc, "NORC") == 0)
***************
*** 3273,3279 ****
// When no .vimrc file was found: source defaults.vim.
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE,
NULL) == FAIL)
! emsg(e_failed_to_source_defaults);
}
}
--- 3273,3279 ----
// When no .vimrc file was found: source defaults.vim.
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE,
NULL) == FAIL)
! emsg(_(e_failed_to_source_defaults));
}
}
*** ../vim-9.0.1571/src/crypt.c 2023-04-25 15:27:23.355582228 +0100
--- src/crypt.c 2023-05-20 16:16:21.230472369 +0100
***************
*** 1022,1028 ****
return OK;
# else
! emsg(e_libsodium_not_built_in);
return FAIL;
# endif
}
--- 1022,1028 ----
return OK;
# else
! emsg(_(e_libsodium_not_built_in));
return FAIL;
# endif
}
***************
*** 1051,1057 ****
{
if (len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
! emsg(e_libsodium_cannot_encrypt_header);
return;
}
crypto_secretstream_xchacha20poly1305_init_push(&sod_st->state,
--- 1051,1057 ----
{
if (len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
! emsg(_(e_libsodium_cannot_encrypt_header));
return;
}
crypto_secretstream_xchacha20poly1305_init_push(&sod_st->state,
***************
*** 1061,1067 ****
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
! emsg(e_libsodium_cannot_encrypt_buffer);
return;
}
--- 1061,1067 ----
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
! emsg(_(e_libsodium_cannot_encrypt_buffer));
return;
}
***************
*** 1098,1104 ****
if (sod_st->count == 0
&& len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
! emsg(e_libsodium_cannot_decrypt_header);
return;
}
--- 1098,1104 ----
if (sod_st->count == 0
&& len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
! emsg(_(e_libsodium_cannot_decrypt_header));
return;
}
***************
*** 1106,1112 ****
if (buf_out == NULL)
{
! emsg(e_libsodium_cannot_allocate_buffer);
return;
}
if (sod_st->count == 0)
--- 1106,1112 ----
if (buf_out == NULL)
{
! emsg(_(e_libsodium_cannot_allocate_buffer));
return;
}
if (sod_st->count == 0)
***************
*** 1114,1120 ****
if (crypto_secretstream_xchacha20poly1305_init_pull(
&sod_st->state, from, sod_st->key) != 0)
{
! emsg(e_libsodium_decryption_failed_header_incomplete);
goto fail;
}
--- 1114,1120 ----
if (crypto_secretstream_xchacha20poly1305_init_pull(
&sod_st->state, from, sod_st->key) != 0)
{
! emsg(_(e_libsodium_decryption_failed_header_incomplete));
goto fail;
}
***************
*** 1127,1146 ****
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
! emsg(e_libsodium_cannot_decrypt_buffer);
goto fail;
}
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
buf_out, &buf_len, &tag, from, len, NULL, 0) != 0)
{
! emsg(e_libsodium_decryption_failed);
goto fail;
}
sod_st->count++;
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
{
! emsg(e_libsodium_decryption_failed_premature);
goto fail;
}
if (p1 == p2)
--- 1127,1146 ----
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
! emsg(_(e_libsodium_cannot_decrypt_buffer));
goto fail;
}
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
buf_out, &buf_len, &tag, from, len, NULL, 0) != 0)
{
! emsg(_(e_libsodium_decryption_failed));
goto fail;
}
sod_st->count++;
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
{
! emsg(_(e_libsodium_decryption_failed_premature));
goto fail;
}
if (p1 == p2)
***************
*** 1179,1185 ****
*buf_out = alloc_clear(length);
if (*buf_out == NULL)
{
! emsg(e_libsodium_cannot_allocate_buffer);
return -1;
}
ptr = *buf_out;
--- 1179,1185 ----
*buf_out = alloc_clear(length);
if (*buf_out == NULL)
{
! emsg(_(e_libsodium_cannot_allocate_buffer));
return -1;
}
ptr = *buf_out;
***************
*** 1230,1236 ****
*buf_out = alloc_clear(len);
if (*buf_out == NULL)
{
! emsg(e_libsodium_cannot_allocate_buffer);
return -1;
}
--- 1230,1236 ----
*buf_out = alloc_clear(len);
if (*buf_out == NULL)
{
! emsg(_(e_libsodium_cannot_allocate_buffer));
return -1;
}
***************
*** 1239,1245 ****
if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
from, sod_st->key) != 0)
{
! emsg(e_libsodium_decryption_failed_header_incomplete);
return -1;
}
from += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
--- 1239,1245 ----
if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
from, sod_st->key) != 0)
{
! emsg(_(e_libsodium_decryption_failed_header_incomplete));
return -1;
}
from += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
***************
*** 1249,1260 ****
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
*buf_out, &out_len, &tag, from, len, NULL, 0) != 0)
{
! emsg(e_libsodium_decryption_failed);
return -1;
}
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
! emsg(e_libsodium_decryption_failed_premature);
return (long) out_len;
# else
return -1;
--- 1249,1260 ----
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
*buf_out, &out_len, &tag, from, len, NULL, 0) != 0)
{
! emsg(_(e_libsodium_decryption_failed));
return -1;
}
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
! emsg(_(e_libsodium_decryption_failed_premature));
return (long) out_len;
# else
return -1;
*** ../vim-9.0.1571/src/gui_photon.c 2023-03-07 17:45:07.184247900 +0000
--- src/gui_photon.c 2023-05-20 16:20:11.478288222 +0100
***************
*** 2956,2962 ****
}
if (report_error)
! semsg(e_unknown_font_str, vim_font_name);
return FAIL;
}
--- 2956,2962 ----
}
if (report_error)
! semsg(_(e_unknown_font_str), vim_font_name);
return FAIL;
}
*** ../vim-9.0.1571/src/netbeans.c 2023-01-16 18:19:01.903301075 +0000
--- src/netbeans.c 2023-05-20 16:30:00.905822960 +0100
***************
*** 477,483 ****
if (*verb != ':')
{
nbdebug((" missing colon: %s\n", cmd));
! semsg(e_missing_colon_str, cmd);
return;
}
++verb; // skip colon
--- 477,483 ----
if (*verb != ':')
{
nbdebug((" missing colon: %s\n", cmd));
! semsg(_(e_missing_colon_str), cmd);
return;
}
++verb; // skip colon
***************
*** 501,507 ****
if (isfunc < 0)
{
nbdebug((" missing ! or / in: %s\n", cmd));
! semsg(e_missing_bang_or_slash_in_str, cmd);
return;
}
--- 501,507 ----
if (isfunc < 0)
{
nbdebug((" missing ! or / in: %s\n", cmd));
! semsg(_(e_missing_bang_or_slash_in_str), cmd);
return;
}
***************
*** 518,524 ****
* so I'm disabling it except for debugging.
*/
nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd));
! emsg(e_bad_return_from_nb_do_cmd);
#endif
}
}
--- 518,524 ----
* so I'm disabling it except for debugging.
*/
nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd));
! emsg(_(e_bad_return_from_nb_do_cmd));
#endif
}
}
***************
*** 1040,1046 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" Invalid buffer identifier in getAnno\n"));
! emsg(e_invalid_buffer_identifier_in_getanno);
retval = FAIL;
}
else
--- 1040,1046 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" Invalid buffer identifier in getAnno\n"));
! emsg(_(e_invalid_buffer_identifier_in_getanno));
retval = FAIL;
}
else
***************
*** 1063,1069 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getLength\n"));
! emsg(e_invalid_buffer_identifier_in_getlength);
retval = FAIL;
}
else
--- 1063,1069 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getLength\n"));
! emsg(_(e_invalid_buffer_identifier_in_getlength));
retval = FAIL;
}
else
***************
*** 1085,1091 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getText\n"));
! emsg(e_invalid_buffer_identifier_in_gettext);
retval = FAIL;
}
else
--- 1085,1091 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getText\n"));
! emsg(_(e_invalid_buffer_identifier_in_gettext));
retval = FAIL;
}
else
***************
*** 1148,1154 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in remove\n"));
! emsg(e_invalid_buffer_identifier_in_remove);
retval = FAIL;
}
else
--- 1148,1154 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in remove\n"));
! emsg(_(e_invalid_buffer_identifier_in_remove));
retval = FAIL;
}
else
***************
*** 1318,1324 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in insert\n"));
! emsg(e_invalid_buffer_identifier_in_insert);
retval = FAIL;
}
else if (args != NULL)
--- 1318,1324 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in insert\n"));
! emsg(_(e_invalid_buffer_identifier_in_insert));
retval = FAIL;
}
else if (args != NULL)
***************
*** 1478,1484 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in create\n"));
! emsg(e_invalid_buffer_identifier_in_create);
return FAIL;
}
VIM_CLEAR(buf->displayname);
--- 1478,1484 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in create\n"));
! emsg(_(e_invalid_buffer_identifier_in_create));
return FAIL;
}
VIM_CLEAR(buf->displayname);
***************
*** 1526,1532 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in
startDocumentListen\n"));
! emsg(e_invalid_buffer_identifier_in_startdocumentlisten);
return FAIL;
}
buf->fireChanges = 1;
--- 1526,1532 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in
startDocumentListen\n"));
! emsg(_(e_invalid_buffer_identifier_in_startdocumentlisten));
return FAIL;
}
buf->fireChanges = 1;
***************
*** 1537,1543 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in
stopDocumentListen\n"));
! emsg(e_invalid_buffer_identifier_in_stopdocumentlisten);
return FAIL;
}
buf->fireChanges = 0;
--- 1537,1543 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in
stopDocumentListen\n"));
! emsg(_(e_invalid_buffer_identifier_in_stopdocumentlisten));
return FAIL;
}
buf->fireChanges = 0;
***************
*** 1567,1573 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setTitle\n"));
! emsg(e_invalid_buffer_identifier_in_settitle);
return FAIL;
}
vim_free(buf->displayname);
--- 1567,1573 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setTitle\n"));
! emsg(_(e_invalid_buffer_identifier_in_settitle));
return FAIL;
}
vim_free(buf->displayname);
***************
*** 1579,1585 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in initDone\n"));
! emsg(e_invalid_buffer_identifier_in_initdone);
return FAIL;
}
do_update = 1;
--- 1579,1585 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in initDone\n"));
! emsg(_(e_invalid_buffer_identifier_in_initdone));
return FAIL;
}
do_update = 1;
***************
*** 1600,1606 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setBufferNumber\n"));
! emsg(e_invalid_buffer_identifier_in_setbuffernumber);
return FAIL;
}
path = (char_u *)nb_unquote(args, NULL);
--- 1600,1606 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setBufferNumber\n"));
! emsg(_(e_invalid_buffer_identifier_in_setbuffernumber));
return FAIL;
}
path = (char_u *)nb_unquote(args, NULL);
***************
*** 1611,1617 ****
if (bufp == NULL)
{
nbdebug((" File %s not found in setBufferNumber\n", args));
! semsg(e_file_str_not_found_in_setbuffernumber, args);
return FAIL;
}
buf->bufp = bufp;
--- 1611,1617 ----
if (bufp == NULL)
{
nbdebug((" File %s not found in setBufferNumber\n", args));
! semsg(_(e_file_str_not_found_in_setbuffernumber), args);
return FAIL;
}
buf->bufp = bufp;
***************
*** 1636,1642 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setFullName\n"));
! emsg(e_invalid_buffer_identifier_in_setfullname);
return FAIL;
}
vim_free(buf->displayname);
--- 1636,1642 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setFullName\n"));
! emsg(_(e_invalid_buffer_identifier_in_setfullname));
return FAIL;
}
vim_free(buf->displayname);
***************
*** 1659,1665 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in editFile\n"));
! emsg(e_invalid_buffer_identifier_in_editfile);
return FAIL;
}
// Edit a file: like create + setFullName + read the file.
--- 1659,1665 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in editFile\n"));
! emsg(_(e_invalid_buffer_identifier_in_editfile));
return FAIL;
}
// Edit a file: like create + setFullName + read the file.
***************
*** 1685,1691 ****
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(e_invalid_buffer_identifier_in_setvisible);
return FAIL;
}
if (streq((char *)args, "T") && buf->bufp != curbuf)
--- 1685,1691 ----
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(_(e_invalid_buffer_identifier_in_setvisible));
return FAIL;
}
if (streq((char *)args, "T") && buf->bufp != curbuf)
***************
*** 1725,1731 ****
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(e_invalid_buffer_identifier_in_setmodified);
return FAIL;
}
prev_b_changed = buf->bufp->b_changed;
--- 1725,1731 ----
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(_(e_invalid_buffer_identifier_in_setmodified));
return FAIL;
}
prev_b_changed = buf->bufp->b_changed;
***************
*** 1808,1814 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in setDot\n"));
! emsg(e_invalid_buffer_identifier_in_setdot);
return FAIL;
}
--- 1808,1814 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in setDot\n"));
! emsg(_(e_invalid_buffer_identifier_in_setdot));
return FAIL;
}
***************
*** 1861,1867 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in close\n"));
! emsg(e_invalid_buffer_identifier_in_close);
return FAIL;
}
--- 1861,1867 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in close\n"));
! emsg(_(e_invalid_buffer_identifier_in_close));
return FAIL;
}
***************
*** 1875,1881 ****
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(e_invalid_buffer_identifier_in_close_2);
}
nbdebug((" CLOSE %d: %s\n", bufno, name));
#ifdef FEAT_GUI
--- 1875,1881 ----
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
! emsg(_(e_invalid_buffer_identifier_in_close_2));
}
nbdebug((" CLOSE %d: %s\n", bufno, name));
#ifdef FEAT_GUI
***************
*** 1914,1920 ****
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in defineAnnoType\n"));
! emsg(e_invalid_buffer_identifier_in_defineannotype);
return FAIL;
}
--- 1914,1920 ----
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in defineAnnoType\n"));
! emsg(_(e_invalid_buffer_identifier_in_defineannotype));
return FAIL;
}
***************
*** 1942,1948 ****
bg = vim_strsave(p);
if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
{
! emsg(e_highlighting_color_name_too_long_in_defineAnnoType);
VIM_CLEAR(typeName);
parse_error = TRUE;
}
--- 1942,1948 ----
bg = vim_strsave(p);
if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
{
! emsg(_(e_highlighting_color_name_too_long_in_defineAnnoType));
VIM_CLEAR(typeName);
parse_error = TRUE;
}
***************
*** 1971,1977 ****
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in addAnno\n"));
! emsg(e_invalid_buffer_identifier_in_addanno);
return FAIL;
}
--- 1971,1977 ----
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in addAnno\n"));
! emsg(_(e_invalid_buffer_identifier_in_addanno));
return FAIL;
}
*** ../vim-9.0.1571/src/os_unix.c 2023-05-20 14:06:56.673542805 +0100
--- src/os_unix.c 2023-05-20 16:30:58.497777775 +0100
***************
*** 7705,7711 ****
for (i = 0; signal_info[i].sig != -1; i++)
if (lc_signal == signal_info[i].sig)
break;
! semsg(e_got_sig_str_in_libcall, signal_info[i].name);
}
# endif
# endif
--- 7705,7711 ----
for (i = 0; signal_info[i].sig != -1; i++)
if (lc_signal == signal_info[i].sig)
break;
! semsg(_(e_got_sig_str_in_libcall), signal_info[i].name);
}
# endif
# endif
*** ../vim-9.0.1571/src/terminal.c 2023-05-05 22:12:19.064321405 +0100
--- src/terminal.c 2023-05-20 16:34:38.457622633 +0100
***************
*** 887,893 ****
tty_type = 'c';
else
{
! semsg(e_invalid_value_for_argument_str, "type");
goto theend;
}
opt.jo_set2 |= JO2_TTY_TYPE;
--- 887,893 ----
tty_type = 'c';
else
{
! semsg(_(e_invalid_value_for_argument_str), "type");
goto theend;
}
opt.jo_set2 |= JO2_TTY_TYPE;
*** ../vim-9.0.1571/src/version.c 2023-05-20 14:06:56.677542802 +0100
--- src/version.c 2023-05-20 16:37:56.705481766 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1572,
/**/
--
hundred-and-one symptoms of being an internet addict:
48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
higher."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230520153933.D74C01C0A8A%40moolenaar.net.