KDE.org internalization

Carl Schwan carl at carlschwan.eu
Thu Oct 22 20:04:27 BST 2020


Hello everyone,
I have been doing quite a bit of work on the kde.org website finishing
the port to the Hugo static website generator that was started by Anuj
during his GSoC.

The new system provides a better internalization system and this
should allow translating a bigger part of the kde.org, creating an unique
URL for each language (better for search engines), no need to
individually tag each strings for translations, and add global language
selector. There are also some other advantages like editing markdown
instead of html/php for the promo team, autogenerated announcement
listing, SEO tag included on every page, ...

The migration is planned for this weekend. I still need to notify the
release team and adapt their release scripts to create a correct file
and also do a last checkup to make sure I didn't break anything during
the migrations.

Now the bad news is that the move will break some strings and add a lot
of new strings. The strings that will break are mostly focused on the
Plasma 5.0, Plasma 5.1 and Plasma 5.10 which had some really bad i18n()
call and trying to make the old strings compatible with the new format
would have required writing a complex custom extractor just for these
pages.

Most of the new strings are the page titles that were previously not
translated, but not only.

I found that often the interesting information from the framework announcements
weren't translated because this was added manually (e.g. announcing a new framework).

Same the plasma 5.7 announcement was also only partially translatable and
it will be now completely available for translations. Again it would be
quite complex to try to remain compatible with the old partially
translated page :(

To keep the compatibility between the old translations with the new strings
I wrote a small script. https://invent.kde.org/websites/kde-org/-/blob/work/hugo-script/port.py

I tested it on all the translations and it works now (I found a few small
issues with invalid HTML tags that I have now fixed).

That I would need help is merging the kde-org-announcements-releases po
files into the kde-org one (this change will merge both repositories).

All the special handling for generating the translations can also be
removed and replaced by the system using StaticMessages.sh.

And it would be probably a good idea to not touch this po files during
the big migrations.

My goal is also to have the translations fetched at build time with the
ci, so that they don't get stored in the git repository.

For those interested, this is the link to the MR
 https://invent.kde.org/websites/kde-org/-/merge_requests/14

Cheers,
Carl



More information about the kde-i18n-doc mailing list