[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun ChangeLog Makefile...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun ChangeLog Makefile... |
Date: |
Tue, 05 Jun 2012 10:13:08 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 12/06/05 10:13:08
Modified files:
gnun/server/gnun: ChangeLog Makefile.am NEWS
gnun/server/gnun/doc: gnun.texi
Added files:
gnun/server/gnun: gnun-init-po.in
Log message:
Add `gnun-init-po'; update the documentation.
* gnun-init-po.in: New file.
* Makefile.am (bin_SCRIPTS, CLEANFILES): Add `gnun-init-po'.
(edit): Substitute MSGMERGE.
(gnun-init-po): New target.
(EXTRA_DIST): Add `gnun-init-po'.
* NEWS: Update.
* doc/gnun.texi (gnun-init-po): New node.
(Concepts): Update passage on the translation links; comment out
non-informative passage.
(Advantages): Mention HTML validation.
(Disadvantages): Fix period of updates (8 rather than 12 hours).
(Runtime Variables): Reword the passage on out-of-date notice;
fix a typo; document that invalid pages are not committed.
(Special Targets): Remove `clean' and `distclean' from menu.
(clean, distclean): Remove nodes.
(no-grace-items, sync): Fix a typo.
(no-grace-items, update-localized-URLs, sync, report, triggers)
(Migrating, GNU News, PO Tips, generic.LANG.html)
(languages.txt, GNUmakefile.team Variables): Properly capitalize
the title.
(triggers): Comment out obsolete paragraph; document that
invalid pages are not committed; update the cron job example.
(Main Variables): `FUZZY_DIFF_LINGUAS' can also be updated
by the translators; minor rewording in `FUZZY_DIFF_LINGUAS'
item.
(New Translation): Document `gnun-init-po'; minor refinements.
(Migrating, languages.txt, gnun-preconvert): Improve the markup.
(PO Tips): Translation links go to a dedicated file;
don't suggest replacing address@hidden with
address@hidden, as per current boilerplate.
(PO Files and Team): Minor rewording.
(GNUmakefile.team Variables): Don't suggest that support
translations for multiple languages in single directory
should be possible.
(Compendia): Fix a typo, improve a cross-reference.
(Modifying Boilerplates): Reword to indicate that only major
untested structural changes are likely to break the builds.
(Localized URLs): Remind to commit the sources
for translatable images.
(Internally Used Scripts): Rename to `GNUN Scripts' because
some scripts are for user; update the text accordingly;
add descriptions for menu items that document scripts
for users.
(make-prototype): Add a footnote saying that the translation
lists are maintained in a separate file; declare that
the ``--article'' and ``--home'' options will be removed.
(gnun-add-fuzzy-diff, gnun-preconvert)
(gnun-merge-preconverted): Add a full stop in a description
of an option.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.276&r2=1.277
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-init-po.in?cvsroot=trans-coord&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.54&r2=1.55
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -b -r1.276 -r1.277
--- ChangeLog 4 Jun 2012 14:16:10 -0000 1.276
+++ ChangeLog 5 Jun 2012 10:13:07 -0000 1.277
@@ -1,3 +1,57 @@
+2012-06-05 Pavel Kharitonov <address@hidden>
+
+ Add `gnun-init-po'; update the documentation.
+
+ * gnun-init-po.in: New file.
+ * Makefile.am (bin_SCRIPTS, CLEANFILES): Add `gnun-init-po'.
+ (edit): Substitute MSGMERGE.
+ (gnun-init-po): New target.
+ (EXTRA_DIST): Add `gnun-init-po'.
+ * NEWS: Update.
+ * doc/gnun.texi (gnun-init-po): New node.
+ (Concepts): Update passage on the translation links; comment out
+ non-informative passage.
+ (Advantages): Mention HTML validation.
+ (Disadvantages): Fix period of updates (8 rather than 12 hours).
+ (Runtime Variables): Reword the passage on out-of-date notice;
+ fix a typo; document that invalid pages are not committed.
+ (Special Targets): Remove `clean' and `distclean' from menu.
+ (clean, distclean): Remove nodes.
+ (no-grace-items, sync): Fix a typo.
+ (no-grace-items, update-localized-URLs, sync, report, triggers)
+ (Migrating, GNU News, PO Tips, generic.LANG.html)
+ (languages.txt, GNUmakefile.team Variables): Properly capitalize
+ the title.
+ (triggers): Comment out obsolete paragraph; document that
+ invalid pages are not committed; update the cron job example.
+ (Main Variables): `FUZZY_DIFF_LINGUAS' can also be updated
+ by the translators; minor rewording in `FUZZY_DIFF_LINGUAS'
+ item.
+ (New Translation): Document `gnun-init-po'; minor refinements.
+ (Migrating, languages.txt, gnun-preconvert): Improve the markup.
+ (PO Tips): Translation links go to a dedicated file;
+ don't suggest replacing address@hidden with
+ address@hidden, as per current boilerplate.
+ (PO Files and Team): Minor rewording.
+ (GNUmakefile.team Variables): Don't suggest that support
+ translations for multiple languages in single directory
+ should be possible.
+ (Compendia): Fix a typo, improve a cross-reference.
+ (Modifying Boilerplates): Reword to indicate that only major
+ untested structural changes are likely to break the builds.
+ (Localized URLs): Remind to commit the sources
+ for translatable images.
+ (Internally Used Scripts): Rename to `GNUN Scripts' because
+ some scripts are for user; update the text accordingly;
+ add descriptions for menu items that document scripts
+ for users.
+ (make-prototype): Add a footnote saying that the translation
+ lists are maintained in a separate file; declare that
+ the ``--article'' and ``--home'' options will be removed.
+ (gnun-add-fuzzy-diff, gnun-preconvert)
+ (gnun-merge-preconverted): Add a full stop in a description
+ of an option.
+
2012-06-04 Pavel Kharitonov <address@hidden>
* gnun-merge-preconverted.in: Fix options processing.
Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- Makefile.am 1 Jun 2012 09:44:26 -0000 1.30
+++ Makefile.am 5 Jun 2012 10:13:07 -0000 1.31
@@ -28,7 +28,7 @@
if NEW_MSGATTRIB
bin_SCRIPTS += gnun-clear-previous
if HAVE_PO4A
-bin_SCRIPTS += gnun-preconvert gnun-merge-preconverted
+bin_SCRIPTS += gnun-init-po gnun-preconvert gnun-merge-preconverted
endif
endif
@@ -60,11 +60,12 @@
-e 's|@address@hidden|$(AWK)|g' \
-e 's|@address@hidden|$(GREP)|g' \
-e 's|@address@hidden|$(pkglibexecdir)/expand-m4-includes|g' \
+ -e 's|@address@hidden|$(MSGMERGE)|g' \
-e 's|@address@hidden|$(SED)|g' \
-e 's|@address@hidden|$(WDIFF)|g'
add-fuzzy-diff copy-msgid expand-m4-includes gnun-add-fuzzy-diff \
-gnun-merge-preconverted \
+gnun-init-po gnun-merge-preconverted \
gnun-validate-html update-localized-urls validate-html-notify: Makefile
$(AM_V_at)rm -f $@ address@hidden
$(AM_V_GEN)$(edit) '$(srcdir)/address@hidden' >address@hidden
@@ -81,6 +82,7 @@
expand-m4-includes: $(srcdir)/expand-m4-includes.in
gnun-validate-html: $(srcdir)/gnun-validate-html.in
gnun-add-fuzzy-diff: $(srcdir)/gnun-add-fuzzy-diff.in
+gnun-init-po: $(srcdir)/gnun-init-po.in
gnun-merge-preconverted: $(srcdir)/gnun-merge-preconverted.in
update-localized-urls: $(srcdir)/update-localized-urls.in
validate-html-notify: $(srcdir)/validate-html-notify.in
@@ -97,11 +99,11 @@
dist_pkgdata_DATA = GNUmakefile
EXTRA_DIST = add-fuzzy-diff.in copy-msgid.in expand-m4-includes.in \
- gnun-add-fuzzy-diff.in gnun-merge-preconverted.in \
+ gnun-add-fuzzy-diff.in gnun-init-po.in gnun-merge-preconverted.in \
gnun-validate-html.in update-localized-urls.in \
validate-html-notify.in
CLEANFILES = add-fuzzy-diff copy-msgid expand-m4-includes gnun-add-fuzzy-diff \
- gnun-merge-preconverted \
+ gnun-init-po gnun-merge-preconverted \
gnun-validate-html update-localized-urls validate-html-notify \
stamp-config.mk
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- NEWS 1 Jun 2012 09:44:27 -0000 1.55
+++ NEWS 5 Jun 2012 10:13:07 -0000 1.56
@@ -2,6 +2,8 @@
* Changes in GNUnited Nations 0.6 (????-??-??)
+** New script to initialize PO files: `gnun-init-po'.
+
** New scripts to facilitate migration to PO format: `gnun-preconvert' and
`gnun-merge-preconverted'.
Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- doc/gnun.texi 2 Jun 2012 10:33:38 -0000 1.54
+++ doc/gnun.texi 5 Jun 2012 10:13:08 -0000 1.55
@@ -257,20 +257,24 @@
Several additional features are implemented, like automatic update of
the list of the available translations. For example, if a new
-translation is added and the list of translations in
address@hidden is updated, all translated
address@hidden@var{lang}.html} will be regenerated. This saves a lot
-of tedious, repetitive work. There is a basic infrastructure to
+translation is added and the list of translations included in
address@hidden and all translated @address@hidden
+is updated. This saves a lot of tedious, repetitive work and eliminates
+a source of mistakes. There is a basic infrastructure to
``inject'' general information about a translation team---like a note
how to contact the team, or how to report a bug/suggestion for
improvement. Translators' credits are also handled, as well as
translators' notes, if any.
-GNUN can be extended, and new features will certainly be added. The
address@hidden file currently lists some of them, but new ideas pop up
-quite often. The plan is to make a solid foundation and develop
-front-ends---a web front-end, possibly based on Pootle, a statistics
-facility, probably a wiki compiler, and more.
address@hidden ineiev: This passage carries no practically useful information
address@hidden for GNUN users; extensibility is a feature of any program, the
plans
address@hidden seem too long-term.
address@hidden
address@hidden GNUN can be extended, and new features will certainly be added.
The
address@hidden @file{TODO} file currently lists some of them, but new ideas pop
up
address@hidden quite often. The plan is to make a solid foundation and develop
address@hidden front-ends---a web front-end, possibly based on Pootle, a
statistics
address@hidden facility, probably a wiki compiler, and more.
@node Advantages
@section Major Advantages of GNUN
@@ -307,6 +311,12 @@
translated it or not.
@item
+HTML validation. As a preliminary step, GNUN validates the English
+pages before updating the POT files, and the regenerated translations
+before committing them. It often detects typos and other errors in
+the markup.
+
address@hidden
Simplification of the translation process---lots of errors and typos
come from the fact that translators basically have to duplicate the
whole HTML markup of the original. The PO files eliminate most of the
@@ -345,7 +355,7 @@
items are rebuilt hourly.}, because doing it more often
will potentially generate more messages to the mailing list in the form
of commit notifications. This has its drawback, since translators have
-to wait 12 hours until their PO files are updated, and another period
+to wait 8 hours until their PO files are updated, and another period
for the @address@hidden articles to get generated, after they
commit the updated POs. Additionally, any errors interrupt the build so
they have to be fixed before the next articles are processed.
@@ -584,13 +594,12 @@
text (@file{server/outdated.html} in the `www' repository) that is
inserted into every outdated translation when the period defined in
this variable is over; its purpose is to inform the reader that the
-translation does not correspond to the original English article, which
-has been changed since the translation was last updated.
+translation may not correspond to the original English article.
@cindex TEAM
@cindex variable, team
@item address@hidden
-The translation team which articles need to be checked for
+The translation team whose articles need to be checked for
completeness. This variable is applicable only for the @code{report}
target, and is mandatory for it. @xref{report}.
@@ -609,11 +618,12 @@
the propagation of an eventual error in the markup of the original
article to all translations.
-By contrast, validation of the translated @address@hidden is
-performed after it is generated and if @code{VCS=yes} the article will
-be committed in the repository. The build will fail again and further
-processing of the remaining articles will not be performed, but this
-particular translation will be installed. The translator has time
+Validation of the translated @address@hidden is
+performed after it is preliminarily generated as a temporary file.
+When no errors are found, the translation is updated; otherwise
+the real file is not changed (and it is not added if absent)---the build
+will fail and further processing of the remaining articles will not be
+performed. The translator has time
until the next run to fix the error---usually by modifying the
corresponding @address@hidden file.
@@ -643,12 +653,10 @@
* sync::
* report::
* triggers::
-* clean::
-* distclean::
@end menu
@node no-grace-items
address@hidden The @code{no-grace-items} target
address@hidden The @code{no-grace-items} Target
The @code{no-grace-items} target regenerates a limited set of articles
that are not affected by the grace period, namely, the homepage, the
@@ -656,10 +664,10 @@
@code{no-grace-articles} (@pxref{GRACE,,grace period}).
This target can be rebuilt more often than @code{all}; it is invoked
-hourly by the official GNUN cronjob.
+hourly by the official GNUN cron job.
@node update-localized-URLs
address@hidden The @code{update-localized-URLs} target
address@hidden The @code{update-localized-URLs} Target
The @code{update-localized-URLs} target invokes a script that
generates the @file{localized-urls.mk} file. This file includes the
@@ -669,7 +677,7 @@
This target is meant to be rebuilt nightly.
@node sync
address@hidden The @code{sync} target
address@hidden The @code{sync} Target
@cindex synchronization, repository
The @code{sync} target has a simple task: synchronize the
@@ -701,7 +709,7 @@
@file{server/banner.html}, @file{server/footer.html} and their
translations, as defined in the @code{verbatim-templates} variable.
This is important, as these files may change in the master repository,
-while the validation of the html files in the development repository
+while the validation of the HTML files in the development repository
will be performed with the old templates expanded, thus making this
specific test more or less bogus.
@@ -709,7 +717,7 @@
@code{VALIDATE}.
@node report
address@hidden The @code{report} target
address@hidden The @code{report} Target
@cindex reporting
@cindex status, translations
@@ -737,23 +745,25 @@
all other translations are reported as less important.
@node triggers
address@hidden The @code{triggers} target
address@hidden The @code{triggers} Target
This is a special target intended to be run by the automatic build after
the main build and @emph{after} @code{cvs|svn|bzr commit}.
@c FIXME: Check how Subversion behaves with keywords and update the
@c paragraph below.
-When a GNUN build completes and some translations fail at the HTML
-validation stage, the result is checked in the repository, as
-explained earlier (@pxref{Runtime Variables}). Thus, CVS updates the
address@hidden RCS keyword (or any other keywords, for that matter) and
-resets the file(s) timestamp. Next time @command{make} is invoked,
-the target appears newer than the prerequisite so no rebuild is
-triggered. The purpose of the @code{triggers} target is to ``save''
-the information of the faulty targets during the main build, and to
-touch their prerequisites in order such invalid articles not to remain
-online unnoticed.
address@hidden ineiev: In fact, "the result" is _not_ "checked in" the
repository.
address@hidden
address@hidden When a GNUN build completes and some translations fail at the
HTML
address@hidden validation stage, the result is checked in the repository, as
address@hidden explained earlier (@pxref{Runtime Variables}). Thus, CVS
updates the
address@hidden @w{$}Date$ RCS keyword (or any other keywords, for that matter)
and
address@hidden resets the file(s) timestamp. Next time @command{make} is
invoked,
address@hidden the target appears newer than the prerequisite so no rebuild is
address@hidden triggered. The purpose of the @code{triggers} target is to
``save''
address@hidden the information of the faulty targets during the main build, and
to
address@hidden touch their prerequisites in order such invalid articles not to
remain
address@hidden online unnoticed.
The @code{triggers} target currently executes the files named
@address@hidden@var{lang}.html.hook} in the @file{server/gnun}
@@ -762,15 +772,15 @@
based on the timestamp of the target that must be rebuilt. Finally, it
deletes all those @file{*.hook} files.
-In addition, this is the rule that takes care of actually sending the
+This is the rule that takes care of actually sending the
announcements if @code{ANNOUNCE=yes}. Since it is a completely valid
scenario to have a new translation which is initially invalid HTML,
the canned command sequence for announcements is recorded in
@file{*.hook-ann} files, and they are treated by @code{triggers} in a
different way. A newly added @address@hidden file may be
-invalid, in which case GNUN will commit an empty
address@hidden@var{lang}.html} file---it is not appropriate to announce it as
-a new translation as it is an empty file completely useless for the
+invalid, in which case the HTML file is not added, and it is not
+appropriate to announce it as a new translation as it is completely
+useless for the
general public. The @code{triggers} rule detects this case, and
postpones the announcement to the next build attempt, when the
generated HTML translation is supposed to be human-readable.
@@ -783,8 +793,8 @@
@example
@group
25 4,12,20 * * * cd $HOME/projects/www ; cvs -q update &>/dev/null; \
- make -j4 -C server/gnun VCS=yes VALIDATE=yes; \
- NOTIFY=yes VERBOSE=yes GRACE=30; ANNOUNCE=yes; \
+ make -j1 -C server/gnun VCS=yes VALIDATE=yes; \
+ NOTIFY=yes VERBOSE=yes GRACE=5000; ANNOUNCE=yes; \
cvs commit -m \
"Automatic update by GNUnited Nations."; \
make -C server/gnun triggers
@@ -804,16 +814,6 @@
In the future, this target may be extended further to do other useful
things that should be ``triggered'' after the main build.
address@hidden clean
address@hidden The @code{clean} target
-
-Not implemented yet.
-
address@hidden distclean
address@hidden The @code{distclean} target
-
-Not implemented yet.
-
@node Main Variables
@section Defining Articles to be Built
@cindex variables
@@ -830,7 +830,8 @@
address@hidden because presumably, they are more familiar with
GNUnited Nations' internals. From a purely technical point of view,
there is no difference.}, ideally after performing some local tests. A
-translation team leader should update only @code{TEMPLATE_LINGUAS} and
+translation team leader should update only @code{FUZZY_DIFF_LINGUAS},
address@hidden and
@code{HOME_LINGUAS}; everything else is supposed to be built
automagically, without manual intervention. If not, that is a bug that
should be reported and fixed.
@@ -867,9 +868,9 @@
@cindex previous, diff
@item FUZZY_DIFF_LINGUAS
Add your language code here if you want GNUN to add differences to
-previous msgids in your PO files. The differences are shown in
address@hidden format. @xref{wdiff, wdiff, The word difference
-finder, wdiff, GNU wdiff}, for more information.
+previous @code{msgid}s in your PO files. The differences are shown in
+the default @command{wdiff} format. @xref{wdiff, wdiff, The word
+difference finder, wdiff, GNU wdiff}, for more information.
@cindex HOME_LINGUAS
@cindex homepage, defining
@@ -989,7 +990,7 @@
@cindex translation, new
@cindex new translation
-To start a new translation, the easiest way is to copy the existing POT
+To start a new translation, the most simple way is to copy the existing POT
as @address@hidden, where @var{lang} is your language code.
For example, to prepare for a new translation of the essay
@uref{http://www.gnu.org/philosophy/free-sw.html}, you can simply do
@@ -1005,6 +1006,9 @@
environment is set up correctly. @xref{msginit Invocation, ,,
gettext, GNU gettext tools}.
+GNUN also provides a customized script to automatically fill more header
+fields. @xref{gnun-init-po}.
+
The PO file header as generated usually looks like this:
@example
@@ -1132,7 +1136,7 @@
@cindex wrapping long lines
@cindex long lines, wrap
Most of the PO editors do not wrap long lines that inevitably appear in
address@hidden's. If that happens, long lines make reading subsequent
address@hidden If that happens, long lines make reading subsequent
diffs harder, and are generally annoying for most people. If this issue
bothers you, you can ``normalize'' the already finished PO translation
by executing on the command line @code{msgcat -o @var{file}.po
@@ -1265,7 +1269,7 @@
Style Sheet when adding URIs or other information.
@node Migrating
address@hidden Transforming existing translation in PO format
address@hidden Transforming Existing Translation in PO Format
@cindex migration, translations
@cindex conversion of existing translations
@@ -1309,12 +1313,13 @@
gnun-merge-preconverted -C compendium.lang.po foo.lang.po foo.pot
@end example
-If you have no compendium, just omit the ``-C compendium.lang.po'' part.
+If you have no compendium, just omit the address@hidden
+compendium.lang.po}'' part.
You get @address@hidden where all messages are marked as
``fuzzy'' (unless you use a compendium); you still should make sure that
the translations correspond to the original and remove those ``fuzzy''
-marks. The script adds differences against previous msgids to
+marks. The script adds differences against previous @code{msgid}s to
facilitate checking.
There is no need to delete the existing HTML translation, GNUN will
@@ -1343,7 +1348,7 @@
translator returned in 2008 and continued maintaining it.
@node GNU News
address@hidden Special Handling For GNU News
address@hidden Special Handling for GNU News
@cindex gnunews
@cindex whatsnew
@cindex gnusflashes
@@ -1378,7 +1383,7 @@
again translated.
@node PO Tips
address@hidden Useful Hints For Editing PO Files
address@hidden Useful Hints for Editing PO Files
@cindex tips, translators
@cindex recommendations, PO files
@@ -1393,7 +1398,7 @@
your PO file in the appropriate @file{/po} sub-directory.
In the next build, your @address@hidden@var{lang}.html} will be
-built and the link to it will be added to the original page
+built and the link to it will be added to the list of translations
and propagate to all translations, provided
that they are under GNUN's control.
@@ -1430,11 +1435,6 @@
which normally you would want to preserve verbatim.
@item
-To reduce the load on the webmasters RT queue, please replace
address@hidden@@gnu.org} in the standard footer with
address@hidden@@gnu.org}.
-
address@hidden
If you translate ``Free Software Foundation, Inc.'' in your native
language in the copyright notice, then please prepend the English name
to the @code{<address>}; otherwise it looks awkward in most
@@ -1465,7 +1465,7 @@
@end itemize
@node generic.LANG.html
address@hidden The @address@hidden file
address@hidden The @address@hidden File
@cindex team information
@cindex generic notice, translations
@@ -1495,13 +1495,13 @@
include the contents of this special file.
@node languages.txt
address@hidden The @file{languages.txt} file
address@hidden The @file{languages.txt} File
The file @file{server/gnun/languages.txt} is used when generating
lists of translations; those lists are subsequently included in all
translations of the article. Every line in the file is either a
comment (when it begins with ``#'') or a definition for a language. A
-language is defined by three tab-separated fields. The first field
+language is defined by three @key{TAB}-separated fields. The first field
defines the language suffix; it is used in file names and in texts of
the links. The second field is the name of the language in English;
it is used in HTML comments. The third field defines the name of the
@@ -1571,7 +1571,7 @@
@end group
@end example
-All members and the team leader(s) commit in their project's
+All members and the team leader commit in their project's
repository---when a translation is ready, the leader checks it in in the
official `www' repository. If an original article changes,
a build could be invoked to synchronize (i.e. merge) the changes and
@@ -1628,7 +1628,7 @@
@end menu
@node GNUmakefile.team Variables
address@hidden Adopting @file{GNUmakefile.team} For a Specific Team
address@hidden Adopting @file{GNUmakefile.team} for a Specific Team
To adjust the makefile for your team, you need to edit two variables.
@@ -1645,9 +1645,8 @@
slash at the end, it is important.
@end table
-Technically speaking, two variants of one language sharing the same
-project and repository (such as @code{zh-cn} and @code{zh-tw}) are not
-supported---patches welcome. As a workaround, there could be two
+If two variants of one language share the same project and repository
+(such as @code{zh-cn} and @code{zh-tw}), they should maintain two
directories with two @file{GNUmakefile}s and each directory having its
own tree.
@@ -1803,8 +1802,9 @@
@cindex compendium.pot
Compendium is a PO file including translations for common strings; it is
-used to fill other PO files. @xref{Compendium, gettext, Compendium,
-gettext, GNU gettext}. One example of such common strings is the footer
+used to fill other PO files. @xref{Compendium, Compendium, Using
+Translation Compendia, gettext, GNU gettext tools}. One example of such
+common strings is the footer
text about reporting bugs and sending inquiries: when a webmaster
updates footer texts in an article, GNUN will use compendia to
automatically fill the translations for the new version of the strings.
@@ -1828,14 +1828,15 @@
file is also used to fill missing translations, but it doesn't override
the translations from @address@hidden@var{lang}.po}, and the
strings coming from @address@hidden are always marked as
-``fuzzy''.
+``fuzzy'' to prevent propagation of translations that may be wrong in
+a different context.
When updating @file{compendium.pot}, some strings should be excluded
even though they repeat in the POT files many times, for instance, GNUN
slots for translators' notes. @xref{Notes Slot}. They are not real
translations, this is why they are likely to be differrent for different
articles. In order to avoid including them in compendia, GNUN checks a
-specific file, @file{exclude.pot}, and when that file contains the the
+specific file, @file{exclude.pot}, and when that file contains the
string, it won't be added to @file{compendium.pot}.
@node Webmaster Tips
@@ -1914,13 +1915,13 @@
@subsection Modifying Boilerplates
@cindex boilerplates
address@hidden:} Any structural diversion from @file{boilerplate.html}
-in a specific article is likely to result in errors from GNUN. Any
-unexpected updates to the server templates (such as changing the entire
-look & feel of the site) will most probably break @emph{all}
-translations under GNUN's control. Of course, this does not mean that
-such changes should not happen---only that they must be applied in our
-sandbox first, to ensure a smooth transition.
address@hidden:} Any significant structural diversion from
address@hidden in a specific article may result in errors from
+GNUN. Any untested intrusive updates to the server templates (such as
+changing the entire look & feel of the site) will probably break
address@hidden translations under GNUN's control. Of course, this does not
+mean that no changes should happen---only that they must be applied in
+our sandbox first, to ensure a smooth transition.
@node Localized URLs
@subsection Localized URLs
@@ -1952,12 +1953,16 @@
as required in
@url{http://www.gnu.org/server/fsf-html-style-sheet.html#FilenameAndURLGuidelines}.
+And please don't forget to commit the image in its source form
+(typically, in SVG format).
+
@node Internals
@chapter Unexciting Information for GNUN's Operation
This chapter might be of interest probably only to people who would have
special interest in the software, plan to enhance it or develop a
-front-end.
+front-end, except the section about scripts that includes descriptions
+of programs that may also be useful for the translators.
@menu
* Scripts:: Helper scripts.
@@ -1965,22 +1970,23 @@
@end menu
@node Scripts
address@hidden Internally Used Scripts
address@hidden GNUN Scripts
-For the time being there are several helper scripts, used internally
-as commands with certain arguments in the makefile rules. They can be
-invoked separately, as stand-alone programs, and sometimes they are
-useful on their own.
-
-The @command{gnun-clear-previous} script is an exception---it is not
-used in GNUN's rules at all.
+For the time being there are several helper scripts. Some of them are
+used internally as commands with certain arguments in the makefile
+rules; other scripts were written specifically to facilitate some
+mechanical actions, like initially filling the headers in the PO files.
+They all can be invoked separately, as stand-alone programs.
@menu
* make-prototype::
-* gnun-add-fuzzy-diff::
-* gnun-preconvert::
-* gnun-merge-preconverted::
-* gnun-validate-html::
+* gnun-add-fuzzy-diff:: Add differences to previous
+ @code{msgid}s.
+* gnun-init-po:: Initialize a new translation.
+* gnun-preconvert:: Invoke the first step in converting
+ HTML translation to PO format.
+* gnun-merge-preconverted:: Run the second step of the convertion.
+* gnun-validate-html:: Validate HTML file.
* mailfail::
* validate-html-notify::
* gnun-clear-previous::
@@ -1997,7 +2003,8 @@
designed in such a way, because it would be no big improvement if links
to other translations ended up in the POT---it would mean that
translators would have to manually update their PO file when a new
-translation is added.
+translation is address@hidden version 0.5, those links are
+maintained in a separate file included with SSI directives.}
In addition, @command{make-prototype} guards the timestamp (the
@w{$}Date$ RCS keyword) in order the timestamp of the translation to
@@ -2014,11 +2021,12 @@
@table @option
@item --article
-Process the input file as an article. This is the default. As of
-version 0.5, this option is considered obsolete because the lists of
+Process the input file as an article. This is the address@hidden
+of version 0.5, this option is considered obsolete because the lists of
translations are implemented as an automatically generated file included
via SSI directive just like the respective list is included in the
-homepage. @xref{languages.txt}.
+homepage. @xref{languages.txt}. In the future, both the
address@hidden and the @code{--home} option will be removed.}
@item --home
Process the input article as a homepage. Specify this when you want
@@ -2048,8 +2056,8 @@
@subsection The @command{gnun-add-fuzzy-diff} Script
@cindex previous, diff
-This script adds comments with differences of current msgids against
-previous ones to fuzzy translations in a PO file. To produce
+This script adds comments with differences of current @code{msgid}s
+against previous ones to fuzzy translations in a PO file. To produce
the differences @command{wdiff} is used. This may be useful to figure
out what has changed. In fact, it wraps around a @command{sed} script
used in GNUN internally.
@@ -2067,9 +2075,56 @@
Display copyright and version information and exit.
@item --help
-Display usage information and exit
+Display usage information and exit.
@end table
address@hidden gnun-init-po
address@hidden The @command{gnun-init-po} Script
address@hidden initializing, translations
+
+This script initializes a PO file using POT generated with GNUN,
+and fills some fields in the header. It also optionally uses
+a compendium (or compendia) to fill translations.
+
address@hidden
+gnun-init-po [OPTION...] POT
address@hidden example
+
address@hidden @option
address@hidden -C
address@hidden address@hidden
+Specify a compendium to use. You can issue this option
+many times to use multiple compentia simultaneously. The suffix
+of compendium is used when the language suffix is not specified
+with the @code{--language} option.
+
address@hidden -d
address@hidden --disable-diffs
+Don't add diffs to previous messages.
+
address@hidden -g
address@hidden --team="@var{team <list>}"
+Specify team's name and mailing list.
+
address@hidden -l
address@hidden address@hidden
+Specify language suffix, e.g ``bg''. The suffix also defines
+the name of the language which is used in some fields of PO file header.
+
address@hidden -t
address@hidden --translator="@var{full name <email>}"
+Specify translator.
+
address@hidden --version
+Display copyright and version information and exit.
+
address@hidden --help
+Display usage information and exit.
address@hidden table
+
+The PO file name is guessed from the name of POT and language
+suffix; the file is created in current working directory.
+
@node gnun-preconvert
@subsection The @command{gnun-preconvert} Script
@cindex migration, translations
@@ -2094,7 +2149,7 @@
Display copyright and version information and exit.
@item --help
-Display usage information and exit
+Display usage information and exit.
@end table
@node gnun-merge-preconverted
@@ -2102,10 +2157,10 @@
@cindex migration, translations
@cindex conversion of existing translations
-This script takes @command{po4a-gettextize} output, adds current msgids
-as ``previous'' values, merges the file with new POT, and adds
-differences against previous values like @command{gnun-add-fuzzy-diff}
-does.
+This script takes @command{po4a-gettextize} output, adds current
address@hidden as ``previous'' values, merges the file with new POT, and
+adds differences against previous values like
address@hidden does.
@example
gnun-merge-preconverted [OPTION...] PO POT
@@ -2121,7 +2176,7 @@
Display copyright and version information and exit.
@item --help
-Display usage information and exit
+Display usage information and exit.
@end table
@node gnun-validate-html
Index: gnun-init-po.in
===================================================================
RCS file: gnun-init-po.in
diff -N gnun-init-po.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnun-init-po.in 5 Jun 2012 10:13:08 -0000 1.1
@@ -0,0 +1,256 @@
+#! /bin/bash
+# Init a translation file.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This file is part of GNUnited Nations.
+
+# GNUnited Nations is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# GNUnited Nations is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNUnited Nations. If not, see <http://www.gnu.org/licenses/>.
+
+function version () {
+cat <<EOF
+gnun-init-po (@PACKAGE_NAME@) @PACKAGE_VERSION@
+Copyright (C) 2012 Free Software Foundation, Inc.
+You may redistribute copies of @PACKAGE_NAME@
+under the terms of the GNU General Public License.
+For more information about these matters, see the file named COPYING.
+EOF
+}
+
+function usage () {
+cat <<EOF
+Usage: gnun-init-po OPTION... POT
+
+Initialize a PO file.
+
+Options:
+ -C, --compendium=COMP Use compendium
+ -d, --disable-diffs Don't add diffs to previous messages
+ -g, --team="NAME <list>" Specify team
+ -l, --language=LANG Specify language suffix
+ -t, --translator="FULL NAME <email>"
+ Specify translator
+ --version Display version info and exit
+ --help Display this help and exit
+
+Report bugs to @PACKAGE_BUGREPORT@
address@hidden@ home page: <@PACKAGE_URL@>
+General help using GNU software: <http://www.gnu.org/gethelp/>
+EOF
+}
+
+# Parse command line.
+
+compendia=
+language=
+translator=
+team=
+disable_diffs=
+
+params=$#
+while [ ${params} -ge 1 ]; do
+ case "$1" in
+ --help )
+ usage
+ exit 0
+ ;;
+ --version )
+ version
+ exit 0
+ ;;
+ -d | --disable-diffs )
+ disable_diffs=yes
+ ;;
+ -t | --translator )
+ shift
+ params=$((${params}-1))
+ translator="$1"
+ ;;
+ --translator=* )
+ translator="${1#--translator=}"
+ ;;
+ -g | --team )
+ shift
+ params=$((${params}-1))
+ team="$1"
+ ;;
+ --team=* )
+ team="${1#--team=}"
+ ;;
+ -l | --language )
+ shift
+ params=$((${params}-1))
+ language=$1
+ ;;
+ --language=* )
+ language="${1#--language=}"
+ ;;
+ -C | --compendium )
+ shift
+ params=$((${params}-1))
+ compendia="${compendia} -C $1"
+ ;;
+ --compendium=* )
+ compendia="${compendia} -C ${1#--compendium=}"
+ ;;
+ * )
+ break
+ ;;
+ esac
+ params=$((${params}-1))
+ shift
+done
+
+if [ ${params} -ne 1 ]; then
+ echo 1>&2 Error: Single FILE arguments is required. See --help for
details.
+ exit 1
+fi
+
+# Figure out language suffix and PO file name.
+article=${1%.pot}
+article=${article##*/}
+
+if test -z "${language}" && test -n "${compendia}"; then
+ language=${compendia# -C }
+ language=${language%% *}
+ language=${language%.po}
+ language=${language##*.}
+fi
+
+if test -z "${language}";then
+ echo 1>&2 Note: Language suffix is not specified.
+fi
+
+po=${article}.${language}.po
+
+revision_date="`date +"%Y-%m-%d %H:%M%z"`"
+year=${revision_date%%-*}
+creation_date="address@hidden@ -n '1,/^$/ \
+{s/\\\n"//;/^\(\"POT-Creation-Date: \)/{s/\"POT-Creation-Date: //p;q}}' $1`"
+
+# Figure out language name by its code.
+case ${language} in
+ af ) PO_LANGUAGE=Afrikaans ;;
+ ar ) PO_LANGUAGE=Arabic ;;
+ az ) PO_LANGUAGE=Azerbaijani ;;
+ bg ) PO_LANGUAGE=Bulgarian ;;
+ bn ) PO_LANGUAGE=Bengali ;;
+ bs ) PO_LANGUAGE=Bosnian ;;
+ ca ) PO_LANGUAGE=Catalan ;;
+ cs ) PO_LANGUAGE=Czech ;;
+ da ) PO_LANGUAGE=Danish ;;
+ de ) PO_LANGUAGE=German ;;
+ el ) PO_LANGUAGE=Greek ;;
+ en ) PO_LANGUAGE=English ;;
+ eo ) PO_LANGUAGE=Esperanto ;;
+ es ) PO_LANGUAGE=Spanish ;;
+ et ) PO_LANGUAGE=Estonian ;;
+ fa ) PO_LANGUAGE=Farsi ;;
+ fi ) PO_LANGUAGE=Finnish ;;
+ fr ) PO_LANGUAGE=French ;;
+ gl ) PO_LANGUAGE=Galician ;;
+ he ) PO_LANGUAGE=Hebrew ;;
+ hr ) PO_LANGUAGE=Croatian ;;
+ hu ) PO_LANGUAGE=Hungarian ;;
+ id ) PO_LANGUAGE=Indonesian ;;
+ it ) PO_LANGUAGE=Italian ;;
+ ja ) PO_LANGUAGE=Japanese ;;
+ kn ) PO_LANGUAGE=Kannada ;;
+ ko ) PO_LANGUAGE=Korean ;;
+ mk ) PO_LANGUAGE=Macedonian ;;
+ ml ) PO_LANGUAGE=Malayalam ;;
+ nb ) PO_LANGUAGE=Norwegian ;;
+ nl ) PO_LANGUAGE=Dutch ;;
+ nn ) PO_LANGUAGE=Norwegian ;;
+ pl ) PO_LANGUAGE=Polish ;;
+ pt ) PO_LANGUAGE=Portuguese ;;
+ pt-br ) PO_LANGUAGE="Brazilian Portuguese";;
+ ro ) PO_LANGUAGE=Romanian ;;
+ ru ) PO_LANGUAGE=Russian ;;
+ sh ) PO_LANGUAGE=Serbo-Croatian ;;
+ sk ) PO_LANGUAGE=Slovak ;;
+ sl ) PO_LANGUAGE=Slovenian ;;
+ sq ) PO_LANGUAGE=Albanian ;;
+ sr ) PO_LANGUAGE=Serbian ;;
+ sv ) PO_LANGUAGE=Swedish ;;
+ ta ) PO_LANGUAGE=Tamil ;;
+ th ) PO_LANGUAGE=Thai ;;
+ tl ) PO_LANGUAGE=Tagalog ;;
+ tr ) PO_LANGUAGE=Turkish ;;
+ uk ) PO_LANGUAGE=Ukrainian ;;
+ uz ) PO_LANGUAGE=Uzbek ;;
+ vi ) PO_LANGUAGE=Vietnamese ;;
+ zh-cn ) PO_LANGUAGE="Chinese (Simplified)" ;;
+ zh-tw ) PO_LANGUAGE="Chinese (Traditional)" ;;
+ * ) PO_LANGUAGE="LANGUAGE" ;;
+esac
+
+if test -n "${compendia}"; then
+ @MSGMERGE@ --previous ${compendia} -o ${po} /dev/null $1 || exit 1
+else
+ # No compendium specified: just copy POT.
+ cp $1 ${po}
+fi
+
+description="$(head -n 1 ${1})"
+# If the first line in the POT file contains "LANGUAGE",
+# it is considered to be filled by GNUN; so it should be used
+# to fill the URL of the article.
+if echo ${description} | grep -q LANGUAGE; then
+ @SED@ --in-place \
+ "0,/^msgid/address@hidden@${description}@;address@hidden@address@hidden" \
+ ${po}
+ description=${description/LANGUAGE/${PO_LANGUAGE}}
+fi
+
+substitution=
+if test -n "${translator}"; then
+ escaped="${translator//\//\/}"
+ escaped="${escaped//&/\&}"
+# Substitute last translator's name and first translator's name (if absent).
+ substitution="1,/^$/{s/^\(\"Last-Translator: \).*/\1${escaped}\\\n\"/
+ s/# FIRST AUTHOR <address@hidden>, YEAR./# ${escaped}, ${year}./}"
+fi
+
+if test -n "${team}"; then
+ escaped="${team//\//\/}"
+ escaped="${escaped//&/\&}"
+# Substitute team's name and address.
+ substitution="${substitution}
+1,/^$/s/^\(\"Language-Team: \).*/\1${escaped}\\\n\"/"
+fi
+
+# Insert description if it is not present in ${po}.
address@hidden@ "0,/^msgid/{p;d};q" ${po} | @GREP@ -F "${description}" >
/dev/null \
+ || @SED@ --in-place "1s|.*|${description}\n&|" ${po}
+
+# Fill some fields.
address@hidden@ --in-place \
+"0,/^msgid/s/\<PACKAGE\>/${article}.html/
+ 0,/^# [^#]/{/^# [^#]/p;d}
+ ${substitution}
+# We rely on gettext utilities removing all empty lines in the header.
+ 1,/^$/{
+ s/\<LANGUAGE\>/${PO_LANGUAGE}/
+ s/^\(\"Project-Id-Version:\).*/\1 ${article}.html\\\n\"/
+ s/^\(\"POT-Creation-Date:\).*/\1 ${creation_date}\\\n\"/
+ s/^\(\"PO-Revision-Date:\).*/\1 ${revision_date}\\\n\"/
+ address@hidden(\"Content-Type: text/plain;
charset\)=CHARSET\(\\\n\)\?\"@\1=UTF-8\2\"@
+ s/^\(\"Content-Transfer-Encoding:\) ENCODING\(\\\n\)\?\"$/\1 8bit\\\n\"/
+ }" ${po}
+
+# Add differences to previous msgids.
+if test -z "${disable_diffs}"; then
+ @pkglibexecdir@/add-fuzzy-diff -i ${po}
+fi