poe

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

poe.1.in (6408B)


      1 .\" This program is licensed under the terms of GNU GPL v3 or (at your option)
      2 .\" any later version. Copyright (C) 2021-2024  Страхиња Радић.
      3 .\" See the file LICENSE for exact copyright and license details.
      4 .Dd %DATE%
      5 .Dt POE 1
      6 .Os
      7 .Sh NAME
      8 .Nm poe
      9 .Nd .po file editor
     10 .Sh SYNOPSIS
     11 .Nm
     12 .Fl h | \-help | Fl V | \-full\-version | Fl v | \-version
     13 .Nm
     14 .Ar filename.po
     15 .Sh DESCRIPTION
     16 .Nm
     17 is a .po (GNU gettext) file editor with a terminal UI.
     18 .Bl -tag -width Ds
     19 .It Fl h , \-help
     20 Show option summary.
     21 .It Fl V , \-full\-version
     22 Show full version information: like
     23 .Fl v ,
     24 followed by copyright notice and defines set in
     25 .Pa config.h .
     26 .It Fl v , \-version
     27 Show version information: program version and source git repository commit date.
     28 .El
     29 .Ss Key bindings
     30 Main window key bindings are as follows:
     31 .Bl -column -offset Ds "C-F or PgDn"
     32 .It Sy Key Ta Sy Action
     33 .It \f[CR]Esc\fR Ta Close dialog or clear error
     34 .It \f[CR]Enter\fR Ta Edit entry
     35 .It \f[CR]H\fR or \f[CR]F1\fR Ta Show help dialog
     36 .It \f[CR]/\fR or \f[CR]F7\fR Ta Incremental search (end input with Enter)
     37 .It \f[CR]n\fR or \f[CR]F3\fR Ta Find next
     38 .It \f[CR]N\fR or \f[CR]F4\fR Ta Find previous
     39 .It \f[CR]u\fR or \f[CR]F8\fR Ta Go to next untranslated entry
     40 .It \f[CR]f\fR or \f[CR]F9\fR Ta Go to next fuzzy entry
     41 .It \f[CR]w\fR or \f[CR]C-S\fR Ta Save file (with backup)
     42 .It \f[CR]g\fR or \f[CR]Home\fR Ta Go to first entry
     43 .It \f[CR]C-B\fR or \f[CR]PgUp\fR Ta Go to previous page
     44 .It \f[CR]k\fR or \f[CR]Up\fR Ta Go to previous entry
     45 .It \f[CR]j\fR or \f[CR]Down\fR Ta Go to next entry
     46 .It \f[CR]C-F\fR or \f[CR]PgDn\fR Ta Go to next page
     47 .It \f[CR]G\fR or \f[CR]End\fR Ta Go to last entry
     48 .It \f[CR]z\fR or \f[CR]C-Z\fR Ta Toggle fuzzy flag
     49 .It \f[CR]q\fR or \f[CR]C-Q\fR Ta Quit
     50 .El
     51 .Pp
     52 Edit dialog key bindings are as follows:
     53 .Bl -column -offset Ds "C-A or Home"
     54 .It Sy Key Ta Sy Action
     55 .It \f[CR]C-S\fR Ta Update entry and close dialog
     56 .It \f[CR]C-B\fR or \f[CR]PgUp\fR Ta Update entry and edit previous entry
     57 .It \f[CR]C-F\fR or \f[CR]PgDn\fR Ta Update entry and edit next entry
     58 .It \f[CR]C-P\fR Ta Show previous plural form of msgstr
     59 .It \f[CR]C-N\fR Ta Show next plural form of msgstr
     60 .It \f[CR]Escape\fR Ta Cancel changes and close dialog
     61 .It \f[CR]C-C\fR Ta Yank (copy) current msgstr to paste buffer
     62 .It \f[CR]C-V\fR Ta Paste the contents of paste buffer into current msgstr
     63 .It \f[CR]F8\fR Ta Go to next untranslated entry
     64 .It \f[CR]F9\fR Ta Go to next fuzzy entry
     65 .It \f[CR]F5\fR Ta Copy msgid to edit box as current msgstr
     66 .It \f[CR]F6\fR Ta Toggle focus between info box and edit box
     67 .It \f[CR]C-Z\fR Ta Toggle fuzzy flag
     68 .It \f[CR]C-A\fR or \f[CR]Home\fR Ta Go to start of line
     69 .It \f[CR]C-E\fR or \f[CR]End\fR Ta Go to end of line
     70 .It \f[CR]C-U\fR Ta Erase to start of line
     71 .It \f[CR]C-K\fR Ta Erase to end of line
     72 .It \f[CR]C-R\fR Ta Go to previous word
     73 .It \f[CR]C-T\fR Ta Go to next word
     74 .It \f[CR]C-W\fR Ta Erase previous word
     75 .It \f[CR]Up\fR Ta Go to previous line
     76 .It \f[CR]Left\fR Ta Go to previous character
     77 .It \f[CR]Right\fR Ta Go to next character
     78 .It \f[CR]Down\fR Ta Go to next line
     79 .El
     80 .Pp
     81 In the table above,
     82 .Dq current msgstr
     83 refers to the situation when there are multiple msgstrs, representing different
     84 plural forms.
     85 Only the currently shown plural form is affected.
     86 .Pp
     87 When the info box is focused, arrow keys, \f[CR]C-B\fR/\f[CR]C-F\fR
     88 (\f[CR]PgUp\fR/\f[CR]PgDn\fR) and \f[CR]C-A\fR/\f[CR]C-E\fR
     89 (\f[CR]Home\fR/\f[CR]End\fR) keys scroll the info box.
     90 .Pp
     91 When the search box is open, relevant text editing and movement commands from
     92 the edit box also apply.
     93 For example, \f[CR]C-R\fR moves one word backwards, and \f[CR]C-W\fR deletes one
     94 word backwards.
     95 .
     96 .Ss Status line
     97 Status line is comprised of a number of segments, by default three.
     98 The central segment displays the current message number, the total messages
     99 count, then in parentheses: number of untranslated messages, number of fuzzy
    100 messages and the number of obsolete messages.
    101 Obsolete messages are messages whose msgid doesn't match any msgid in the
    102 message catalog anymore, and are commented out in the .po file using \f[CR]#~\fR
    103 comments.
    104 .
    105 .Ss Message flags
    106 Message flags are shown to the left of the msgid in the main window and the
    107 statusbar of the edit box.
    108 They mean the following:
    109 .Bl -column -offset Ds "Character"
    110 .It Sy Character Ta Sy Meaning
    111 .It \f[CR]C\fR Ta \f[CR]c-format\fR flag
    112 .It \f[CR]F\fR Ta \f[CR]fuzzy\fR flag
    113 .It \f[CR]P\fR Ta Message has plural forms
    114 .It \f[CR]N\fR Ta \f[CR]no-c-format\fR flag
    115 .El
    116 .
    117 .Ss Error checking
    118 .Nm
    119 has some rudimentary checks of the translated messages built in.
    120 First, when saving changes in the edit box, if the msgid has a newline character
    121 (\f[CR]\en\fR), a dot (\f[CR].\fR) or a space (\f[CR]\~\fR) at the end, and the
    122 corresponding msgstr doesn't, msgstr being saved will have its ending character
    123 made to match the one from the msgid.
    124 This feature can be disabled by commenting out the
    125 .Dv MATCH_MSGSTR_ENDING
    126 feature flag.
    127 .Pp
    128 Second, if the numbers of newline characters (\f[CR]\en\fR), or, additionally,
    129 dots when
    130 .Dv WARN_COUNT_DOTS
    131 is set, in msgid and msgstr don't match, msgstr will be shown in a different
    132 color on the main screen.
    133 If the number of newlines was intended, you can simply ignore this warning.
    134 Otherwise, it can be useful to detect unwanted discrepancies in formatting
    135 between the original message and the translation.
    136 .
    137 .Sh EXIT STATUS
    138 .Ex -std
    139 .
    140 .Sh AUTHORS
    141 .An Strahinya Radich Aq Mt contact@strahinja.org ,
    142 2021\-2024
    143 .
    144 .Sh BUGS
    145 Bugs can be reported using the ticket tracker at:
    146 .Lk https://\:todo.sr.ht/\:~strahinja/\:poe
    147 .
    148 .Ss Known limitations
    149 .Bl -bullet -width 1m
    150 .It
    151 UTF-8 character set is assumed.
    152 .It
    153 CJK characters are unsupported/problematic.
    154 This is a limitation of termbox library.
    155 See
    156 .Lk https://\:github.com/\:nsf/\:termbox
    157 for more details.
    158 .It
    159 Only one file can be edited at a time, and no additional files can be loaded at
    160 runtime.
    161 This is a design decision.
    162 .It
    163 Unless the define
    164 .Dv CREATE_BACKUPS
    165 is commented out before compilation, the directory of the edited file must be
    166 writable by the user in order to write the changes to the file.
    167 This is due to creating backups in order to avoid the potential data loss under
    168 specific circumstances (loss of power during write).
    169 .It
    170 Only the flags
    171 .Dv fuzzy ,
    172 .Dv c\-format
    173 and
    174 .Dv no\-c\-format
    175 are supported.
    176 Other flags will be stripped on save.
    177 This is a design decision.
    178 .El