# # spec file for package translation-update-upstream # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: translation-update-upstream Version: 20200601 Release: 1.3 Summary: Tool for Translation Update from Upstream # Ignore cracklib, as it causes build loop cracklib <-> translation-update-upstream #!BuildIgnore: cracklib libcrack2 License: GPL-2.0-or-later Group: System/Localization Provides: translation-update-tool Source: %{name}-%{version}.tar.bz2 Source1: %{name}.in Source2: %{name}-AUTHORS Source3: %{name}-COPYING Source4: %{name}-README Source5: %{name}-HOWTO Source6: msgheadermerge Source7: msgheadermerge-compose Source8: msgheadermerge-parse Source9: msgheadermerge-empty.pot Source10: %{name}-embedded-README Source11: translation-update-mandatory-%{version}.tar.bz2 Patch: %{name}-embedded.patch # Files below are package maintainer tools, not used for package build: Source50: upstream-collect.sh Source51: upstream-collect.conf Source52: upstream-collect-template.hook Source53: create-tlst-step1-list-all-po-projects.sh Source54: create-tlst-step2-create-gnome_gtp.sh Source55: create-tlst.conf Source56: translation-update-upstream-to-translation-update.sh Source57: translation-update-static.tar.bz2 Source58: check-translation-completeness.sh # Configuration files for package maintainer tools: Source60: upstream-gnome_gtp.tlst Source61: upstream-gnome_gtp.hook Source62: freedesktop_org.tlst Source63: lcn-sle.tlst Source65: misc.tlst Source66: opensuse.tlst Source67: static.tlst Source69: github.tlst Source70: upstream-gnome_gtp-not-on-media.tlst BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: coreutils Requires: gettext-tools Requires: grep Requires: intltool Requires: sed BuildArch: noarch %description This is a tool providing update of translations using available upstream resources. The tool tool is intended for use during package compilation as a first command after unpacking of source code. For more see README and HOWTO. This package also includes translation update data files. %prep %setup -q -T -a0 -a11 -c %{name}-%{version} cp -a %{S:1} translation-update-upstream.in cp -a %{S:2} AUTHORS cp -a %{S:3} COPYING cp -a %{S:4} README cp -a %{S:5} HOWTO cp -a %{S:6} %{S:7} %{S:8} %{S:9} . cp -a %{S:10} translation-update-upstream-embedded.README sed 's:@DATADIR@:%{_datadir}:g;s:@LIBEXECDIR@:%{_prefix}/lib:g' translation-update-upstream sed 's/@LIBEXECDIR@/\$BASE_DIR/g;s:@DATADIR@/translation-update-upstream:\$BASE_DIR/translation-update-upstream/po:g;s/translation-update-upstream\./translation-update-upstream-embedded./g' translation-update-upstream-embedded.sh %patch chmod +x translation-update-upstream-embedded.sh %build . %{_sourcedir}/upstream-collect.conf %install mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} $RPM_BUILD_ROOT%{_prefix}/lib/translation-update-upstream cp -a po po-mandatory $RPM_BUILD_ROOT%{_datadir}/%{name} install -d $RPM_BUILD_ROOT%{_bindir} install translation-update-upstream $RPM_BUILD_ROOT%{_bindir}/ install -m0755 msgheadermerge msgheadermerge-compose msgheadermerge-parse $RPM_BUILD_ROOT%{_prefix}/lib/translation-update-upstream/ install -m0644 msgheadermerge-empty.pot $RPM_BUILD_ROOT%{_prefix}/lib/translation-update-upstream/ ln -s translation-update-upstream $RPM_BUILD_ROOT%{_bindir}/translation-update-tool # # # obsolete or bad locales # # gnome-i18n says nds_NFE is wrong, remove until upstream clearified that rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/nds?NFE.po # # invalid locales # # should be @latin rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/*@Latn.po # should be nb rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/no.po # should be nb rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/no_nb.po # should be ar rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/ara.po # testing locale, should not appear in packages rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/en_IGID.po # short form of these locales should be used rm -fv $RPM_BUILD_ROOT%{_datadir}/%{name}/po/*/my_MM.po # these are nonsenses #rm -v $RPM_BUILD_ROOT%{_datadir}/%{name}/po/glib-networking/master.po #rm -v $RPM_BUILD_ROOT%{_datadir}/%{name}/po/glib20/glib.glib-2-30.gu.po # # go through valid locales and fail in invalid ones # set +x cd $RPM_BUILD_ROOT%{_datadir} ; echo translation*/*/*.po | sed 's:.*/::;s:\.po$::' | sort -u for LOCALE in $(set +x ; cd $RPM_BUILD_ROOT%{_datadir} ; ls -1 translation*/*/*/*.po | sed 's:.*/::;s:\.po$::' | sort -u) ; do if ! test -d /usr/share/locale/$LOCALE ; then for file in $RPM_BUILD_ROOT%{_datadir}/translation*/*/*/$LOCALE.po; do # fake it so it looks like removed from %%find_lang package=$(echo $file | sed -e 's,.*translation[^/]*/po/,,; s,/[^/]*.po,,') echo -n "removing translation /usr/share/locale/$LOCALE/LC_MESSAGES/$package.mo: " msgfmt -o - $file | msgunfmt -o - -| msgfmt --statistics -o /dev/null - done fi done %clean rm -rf $RPM_BUILD_ROOT %files %defattr (-,root,root) %doc AUTHORS COPYING README HOWTO %{_bindir}/* %{_datadir}/%{name} %{_prefix}/lib/translation-update-upstream %changelog * Tue Mar 10 2020 sbrabec@suse.com - Reset outdated translations and turn translate-update-upstream into dummy (bsc#1172337, boo#1172367). - Drop SLE / Leap discrimination code. - translation-update-upstream.in: * Disable msgmerge. Never cause translation regression, even at cost of superfluous strings (bsc#1160114). * Implement new heuristic: use xgettext. Make it the default (bsc#1160114). * translation-update-upstream-embedded.patch: Update. - upstream-collect.sh supplementary script: Port translation-update-upstream.in changes. * Tue Nov 5 2019 sbrabec@suse.com - upstream-collect.sh supplementary script: Port meson support to the fallback pot extractor (bsc#1095368#c9). - upstream-collect.sh, upstream-collect.conf supplementary script: Evaluate %%is_opensuse for target system instead of host (bsc#1095368#c8). * Wed Oct 2 2019 sbrabec@suse.com - Update to version 20191002 (bsc#1095361, bsc#1095364, bsc#1095368, bsc#1095371, bsc#1095377, bsc#1095379): * Update configuration to be SLE15 SP1 Update compatible. * Add new upstream branches to tlst files. * Update create-tlst-step2-create-gnome_gtp.sh to cover new upstream branches. * Update all strings from upstream and LCN. - upstream-collect.sh supplementary script: Make paths compatible with Tumbleweed. * Fri Mar 29 2019 sbrabec@suse.com - Update to version 20190328: * Translation updates. * Mon Dec 10 2018 sbrabec@suse.com - translation-update-upstream.in: Restore time stamp to prevent triggering of aclocal (boo#1118603). * Refresh translation-update-upstream-embedded.patch. - Add a check that prevents build of SLE version for openSUSE. * Wed Nov 28 2018 sbrabec@suse.com - Update to Factory specific version 20181128 that contains only abandoned packages in static.tlst (bsc#1100398). * .tlst: Port from SLE15 SP1: - Comment upstream-collect.conf. - upstream-collect.sh supplementary script: * Make paths compatible with Tumbleweed. * Add support for .tar.xz files. - Improved create-tlst scripts to work with standard DVD medium (create-tlst-step1-list-all-po-projects.sh, create-tlst-step2-create-gnome_gtp.sh, create-tlst.conf), add upstream-gnome_gtp-not-on-media.tlst. - Move libgnomecanvas dropped in upstream to translation-update-static.tar.bz2. - Add github.tlst. * Wed May 2 2018 sbrabec@suse.com - Improve meson/ninja domain detection (boo#1091307). * Fri Apr 27 2018 sbrabec@suse.com - Implement support for meson/ninja build system (fixes missing translations in nautilus, bsc#1087076, upstream-collect.sh, translation-update-upstream.in, translation-update-upstream-embedded.patch). - Update to version 20180426: * Update for translation-update-upstream fixes (bsc#1087076). * Correct files from meson/ninja based builds. * Tue Apr 10 2018 sbrabec@suse.com - Update to version 20180410: * Reflect latest package updates (e. g. gtk3, bsc#1087126). * Update for translation-update-upstream fixes (bsc#1086036#c13). * Package is now SLE 15 specific. Update *.tlst to exclude openSUSE-only packages. - Configure upstream-collect.conf to SLE 15. * Mon Apr 9 2018 sbrabec@suse.com - Update to version 20180313.2: * Add upstream eiciel to misc.tlst, remove merged downstream from lcn-sle.tlst. * Update eiciel (bsc#1087321). * Wed Mar 28 2018 sbrabec@suse.com - Refresh gdm after dropping of gdm-nb-translations.patch (bump version to 20180313.1, boo#1087338). * Tue Mar 13 2018 sbrabec@suse.com - Updated strings from the latest upstream translations and for the latest Factory snapshot (version 20180313). - create-tlst-step2-create-gnome_gtp.sh: * Use latest branches. * Add code matching NetworkManager plugins (bsc#989505). - create-tlst.conf: Switch to x86_64. - misc.tlst: * Add firewalld (bsc#1082309, bsc#1081815, bsc#1081623, bsc#1081625, bsc#1081823). * Add virt-manager (bsc#1081541). - lcn-sle.tlst: Remove dropped packages. - upstream-collect.sh: Remove more macros in rpmprep. * Fri Aug 21 2015 sbrabec@suse.com - upstream-collect.sh supplementary script: Prevent plural form clash in case of additions only (bsc#894913). * Thu Sep 4 2014 sbrabec@suse.cz - upstream-collect.sh supplementary script: Fixed inverted po file age check (bnc#889513). - create-tlst-step2-create-gnome_gtp.sh: Add support for udisks. - Reset translation tarballs: use only packaged translations. * Tue May 6 2014 sbrabec@suse.cz - New supplementary script: check-translation-completeness.sh that creates statistics of translation completeness. - Merge latest upstream-collect.sh fixes from SLE11 SP3: * Re-add all strings lost after removal from upstream (bnc#807817#c15). * Do incremental update by default to prevent loss of strings removed from upstream (bnc#807817#c15). * Fix errors in debug mode. - Merge latest translation-update-upstream-to-translation-update.sh fixes from SLE11 SP3: * rewrote to include strings from gnome-patch-translation (bnc#807817, bnc#811265). * Fri Apr 25 2014 schwab@linux-m68k.org - Only process PO header in msgheadermerge * Wed Apr 23 2014 dmueller@suse.com - speed up msgheadermerge by factor 20-25 * Wed Mar 13 2013 sbrabec@suse.cz - Supplementary scripts update: * GTP: Update to the new GTP web engine. * Fri Mar 8 2013 sbrabec@suse.cz - Remove glib.glib-2-30.gu.po file that comes from GTP (bnc#808436). * Thu Feb 14 2013 sbrabec@suse.cz - Improve supplementary script translation-update-upstream-to-translation-update.sh to fit well for SLE, openSUSE and SLE service packs. * Thu Feb 14 2013 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest 12.3 snapshot. * Thu Jan 24 2013 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest Factory snapshot. - Supplementary scripts improvements: * Validate all imported po files before merge. * Try harder to make plural forms consistent. * Collect full translations of all projects. * Create a domain map. * Added a script that makes possible to prepare translations for post-install translation-update package. * Support for pending translation fixes. * "static" method for update from attached tarball (needed if upstream disappeared) * Mon Aug 6 2012 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest 12.2 snapshot. - Reflect migration of LCN from Berlios to svn.opensuse.org. - Supplementary scripts fix: * Fixed name of archive. * Integrate strings from SLE11 SP2. * Mon Feb 13 2012 coolo@suse.com - patch license to follow spdx.org standard * Tue Oct 18 2011 sbrabec@suse.cz - Supplementary scripts improvement: * Fixed partial mandatory update. * Fri Oct 14 2011 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest Factory. - Supplementary scripts improvement: * Keep pot file in place, so "true" can be used as a pot generator. * Wed Sep 7 2011 sbrabec@suse.cz - Supplementary scripts improvements: * Support for pot-only run (COLLECT_UPSTREAM=false). * Implemented check for possible strings in patches. * Support for import of strings from different gettext domain. * Allow to skip time consuming update by setting SKIP_TUU=true. * Thu Jul 7 2011 sbrabec@suse.cz - Don't process .reduced.po files from GTP (bnc#703739). * Fri Jun 24 2011 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest Factory. - COPYING file update. * Tue May 24 2011 coolo@novell.com - fake %%find_lang as if the translations are provided by the packages * Wed Feb 23 2011 sbrabec@suse.cz - Added translations for more packages (bnc#673924). - Supplementary scripts improvements: * Improved support for partial translations update. * Added support for parallel processing of po files. * Do not generate empty new translations. * Use gettext-tools instead of sed hacks. * Mon Feb 14 2011 sbrabec@suse.cz - Updated strings from the latest upstream translations and for the latest Factory. * Tue Dec 14 2010 sbrabec@suse.cz - Validate locales and remove invalid ones (bnc#658999). * Mon Jun 14 2010 sbrabec@suse.cz - Fixes of build failures: * Edit configure* only if po/LINGUAS does not exist. * Support LINGUAS list in a single line. - Added the latest upstream and LCN strings. * Fri Jun 4 2010 sbrabec@suse.cz - Added the latest upstream and LCN strings. - Ported fixes from SLE11-SP1: * Added support for custom pot generator. * Implemented suppport for LCN as a translation source. * Implemented mandatory sources with absolute precedence. * Symlinks to the new name: translation-update-tool. * Updated translation sources. * Tue Feb 2 2010 sbrabec@suse.cz - Use dummy tarball before version freeze. - Migration of servers from Novell Forge to Berlios. - Supports newer version of cgit. - Support for multiple osc sources. - Support for extracting new and changed strings for review. - Never overwrite strings by po file with older time stamp. * Tue Oct 27 2009 sbrabec@suse.cz - Added several more packages. - Fixed errors if one package has updates on more servers. - Do not interfere with gnome-patch-translation (bnc#517629#c17). - Added translation-update-upstream-embedded script (src rpm only). * Fri Oct 9 2009 sbrabec@suse.cz - Updated for the latest Factory and collected fresh translations. - Fixed bugs in merge that caused lost strings (bnc#517629#c12). - Implemented git, git web and GNOME Translation Project support. - GNOME SVN is obsolete, migrate to GNOME Translation Project. - Fixed for new RPM. - Support for multiple domains in a single package. - Generate non-volatile POT time stamps (bnc#489139). - Ignore update if it is older than the package. * Thu Mar 26 2009 sbrabec@suse.cz - Reset mostly outdated translations until next freeze. * Wed Feb 11 2009 sbrabec@suse.cz - Modularization of package lists. - Make possible update of a single translation. - Added pidgin. * Fri Feb 6 2009 sbrabec@suse.cz - New SuSE package (FATE#301344).