[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun GNUmakefile GNUmak...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun GNUmakefile GNUmak... |
Date: |
Tue, 24 Apr 2012 06:02:00 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 12/04/24 06:02:00
Modified files:
gnun/server/gnun: GNUmakefile GNUmakefile.team Makefile.am
AUTHORS NEWS
gnun/server/gnun/doc: gnun.texi web-trans.texi
Added files:
gnun/server/gnun: priorities.mk
Log message:
Report outdated articles by priority; improve merging team
files with `www' working copy.
* GNUmakefile (report): Use `priorities.mk' to sort reported
translations by priority.
* GNUmakefile.team (report): Likewise.
* GNUmakefile (reports-summary): Adjust to new `report' output.
* GNUmakefile.team (sync): Don't merge PO file when it is
identical to the `www' version; use `www' version as a possible
source for missing translations.
* GNUmakefile (report-pos): New function.
* GNUmakefile.team (report-pos): Likewise.
* GNUmakefile (TEAM-POS, priority-articles-pos, other-pos)
(important-articles-pos, important-dir-pos): New variables.
* GNUmakefile.team (priority-articles-pos, other-pos)
(important-articles-pos, important-dir-pos): Likewise.
* Makefile.am (dist_example_DATA): Add `priorities.mk'.
* priorities.mk: New file.
* doc/gnun.texi (report, Invoking GNUN, PO Files and Team):
Update.
* doc/web-trans.texi (Priorities): Likewise.
* AUTHORS: Likewise.
* NEWS: Likewise.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.122&r2=1.123
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/AUTHORS?cvsroot=trans-coord&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/priorities.mk?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.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/web-trans.texi?cvsroot=trans-coord&r1=1.29&r2=1.30
Patches:
Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- GNUmakefile 23 Apr 2012 04:54:32 -0000 1.122
+++ GNUmakefile 24 Apr 2012 06:01:21 -0000 1.123
@@ -1131,6 +1131,46 @@
$(VCSSKIP) $(vcs) commit -m \
"Automatic sync from the master www repository."
+# Assign priorities to translations for report.
+ifdef TEAM
+-include priorities.mk
+TEAM-POS := $(sort $(filter %.${TEAM}.po,${ALL_POS}))
+priority-articles-pos := \
+ $(filter \
+ $(foreach article,${priority-articles},\
+ ${rootdir}/$(filter-out ./,\
+ $(dir ${article}))po/$(notdir ${article}).${TEAM}.po), \
+ ${TEAM-POS})
+important-articles-pos := \
+ $(filter \
+ $(foreach article,${important-articles},\
+ ${rootdir}/$(filter-out ./,\
+ $(dir ${article}))po/$(notdir ${article}).${TEAM}.po), \
+ ${TEAM-POS})
+important-dir-pos := \
+$(filter-out ${priority-articles-pos} ${important-articles-pos},\
+ $(filter $(addsuffix /po/%, \
+ $(addprefix ${rootdir}/,${important-directories})), \
+ ${TEAM-POS}))
+other-pos := \
+ $(filter-out ${priority-articles-pos} ${important-articles-pos} \
+ ${important-dir-pos}, \
+ $(shell find $(rootdir) -name '*.$(TEAM).po' \
+ ! -path '$(template-dir)/gnun/*'))
+
+# Function to report a group of PO files.
+define report-pos
address@hidden(if $(1), $(if $(2), echo " "$(strip $(2)); echo;) \
+ for i in $(1); do \
+ echo -n "$${i#${rootdir}/}: "; \
+ LC_ALL=C $(MSGFMT) --statistics -o /dev/null $$i 2>&1 \
+ | $(SED) ':egin;$$s/\n[[:blank:]]*/; /g;N;begin'; \
+ done | $(EGREP) '(fuzzy|untranslated)' \
+ || echo "All translations seem to be up-to-date."; $(if $(2), echo;) \
+ )
+endef
+endif # def TEAM
+
# Special target to check which translations need updating.
.PHONY: report
report:
@@ -1140,12 +1180,16 @@
ifeq (,$(call find-language,$(TEAM),$(sort $(GENERIC_LINGUAS))))
@echo "There are no translations for language $(TEAM)."
else
- @cd $(rootdir) ; LC_ALL=C find -name '*.$(TEAM).po' \
- ! -path '*/gnun/compendia/*' -printf "%p: " \
- -exec $(MSGFMT) --statistics -o /dev/null '{}' \; 2>&1 \
- | sort | $(EGREP) '(fuzzy|untranslated)' \
- || echo "All translations seem to be up-to-date."
-endif
+ifeq (,${priority-articles}${important-articles}${important-directories})
+ $(call report-pos,${other-pos},)
+else #!eq (,${priority-articles}${important-articles}${important-directories})
+ $(call report-pos,${priority-articles-pos},Priority Articles)
+ $(call report-pos,${important-articles-pos},Important Articles)
+ $(call report-pos,${important-dir-pos},\
+ Other Articles from Important Directories)
+ $(call report-pos,${other-pos},Other Translations)
+endif #!eq (,${priority-articles}${important-articles}${important-directories})
+endif # !eq (,$(call find-language,$(TEAM),$(sort $(GENERIC_LINGUAS))))
# Special target to compile report about number of outdated translations
# for all languages.
@@ -1153,8 +1197,7 @@
reports-summary:
@$(foreach lang,$(TEMPLATE_LINGUAS), echo -n "$(lang): "; \
$(MAKE) report TEAM=$(lang) \
- | $(EGREP) -v "^(make|All translations|There are no translations)" \
- | wc -l; )
+ | $(EGREP) '(fuzzy|untranslated)' | wc -l; )
# Special target to touch all the prerequisites of the targets that
# failed HTML validation and thus to trigger a rebuild in the next
Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- GNUmakefile.team 30 Jan 2012 08:49:13 -0000 1.12
+++ GNUmakefile.team 24 Apr 2012 06:01:35 -0000 1.13
@@ -120,6 +120,9 @@
endif
# Synchronize (update) the PO files from the master POTs.
+# The revision of the PO file from ${wwwdir} is used as a possible
+# source for missing translations, which covers the case when the
+# coordinator updates the translation directly in `www' repository.
.PHONY: sync
sync: update
@for file in $(translations); do \
@@ -127,9 +130,15 @@
$${file/.$(TEAM).po/.pot}` ]; then \
echo "Warning: $(notdir $$file) has no equivalent .pot in www."; \
else \
- $(ECHO) $(MSGMERGE) $(MSGMERGEVERBOSE) --quiet --update \
- --previous $$file \
- $(wwwdir)`dirname $$file`/po/`basename $${file/.$(TEAM).po/.pot}`; \
+ $(ECHO) www_po=$(wwwdir)`dirname $$file`/po/`basename $${file}`; \
+ if test -f $${www_po} ;then \
+ comp="-C $${www_po}"; \
+ else \
+ comp=; \
+ fi; \
+ diff -q $${file} $${www_po} 2>/dev/null \
+ || $(MSGMERGE) $(MSGMERGEVERBOSE) $${comp} --quiet --update \
+ --previous $$file $${www_po%.$(TEAM).po}.pot; \
fi; \
done
ifeq ($(VCS),yes)
@@ -161,14 +170,44 @@
endif
endif
-# Helper target to check which articles have to be updated.
-.PHONY: report
-report:
- @for file in $(translations) ; do \
+# Assign priorities to translations for report.
+-include priorities.mk
+priority-articles-pos := \
+ $(filter $(foreach article,${priority-articles},\
+ ./${article}.${TEAM}.po), ${translations})
+important-articles-pos := \
+ $(filter $(foreach article,${important-articles},\
+ ./${article}.${TEAM}.po), ${translations})
+important-dir-pos := \
+$(filter-out ${priority-articles-pos} ${important-articles-pos},\
+ $(filter $(addsuffix /%, $(addprefix ./,${important-directories})), \
+ ${translations}))
+other-pos := \
+ $(filter-out ${priority-articles-pos} ${important-articles-pos} \
+ ${important-dir-pos}, ${translations})
+
+# Function to report a group of PO files.
+define report-pos
address@hidden(if $(1), $(if $(2), echo " "$(strip $(2)); echo;) \
+ for file in $(1); do \
LC_ALL=C $(MSGFMT) --statistics -o /dev/null $$file 2>&1 \
| egrep '(fuzzy|untranslated)' \
&& echo "$${file#./} needs updating." || true ; \
- done
+ done; $(if $(2), echo;))
+endef
+
+# Helper target to check which articles have to be updated.
+.PHONY: report
+report:
+ifeq (,${priority-articles}${important-articles}${important-directories})
+ $(call report-pos,${other-pos},)
+else #!eq (,${priority-articles}${important-articles}${important-directories})
+ $(call report-pos,${priority-articles-pos},Priority Articles)
+ $(call report-pos,${important-articles-pos},Important Articles)
+ $(call report-pos,${important-dir-pos},\
+ Other Articles from Important Directories)
+ $(call report-pos,${other-pos},Other Translations)
+endif #!eq (,${priority-articles}${important-articles}${important-directories})
# Helper target to rewrap all PO files; avoids spurious diffs when
# they get remerged by the official build.
Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- Makefile.am 22 Mar 2012 07:50:06 -0000 1.27
+++ Makefile.am 24 Apr 2012 06:01:38 -0000 1.28
@@ -85,6 +85,7 @@
dist_example_DATA = diff-page-head.html diff-page-tail.html \
gnun.mk GNUmakefile.team languages.txt \
initial-translations-list.html \
+ priorities.mk \
translinks-head.html translinks-tail.html
pkgdata_DATA = config.mk
dist_sysconf_DATA = gnun.conf
Index: AUTHORS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/AUTHORS,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- AUTHORS 17 Mar 2012 15:00:21 -0000 1.8
+++ AUTHORS 24 Apr 2012 06:01:42 -0000 1.9
@@ -9,10 +9,12 @@
diff-page-tail.html, dtd/html5.dtd (based on W3C DTD),
expand-m4-includes.in,
languages.txt (compiled from www.gnu.org pages),
- gnun-add-fuzzy-diff, translinks-head.html, translinks-tail.html,
+ gnun-add-fuzzy-diff, priorities.mk,
+ translinks-head.html, translinks-tail.html,
update-localized-urls.in.
- Some changes in configure.ac, GNUmakefile, gnun-validate-html,
+ Some changes in configure.ac, GNUmakefile, GNUmakefile.team,
+ gnun-validate-html,
Makefile.am, README, dtd/README, doc/gnun.texi,
doc/web-trans.texi.
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- NEWS 19 Apr 2012 04:50:21 -0000 1.49
+++ NEWS 24 Apr 2012 06:01:44 -0000 1.50
@@ -2,6 +2,9 @@
* Changes in GNUnited Nations 0.6 (????-??-??)
+** Variables defined in `priorities.mk' are used to sort the reported
+ translations by priority.
+
** Support compendia.
** Bugs fixed in 0.6.
Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- doc/gnun.texi 19 Mar 2012 14:39:28 -0000 1.51
+++ doc/gnun.texi 24 Apr 2012 06:01:46 -0000 1.52
@@ -394,6 +394,7 @@
@cindex invoking
@cindex invocation
@cindex triggering, build
address@hidden GNUmakefile
The central part of GNUnited Nations is a makefile; actually a
@file{GNUmakefile} since it heavily relies on features and extensions
@@ -412,10 +413,17 @@
@code{make @var{target}}. Some of the variables in the next section
apply to them, and some do not.
address@hidden config.mk
address@hidden gnun.mk
address@hidden priorities.mk
Note that GNUN expects @file{GNUmakefile}, @file{config.mk} and
@file{gnun.mk} to be @emph{present} under @file{server/gnun} of the
`www' web repository, otherwise @command{make} has no way to know what
-and how should be built. Since the location of the repository working
+and how should be built. Another file, @file{priorities.mk}, is
+expected to be present under @file{server/gnun} in order to define
+the priorities when reporting about the outdated translations. If
+absent, the @code{report} target will not sort the translations by
+priority. Since the location of the repository working
copy is strictly user-specific and cannot be determined in any way,
@file{GNUmakefile} and @file{config.mk} must be copied there manually
after the package installation. For convenience, these files are
@@ -721,6 +729,13 @@
up-to-date. In fact, this is one of the main reasons GNUN is being
developed, if you recall.
address@hidden priorities.mk
+When present, @file{priorities.mk} defines four classes of articles by
+priority: @var{priority-articles} for the most important translations,
address@hidden for the second priority level,
address@hidden for the directories with important articles;
+all other translations are reported as less important.
+
@node triggers
@subsubsection The @code{triggers} target
@@ -1492,6 +1507,7 @@
@cindex project repository
@cindex repository, translation project
@cindex team maintenance
address@hidden GNUmakefile.team
GNUN operates on the ``official'' Web repository of the Savannah project
`www', where normally only the coordinators of translation teams have
@@ -1572,6 +1588,10 @@
@end group
@end example
address@hidden priorities.mk
+Add @file{priorities.mk} in order to make the @code{report} target sort
+the files by priority.
+
The next sections explain how to adopt the makefile for your team and
how to invoke a ``build''.
Index: doc/web-trans.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/web-trans.texi,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- doc/web-trans.texi 12 Feb 2012 14:25:49 -0000 1.29
+++ doc/web-trans.texi 24 Apr 2012 06:01:50 -0000 1.30
@@ -1473,7 +1473,8 @@
The article
@uref{http://www.gnu.org/@/server/@/standards/@/translations/@/priorities.html}
lists the most important essays to translate. In general, articles in
-the directories @file{philosophy}, @file{gnu}, @file{distros},
+the directories @file{philosophy}, @file{gnu},
address@hidden, @file{distros},
@file{copyleft} and @file{licenses} are important. The others may be
deferred for a time when a team completes most of the important
translations, or they can be translated as a ``rest''--in translators'
Index: priorities.mk
===================================================================
RCS file: priorities.mk
diff -N priorities.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ priorities.mk 24 Apr 2012 06:01:41 -0000 1.1
@@ -0,0 +1,57 @@
+# 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/>.
+
+# This file defines priorities for `report' targets.
+# It is based on /server/standards/translations/priorities.html
+# and /server/standards/README.translations.html.
+
+# The most important articles.
+priority-articles := philosophy/free-sw \
+ philosophy/why-free \
+ education/education \
+ education/edu-cases-india-irimpanam \
+ education/edu-software-tuxpaint \
+ gnu/thegnuproject \
+ philosophy/open-source-misses-the-point \
+ philosophy/compromise \
+ distros/distros
+
+# Second level of priority.
+important-articles := copyleft/copyleft \
+ philosophy/pragmatic \
+ philosophy/selling \
+ philosophy/who-does-that-server-really-serve \
+ philosophy/javascript-trap \
+ education/edu-why \
+ education/edu-cases-argentina-ecen \
+ education/edu-cases-india-ambedkar \
+ education/edu-software \
+ education/edu-software-gcompris \
+ education/edu-faq \
+ education/edu-team \
+ gnu/linux-and-gnu \
+ provide \
+ philosophy/right-to-read \
+ philosophy/free-doc
+
+# What to translate.
+important-directories := copyleft \
+ distros \
+ education \
+ gnu \
+ licenses \
+ philosophy
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- trans-coord/gnun/server/gnun GNUmakefile GNUmak...,
Pavel Kharitonov <=