#16 Enabling translations for fedoraloveskde.org
Closed 2 years ago by jibecfed. Opened 2 years ago by carlschwan.


Fedora is sponsoring Akademy this year, and the KDE SIG produced a splash site about why Fedora loves KDE. The website is translatable and I would be awesome if we could hook this up with fedora weblate system.

The repo is located at https://pagure.io/fedora-kde/fedoraloveskde.org. I'm a bit unfamiliar with how translations and websites in general work in fedora. Should I create a po directory and put the .pot file in it and let weblate pick it up? or is there a better way to do it?

In practice I have some python scripts for generating pot files from markdown files and markdown files from the translated po files that I use for the kde websites. But this will probably be too much work for now and I can just run it manually.

cc @ngompa

Hallo Carl, great initiative!

there is multiple easy things to define:
where is the source template to translate
where are the translated files
what's the file format
what the refresh rate of the source template
what's the publication method

we'll answer to all this one by one, let's start by the format as it is th=
e more impacting on dev work=2E

what can you do with the tool you selected?
(you ask about fedora website: we have babel to extract translatable strin=

Hi Jean-Baptiste,

where is the source template to translate

I pushed the template to the po folder in https://pagure.io/fedora-kde/fedoraloveskde.org/tree/main

where are the translated files

To make it easy to manage it would be great if the translated po files are put in the po folder

what's the file format

Po/pot generated with https://invent.kde.org/websites/hugo-i18n

what the refresh rate of the source template

In theory, it shouldn't change much after Akademy 2021

what's the publication method

I push the build artifacts to the public folder in the staging and production branches. I'm not that happy with that but it was a lot easier to deploy that way on the rhel7 in the time constraints. So once I have the translated po files I can also generate the translated pages.

what can you do with the tool you selected?

Not sure what you mean by that. It's just Hugo with the translations extractor used for kde.org, timeline.kde.org, okular.kde.org and a few other translatable kde websites. I mostly choose it because I was familiar with it and had a very small timeframe to do the website.

Merci :)

I created this a few days/weeks ago: https://translate.fedoraproject.org/projects/fedoraloveskde-org/

but there is an issue with Pagure communication, I just asked for Weblate support to give it a look

you are admin of this project

I just added Weblatebot as authorized users in the pagure repo, maybe that help?

we can configure weblate to do direct commits, like we do for websites, but=
it will increase the number of commits=2E

we can mitigate by telling weblate to rebase the repository to merge chang=
es by contributors=2E

if you wish to do so, configure weblate component to use Git instead of pa=
gure, and give it an ssh+git url=2E
should work fine

It now works: https://pagure.io/fedora-kde/fedoraloveskde.org/commits/main

I'm an expert in configuring Weblate, I did not realize it was complex to properly do this

sorry about that!

Metadata Update from @jibecfed:
- Issue status updated to: Closed (was: Open)

2 years ago

Thanks for configuring it :D I will take care of setting a cron job tonight for manually rebuilding the websites when the translations get updated

Login to comment on this ticket.