Making images translatable
Closed, ResolvedPublic


Ok, just making this task because my brain isn't here 100%

So, we thought we had figured out how to get images translated, but it seems we interpreted wrong.

We currently have images being pulled into the translation files with
gettext_additional_targets = ['image']

We need to keep this because it also allows translation alt-texts. But it also allows changing the path. @Abella informed me that changing the path didn't work for getting the translated image for him.

So, I did some investigation, and it turns out we need to set this config value:

figure_language_filename = "{path}{language}/{basename}{ext}"

but, this config value will translate a path like /images/file.png to /images/ca/file.png, without any modification of paths required, the stupid thing is that we've been using /images/en/file.png, which sphinx then tries to convert to /images/en/ca/file.png and reverts back to /images/en/file.png as it cannot find any.

So, I think I am going to need to figure out how to mass change all these paths first before we can have translation of images :D

woltherav triaged this task as High priority.
woltherav added a comment.EditedApr 17 2019, 1:48 PM

Some other things that need to be done...

index needs to be added to the gettext_additional_targets, so that the index terms can be translated. 'literal-block' might also need to be added, or we need to decide to avoid comments inside code blocks. I do not know if there's any strong feelings about this.

I also need to check other entries here:

And... I'll need to figure out if .. Topic:: should be avoided alltogether or whether it'll be made translatable if we use literal-block.

I am feeling myself however hit a limit, due to a combination of school, real life, and this, so I am going to delay this to the weekend and just take a break for the coming two days.

It might be helpful to ask Tobias Junghans from Veyon. He has recently configured Veyon's Sphinx with translations:

I will need to delay this further, I am actually burned out right now.

I have done this in the draft branch for now:

This way, the sudden change in all the files will be expected as the draft branch changes quite a bit anyway, and that should be less work for translation coordinators to update all the po files in one fell swoop... at the least, if I understand the translation system correctly.

Krita itself will go into the 4.2 string freeze on wednesday. I think the manual might have a few days delay just to get any potential last minute string changes documented. Hopefully this'll be comfortable for translators as well. As far as translating our huge manual is comfortable :D

Great job Wolthera!

Although I honestly have no idea what this is about, but thank you for the good work, Wolthera. I'll figure it out eventually after this is implemented. :)