mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 07:37:57 +00:00
po: Add customizable 'fetch-po' script.
* gettext-tools/wizard/po-templates/traditional/fetch-po: New file. * gettext-tools/wizard/Makefile.am (po_SCRIPTS): New variable. (EXTRA_DIST): Add the po_SCRIPTS. * gettext-tools/wizard/gettextize.in: Copy but don't overwrite po/fetch-po. * gettext-tools/wizard/po-templates/traditional/Makefile.in.in (fetch-po): New target. * gettext-tools/examples/po/Makefile.am (fetch-po): New target. * gettext-tools/examples/hello-*/po/Makefile.am (fetch-po): New target. * gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (fetch-po): New target. * gettext-tools/doc/gettext.texi (po/fetch-po): New subsection. (po/LINGUAS): Explain how it related to the 'fetch-po' script. (Release Management): Document how to fetch the PO files before a release. * NEWS: Mention the change.
This commit is contained in:
parent
e003323602
commit
f3edef2e5b
4
NEWS
4
NEWS
@ -26,6 +26,10 @@ Version 1.0 - October 2025
|
||||
PO files from a translation project's site on the internet, and
|
||||
updates the LINGUAS file accordingly.
|
||||
|
||||
* In a po/ directory, a new script 'fetch-po' is now added by 'gettextize'.
|
||||
It provides the standard interface for fetching the translated PO files.
|
||||
It typically either invokes the 'po-fetch' program or does nothing.
|
||||
|
||||
# Improvements for translators:
|
||||
* msginit:
|
||||
- When the PO file already exists, 'msginit' now updates it w.r.t. the
|
||||
|
||||
@ -369,6 +369,7 @@ The Maintainer's View
|
||||
Files You Must Create or Alter
|
||||
|
||||
* po/POTFILES.in:: @file{POTFILES.in} in @file{po/}
|
||||
* po/fetch-po:: @file{fetch-po} in @file{po/}
|
||||
* po/LINGUAS:: @file{LINGUAS} in @file{po/}
|
||||
* po/Makevars:: @file{Makevars} in @file{po/}
|
||||
* po/Rules-*:: Extending @file{Makefile} in @file{po/}
|
||||
@ -8983,6 +8984,7 @@ using GNU gettext functionality.
|
||||
|
||||
@menu
|
||||
* po/POTFILES.in:: @file{POTFILES.in} in @file{po/}
|
||||
* po/fetch-po:: @file{fetch-po} in @file{po/}
|
||||
* po/LINGUAS:: @file{LINGUAS} in @file{po/}
|
||||
* po/Makevars:: @file{Makevars} in @file{po/}
|
||||
* po/Rules-*:: Extending @file{Makefile} in @file{po/}
|
||||
@ -9035,6 +9037,44 @@ it is recommended to list in @file{po/POTFILES.in} the real source file
|
||||
(ending in @file{.l} in the case of @code{flex}, or in @file{.y} in the
|
||||
case of @code{bison}), not the generated C file.
|
||||
|
||||
@node po/fetch-po
|
||||
@subsection @file{fetch-po} in @file{po/}
|
||||
@cindex @file{fetch-po} file
|
||||
|
||||
The @file{po/} directory should also contain
|
||||
an executable shell script named @file{fetch-po}.
|
||||
It is supposed to fetch the PO files, produced by translators,
|
||||
from a translations project's site on the internet,
|
||||
store them in the current directory,
|
||||
and generate a @file{LINGUAS} file accordingly.
|
||||
(More on that below.)
|
||||
|
||||
This script does not take any arguments.
|
||||
|
||||
An initial @file{fetch-po} file can be installed by @code{gettextize}.
|
||||
But you may need to customize it.
|
||||
|
||||
There are two ways of implementing the @file{fetch-po} script:
|
||||
@itemize @bullet
|
||||
@item
|
||||
In packages whose translators commit their PO files
|
||||
directly into the version control of the package,
|
||||
or where a translations project's daemon does this automatically
|
||||
on behalf of the translators,
|
||||
this script does not do anything.
|
||||
@item
|
||||
In packages where the translations are collected by a translation project,
|
||||
it uses a @code{po-fetch} invocation.
|
||||
See @ref{po-fetch Invocation} for the possible arguments.
|
||||
@end itemize
|
||||
|
||||
@cindex @code{fetch-po} target
|
||||
This script implements the @code{Makefile}'s target @code{fetch-po}.
|
||||
|
||||
This script is not contained in distribution tarballs by default,
|
||||
because it is part of the maintainer's release management infrastructure
|
||||
and because it may, in rare cases, contains secrets (such as API keys).
|
||||
|
||||
@node po/LINGUAS
|
||||
@subsection @file{LINGUAS} in @file{po/}
|
||||
@cindex @file{LINGUAS} file
|
||||
@ -9059,6 +9099,9 @@ languages, this should not be done by modifying the @file{LINGUAS} file,
|
||||
but rather by using the @code{LINGUAS} environment variable
|
||||
(@pxref{Installers}).
|
||||
|
||||
In packages where the translations are collected by a translation project,
|
||||
this file is generated by the @code{fetch-po} script.
|
||||
|
||||
It is recommended that you add the "languages" @samp{en@@quot} and
|
||||
@samp{en@@boldquot} to the @code{LINGUAS} file. @code{en@@quot} is a
|
||||
variant of English message catalogs (@code{en}) which uses real quotation
|
||||
@ -10015,6 +10058,28 @@ recover the location comments by running @code{msgmerge} again.
|
||||
|
||||
@cindex release
|
||||
@cindex distribution tarball
|
||||
|
||||
First,
|
||||
in packages where the translations are collected by a translation project,
|
||||
before creating a distribution tarball,
|
||||
the maintainer should fetch the PO files from the translators.
|
||||
There are two ways to do this: Either
|
||||
|
||||
@example
|
||||
$ (cd po; ./fetch-po)
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
or
|
||||
|
||||
@cindex @code{fetch-po} target
|
||||
@example
|
||||
$ ./configure
|
||||
$ (cd po; make fetch-po)
|
||||
$ make distclean
|
||||
@end example
|
||||
|
||||
Second, updating generated files.
|
||||
In projects that use GNU @code{automake}, the usual commands for creating
|
||||
a distribution tarball, @samp{make dist} or @samp{make distcheck},
|
||||
automatically update the generated files in the @file{po/} directories
|
||||
@ -10023,6 +10088,7 @@ as needed.
|
||||
If GNU @code{automake} is not used, the maintainer needs to perform this
|
||||
update before making a release:
|
||||
|
||||
@cindex @code{update-po} target
|
||||
@example
|
||||
$ ./configure
|
||||
$ (cd po; make update-po)
|
||||
|
||||
@ -175,6 +175,15 @@ SUFFIXES = .po .qm .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -178,6 +178,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -183,6 +183,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -183,6 +183,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -175,6 +175,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -91,6 +91,15 @@ CATALOGS = $(STRINGSFILES) $(ENSTRINGSFILES)
|
||||
|
||||
.SUFFIXES: .po .gpo .nop .po-create
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -182,6 +182,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -181,6 +181,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -181,6 +181,15 @@ SUFFIXES = .po .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -172,6 +172,15 @@ SUFFIXES = .po .gmo .gpo .nop .po-create
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
@ -199,6 +199,15 @@ SUFFIXES = .po .gpo
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file.
|
||||
$(GPOFILES): $(srcdir)/$(DOMAIN).pot
|
||||
.po.gpo:
|
||||
|
||||
@ -44,8 +44,10 @@ po_DATA = \
|
||||
po-templates/traditional/en@quot.header \
|
||||
po-templates/traditional/en@boldquot.header \
|
||||
po-templates/traditional/insert-header.sed
|
||||
po_SCRIPTS = \
|
||||
po-templates/traditional/fetch-po
|
||||
|
||||
EXTRA_DIST += $(po_DATA)
|
||||
EXTRA_DIST += $(po_DATA) $(po_SCRIPTS)
|
||||
|
||||
|
||||
# We don't install the source code in unpacked form any more.
|
||||
|
||||
@ -757,6 +757,20 @@ You can then remove $podir/Makevars.template.
|
||||
please="$please
|
||||
Please create $podir/Makevars from the template in $podir/Makevars.template.
|
||||
You can then remove $podir/Makevars.template.
|
||||
"
|
||||
fi
|
||||
;;
|
||||
fetch-po)
|
||||
if test -f "$srcdir/$podir/$file"; then
|
||||
# This file may already be customized. Don't overwrite it.
|
||||
:
|
||||
else
|
||||
if $do_changelog; then
|
||||
func_poChangeLog_add_entry " * $file: New file, from gettext-${version}."
|
||||
fi
|
||||
func_linkorcopy $file "$gettext_datadir/po/$file" "$podir/$file"
|
||||
please="$please
|
||||
Please customize $podir/fetch-po, if appropriate.
|
||||
"
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -207,6 +207,15 @@ all: all-@USE_NLS@
|
||||
# source directory."
|
||||
# Therefore we put these files in the source directory, not the build directory.
|
||||
|
||||
# This target fetches the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, and generates the associated
|
||||
# LINGUAS file (for packages that use such a translations project and where
|
||||
# this translation project does not already commit the PO files and the LINGUAS
|
||||
# file into the version control repository of the package automatically).
|
||||
.PHONY: fetch-po
|
||||
fetch-po:
|
||||
cd $(srcdir) && @SHELL@ ./fetch-po
|
||||
|
||||
# This target creates a merged PO file (mostly for debugging purposes).
|
||||
.po.gpo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
|
||||
30
gettext-tools/wizard/po-templates/traditional/fetch-po
Executable file
30
gettext-tools/wizard/po-templates/traditional/fetch-po
Executable file
@ -0,0 +1,30 @@
|
||||
#! /bin/sh
|
||||
# Script for fetching the PO files, produced by translators, from a
|
||||
# translations project's site on the internet, to the current directory.
|
||||
#
|
||||
# Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to use, copy, distribute, and modify it.
|
||||
|
||||
# Usage: ./fetch-po
|
||||
#
|
||||
# This script is invoked from two locations:
|
||||
# 1. From the script that fetches auxiliary files that are omitted from
|
||||
# the version control repository of this package, typically called
|
||||
# 'autopull.sh' or 'bootstrap --pull' or similar.
|
||||
# 2. From the Makefile in the po/ directory, target 'fetch-po'.
|
||||
|
||||
# There are two ways to implement this script:
|
||||
#
|
||||
# In packages whose translators commit their PO files directly into
|
||||
# the version control of the package, or where a translations project's
|
||||
# daemon does this automatically on behalf of the translators, this
|
||||
# script does not do anything.
|
||||
echo "fetch-po: Nothing to do."
|
||||
#
|
||||
# In packages where the translations are collected by a translation project,
|
||||
# use a 'po-fetch' invocation.
|
||||
# See 'po-fetch --help' for the possible arguments.
|
||||
# If you want the fetched PO files to be added into the version control of
|
||||
# the package, use the option '--git'; otherwise, don't use this option.
|
||||
#po-fetch ...
|
||||
Loading…
x
Reference in New Issue
Block a user