Skip to content

Conversation

@msirringhaus
Copy link
Collaborator

This isn't great yet, but it's working.

Esp. running meson compile credentialds-ui-pot throws a bunch of warnings/errors, but it actually does the right thing. I'm not really used to meson, so I may be holding it wrong somewhere.

Also, I have found no nice way to auto-fill some of the field that xgettext() creates for the pot-file (like which license we use). So these get overwritten now with every meson compile credentialds-ui-pot and have to be manually reverted.

And finally: I also have found no way to exclude some strings (e.g. translatable=no|false|etc. does not work), so these also have to be manually removed after the generation step.

@msirringhaus msirringhaus requested a review from iinuwa October 15, 2025 13:26
Copy link
Member

@AlfioEmanueleFresta AlfioEmanueleFresta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff! 🗺️

Copy link
Member

@AlfioEmanueleFresta AlfioEmanueleFresta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

iinuwa
iinuwa previously approved these changes Nov 14, 2025
Copy link
Member

@iinuwa iinuwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting so much work into this: this will really help us expand our reach.

I'm not familiar with managing internationalization with gettext, so I can't give much more feedbacl. I just had one question below.

"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#. Insert your license of choice here
#. <project_license>LGPL-3.0-only</project_license>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain more about the issue that occurs here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running meson compile credentialsd-ui-pot, the license-field gets automatically filled with MIT, and one has to manually revert that change back to LGPL, before committing.
I have not found a way to tell gettext to use the correct license here when it auto-generates the file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we skip checking in this file? In another project where we use gettext, we only check in the .po files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, yes. But the .po-files have the same problem with the license-string.
And it may be a tiny bit easier to add new languages with the pot-file there (although that may be debatable).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other project, msgmerge which update the .po file doesn't enforce any license on the .po file. I'll try your branch later today and see if I can tame the tools here as well ;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I looked closer into this. It is actually not any metadata about the project, it's only some surrounding context to help the translator for the next string to translate, "Credential Manager". It's extracted from data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in so that's where we should change.

I'm not sure if the strings in data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in are translated in the app so maybe easier to just remove that file from credentialsd-ui/po/POTFILES.in

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wow. Now that you say it, it's so obvious. 🤦
Thank for digging into that! That file needs to be reworked completely anyways. I'm leaving it in for now.

@iinuwa
Copy link
Member

iinuwa commented Nov 28, 2025

Merged in 0f77670. Closing.

Thank you!

@iinuwa iinuwa closed this Nov 28, 2025
@iinuwa iinuwa mentioned this pull request Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants