Mercurial > vim
comparison src/memline.c @ 32525:bb5458706799 v9.0.1594
patch 9.0.1594: some internal error messages are translated
Commit: https://github.com/vim/vim/commit/68ebcee0237d927dd5386073499162389d4d708a
Author: RestorerZ <restorer@mail2k.ru>
Date: Wed May 31 17:12:14 2023 +0100
patch 9.0.1594: some internal error messages are translated
Problem: Some internal error messages are translated.
Solution: Consistently do not translate internal error messages.
(closes #12459)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 31 May 2023 18:15:04 +0200 |
parents | 5d07e7e9580f |
children | 448aef880252 |
comparison
equal
deleted
inserted
replaced
32524:f32e24ce6970 | 32525:bb5458706799 |
---|---|
330 */ | 330 */ |
331 if ((hp = mf_new(mfp, FALSE, 1)) == NULL) | 331 if ((hp = mf_new(mfp, FALSE, 1)) == NULL) |
332 goto error; | 332 goto error; |
333 if (hp->bh_bnum != 0) | 333 if (hp->bh_bnum != 0) |
334 { | 334 { |
335 iemsg(_(e_didnt_get_block_nr_zero)); | 335 iemsg(e_didnt_get_block_nr_zero); |
336 goto error; | 336 goto error; |
337 } | 337 } |
338 b0p = (ZERO_BL *)(hp->bh_data); | 338 b0p = (ZERO_BL *)(hp->bh_data); |
339 | 339 |
340 b0p->b0_id[0] = BLOCK0_ID0; | 340 b0p->b0_id[0] = BLOCK0_ID0; |
380 */ | 380 */ |
381 if ((hp = ml_new_ptr(mfp)) == NULL) | 381 if ((hp = ml_new_ptr(mfp)) == NULL) |
382 goto error; | 382 goto error; |
383 if (hp->bh_bnum != 1) | 383 if (hp->bh_bnum != 1) |
384 { | 384 { |
385 iemsg(_(e_didnt_get_block_nr_one)); | 385 iemsg(e_didnt_get_block_nr_one); |
386 goto error; | 386 goto error; |
387 } | 387 } |
388 pp = (PTR_BL *)(hp->bh_data); | 388 pp = (PTR_BL *)(hp->bh_data); |
389 pp->pb_count = 1; | 389 pp->pb_count = 1; |
390 pp->pb_pointer[0].pe_bnum = 2; | 390 pp->pb_pointer[0].pe_bnum = 2; |
398 */ | 398 */ |
399 if ((hp = ml_new_data(mfp, FALSE, 1)) == NULL) | 399 if ((hp = ml_new_data(mfp, FALSE, 1)) == NULL) |
400 goto error; | 400 goto error; |
401 if (hp->bh_bnum != 2) | 401 if (hp->bh_bnum != 2) |
402 { | 402 { |
403 iemsg(_(e_didnt_get_block_nr_two)); | 403 iemsg(e_didnt_get_block_nr_two); |
404 goto error; | 404 goto error; |
405 } | 405 } |
406 | 406 |
407 dp = (DATA_BL *)(hp->bh_data); | 407 dp = (DATA_BL *)(hp->bh_data); |
408 dp->db_index[0] = --dp->db_txt_start; // at end of block | 408 dp->db_index[0] = --dp->db_txt_start; // at end of block |
972 return; | 972 return; |
973 } | 973 } |
974 | 974 |
975 b0p = (ZERO_BL *)(hp->bh_data); | 975 b0p = (ZERO_BL *)(hp->bh_data); |
976 if (ml_check_b0_id(b0p) == FAIL) | 976 if (ml_check_b0_id(b0p) == FAIL) |
977 iemsg(_(e_ml_upd_block0_didnt_get_block_zero)); | 977 iemsg(e_ml_upd_block0_didnt_get_block_zero); |
978 else | 978 else |
979 { | 979 { |
980 if (what == UB_FNAME) | 980 if (what == UB_FNAME) |
981 set_b0_fname(b0p, buf); | 981 set_b0_fname(b0p, buf); |
982 #ifdef FEAT_CRYPT | 982 #ifdef FEAT_CRYPT |
2676 if (recursive == 0) | 2676 if (recursive == 0) |
2677 { | 2677 { |
2678 // Avoid giving this message for a recursive call, may happen when | 2678 // Avoid giving this message for a recursive call, may happen when |
2679 // the GUI redraws part of the text. | 2679 // the GUI redraws part of the text. |
2680 ++recursive; | 2680 ++recursive; |
2681 siemsg(_(e_ml_get_invalid_lnum_nr), lnum); | 2681 siemsg(e_ml_get_invalid_lnum_nr, lnum); |
2682 --recursive; | 2682 --recursive; |
2683 } | 2683 } |
2684 ml_flush_line(buf); | 2684 ml_flush_line(buf); |
2685 errorret: | 2685 errorret: |
2686 STRCPY(questions, "???"); | 2686 STRCPY(questions, "???"); |
2723 // Avoid giving this message for a recursive call, may happen | 2723 // Avoid giving this message for a recursive call, may happen |
2724 // when the GUI redraws part of the text. | 2724 // when the GUI redraws part of the text. |
2725 ++recursive; | 2725 ++recursive; |
2726 get_trans_bufname(buf); | 2726 get_trans_bufname(buf); |
2727 shorten_dir(NameBuff); | 2727 shorten_dir(NameBuff); |
2728 siemsg(_(e_ml_get_cannot_find_line_nr_in_buffer_nr_str), | 2728 siemsg(e_ml_get_cannot_find_line_nr_in_buffer_nr_str, |
2729 lnum, buf->b_fnum, NameBuff); | 2729 lnum, buf->b_fnum, NameBuff); |
2730 --recursive; | 2730 --recursive; |
2731 } | 2731 } |
2732 goto errorret; | 2732 goto errorret; |
2733 } | 2733 } |
3217 if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL) | 3217 if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL) |
3218 goto theend; | 3218 goto theend; |
3219 pp = (PTR_BL *)(hp->bh_data); // must be pointer block | 3219 pp = (PTR_BL *)(hp->bh_data); // must be pointer block |
3220 if (pp->pb_id != PTR_ID) | 3220 if (pp->pb_id != PTR_ID) |
3221 { | 3221 { |
3222 iemsg(_(e_pointer_block_id_wrong_three)); | 3222 iemsg(e_pointer_block_id_wrong_three); |
3223 mf_put(mfp, hp, FALSE, FALSE); | 3223 mf_put(mfp, hp, FALSE, FALSE); |
3224 goto theend; | 3224 goto theend; |
3225 } | 3225 } |
3226 /* | 3226 /* |
3227 * TODO: If the pointer block is full and we are adding at the end | 3227 * TODO: If the pointer block is full and we are adding at the end |
3358 /* | 3358 /* |
3359 * Safety check: fallen out of for loop? | 3359 * Safety check: fallen out of for loop? |
3360 */ | 3360 */ |
3361 if (stack_idx < 0) | 3361 if (stack_idx < 0) |
3362 { | 3362 { |
3363 iemsg(_(e_updated_too_many_blocks)); | 3363 iemsg(e_updated_too_many_blocks); |
3364 buf->b_ml.ml_stack_top = 0; // invalidate stack | 3364 buf->b_ml.ml_stack_top = 0; // invalidate stack |
3365 } | 3365 } |
3366 } | 3366 } |
3367 | 3367 |
3368 #ifdef FEAT_BYTEOFF | 3368 #ifdef FEAT_BYTEOFF |
3818 if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL) | 3818 if ((hp = mf_get(mfp, ip->ip_bnum, 1)) == NULL) |
3819 goto theend; | 3819 goto theend; |
3820 pp = (PTR_BL *)(hp->bh_data); // must be pointer block | 3820 pp = (PTR_BL *)(hp->bh_data); // must be pointer block |
3821 if (pp->pb_id != PTR_ID) | 3821 if (pp->pb_id != PTR_ID) |
3822 { | 3822 { |
3823 iemsg(_(e_pointer_block_id_wrong_four)); | 3823 iemsg(e_pointer_block_id_wrong_four); |
3824 mf_put(mfp, hp, FALSE, FALSE); | 3824 mf_put(mfp, hp, FALSE, FALSE); |
3825 goto theend; | 3825 goto theend; |
3826 } | 3826 } |
3827 count = --(pp->pb_count); | 3827 count = --(pp->pb_count); |
3828 if (count == 0) // the pointer block becomes empty! | 3828 if (count == 0) // the pointer block becomes empty! |
4083 lnum = buf->b_ml.ml_line_lnum; | 4083 lnum = buf->b_ml.ml_line_lnum; |
4084 new_line = buf->b_ml.ml_line_ptr; | 4084 new_line = buf->b_ml.ml_line_ptr; |
4085 | 4085 |
4086 hp = ml_find_line(buf, lnum, ML_FIND); | 4086 hp = ml_find_line(buf, lnum, ML_FIND); |
4087 if (hp == NULL) | 4087 if (hp == NULL) |
4088 siemsg(_(e_cannot_find_line_nr), lnum); | 4088 siemsg(e_cannot_find_line_nr, lnum); |
4089 else | 4089 else |
4090 { | 4090 { |
4091 dp = (DATA_BL *)(hp->bh_data); | 4091 dp = (DATA_BL *)(hp->bh_data); |
4092 idx = lnum - buf->b_ml.ml_locked_low; | 4092 idx = lnum - buf->b_ml.ml_locked_low; |
4093 start = ((dp->db_index[idx]) & DB_INDEX_MASK); | 4093 start = ((dp->db_index[idx]) & DB_INDEX_MASK); |
4343 } | 4343 } |
4344 | 4344 |
4345 pp = (PTR_BL *)(dp); // must be pointer block | 4345 pp = (PTR_BL *)(dp); // must be pointer block |
4346 if (pp->pb_id != PTR_ID) | 4346 if (pp->pb_id != PTR_ID) |
4347 { | 4347 { |
4348 iemsg(_(e_pointer_block_id_wrong)); | 4348 iemsg(e_pointer_block_id_wrong); |
4349 goto error_block; | 4349 goto error_block; |
4350 } | 4350 } |
4351 | 4351 |
4352 if ((top = ml_add_stack(buf)) < 0) // add new entry to stack | 4352 if ((top = ml_add_stack(buf)) < 0) // add new entry to stack |
4353 goto error_block; | 4353 goto error_block; |
4388 } | 4388 } |
4389 } | 4389 } |
4390 if (idx >= (int)pp->pb_count) // past the end: something wrong! | 4390 if (idx >= (int)pp->pb_count) // past the end: something wrong! |
4391 { | 4391 { |
4392 if (lnum > buf->b_ml.ml_line_count) | 4392 if (lnum > buf->b_ml.ml_line_count) |
4393 siemsg(_(e_line_number_out_of_range_nr_past_the_end), | 4393 siemsg(e_line_number_out_of_range_nr_past_the_end, |
4394 lnum - buf->b_ml.ml_line_count); | 4394 lnum - buf->b_ml.ml_line_count); |
4395 | 4395 |
4396 else | 4396 else |
4397 siemsg(_(e_line_count_wrong_in_block_nr), bnum); | 4397 siemsg(e_line_count_wrong_in_block_nr, bnum); |
4398 goto error_block; | 4398 goto error_block; |
4399 } | 4399 } |
4400 if (action == ML_DELETE) | 4400 if (action == ML_DELETE) |
4401 { | 4401 { |
4402 pp->pb_pointer[idx].pe_line_count--; | 4402 pp->pb_pointer[idx].pe_line_count--; |
4485 break; | 4485 break; |
4486 pp = (PTR_BL *)(hp->bh_data); // must be pointer block | 4486 pp = (PTR_BL *)(hp->bh_data); // must be pointer block |
4487 if (pp->pb_id != PTR_ID) | 4487 if (pp->pb_id != PTR_ID) |
4488 { | 4488 { |
4489 mf_put(mfp, hp, FALSE, FALSE); | 4489 mf_put(mfp, hp, FALSE, FALSE); |
4490 iemsg(_(e_pointer_block_id_wrong_two)); | 4490 iemsg(e_pointer_block_id_wrong_two); |
4491 break; | 4491 break; |
4492 } | 4492 } |
4493 pp->pb_pointer[ip->ip_index].pe_line_count += count; | 4493 pp->pb_pointer[ip->ip_index].pe_line_count += count; |
4494 ip->ip_high += count; | 4494 ip->ip_high += count; |
4495 mf_put(mfp, hp, TRUE, FALSE); | 4495 mf_put(mfp, hp, TRUE, FALSE); |