poe

Уређивач .po фајлова
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 5b21322848c163934256ec0962cbb5dbf1d81f7b
родитељ 54025aa597d5162628e7e1604c609472d12d6828
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Thu, 10 Feb 2022 07:45:04 +0100

Finish adding heuristics to match the ending newline/dot

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MTODO | 2+-
Mpo.c | 5++---
измењених датотека: 2, додавања: 3(+), брисања: 4(-)

diff --git a/TODO b/TODO @@ -3,7 +3,7 @@ [~] Investigate newlines loading and saving [x] Fix line counting when \n at end of string - [ ] Add heuristics to match the ending newline or dot + [x] Add heuristics to match the ending newline or dot [ ] Soft-warn when the number of newlines doesn't match (different color?) diff --git a/po.c b/po.c @@ -497,7 +497,7 @@ save_file(const struct PoEntry* entries, const size_t real_msgid_count, if (!(output = fopen(tmp_filename[1], "wt"))) return SAVE_ERR_CANT_OPEN_FILE; - strncpy(backup_filename, filename, len + 1); + strcpy(backup_filename, filename); backup_filename[len] = '~'; backup_filename[len + 1] = 0; @@ -736,8 +736,7 @@ save_loop_entries_start: VERSION); } else - fprintf(output, "\"%s%s\"\n", u8_msgstr, - *pumsgstr ? "" : "\\n"); + fprintf(output, "\"%s\"\n", u8_msgstr); free(u8_msgstr); } if (first_entry && !seen_generator)