build: Add scripts for fetching the PO files.

* gettext-runtime/po/fetch-po: New file.
* gettext-tools/po/fetch-po: New file.
* gettext-tools/examples/po/fetch-po: New file.
* check-copyright-headers (func_check_file): Don't complain about the LINGUAS
files, that will now have more than 10 lines.
This commit is contained in:
Bruno Haible 2025-10-24 14:13:44 +02:00
parent f3edef2e5b
commit 6eb3598f76
5 changed files with 60 additions and 22 deletions

View File

@ -167,29 +167,11 @@ We assume that the following environment variables are set:
** If you got any translation updates, update translations:
wget --mirror --level=1 -nd -nv -A.po -P gettext-runtime/po/new \
https://translationproject.org/latest/gettext-runtime/
Optionally merge:
cd gettext-runtime/po
mv new/*.po .
rm -rf new
(cd gettext-runtime/po && ./fetch-po)
(cd gettext-tools/po && ./fetch-po)
(cd gettext-tools/examples/po && ./fetch-po)
wget --mirror --level=1 -nd -nv -A.po -P gettext-tools/po/new \
https://translationproject.org/latest/gettext-tools/
Optionally merge:
cd gettext-tools/po
mv new/*.po .
rm -rf new
wget --mirror --level=1 -nd -nv -A.po -P gettext-tools/examples/po/new \
https://translationproject.org/latest/gettext-examples/
Optionally merge:
cd gettext-tools/examples/po
mv new/*.po .
rm -rf new
Adjust LINGUAS files if any of the languages has been added or
removed since the last release. Commit the changes.
Commit the changes.
** Create a release:

View File

@ -111,6 +111,11 @@ func_check_file ()
# These are a mostly data. They don't have much programmer expression.
return 0 ;;
*/LINGUAS )
# These are generated files that contain only data.
# They don't have any programmer expression.
return 0 ;;
*/ChangeLog* )
# ChangeLog files are convenience information, not worth sueing for.
return 0 ;;

17
gettext-runtime/po/fetch-po Executable file
View File

@ -0,0 +1,17 @@
#! /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'.
po-fetch --git TP gettext-runtime

View File

@ -0,0 +1,17 @@
#! /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'.
po-fetch --git TP gettext-examples

17
gettext-tools/po/fetch-po Executable file
View File

@ -0,0 +1,17 @@
#! /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'.
po-fetch --git TP gettext-tools