110 lines
4.0 KiB
Plaintext
110 lines
4.0 KiB
Plaintext
If you want to add translation-update-upstream support to a package
|
|
===================================================================
|
|
|
|
1) Add to preamble:
|
|
|
|
BuildRequires: translation-update-upstream
|
|
|
|
2) Immediately after %setup (and before possible
|
|
gnome-patch-translation-prepare) add command:
|
|
|
|
translation-update-upstream
|
|
|
|
3) Add configuration for this package to translation-update-upstream and
|
|
update translations.
|
|
|
|
|
|
If you want to update or add single translation
|
|
===============================================
|
|
|
|
Add a line to a proper configuration file (or create a new one -
|
|
anything with nale *.tlst is sourced automatically).
|
|
|
|
See upstream-collect.sh for implemented methods.
|
|
|
|
If your project uses a non-standard directory in the upstream directory
|
|
hierrarchy, you may need a code into a *.hook file.
|
|
|
|
Then run following command in unpacked sources directory:
|
|
|
|
./upstream-collect.sh {package_name}
|
|
|
|
where {package_name} is the name of the package you need to update.
|
|
|
|
Then you have to edit spec file to include new tarball, rebuild it and
|
|
rebuild the package using the new version of translation-update-upstream.
|
|
|
|
Note that the shapshot date of the package will not be updated, but
|
|
instead of it, a sub-version will be used.
|
|
|
|
You need osc, network connection, commands for all used download methods
|
|
(cvs, svn, git, wget) all commands needed to run %prep of packages
|
|
(e. g. patch or gnome-patch-translation) and network connection.
|
|
|
|
You need a lot of time. A complete run on ./upstream-collect.sh may
|
|
require 12 hours and several gigabytes of data downloaded.
|
|
|
|
|
|
If you want to update translations (short process: update translations only)
|
|
============================================================================
|
|
|
|
Run following command in unpacked sources directory:
|
|
|
|
bash ./upstream-collect.sh
|
|
|
|
It creates a tarball with translations updated by upstream using all
|
|
existing *.tlst filůes (configuration of packages) and
|
|
upstream-collect.conf (configuration of tool itself).
|
|
|
|
Then you have to edit spec file to include new tarball, rebuild it and
|
|
rebuild all packages using new version of translation-update-upstream.
|
|
|
|
You need osc, network connection, commands for all used download methods
|
|
(cvs, svn, git, wget) all commands needed to run %prep of packages
|
|
(e. g. patch or gnome-patch-translation) and network connection.
|
|
|
|
Note that ./upstream-collect.sh has a smart error recovery. If any of
|
|
actions fail, you can restart ./upstream-collect.sh without loss of
|
|
already collected data. Just an actual package is restarted.
|
|
|
|
|
|
If you want to update translations (long process: update configuration)
|
|
============================================================================
|
|
|
|
Just now the file upstream-collect.lst is automatically generated by
|
|
lower mentioned tools.
|
|
|
|
You need a complete binary RPM repository available on a filesystem and
|
|
refer to it in create-config.conf
|
|
|
|
Then you can run following command in unpacked sources directory:
|
|
|
|
# collect possible po domains from rpm packages
|
|
bash ./create-tlst-step1-list-all-po-projects.sh
|
|
# scan upstream branches
|
|
bash ./create-tlst-step2-create-gnome_gtp.sh
|
|
|
|
Then continue as above.
|
|
|
|
|
|
To extract relevant strings from translation-update-upstream to translation-update
|
|
==================================================================================
|
|
|
|
If you need to extract relevant strings from compile time merged
|
|
translation-update-upstream to post installation update
|
|
translation-update, you can use
|
|
translation-update-upstream-to-translation-update.sh. This tool requires
|
|
some outputs of the upstream-collect.sh run, especially po-full
|
|
directory that contains the best full translations available.
|
|
|
|
You need this command:
|
|
|
|
# extract strings from translation-update-upstream that will not be updated
|
|
./translation-update-upstream-to-translation-update.sh
|
|
|
|
The command uses first item in OSC_REPOSITORIES array in
|
|
upstream-collect.conf as your target distro. Any package that is not
|
|
present there will be considered for post installation update.
|
|
|
|
Add the generated tarball to translation-update package after the run.
|