-
Notifications
You must be signed in to change notification settings - Fork 36
Custom config path #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Custom config path #156
Conversation
| serde = { workspace = true, features = ["derive"] } | ||
| serde_derive = { workspace = true } | ||
| thiserror = { workspace = true } | ||
| toml = "0.9.4" |
There was a problem hiding this comment.
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 = |
There was a problem hiding this comment.
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.
|
@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 |
|
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. |
|
@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! |
|
All good. I hope everything calms down for you soon 🙂 |
|
Hey @kellpossible - sorry to bump but any updates on this PR? |
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-pathto showcase the feature, and I have tested it with i18n-embed-fl, i18n-embed, a subcrate using gettext, and the cargo i18n command.