mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 15:39:06 +00:00
build: remove PO files from version control
Let bootstrap auto-update the PO files from "translationproject.org". * bootstrap.conf (SKIP_PO): Remove, thus letting bootstrap download the PO files now. * po/.gitignore: Add entries now created during the build. * doc/find-maint.texi (Internationalisation): Mention the change. * NEWS (Changes to the build process): Likewise. (Translations): Remove section.
This commit is contained in:
parent
0e7a378e8c
commit
0f3822c284
13
NEWS
13
NEWS
@ -93,15 +93,6 @@ Some minor documentation improvements are listed in "Bug Fixes" below.
|
||||
|
||||
#46784: frcode drops last char if no final newline
|
||||
|
||||
** Translations
|
||||
|
||||
Updated translations: Belarusian, Brazilian Portuguese, Bulgarian, Catalan,
|
||||
Chinese (simplified), Chinese (traditional), Croatian, Czech, Danish, Dutch,
|
||||
Esperanto, Estonian, Finnish, French, Galician, German, Greek, Hungarian,
|
||||
Indonesian, Irish, Italian, Japanese, Korean, Lithuanian, Luganda, Malay,
|
||||
Norwegian Bokmaal, Polish, Portuguese, Romanian, Russian, Serbian, Slovak,
|
||||
Slovenian, Spanish, Swedish, Turkish, Ukrainian, Vietnamese.
|
||||
|
||||
** Changes to the build process
|
||||
|
||||
The configure option --enable-id-cache has been removed. It has been
|
||||
@ -124,6 +115,10 @@ distinguished: e.g. "4.6.0.152-fe9c" is the 152th commit after the tag "v4.6.0"
|
||||
and has the Git short hash "fe9c". Builds from an unclean tree are marked with
|
||||
the suffix "-dirty".
|
||||
|
||||
The translation files in the PO directory are no longer version controlled;
|
||||
instead bootstrap auto-updates them from "translationproject.org" during a
|
||||
maintainer build.
|
||||
|
||||
* Major changes in release 4.6.0, 2015-12-28
|
||||
|
||||
** Stable Release
|
||||
|
||||
@ -194,10 +194,6 @@ m4_base=gl/m4
|
||||
# 'libgnulib' is mentioned in various 'Makefile.am' files.
|
||||
gnulib_name=libgnulib
|
||||
|
||||
# PO files are committed to findutils, don't auto-update.
|
||||
SKIP_PO=t
|
||||
|
||||
|
||||
# Create 'gl/Makefile.am' which is mentioned in 'configure.ac'.
|
||||
hack_gnulib_tool_makefile() {
|
||||
cat > gl/Makefile.am <<EOF
|
||||
|
||||
@ -716,8 +716,9 @@ which provides a replacement @code{locate}.
|
||||
@chapter Internationalisation
|
||||
Translation is essentially automated from the maintainer's point of
|
||||
view. The TP mails the maintainer when a new PO file is available,
|
||||
and we just download it and check it in. We copy the @file{.po} files
|
||||
into the git repository. For more information, please see
|
||||
and we just download it and check it in. The @file{bootstrap} script
|
||||
copies @file{.po} files into the working tree. For more information,
|
||||
please see
|
||||
@url{https://translationproject.org/domain/findutils.html}.
|
||||
|
||||
|
||||
|
||||
14
po/.gitignore
vendored
14
po/.gitignore
vendored
@ -1,9 +1,21 @@
|
||||
/cat-id-tbl.c
|
||||
/*.gmo
|
||||
/*.po
|
||||
/.reference/
|
||||
/LINGUAS
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/Makefile.in.in
|
||||
/Makevars
|
||||
/Makevars.template
|
||||
/POTFILES
|
||||
/Rules-quot
|
||||
/boldquot.sed
|
||||
/cat-id-tbl.c
|
||||
/en@boldquot.header
|
||||
/en@quot.header
|
||||
/findutils.pot
|
||||
/insert-header.sin
|
||||
/quot.sed
|
||||
/remove-potcdate.sed
|
||||
/remove-potcdate.sin
|
||||
/stamp-po
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This tells whether or not to prepend "GNU " prefix to the package
|
||||
# name that gets inserted into the header of the $(DOMAIN).pot file.
|
||||
# Possible values are "yes", "no", or empty. If it is empty, try to
|
||||
# detect it automatically by scanning the files in $(top_srcdir) for
|
||||
# "GNU packagename" string.
|
||||
PACKAGE_GNU =
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS =
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
|
||||
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
|
||||
# context. Possible values are "yes" and "no". Set this to yes if the
|
||||
# package uses functions taking also a message context, like pgettext(), or
|
||||
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
|
||||
USE_MSGCTXT = no
|
||||
|
||||
# These options get passed to msgmerge.
|
||||
# Useful options are in particular:
|
||||
# --previous to keep previous msgids of translated messages,
|
||||
# --quiet to reduce the verbosity.
|
||||
MSGMERGE_OPTIONS =
|
||||
|
||||
# These options get passed to msginit.
|
||||
# If you want to disable line wrapping when writing PO files, add
|
||||
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
|
||||
# MSGINIT_OPTIONS.
|
||||
MSGINIT_OPTIONS =
|
||||
|
||||
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
|
||||
# has changed. Possible values are "yes" and "no". Set this to no if
|
||||
# the POT file is checked in the repository and the version control
|
||||
# program ignores timestamps.
|
||||
PO_DEPENDS_ON_POT = yes
|
||||
|
||||
# This tells whether or not to forcibly update $(DOMAIN).pot and
|
||||
# regenerate PO files on "make dist". Possible values are "yes" and
|
||||
# "no". Set this to no if the POT file and PO files are maintained
|
||||
# externally.
|
||||
DIST_DEPENDS_ON_UPDATE_PO = yes
|
||||
@ -1,58 +0,0 @@
|
||||
# This file, Rules-quot, can be copied and used freely without restrictions.
|
||||
# Special Makefile rules for English message catalogs with quotation marks.
|
||||
|
||||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
|
||||
|
||||
.SUFFIXES: .insert-header .po-update-en
|
||||
|
||||
en@quot.po-create:
|
||||
$(MAKE) en@quot.po-update
|
||||
en@boldquot.po-create:
|
||||
$(MAKE) en@boldquot.po-update
|
||||
|
||||
en@quot.po-update: en@quot.po-update-en
|
||||
en@boldquot.po-update: en@boldquot.po-update-en
|
||||
|
||||
.insert-header.po-update-en:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
ll=`echo $$lang | sed -e 's/@.*//'`; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
|
||||
| $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
|
||||
{ case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
|
||||
$(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
|
||||
;; \
|
||||
*) \
|
||||
$(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
|
||||
;; \
|
||||
esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
|
||||
; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
en@quot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
|
||||
|
||||
en@boldquot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
|
||||
|
||||
mostlyclean: mostlyclean-quot
|
||||
mostlyclean-quot:
|
||||
rm -f *.insert-header
|
||||
@ -1,10 +0,0 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
s/“/“[1m/g
|
||||
s/”/[0m”/g
|
||||
s/‘/‘[1m/g
|
||||
s/’/[0m’/g
|
||||
@ -1,25 +0,0 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
# This catalog furthermore displays the text between the quotation marks in
|
||||
# bold face, assuming the VT100/XTerm escape sequences.
|
||||
#
|
||||
@ -1,22 +0,0 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
@ -1,177 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# fetch-po-files -- fetches the .po files from the Translation Project website
|
||||
# Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Written by James Youngman.
|
||||
|
||||
URLBASE="http://www.iro.umontreal.ca/translation/maint"
|
||||
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "You need to specify the package name and a destination directory on the command line." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
PACKAGE="$1"
|
||||
DESTDIR="$2"
|
||||
shift
|
||||
|
||||
debug () {
|
||||
: nothing
|
||||
}
|
||||
|
||||
info () {
|
||||
echo "$@"
|
||||
}
|
||||
|
||||
|
||||
v_update_needed() {
|
||||
debug "update_required: Checking $@"
|
||||
vnew=$1
|
||||
vexisting=$2
|
||||
|
||||
major_new=$(echo $vnew | cut -s -d. -f1)
|
||||
major_existing=$(echo $vexisting | cut -s -d. -f1)
|
||||
if [ -z "$major_new" ]; then
|
||||
debug "New version number empty, update not needed"
|
||||
false
|
||||
elif [ -z "$major_existing" ]; then
|
||||
debug "Existing version number empty, update is needed"
|
||||
true
|
||||
elif [ $major_new -gt $major_existing ]; then
|
||||
debug "$vnew > $vexisting, update needed"
|
||||
true
|
||||
elif [ $major_new -lt $major_existing ]; then
|
||||
debug "$vnew < $vexisting, update NOT needed"
|
||||
true
|
||||
else
|
||||
v_update_needed \
|
||||
$(echo $vnew | cut -s -d. -f2-) \
|
||||
$(echo $vexisting | cut -s -d. -f2-)
|
||||
fi
|
||||
}
|
||||
|
||||
d_update_needed() {
|
||||
# Determine if an update is neeededon the basis of the version numbers.
|
||||
cat "$@" |
|
||||
tr -d '"' |
|
||||
grep "^PO-Revision-Date: " |
|
||||
sed -e 's/PO-Revision-Date: //' -e 's/\\n$//' |
|
||||
LANG=C sort -c >/dev/null
|
||||
}
|
||||
|
||||
|
||||
|
||||
getversion() {
|
||||
grep Project-Id-Version: < "$1" |
|
||||
tr -d '"' |
|
||||
sed -e 's/^.*'$PACKAGE' //' -e 's/\\n$//'
|
||||
}
|
||||
|
||||
|
||||
check_versions() {
|
||||
if vnew=$(getversion "$1"); then
|
||||
if vexisting=$(getversion "$2"); then
|
||||
if v_update_needed "$vnew" "$vexisting"; then
|
||||
true
|
||||
else
|
||||
d_update_needed "$2" "$1" && \
|
||||
info "Timestamp fields indicate $1 is newer than $2"
|
||||
fi
|
||||
else
|
||||
false
|
||||
fi
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
update_required() {
|
||||
new="$1"
|
||||
existing="$2"
|
||||
# ls -ltrd "$new" "$existing"
|
||||
|
||||
if ! [ -e "$existing" ] ; then
|
||||
debug "$existing does not exist, using $new"
|
||||
true
|
||||
elif cmp $new $existing >/dev/null 2>&1; then
|
||||
info "$new and $existing are identical"
|
||||
false
|
||||
elif check_versions "$new" "$existing"; then
|
||||
info "Fetched file has newer version number or date stamp"
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
possible_update() {
|
||||
|
||||
debug "Possible update of $3/$1"
|
||||
|
||||
new="$2/$1"
|
||||
existing="$3/$1"
|
||||
|
||||
if update_required $new $existing; then
|
||||
info "Updating $1..."
|
||||
rm -f $existing
|
||||
mv $new $existing
|
||||
else
|
||||
rm -f $new
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
main () {
|
||||
potfile=$DESTDIR/$PACKAGE.pot
|
||||
if [ -f $potfile ] ; then
|
||||
echo "OK".
|
||||
else
|
||||
echo "$potfile is not present. Did you specify the right command line?" >&2
|
||||
exit 1
|
||||
fi
|
||||
tmpdir=`mktemp -d`
|
||||
|
||||
|
||||
# set -x
|
||||
printf "Fetching .po files..."
|
||||
wget --quiet --recursive --directory-prefix="$tmpdir" --level=1 --accept "*.po" --no-directories "$URLBASE"/"$PACKAGE"
|
||||
echo done
|
||||
# cp /tmp/po-updates/$PACKAGE/*.po "$tmpdir"
|
||||
# touch "$tmpdir"/*.po
|
||||
|
||||
for f in $(cd $tmpdir && ls *.po ); do
|
||||
possible_update "$f" "$tmpdir" "$DESTDIR"
|
||||
done
|
||||
cd /
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
|
||||
# getversion gl.po
|
||||
# update_needed 4.1.5 4.1.5
|
||||
# update_needed 4.1.15 4.1.5
|
||||
# update_needed 5.0 4.1.5
|
||||
# update_needed 4.2.6 5.0
|
||||
# exit 0
|
||||
|
||||
main "$@"
|
||||
1373
po/findutils.pot
1373
po/findutils.pot
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
||||
# Sed script that inserts the file called HEADER before the header entry.
|
||||
#
|
||||
# At each occurrence of a line starting with "msgid ", we execute the following
|
||||
# commands. At the first occurrence, insert the file. At the following
|
||||
# occurrences, do nothing. The distinction between the first and the following
|
||||
# occurrences is achieved by looking at the hold space.
|
||||
/^msgid /{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/m/m/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Read the file.
|
||||
r HEADER
|
||||
# Output the file's contents by reading the next line. But don't lose the
|
||||
# current line while doing this.
|
||||
g
|
||||
N
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
||||
1825
po/pt_BR.po
1825
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
@ -1,19 +0,0 @@
|
||||
# Sed script that remove the POT-Creation-Date line in the header entry
|
||||
# from a POT file.
|
||||
#
|
||||
# The distinction between the first and the following occurrences of the
|
||||
# pattern is achieved by looking at the hold space.
|
||||
/^"POT-Creation-Date: .*"$/{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/P/P/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Remove the line.
|
||||
g
|
||||
d
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
||||
1755
po/zh_CN.po
1755
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1630
po/zh_TW.po
1630
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user