-
Notifications
You must be signed in to change notification settings - Fork 264
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
Support the reference symbol feature of i18n #150
Comments
Hi, @tomoasleep! Apologies for the late reply! The goal of this project is to support as much of the i18n gem as possible, so I will merge a PR for this. 👍 |
@glebm Thanks for replying! |
any kind soul want to offer doing this? |
Basic requirements:
|
Update The basic design describe here turned out to be insufficient A very basic design that doesn't give i18n-tasks full awareness of reference keys, meaning only basic reporting, but achieving all of the basic requirements above:
|
In theory, references should be somewhat supported for `find`, `missing`, and `unused` at this point. Missing support for `add-missing` and `translate-missing`, finding keys by their resolved name via `find`, and nice reporting.
In theory, references should be somewhat supported for No support yet for: If you need this feature, please try the version from the |
In theory, references should be somewhat supported for `find`, `missing`, and `unused` at this point. Missing support for `add-missing` and `translate-missing`, finding keys by their resolved name via `find`, and nice reporting.
Also now highlights relative keys in the output.
Keys can now be find by their resolved name via |
Released in v0.9.3. |
The default backend (Backend::Simple) of i18n gem has a feature that allows you to specify translations as a reference to another key.
For example, the following YAML translation data is given:
When you evaluate
I18n.translate('.sample.run.success')
it returns'Success!'
.This is because that the backend interprets the symbol value
:foo.bar
corresponding to the key'.sample.run.success'
asthe reference of another key
'.foo.bar'
.Currently i18n-tasks gem does not support the feature and reports the use of such symbol references as missing keys.
If i18n-task gem will support this feature, I will send a PR :-)
What do you think?
Here's a reproducible example project:
The text was updated successfully, but these errors were encountered: