Blueprint files aren't being translated

Hi,

A few weeks ago, I made this pull request for the app Curtail: Convert UI files to Blueprint by ARAKHN1D · Pull Request #313 · Huluti/Curtail · GitHub . It converted the UI files to Blueprint.

A few days ago, we realized translations in the Blueprint files weren’t being applied.

I’ve spent some time trying to debug this, but I’m unsure what the problem could be. The strings are marked as translatable, the POTFILES file has been updated, and the po files have been getting updated. But, they’re still not appearing in the UI.

Any help here would be appreciated. Thank you!

I’m having a hard time thinking of something that would work for XML files but break for Blueprint…

I checked how translations are loaded in curtail.in, and the only difference in my setup is that I run both locale.bindtextdomain and locale.textdomain.

So maybe change:

locale.bindtextdomain('curtail', localedir)

to:

locale.bindtextdomain('curtail', localedir)
locale.textdomain('curtail')

Another thing I saw is that curtail.pot still points to the .ui files, not the .blp files.

Hi,

I don’t know much about blueprint, but I suppose you need to specify the translation domain in each blp file that contains translatable strings.

The locale.textdomain change fixed it, thanks! I guess I did miss something.