forked from pool/gnome-patch-translation
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-patch-translation?expand=0&rev=26
This commit is contained in:
parent
f34793b2e5
commit
18ec52fc60
110
HOWTO
110
HOWTO
@ -1,79 +1,73 @@
|
|||||||
This package is intended for collection of translation strings in
|
scripts for gnome-patch-translation maintainers
|
||||||
patches and merging translations back to packages.
|
===============================================
|
||||||
|
|
||||||
It works only with packages using intltool for translation.
|
HOW TO UPDATE TRANSLATIONS
|
||||||
|
|
||||||
It contains:
|
Scripts for gnome-patch-translation package maintainers are intended to
|
||||||
|
update package from forge, then update translations from latest package
|
||||||
|
shapshots and then merge them back to forge.
|
||||||
|
|
||||||
gnome-patch-translation-prepare: This tool collects strings from
|
Note that in difference to all other packages, gnome-patch-translation
|
||||||
intact package.
|
provides fuzzy strings from upstream translations not present in the po
|
||||||
|
file.
|
||||||
|
|
||||||
gnome-patch-translation-update: Using previously collected strings, this
|
These scripts are intended to be started from inside directory
|
||||||
tool:
|
containing unpacked sources of gnome-patch-translation. Please also see
|
||||||
- Collects actual strings in patches into gnome-patch-translation/
|
HOWTO in gnome-patch-translation sources.
|
||||||
sub-directory in build directory.
|
|
||||||
- Prepares fuzzy translations for existing translations.
|
|
||||||
(only if COMPENDIUM_UPDATE_MODE=1)
|
|
||||||
- Updates actual translations in po/ using translations from
|
|
||||||
gnome-patch-translation package.
|
|
||||||
|
|
||||||
gnome-patch-translation-files.tar.bz2: Files created by
|
|
||||||
COMPENDIUM_UPDATE_MODE=1 gnome-patch-translation-update collected from
|
|
||||||
all needed packages.
|
|
||||||
|
|
||||||
gnome-patch-translation.tar.bz2: Translation files provided by
|
Run scripts in following order:
|
||||||
translators.
|
|
||||||
|
|
||||||
gnome-patch-translation-merged and /usr/share/gnome-patch-translation
|
|
||||||
(autogenerated): It contains merged files, which will be used for
|
./update-step1-update-translations-from-lcn (calls gnome-patch-translation-from-forge):
|
||||||
translation. These files should be sent to translators for update.
|
|
||||||
|
Collects translations from LCN and updates gnome-patch-translation.tar.bz2.
|
||||||
|
|
||||||
|
|
||||||
|
./update-step2-update-strings-from-packages (calls gnome-patch-translation-collect):
|
||||||
|
|
||||||
|
Collects strings in patches.
|
||||||
|
|
||||||
|
You need following special tools: osc svn
|
||||||
|
|
||||||
|
|
||||||
|
./update-step3-upload-strings-to-lcn (calls gnome-patch-translation-to-forge):
|
||||||
|
|
||||||
|
Picks updated translations and fuzzy files and puts them back to forge.
|
||||||
|
|
||||||
|
After successful call please call
|
||||||
|
|
||||||
|
./update-step1-update-translations-from-lcn
|
||||||
|
|
||||||
|
once again.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HOW TO PREPARE PACKAGE FOR TRANSLATION
|
If gnome-patch-translation-to-forge fails due to third party commits
|
||||||
|
during gnome-patch-translation-collect run, run script:
|
||||||
|
|
||||||
1) Search for candidates on unpacked source packages:
|
./update-solve-upload-conflict
|
||||||
( find -name '*patch*' ; find -name '*dif*' ) | xargs fgrep '_("' | less | grep ':[+-]' | less
|
|
||||||
|
|
||||||
2) Include selected packages to gnome-patch-translation.
|
Then you can continue with
|
||||||
|
|
||||||
You have to do following changes in the spec file:
|
./update-step3-upload-strings-to-lcn
|
||||||
|
|
||||||
...
|
|
||||||
+BuildRequires: gnome-patch-translation
|
|
||||||
...
|
|
||||||
%prep
|
|
||||||
%setup
|
|
||||||
+gnome-patch-translation-prepare
|
|
||||||
...
|
|
||||||
%patch
|
|
||||||
...
|
|
||||||
+gnome-patch-translation-update
|
|
||||||
|
|
||||||
3) You have to update gnome-patch-translation package, if any
|
|
||||||
translatable string is changed in any patch.
|
|
||||||
|
|
||||||
Call %prep phase of the package, copy contents of
|
|
||||||
gnome-patch-translation/ to the gnome-patch-translation package, file
|
|
||||||
gnome-patch-translation-files.tar.bz2.
|
|
||||||
|
|
||||||
4) See Novell Forge LCN repository and update
|
|
||||||
gnome-patch-translation-collect from translation collection tools:
|
|
||||||
https://forgesvn1.novell.com/svn/suse-i18n/trunk/lcn/50-tools
|
|
||||||
|
|
||||||
|
|
||||||
HOW TO PROVIDE TRANSLATIONS
|
|
||||||
|
|
||||||
See Novell Forge LCN repository for more:
|
gnome-patch-translation-from-forge:
|
||||||
https://forgesvn1.novell.com/svn/suse-i18n
|
|
||||||
|
|
||||||
If you plan to update translations, you should use Novell Forge LCN
|
You can optionally repeat its run to merge new strings to the package.
|
||||||
translation tools.
|
If you will not do it, next changelog checker will consider files as
|
||||||
https://forgesvn1.novell.com/svn/suse-i18n/trunk/lcn/50-tools
|
changes and you will have to check manually, which changes were provided
|
||||||
|
by translators.
|
||||||
|
|
||||||
After using tools, submit updated package for Factory.
|
|
||||||
|
|
||||||
Tools performs following steps:
|
After using tools, submit updated packages!
|
||||||
|
|
||||||
|
|
||||||
|
DETAILS
|
||||||
|
|
||||||
|
Tools perform following steps for you:
|
||||||
|
|
||||||
1) Collect all files created by COMPENDIUM_UPDATE_MODE=1
|
1) Collect all files created by COMPENDIUM_UPDATE_MODE=1
|
||||||
gnome-patch-translation-update in all included packages. They are picked
|
gnome-patch-translation-update in all included packages. They are picked
|
||||||
@ -82,7 +76,7 @@ by calling %prep phase of rpmbuild.
|
|||||||
2) Use upper mentioned files to update
|
2) Use upper mentioned files to update
|
||||||
gnome-patch-translation-files.tar.bz2
|
gnome-patch-translation-files.tar.bz2
|
||||||
|
|
||||||
3) Build this package (it is enough to unpack archives and call
|
3) Prepare this package (it is enough to unpack archives and call
|
||||||
"sh gnome-patch-translation-merge").
|
"sh gnome-patch-translation-merge").
|
||||||
|
|
||||||
4a) If there is not yet any translation for particular language, pick
|
4a) If there is not yet any translation for particular language, pick
|
||||||
|
70
README
Normal file
70
README
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
This package is intended for collection of translation strings in
|
||||||
|
patches and merging translations back to packages.
|
||||||
|
|
||||||
|
It works only with packages using intltool for translation.
|
||||||
|
|
||||||
|
It contains:
|
||||||
|
|
||||||
|
gnome-patch-translation-prepare: This tool collects strings from
|
||||||
|
intact package.
|
||||||
|
|
||||||
|
gnome-patch-translation-update: Using previously collected strings, this
|
||||||
|
tool:
|
||||||
|
- Collects actual strings in patches into gnome-patch-translation/
|
||||||
|
sub-directory in build directory.
|
||||||
|
- Prepares fuzzy translations for existing translations.
|
||||||
|
(only if COMPENDIUM_UPDATE_MODE=1)
|
||||||
|
- Updates actual translations in po/ using translations from
|
||||||
|
gnome-patch-translation package.
|
||||||
|
|
||||||
|
gnome-patch-translation-files.tar.bz2: Files created by
|
||||||
|
COMPENDIUM_UPDATE_MODE=1 gnome-patch-translation-update collected from
|
||||||
|
all needed packages.
|
||||||
|
|
||||||
|
gnome-patch-translation.tar.bz2: Translation files provided by
|
||||||
|
translators.
|
||||||
|
|
||||||
|
gnome-patch-translation-merged and /usr/share/gnome-patch-translation
|
||||||
|
(autogenerated): It contains merged files, which will be used for
|
||||||
|
translation. These files should be sent to translators for update.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HOW TO PREPARE PACKAGE FOR TRANSLATION
|
||||||
|
|
||||||
|
1) Search for candidates on unpacked source packages:
|
||||||
|
( find -name '*patch*' ; find -name '*dif*' ) | xargs fgrep '_("' | less | grep ':[+-]' | less
|
||||||
|
|
||||||
|
2) Include selected packages to gnome-patch-translation.
|
||||||
|
|
||||||
|
You have to do following changes in the spec file:
|
||||||
|
|
||||||
|
...
|
||||||
|
+BuildRequires: gnome-patch-translation
|
||||||
|
...
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
+gnome-patch-translation-prepare
|
||||||
|
...
|
||||||
|
%patch
|
||||||
|
...
|
||||||
|
+gnome-patch-translation-update
|
||||||
|
|
||||||
|
3) You have to update gnome-patch-translation package, if any
|
||||||
|
translatable string is changed in any patch.
|
||||||
|
|
||||||
|
Call %prep phase of the package, copy contents of
|
||||||
|
gnome-patch-translation/ to the gnome-patch-translation package, file
|
||||||
|
gnome-patch-translation-files.tar.bz2.
|
||||||
|
|
||||||
|
4) See Novell Forge LCN repository and update
|
||||||
|
gnome-patch-translation-collect from translation collection tools:
|
||||||
|
https://forgesvn1.novell.com/svn/suse-i18n/trunk/lcn/50-tools
|
||||||
|
|
||||||
|
|
||||||
|
HOW TO PROVIDE TRANSLATIONS
|
||||||
|
|
||||||
|
See HOWTO in this package source.
|
||||||
|
|
||||||
|
See Novell Forge LCN repository for more:
|
||||||
|
https://forgesvn1.novell.com/svn/suse-i18n
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 4 19:14:00 CET 2008 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
- Package updating tools reworked and migrated to osc.
|
||||||
|
- Updated pl, pt_BR.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 22 13:51:22 CEST 2008 - sbrabec@suse.cz
|
Wed Oct 22 13:51:22 CEST 2008 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
20
gnome-patch-translation.conf
Normal file
20
gnome-patch-translation.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# gnome-patch-translation.conf: Configuration for
|
||||||
|
# updating of gnome-patch-translation package.
|
||||||
|
#
|
||||||
|
|
||||||
|
# URI of Novell Forge SVN LCN repository.
|
||||||
|
# It should contain string "$BRANCH", which will be replaced by the
|
||||||
|
# $LCN_BRANCH (see below).
|
||||||
|
FORGESVN_URI='https://forgesvn1.novell.com/svn/suse-i18n/$BRANCH/lcn'
|
||||||
|
|
||||||
|
# lcn branch on forgesvn
|
||||||
|
LCN_BRANCH=trunk
|
||||||
|
|
||||||
|
# osc repository with packages
|
||||||
|
OSC_REPOSITORY=openSUSE:Factory
|
||||||
|
|
||||||
|
# list of packages in gnome-patch-translation project
|
||||||
|
GPT_PACKAGES="gnome-control-center gconf-editor gdm gedit gnome-applets gnome-menus gnome-panel gnome-session gnome-utils gnome-vfs2 gtk gtk2 metacity nautilus xchat"
|
||||||
|
|
||||||
|
# osc server, empty for using of the osc default
|
||||||
|
OSC_APIURL=
|
@ -23,15 +23,21 @@ License: GPL v2 or later
|
|||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
Release: 210
|
Release: 211
|
||||||
Summary: Collect and Merge Translations From RPM Patches
|
Summary: Collect and Merge Translations From RPM Patches
|
||||||
Source: gnome-patch-translation-files.tar.bz2
|
Source: gnome-patch-translation-files.tar.bz2
|
||||||
Source1: gnome-patch-translation.tar.bz2
|
Source1: gnome-patch-translation.tar.bz2
|
||||||
Source2: HOWTO
|
Source2: README
|
||||||
Source3: gnome-patch-translation-prepare
|
Source3: gnome-patch-translation-prepare
|
||||||
Source4: gnome-patch-translation-update
|
Source4: gnome-patch-translation-update
|
||||||
Source5: gnome-patch-translation-merge
|
Source5: gnome-patch-translation-merge
|
||||||
Source6: HEADER.pot
|
Source6: HEADER.pot
|
||||||
|
Source7: HOWTO
|
||||||
|
Source8: update-step1-update-translations-from-lcn
|
||||||
|
Source9: update-step2-update-strings-from-packages
|
||||||
|
Source10: update-step3-upload-strings-to-lcn
|
||||||
|
Source11: update-solve-upload-conflict
|
||||||
|
Source12: gnome-patch-translation.conf
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires: intltool
|
Requires: intltool
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -64,11 +70,14 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc HOWTO
|
%doc README
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_datadir}/gnome-patch-translation
|
%{_datadir}/gnome-patch-translation
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 04 2008 sbrabec@suse.cz
|
||||||
|
- Package updating tools reworked and migrated to osc.
|
||||||
|
- Updated pl, pt_BR.
|
||||||
* Wed Oct 22 2008 sbrabec@suse.cz
|
* Wed Oct 22 2008 sbrabec@suse.cz
|
||||||
- Updated da, de, en_US, es, gl, hr, hu, it, ja, km, ko, nb, nl,
|
- Updated da, de, en_US, es, gl, hr, hu, it, ja, km, ko, nb, nl,
|
||||||
pl, pt_BR, ro, uk, wa, zh_CN.
|
pl, pt_BR, ro, uk, wa, zh_CN.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f1400151db7a530132f68a98d42323a1ccd1f9fc6ba73c01d24228b0b40bea47
|
oid sha256:fc18900aa873fb50cb0796a93cebdf23f4f90b93aa8a9688f49b9d61c06b7092
|
||||||
size 376736
|
size 376579
|
||||||
|
19
update-solve-upload-conflict
Normal file
19
update-solve-upload-conflict
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fail on errors:
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! test -x 50-tools/gnome-patch-translation-collect ; then
|
||||||
|
echo "ERROR: 50-tools/gnome-patch-translation-collect is missing.
|
||||||
|
Please call update-step1-update-translations-from-lcn."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. gnome-patch-translation.conf
|
||||||
|
|
||||||
|
export CALLING_FROM_G_P_T=1
|
||||||
|
export FORGESVN_URI LCN_BRANCH OSC_REPOSITORY GPT_PACKAGES OSC_APIURL
|
||||||
|
|
||||||
|
# And then run needed scripts:
|
||||||
|
50-tools/gnome-patch-translation-from-forge
|
||||||
|
exec 50-tools/gnome-patch-translation-remerge
|
17
update-step1-update-translations-from-lcn
Normal file
17
update-step1-update-translations-from-lcn
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fail on errors:
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Read the config?
|
||||||
|
. gnome-patch-translation.conf
|
||||||
|
BRANCH=$LCN_BRANCH
|
||||||
|
|
||||||
|
# First of all, read set of update tools from SVN:
|
||||||
|
eval svn co $FORGESVN_URI/50-tools
|
||||||
|
|
||||||
|
export CALLING_FROM_G_P_T=1
|
||||||
|
export FORGESVN_URI LCN_BRANCH OSC_REPOSITORY GPT_PACKAGES OSC_APIURL
|
||||||
|
|
||||||
|
# And then run gnome-patch-translation-from-forge
|
||||||
|
exec 50-tools/gnome-patch-translation-from-forge
|
15
update-step2-update-strings-from-packages
Normal file
15
update-step2-update-strings-from-packages
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fail on errors:
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! test -x 50-tools/gnome-patch-translation-collect ; then
|
||||||
|
echo "ERROR: 50-tools/gnome-patch-translation-collect is missing.
|
||||||
|
Please call update-step1-update-translations-from-lcn."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CALLING_FROM_G_P_T=1
|
||||||
|
|
||||||
|
# And then run gnome-patch-translation-collect
|
||||||
|
exec 50-tools/gnome-patch-translation-collect
|
15
update-step3-upload-strings-to-lcn
Normal file
15
update-step3-upload-strings-to-lcn
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Fail on errors:
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! test -x 50-tools/gnome-patch-translation-collect ; then
|
||||||
|
echo "ERROR: 50-tools/gnome-patch-translation-collect is missing.
|
||||||
|
Please call update-step1-update-translations-from-lcn."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CALLING_FROM_G_P_T=1
|
||||||
|
|
||||||
|
# And then run gnome-patch-translation-to-forge
|
||||||
|
exec 50-tools/gnome-patch-translation-to-forge
|
Loading…
x
Reference in New Issue
Block a user