summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-05-20 16:39:07 +0100
committerBram Moolenaar <Bram@vim.org>2023-05-20 16:39:07 +0100
commit50809a45ebde327cb6fdcc727d7466e926aed713 (patch)
tree90faf3ed7dd23ddd65c47460102cd6e1e0d832d0 /src
parent79cdf026f1b8a16298ee73be497c4bd5f3458cde (diff)
patch 9.0.1572: error messages are not translatedv9.0.1572
Problem: Error messages are not translated. Solution: Add _().
Diffstat (limited to 'src')
-rw-r--r--src/crypt.c28
-rw-r--r--src/gui_photon.c2
-rw-r--r--src/main.c4
-rw-r--r--src/netbeans.c50
-rw-r--r--src/os_unix.c2
-rw-r--r--src/terminal.c2
-rw-r--r--src/version.c2
7 files changed, 46 insertions, 44 deletions
diff --git a/src/crypt.c b/src/crypt.c
index f6d7c12f1b..3acbfa27c0 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -1022,7 +1022,7 @@ crypt_sodium_init_(
return OK;
# else
- emsg(e_libsodium_not_built_in);
+ emsg(_(e_libsodium_not_built_in));
return FAIL;
# endif
}
@@ -1051,7 +1051,7 @@ crypt_sodium_encode(
{
if (len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
- emsg(e_libsodium_cannot_encrypt_header);
+ emsg(_(e_libsodium_cannot_encrypt_header));
return;
}
crypto_secretstream_xchacha20poly1305_init_push(&sod_st->state,
@@ -1061,7 +1061,7 @@ crypt_sodium_encode(
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
- emsg(e_libsodium_cannot_encrypt_buffer);
+ emsg(_(e_libsodium_cannot_encrypt_buffer));
return;
}
@@ -1098,7 +1098,7 @@ crypt_sodium_decode(
if (sod_st->count == 0
&& len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
{
- emsg(e_libsodium_cannot_decrypt_header);
+ emsg(_(e_libsodium_cannot_decrypt_header));
return;
}
@@ -1106,7 +1106,7 @@ crypt_sodium_decode(
if (buf_out == NULL)
{
- emsg(e_libsodium_cannot_allocate_buffer);
+ emsg(_(e_libsodium_cannot_allocate_buffer));
return;
}
if (sod_st->count == 0)
@@ -1114,7 +1114,7 @@ crypt_sodium_decode(
if (crypto_secretstream_xchacha20poly1305_init_pull(
&sod_st->state, from, sod_st->key) != 0)
{
- emsg(e_libsodium_decryption_failed_header_incomplete);
+ emsg(_(e_libsodium_decryption_failed_header_incomplete));
goto fail;
}
@@ -1127,20 +1127,20 @@ crypt_sodium_decode(
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
{
- emsg(e_libsodium_cannot_decrypt_buffer);
+ 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);
+ emsg(_(e_libsodium_decryption_failed));
goto fail;
}
sod_st->count++;
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
{
- emsg(e_libsodium_decryption_failed_premature);
+ emsg(_(e_libsodium_decryption_failed_premature));
goto fail;
}
if (p1 == p2)
@@ -1179,7 +1179,7 @@ crypt_sodium_buffer_encode(
*buf_out = alloc_clear(length);
if (*buf_out == NULL)
{
- emsg(e_libsodium_cannot_allocate_buffer);
+ emsg(_(e_libsodium_cannot_allocate_buffer));
return -1;
}
ptr = *buf_out;
@@ -1230,7 +1230,7 @@ crypt_sodium_buffer_decode(
*buf_out = alloc_clear(len);
if (*buf_out == NULL)
{
- emsg(e_libsodium_cannot_allocate_buffer);
+ emsg(_(e_libsodium_cannot_allocate_buffer));
return -1;
}
@@ -1239,7 +1239,7 @@ crypt_sodium_buffer_decode(
if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
from, sod_st->key) != 0)
{
- emsg(e_libsodium_decryption_failed_header_incomplete);
+ emsg(_(e_libsodium_decryption_failed_header_incomplete));
return -1;
}
from += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
@@ -1249,12 +1249,12 @@ crypt_sodium_buffer_decode(
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
*buf_out, &out_len, &tag, from, len, NULL, 0) != 0)
{
- emsg(e_libsodium_decryption_failed);
+ emsg(_(e_libsodium_decryption_failed));
return -1;
}
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
- emsg(e_libsodium_decryption_failed_premature);
+ emsg(_(e_libsodium_decryption_failed_premature));
return (long) out_len;
# else
return -1;
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 0eb1282e06..b987e9b8a8 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -2956,7 +2956,7 @@ gui_mch_get_font(char_u *vim_font_name, int report_error)
}
if (report_error)
- semsg(e_unknown_font_str, vim_font_name);
+ semsg(_(e_unknown_font_str), vim_font_name);
return FAIL;
}
diff --git a/src/main.c b/src/main.c
index 476d869578..0e8e82cd4f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3198,7 +3198,7 @@ source_startup_scripts(mparm_T *parmp)
{
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL)
!= OK)
- emsg(e_failed_to_source_defaults);
+ emsg(_(e_failed_to_source_defaults));
}
else if (STRCMP(parmp->use_vimrc, "NONE") == 0
|| STRCMP(parmp->use_vimrc, "NORC") == 0)
@@ -3273,7 +3273,7 @@ source_startup_scripts(mparm_T *parmp)
// 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);
+ emsg(_(e_failed_to_source_defaults));
}
}
diff --git a/src/netbeans.c b/src/netbeans.c
index 56a25829fa..7966cf521c 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -477,7 +477,7 @@ nb_parse_cmd(char_u *cmd)
if (*verb != ':')
{
nbdebug((" missing colon: %s\n", cmd));
- semsg(e_missing_colon_str, cmd);
+ semsg(_(e_missing_colon_str), cmd);
return;
}
++verb; // skip colon
@@ -501,7 +501,7 @@ nb_parse_cmd(char_u *cmd)
if (isfunc < 0)
{
nbdebug((" missing ! or / in: %s\n", cmd));
- semsg(e_missing_bang_or_slash_in_str, cmd);
+ semsg(_(e_missing_bang_or_slash_in_str), cmd);
return;
}
@@ -518,7 +518,7 @@ nb_parse_cmd(char_u *cmd)
* 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);
+ emsg(_(e_bad_return_from_nb_do_cmd));
#endif
}
}
@@ -1040,7 +1040,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" Invalid buffer identifier in getAnno\n"));
- emsg(e_invalid_buffer_identifier_in_getanno);
+ emsg(_(e_invalid_buffer_identifier_in_getanno));
retval = FAIL;
}
else
@@ -1063,7 +1063,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getLength\n"));
- emsg(e_invalid_buffer_identifier_in_getlength);
+ emsg(_(e_invalid_buffer_identifier_in_getlength));
retval = FAIL;
}
else
@@ -1085,7 +1085,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in getText\n"));
- emsg(e_invalid_buffer_identifier_in_gettext);
+ emsg(_(e_invalid_buffer_identifier_in_gettext));
retval = FAIL;
}
else
@@ -1148,7 +1148,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in remove\n"));
- emsg(e_invalid_buffer_identifier_in_remove);
+ emsg(_(e_invalid_buffer_identifier_in_remove));
retval = FAIL;
}
else
@@ -1318,7 +1318,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in insert\n"));
- emsg(e_invalid_buffer_identifier_in_insert);
+ emsg(_(e_invalid_buffer_identifier_in_insert));
retval = FAIL;
}
else if (args != NULL)
@@ -1478,7 +1478,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in create\n"));
- emsg(e_invalid_buffer_identifier_in_create);
+ emsg(_(e_invalid_buffer_identifier_in_create));
return FAIL;
}
VIM_CLEAR(buf->displayname);
@@ -1526,7 +1526,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in startDocumentListen\n"));
- emsg(e_invalid_buffer_identifier_in_startdocumentlisten);
+ emsg(_(e_invalid_buffer_identifier_in_startdocumentlisten));
return FAIL;
}
buf->fireChanges = 1;
@@ -1537,7 +1537,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in stopDocumentListen\n"));
- emsg(e_invalid_buffer_identifier_in_stopdocumentlisten);
+ emsg(_(e_invalid_buffer_identifier_in_stopdocumentlisten));
return FAIL;
}
buf->fireChanges = 0;
@@ -1567,7 +1567,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setTitle\n"));
- emsg(e_invalid_buffer_identifier_in_settitle);
+ emsg(_(e_invalid_buffer_identifier_in_settitle));
return FAIL;
}
vim_free(buf->displayname);
@@ -1579,7 +1579,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in initDone\n"));
- emsg(e_invalid_buffer_identifier_in_initdone);
+ emsg(_(e_invalid_buffer_identifier_in_initdone));
return FAIL;
}
do_update = 1;
@@ -1600,7 +1600,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setBufferNumber\n"));
- emsg(e_invalid_buffer_identifier_in_setbuffernumber);
+ emsg(_(e_invalid_buffer_identifier_in_setbuffernumber));
return FAIL;
}
path = (char_u *)nb_unquote(args, NULL);
@@ -1611,7 +1611,7 @@ nb_do_cmd(
if (bufp == NULL)
{
nbdebug((" File %s not found in setBufferNumber\n", args));
- semsg(e_file_str_not_found_in_setbuffernumber, args);
+ semsg(_(e_file_str_not_found_in_setbuffernumber), args);
return FAIL;
}
buf->bufp = bufp;
@@ -1636,7 +1636,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in setFullName\n"));
- emsg(e_invalid_buffer_identifier_in_setfullname);
+ emsg(_(e_invalid_buffer_identifier_in_setfullname));
return FAIL;
}
vim_free(buf->displayname);
@@ -1659,7 +1659,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in editFile\n"));
- emsg(e_invalid_buffer_identifier_in_editfile);
+ emsg(_(e_invalid_buffer_identifier_in_editfile));
return FAIL;
}
// Edit a file: like create + setFullName + read the file.
@@ -1685,7 +1685,7 @@ nb_do_cmd(
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
- emsg(e_invalid_buffer_identifier_in_setvisible);
+ emsg(_(e_invalid_buffer_identifier_in_setvisible));
return FAIL;
}
if (streq((char *)args, "T") && buf->bufp != curbuf)
@@ -1725,7 +1725,7 @@ nb_do_cmd(
// This message was commented out, probably because it can
// happen when shutting down.
if (p_verbose > 0)
- emsg(e_invalid_buffer_identifier_in_setmodified);
+ emsg(_(e_invalid_buffer_identifier_in_setmodified));
return FAIL;
}
prev_b_changed = buf->bufp->b_changed;
@@ -1808,7 +1808,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in setDot\n"));
- emsg(e_invalid_buffer_identifier_in_setdot);
+ emsg(_(e_invalid_buffer_identifier_in_setdot));
return FAIL;
}
@@ -1861,7 +1861,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in close\n"));
- emsg(e_invalid_buffer_identifier_in_close);
+ emsg(_(e_invalid_buffer_identifier_in_close));
return FAIL;
}
@@ -1875,7 +1875,7 @@ nb_do_cmd(
// 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);
+ emsg(_(e_invalid_buffer_identifier_in_close_2));
}
nbdebug((" CLOSE %d: %s\n", bufno, name));
#ifdef FEAT_GUI
@@ -1914,7 +1914,7 @@ nb_do_cmd(
if (buf == NULL)
{
nbdebug((" invalid buffer identifier in defineAnnoType\n"));
- emsg(e_invalid_buffer_identifier_in_defineannotype);
+ emsg(_(e_invalid_buffer_identifier_in_defineannotype));
return FAIL;
}
@@ -1942,7 +1942,7 @@ nb_do_cmd(
bg = vim_strsave(p);
if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
{
- emsg(e_highlighting_color_name_too_long_in_defineAnnoType);
+ emsg(_(e_highlighting_color_name_too_long_in_defineAnnoType));
VIM_CLEAR(typeName);
parse_error = TRUE;
}
@@ -1971,7 +1971,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in addAnno\n"));
- emsg(e_invalid_buffer_identifier_in_addanno);
+ emsg(_(e_invalid_buffer_identifier_in_addanno));
return FAIL;
}
diff --git a/src/os_unix.c b/src/os_unix.c
index 194e4d3134..47073ba09e 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -7705,7 +7705,7 @@ mch_libcall(
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);
+ semsg(_(e_got_sig_str_in_libcall), signal_info[i].name);
}
# endif
# endif
diff --git a/src/terminal.c b/src/terminal.c
index fde77219dc..d235eb34c9 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -887,7 +887,7 @@ ex_terminal(exarg_T *eap)
tty_type = 'c';
else
{
- semsg(e_invalid_value_for_argument_str, "type");
+ semsg(_(e_invalid_value_for_argument_str), "type");
goto theend;
}
opt.jo_set2 |= JO2_TTY_TYPE;
diff --git a/src/version.c b/src/version.c
index 8d0d519e4d..0d0099cc7a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1572,
+/**/
1571,
/**/
1570,