poe

Уређивач .po фајлова
git clone https://git.sr.ht/~strahinja/poe
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 3431e0f6b2c97a8c8ae474b7938529f74b45a5ed
родитељ 658c95688b0b68a56ee2c4465cff92d0d4745c2a
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Mon,  6 May 2024 22:30:29 +0200

poe.1.in: Syntax fixes; add EXIT STATUS; poe.c: Usage syntax

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

Diffstat:
Mpoe.1.in | 35++++++++++++++++++++---------------
Mpoe.c | 7++++---
измењених датотека: 2, додавања: 24(+), брисања: 18(-)

diff --git a/poe.1.in b/poe.1.in @@ -9,23 +9,24 @@ .Nd .po file editor .Sh SYNOPSIS .Nm -.Fl h | \-help | Fl V | \-full\-version | Fl v | \-version | +.Fl h | \-help | Fl V | \-full\-version | Fl v | \-version +.Nm .Ar filename.po .Sh DESCRIPTION .Nm is a .po (GNU gettext) file editor with a terminal UI. .Bl -tag -width Ds -.It Fl h | \-help +.It Fl h , \-help Show option summary. -.It Fl V | \-full\-version +.It Fl V , \-full\-version Show full version information: like .Fl v , followed by copyright notice and defines set in .Pa config.h . -.It Fl v | \-version +.It Fl v , \-version Show version information: program version and source git repository commit date. .El -.Ss "Key bindings" +.Ss Key bindings Main window key bindings are as follows: .TS box tab(@); @@ -83,8 +84,10 @@ _ \f[CR]Down\fR@Go to next line .TE .Pp -In the table above, "current msgstr" refers to the situation when there are -multiple msgstrs, representing different plural forms. +In the table above, +.Dq current msgstr +refers to the situation when there are multiple msgstrs, representing different +plural forms. Only the currently shown plural form is affected. .Pp When the info box is focused, arrow keys, \f[CR]C-B\fR/\f[CR]C-F\fR @@ -96,7 +99,7 @@ the edit box also apply. For example, \f[CR]C-R\fR moves one word backwards, and \f[CR]C-W\fR deletes one word backwards. . -.Ss "Status line" +.Ss Status line Status line is comprised of a number of segments, by default three. The central segment displays the current message number, the total messages count, then in parentheses: number of untranslated messages, number of fuzzy @@ -105,7 +108,7 @@ Obsolete messages are messages whose msgid doesn't match any msgid in the message catalog anymore, and are commented out in the .po file using \f[CR]#~\fR comments. . -.Ss "Message flags" +.Ss Message flags Message flags are shown to the left of the msgid in the main window and the statusbar of the edit box. They mean the following: @@ -120,19 +123,18 @@ _ \f[CR]N\fR@\f[CR]no-c-format\fR flag .TE . -.Ss "Error checking" +.Ss Error checking .Nm has some rudimentary checks of the translated messages built in. First, when saving changes in the edit box, if the msgid has a newline character -(\f[CR]\\n\fR), a dot (\f[CR].\fR) or a space (\f[CR]\~\fR) at the end, and the +(\f[CR]\en\fR), a dot (\f[CR].\fR) or a space (\f[CR]\~\fR) at the end, and the corresponding msgstr doesn't, msgstr being saved will have its ending character made to match the one from the msgid. This feature can be disabled by commenting out the .Dv MATCH_MSGSTR_ENDING feature flag. -. .Pp -Second, if the numbers of newline characters (\f[CR]\\n\fR), or, additionally, +Second, if the numbers of newline characters (\f[CR]\en\fR), or, additionally, dots when .Dv WARN_COUNT_DOTS is set, in msgid and msgstr don't match, msgstr will be shown in a different @@ -141,15 +143,18 @@ If the number of newlines was intended, you can simply ignore this warning. Otherwise, it can be useful to detect unwanted discrepancies in formatting between the original message and the translation. . +.Sh EXIT STATUS +.Ex -std +. .Sh AUTHORS -.An "Strahinya Radich" Aq contact@strahinja.org , +.An Strahinya Radich Aq Mt contact@strahinja.org , 2021\-2024 . .Sh BUGS Bugs can be reported using the ticket tracker at: .Lk https://\:todo.sr.ht/\:~strahinja/\:poe . -.Ss "Known limitations" +.Ss Known limitations .Bl -bullet -width 1m .It UTF-8 character set is assumed. diff --git a/poe.c b/poe.c @@ -2160,9 +2160,10 @@ main(int argc, char** argv) if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) { - printf("Usage: %s -h | --help | -V | --full-version | -v |" - " --version | filename.po\n", - PROGRAMNAME); + printf("Usage:\t%s -h | --help | -V | --full-version | -v |" + " --version\n" + "\t%s filename.po\n", + PROGRAMNAME, PROGRAMNAME); return 0; } else if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version"))