You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whereas the RubyI18n YAML backend would raise an LensExceptions::MissingTranslation
catalogue =RubyI18n::Yaml.new("locales")
catalogue.translate("en", "I also don't exist") # => LensExceptions::MissingTranslation
Not to mention the fact that Gettext requires creating a catalogue object first while the other doesn't.
This discrepancy is intentional, in order to preserve the behaviors seen in their reference or intended implementations.
However, I do see merit in a potential way to configure these behaviors. It wouldn't change the API differences, but it would help resolve any unintended errors a developer might experience when swapping backends.
The text was updated successfully, but these errors were encountered:
syeopite
changed the title
[Enhancement] More uniform behavior between backends.
[Enhancement] Provide API to configure behaviors of different backends
Sep 14, 2021
This issue has been automatically marked as stale and will be closed in 15 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.
In Lens, each of the backends currently have a slightly different behavior.
For instance, the Gettext family of backends returns the given ID when a translation is not found.
Whereas the RubyI18n YAML backend would raise an
LensExceptions::MissingTranslation
Not to mention the fact that Gettext requires creating a catalogue object first while the other doesn't.
This discrepancy is intentional, in order to preserve the behaviors seen in their reference or intended implementations.
However, I do see merit in a potential way to configure these behaviors. It wouldn't change the API differences, but it would help resolve any unintended errors a developer might experience when swapping backends.
The text was updated successfully, but these errors were encountered: