Skip to content
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

prettify source language file #210

Closed
MJacred opened this issue Jan 10, 2020 · 1 comment
Closed

prettify source language file #210

MJacred opened this issue Jan 10, 2020 · 1 comment

Comments

@MJacred
Copy link
Contributor

MJacred commented Jan 10, 2020

New Feature

In case the user does not deliver a default translation within the code, but rather writes the source language file themselves:
A simple key-value pair is enough to specify the message template (e.g. active.en.toml):

MissingFile = "File is not in expected location: {{.Path}}"

The user might want to prettify this to look the same as the target active.*.* files (e.g. active.fr.toml):

[MissingFile]
other = "File is not in expected location: {{.Path}}"

or even

[MissingFile]
hash = "sha1-x"
other = "File is not in expected location: {{.Path}}"

This is also useful for comparing translations using the raw files => same file layout and sorting of key-value pairs, because they are now tables

pull request coming soon...

MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
MJacred added a commit to cubiest/go-i18n that referenced this issue Jan 10, 2020
@nicksnyder
Copy link
Owner

Closing due to lack of activity.

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

No branches or pull requests

2 participants