KDE neon With Testing Translations

For the longest time, the plan was to equip KDE neon’s Developer Editions with translations. As the Developer Editions are built directly from our Git repositories and we do not maintain translations alongside the source code, there is a bit of a problem as the build somehow needs to bridge the gap between code and translations.

It’s fortunate that I also happen to work on ReleaseMe, a KDE tarball release application, and rebuilt it from scratch years ago already, so it supports third party usage of some of its functionality.

At this year’s FOSDEM, Plasma developer David Edmundson asked for translations in the Developer Editions. And, so, here we are. Both KDE neon Developer Editions now include translations live from our Subversion repository. They also include our x-test language allowing you to easily find improperly internationalized strings. Coverage is currently limited to KDE Frameworks and Plasma software.

The majority of tech to accomplish this is hidden in the internals of ReleaseMe itself. On the high-level this entails nothing more than resolving the KDE project and then getting its translations into the Git tree.

projects = ReleaseMe::Project.from_repo_url(url)
unless projects.size == 1
  raise "failed to resolve project #{repo_name} :: #{projects}"
end
project = projects[0]

l10n = ReleaseMe::L10n.new(l10n_origin, project.identifier,
project.i18n_path)
l10n.default_excluded_languages = [] # Include even x-test.
l10n.get(Dir.pwd)

(Underneath there’s, of course, lots of fiddly nonsense going on ;))

Enjoy!

Advertisements

2 thoughts on “KDE neon With Testing Translations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s