Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Secret-chest
Copy link
Contributor

@Secret-chest Secret-chest commented Sep 14, 2025

This PR allows mo files for translations to plugins' XML file in a structure such as:

/usr/locale/
└── ro_RO
    └── LC_MESSAGES
        └── wf-plugin-vswipe.mo

Additionally, it makes the WCM's own UI use gettext so that it can be localised. I have also written PO files for Romanian.

ITS spec to generate the pot (using itstool) from a plugin XML

No changes to plugins or to their XML are required, but to be localised they will need to ship their own PO files as in the example above.

Checklists

Plugin support checklist

Other tasks

  • Write docs

@Secret-chest Secret-chest changed the title add support for translating plugin XML files add internationalisation Sep 14, 2025
@soreau
Copy link
Member

soreau commented Sep 14, 2025

This looks fine to me but code style needs fixing and I'd like to see at least one plugin with a po file, for testing before we merge this.

@Secret-chest
Copy link
Contributor Author

All the plugins will get po, don't worry :D, but that's why it's a draft

Copy link
Member

@soreau soreau left a comment

Choose a reason for hiding this comment

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

I am pleased to see these pull requests shading up to build infrastructure for translations in wcm. I just have one minor nitpick with the build system code. I will let you address what @NamorNiradnug has pointed out, as I can't really comment on these parts of the code. But perchance, @NamorNiradnug can offer a native language translation too.

@soreau
Copy link
Member

soreau commented Sep 15, 2025

I am linking this pixdecor pull request here, since it is serving as part of the test bed for the translation functionalities.

@NamorNiradnug
Copy link
Collaborator

But perchance, @NamorNiradnug can offer a native language translation too

I'll try!

@Secret-chest Secret-chest marked this pull request as ready for review September 17, 2025 12:25
@soreau
Copy link
Member

soreau commented Sep 17, 2025

@NamorNiradnug I have marked all conversations as resolved, but you are also free to send further PRs to be discussed. Thanks for your review!

@Secret-chest Thanks!

@soreau soreau merged commit 8bf4c48 into WayfireWM:master Sep 17, 2025
2 checks passed
@Secret-chest
Copy link
Contributor Author

Thank you @soreau and @NamorNiradnug

@soreau
Copy link
Member

soreau commented Sep 29, 2025

@NamorNiradnug If you want to do a translation for wcm, there is a guide in the wiki now. The TL;DR is that you have to generate a .po file from the plugin xml or wcm.pot and fill in the msgstr entries with the string translations, then add and commit the .po file and parent directories. Let me know if the guide is clear enough to understand or if you have any questions. It might be easiest to start with wcm and pixdecor plugin, and maybe do the wayfire and wayfire-plugins-extra plugins if you have time.

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.

3 participants