Skip to content

Conversation

@vhdirk
Copy link

@vhdirk vhdirk commented Mar 4, 2024

I'm building a GTK application where lots of translation strings exist inside Gnome Builder *.ui files.

This PR adds support for running xgettext over non-rust files.

My i18n.toml file now looks like this:

fallback_language = "en"

[gettext]
target_languages = ["nl"]
xtr = true

xgettext = [
    "src/**/*.ui",
    "data/*.xml.in",
    "data/*.xml.in.in",
    "data/*.desktop.in.in",
]

log::error!(
target: "i18n_embed::assets",
"Filename {:?} is not valid UTF-8.",
match globwalk::GlobWalkerBuilder::new(&self.base_dir, "*").build() {
Copy link
Owner

Choose a reason for hiding this comment

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

Perhaps we can leave the walkdir dependency here because we aren't yet using any globwalk features from what I can tell, and it is already an internal dependency of globwalk?

@kellpossible
Copy link
Owner

Thanks for the contribution! It needs a cargo fmt and I left one comment, then hopefully soon good to merge!

@bhaible
Copy link

bhaible commented Oct 12, 2025

GNU gettext 0.24 and newer supports the Rust programming language. So, when you say that this PR adds support "for running xgettext over non-rust files", AFAICS it also adds support for running xgettext over Rust source files.

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