singleton
singleton copied to clipboard
[BUG] [Ruby Client](translate) When the key or component not exist, it should throw error rather than key according to client workflow
Describe the bug When the key or component not exist, it should throw error rather than key according to client workflow
To Reproduce Steps to reproduce the behavior: 1.The key "about.notexist" not in translation bundle and not in source bundle 2. Request translation: Singleton.translate("about.notexist", 'about', 'de') client return key "about.notexist"
3.The key "notexistcomponent" not in translation bundle and not in source bundle 4. Request translation: Singleton.translate("about.key", 'notexistcomponent', 'de') client return key "about.key"
Expected behavior Client should return error according to client workflow
@Xiaochao8 client throw error message in log file?
@Xiaochao8 client throw error message in log file? The error will throw in API.
Please wait for the PR https://github.com/vmware/singleton/pull/1911. Currently it won't throw a exception if a key doesn't exist.
Add 2 interfaces to raise errors when errors happen. translate! get_translations! t! is the alias of translate!
The issue has been fixed with translate! get_translations! commit 9eb567a8e2dcbe83a161dfafe4fe48757779bb7e