2006-01-08 19:17:16 -05:00
|
|
|
PURPOSE
|
|
|
|
=======
|
2006-01-01 16:32:42 -05:00
|
|
|
|
2006-01-08 19:17:16 -05:00
|
|
|
The scripts in this directory scan the PO files and search for
|
2006-05-13 09:47:39 -04:00
|
|
|
translations that assign the same accelerator to multiple buttons
|
2006-01-08 19:17:16 -05:00
|
|
|
in a dialog box or to multiple items in a menu.
|
2006-01-01 16:32:42 -05:00
|
|
|
|
2006-01-08 19:17:16 -05:00
|
|
|
In addition to this static checking, ELinks can also detect
|
|
|
|
conflicting accelerators at run time, if CONFIG_DEBUG is defined.
|
|
|
|
However, that requires the translator to run ELinks and manually scan
|
|
|
|
through all menus and dialogs, so some conflicts can be left
|
|
|
|
unnoticed. The static checker will also detect conflicts that can
|
|
|
|
only occur on operating systems or configurations that the translator
|
|
|
|
is not currently using.
|
|
|
|
|
|
|
|
|
|
|
|
USAGE
|
|
|
|
=====
|
|
|
|
|
|
|
|
When a programmer adds a translatable string to the C source code of
|
|
|
|
ELinks, and the string contains an accelerator, he should also add a
|
|
|
|
special "gettext_accelerator_context" comment that names the menu or
|
|
|
|
dialog box in which the string will be used. See the documentation of
|
2007-07-17 07:32:07 -04:00
|
|
|
msgaccel-prepare for the details.
|
2006-01-08 19:17:16 -05:00
|
|
|
|
2007-07-17 07:32:07 -04:00
|
|
|
When a programmer or translator runs "make update-po" in the elinks/po
|
|
|
|
directory, msgaccel-prepare reads the "gettext_accelerator_context"
|
|
|
|
comments in the source files and generates "accelerator_context"
|
|
|
|
comments in elinks.pot. Then, msgmerge copies them from elinks.pot to
|
|
|
|
*.po.
|
2006-01-08 19:17:16 -05:00
|
|
|
|
|
|
|
When a translator edits a *.po file, she does not alter the
|
|
|
|
"accelerator_context" comments.
|
|
|
|
|
|
|
|
When a translator runs "make check-po" in the elinks/po directory,
|
2007-07-17 07:32:07 -04:00
|
|
|
msgaccel-check reads the "accelerator_context" comments in the *.po
|
|
|
|
file, checks the accelerators in the translations, and displays any
|
|
|
|
conflicts it finds.
|
2006-01-08 19:17:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
FILES
|
|
|
|
=====
|
|
|
|
|
|
|
|
See each file for copying conditions.
|
|
|
|
|
2007-07-17 07:32:07 -04:00
|
|
|
msgaccel-prepare reads elinks.pot and the source files to which it
|
|
|
|
refers, and writes a new elinks.pot with information from
|
2006-01-08 19:17:16 -05:00
|
|
|
"gettext_accelerator_context" comments.
|
|
|
|
|
2007-07-17 07:32:07 -04:00
|
|
|
msgaccel-check reads just one *.po file and scans it for conflicts.
|
|
|
|
It does not access the C source files.
|
2006-01-08 19:17:16 -05:00
|
|
|
|
|
|
|
Locale/PO.pm was originally imported from Locale-PO-0.16 on CPAN, and
|
|
|
|
has since been patched to make it more suitable for these scripts.
|
|
|
|
(The build system, documentation, and test cases of Locale-PO were
|
|
|
|
not imported, because it isn't obvious where they should be placed.)
|
|
|
|
All changes should be sent back to the author for possible inclusion
|
|
|
|
in the standard version.
|
|
|
|
|
|
|
|
|
|
|
|
TO DO
|
|
|
|
=====
|
|
|
|
|
|
|
|
Make sure that po/Makefile won't fail just because it can't find Perl.
|
|
|
|
This may already be the case, but check it.
|
|
|
|
|
|
|
|
Fix the issues documented in the BUGS section of each file.
|