diff --git a/doc/Makefile b/doc/Makefile index c1943aca..a277087a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -46,8 +46,8 @@ HTML_DOCS-$(CONFIG_POD2HTML) += \ # Don't install these documents, because the corresponding scripts # are not installed either. However, generating them may be useful. HTML_DOCS_NOINSTALL-$(CONFIG_POD2HTML) += \ - perl-check-accelerator-conflicts.html \ - perl-gather-accelerator-contexts.html + perl-msgaccel-check.html \ + perl-msgaccel-prepare.html MAN_DOCS-$(CONFIG_XMLTO) += \ elinks.1 \ diff --git a/po/Makefile b/po/Makefile index bc51f977..29735600 100644 --- a/po/Makefile +++ b/po/Makefile @@ -53,7 +53,7 @@ $(srcdir)$(POTFILES_ABS_LIST): $(POTFILES_REL) find src/ -type f -name '*.[ch]' -o -name options.inc -o -name 'actions-*.inc' | sort ) \ > $(srcdir)$(POTFILES_ABS_LIST) -$(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST) $(srcdir)perl/gather-accelerator-contexts.pl +$(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST) $(srcdir)perl/msgaccel-prepare $(XGETTEXT) --default-domain=$(PACKAGE) \ --directory=$(top_srcdir) \ --add-comments --language=C \ @@ -77,7 +77,7 @@ $(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST) $(srcdir)perl/gather-acce --flag=N__:1:pass-c-format \ -f $(srcdir)$(POTFILES_ABS_LIST) \ && test -f $(PACKAGE).po \ - && $(PERL) -I"$(srcdir)perl" $(srcdir)perl/gather-accelerator-contexts.pl -S"$(top_srcdir)" $(PACKAGE).po \ + && $(PERL) -I"$(srcdir)perl" $(srcdir)perl/msgaccel-prepare -S"$(top_srcdir)" $(PACKAGE).po \ && mv -f $(PACKAGE).po $(srcdir)$(PACKAGE).pot @@ -111,7 +111,7 @@ check-po: @-$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \ echo -n "$(lang): "; \ $(GMSGFMT) --check --check-accelerators="~" --verbose --statistics -o /dev/null $(srcdir)$(lang).po; \ - $(PERL) -I"$(srcdir)perl" $(srcdir)perl/check-accelerator-conflicts.pl $(srcdir)$(lang).po; \ + $(PERL) -I"$(srcdir)perl" $(srcdir)perl/msgaccel-check $(srcdir)$(lang).po; \ ) ### Installation and distribution diff --git a/po/perl/README b/po/perl/README index 78c6743d..75b4100d 100644 --- a/po/perl/README +++ b/po/perl/README @@ -21,21 +21,21 @@ 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 -gather-accelerator-contexts.pl for the details. +msgaccel-prepare for the details. -When a programmer or translator runs "make update-po" in the -elinks/po directory, gather-accelerator-contexts.pl 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. +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. 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, -check-accelerator-conflicts.pl reads the "accelerator_context" -comments in the *.po file, checks the accelerators in the -translations, and displays any conflicts it finds. +msgaccel-check reads the "accelerator_context" comments in the *.po +file, checks the accelerators in the translations, and displays any +conflicts it finds. FILES @@ -43,12 +43,12 @@ FILES See each file for copying conditions. -gather-accelerator-contexts.pl reads elinks.pot and the source files -to which it refers, and writes a new elinks.pot with information from +msgaccel-prepare reads elinks.pot and the source files to which it +refers, and writes a new elinks.pot with information from "gettext_accelerator_context" comments. -check-accelerator-conflicts.pl reads just one *.po file and scans it -for conflicts. It does not access the C source files. +msgaccel-check reads just one *.po file and scans it for conflicts. +It does not access the C source files. 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. diff --git a/po/perl/check-accelerator-conflicts.pl b/po/perl/msgaccel-check similarity index 83% rename from po/perl/check-accelerator-conflicts.pl rename to po/perl/msgaccel-check index dea809ed..29e01c30 100755 --- a/po/perl/check-accelerator-conflicts.pl +++ b/po/perl/msgaccel-check @@ -7,11 +7,11 @@ use Locale::PO qw(); use Getopt::Long qw(GetOptions :config bundling gnu_compat); use autouse 'Pod::Usage' => qw(pod2usage); -my $VERSION = "1.5"; +my $VERSION = "1.6"; sub show_version { - print "check-accelerator-conflicts.pl $VERSION\n"; + print "msgaccel-check $VERSION\n"; pod2usage({-verbose => 99, -sections => "COPYRIGHT AND LICENSE", -exitval => 0}); } @@ -208,32 +208,31 @@ __END__ =head1 NAME -check-accelerator-conflicts.pl - Scan a PO file for conflicting -accelerator keys. +msgaccel-check - Scan a PO file for conflicting accelerator keys. =head1 SYNOPSIS -B [I