Adding po files to source tarball (Re: 3.0.1, 3.1 release schedule and contents)

Friedrich W. H. Kossebau kossebau at kde.org
Mon Jul 4 11:44:06 UTC 2016


Hi,

Am Samstag, 25. Juni 2016, 16:50:25 CEST schrieb Boudewijn Rempt:
> On Sat, 25 Jun 2016, Dmitry Kazakov wrote:
> > Hi, Boud!
> > 
> > I can try to refactor the translations building script into something
> > making source tree instead. It is not difficult. But i need to know what
> > format the language tree should be?
> 
> Well, the thing is: there is something for that already. It's used for
> the KF5 releases, and ties in with the CMakeLists.txt in the kf5 projects.
> I just haven't had time to figure it out -- but we shouldn't do that
> all over again by ourselves, we should reuse what's there.
> 
> So I'm cc'ing kde-i18n-doc at kde.org -- maybe someone else can help us out
> here.

There are two things to be done here when it comes to having the po files as 
part of the the source tarball:

a) getting the po files from the server and putting them at the right places 
into the source tree before creating the tarball itself

b) adding instructions to the CMakeLists.txt to create binary versions of the 
po files (the mo files) and install them in the proper locations.


For a), when using the ki18n_install macro from KI18N for generatig the mo 
files on building and installation (which only makes sense), see for the 
structure needed the API dox inside the macro file (sadly not yet generated on 
api.kde.org):
	http://commits.kde.org/ki18n?path=cmake/KF5I18NMacros.cmake#l106
(or locally the file at /usr/lib64/cmake/KF5I18n/KF5I18NMacros.cmake or 
similar)

For b) the script Luigi pointed to, create_tarball_kf5.rb, e.g. does this:
	# add l10n to compilation.
	`echo "find_package(KF5I18n CONFIG REQUIRED)" >> CMakeLists.txt`
	`echo "ki18n_install(po)" >> CMakeLists.txt`

Some projects also have this directly as part of the normal toplevel 
CMakeLists.txt, and simply check if there is a po/ subdir existing:
	if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
		ki18n_install(po)
	endif()
That might make it even easier for any developer to quickly throw in some 
current po file in the respective folder and get the mo file installed on 
their system.


Next to a) & b), currently translations seem to have not yet been setup to 
also be done for the "krita/3.0" branch. Right now string extraction only 
happens for master. See separate email.

Once done, everything handling po files for releases of the stable Krita 
version (3.0.*) or documentation about it would need to be adapted.
E.g. https://phabricator.kde.org/T2122 needs to be change to no longer point 
to http://l10n.kde.org/stats/gui/trunk-kf5/team/ (that would be "master" 
branch catalogs), but http://l10n.kde.org/stats/gui/stable-kf5/team/ (that 
would be then "krita/3.0" branch catalogs).

Cheers
Friedrich


More information about the kimageshop mailing list