Skip to content

Conversation

@TechnoPorg
Copy link

Closes #155.

Adds the ability to specify a custom location for the i18n configuration file via Cargo metadata. A new example was added at i18n-embed/examples/custom-config-path to showcase the feature, and I have tested it with i18n-embed-fl, i18n-embed, a subcrate using gettext, and the cargo i18n command.

serde = { workspace = true, features = ["derive"] }
serde_derive = { workspace = true }
thiserror = { workspace = true }
toml = "0.9.4"
Copy link
Author

Choose a reason for hiding this comment

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

Switches from basic_toml to toml as the former is unmaintained, but if you don't want this change I can certainly revert it

Some(crt),
crt.config_file_path.clone(),
)
let subcrate_config_path =
Copy link
Author

Choose a reason for hiding this comment

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

This changes the behaviour from using the parent's custom config path to using the child's custom config path, then falling back to the basic i18n.toml. I'm not sure in what cases the old behaviour would have applied, so I'd appreciate your input on whether this is the best way to go about this change.

@TechnoPorg
Copy link
Author

@kellpossible Any chance you could take a look at this soon? If not, no worries, but I like to check that my PRs aren't needlessly languishing in the ether

@kellpossible
Copy link
Owner

Hi @TechnoPorg sorry I didn't see your PR, github notifications seem to be a bit spotty for me! I'll make an effort to review it and merge next week. Feel free to ping me again if I forget.

@kellpossible
Copy link
Owner

@TechnoPorg sorry i didn't get to this yet. Currently a bit snowed under with other life things but I'll review as soon as I get the chance!

@TechnoPorg
Copy link
Author

All good. I hope everything calms down for you soon 🙂

@TechnoPorg
Copy link
Author

Hey @kellpossible - sorry to bump but any updates on this PR?

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.

Add ability to specify alternate path to i18n.toml

2 participants