@@ -289,7 +289,8 @@ How stuff works:
289
289
Interface uses language selected by currently authenticated user.
290
290
291
291
Additional details may be found in `GNU gettext`_ and Python `gettext
292
- module`_ documentation.
292
+ module`_ documentation. Additional information on ``.po`` translation
293
+ files can also be found at pology_.
293
294
294
295
`Roundup source distribution`_ includes POT and PO files for message
295
296
translators, and also pre-built MO files to facilitate installations
@@ -343,6 +344,29 @@ script) has no human readable parts at all, and needs no translations.
343
344
Such strings are left untranslated in PO files, and are reported
344
345
as such by PO status checkers (e.g. ``msgfmt --statistics``).
345
346
347
+ Hints for the translator can be added by adding a comment block
348
+ starting with ``# .Hint``. The hints will be extracted into the .pot
349
+ file and merged to the .po files used by the translators. This can add
350
+ context to how the string is used. For example from admin.py::
351
+
352
+ # .Hint read as: assignedto was admin(1)
353
+ # where assignedto is the property
354
+ # admin is the key name for value 1
355
+ _("%(prop)s was %(name)s(%(value)s)")
356
+
357
+ is shown in the .po file as::
358
+
359
+ #. .Hint read as: assignedto was admin(1)
360
+ #. where assignedto is the property
361
+ #. admin is the key name for value 1
362
+ #: ../roundup/admin.py:1091
363
+ #, python-format
364
+ msgid "%(prop)s was %(name)s(%(value)s)"
365
+ msgstr ""
366
+
367
+ allowing the translator to see the replaced string so they can
368
+ understand how name and value are used.
369
+
346
370
Command Line Interfaces
347
371
~~~~~~~~~~~~~~~~~~~~~~~
348
372
@@ -559,6 +583,8 @@ tools that may help you with this process:
559
583
informed the original plugin author about these changes, but got
560
584
no reply so far.
561
585
586
+ Additional information on ``.po`` files can be found at pology_.
587
+
562
588
Compiling Message Catalogs
563
589
^^^^^^^^^^^^^^^^^^^^^^^^^^
564
590
@@ -621,6 +647,7 @@ At run time, Roundup automatically compiles message catalogs whenever
621
647
https://vim.sourceforge.io/scripts/script.php?script_id=695
622
648
.. _PO utilities: https://github.com/pinard/po-utils
623
649
.. _poEdit: https://poedit.net/
650
+ .. _pology: http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
624
651
.. _pylint: https://pylint.pycqa.org/en/latest/
625
652
.. _Roundup Source:
626
653
.. _Roundup source distribution:
0 commit comments