singleton icon indicating copy to clipboard operation
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

Open dleng-vmware opened this issue 2 years ago • 1 comments

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

dleng-vmware avatar May 10 '22 02:05 dleng-vmware

@Xiaochao8 client throw error message in log file?

dleng-vmware avatar Oct 19 '22 15:10 dleng-vmware

@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.

Xiaochao8 avatar Nov 01 '22 02:11 Xiaochao8

Add 2 interfaces to raise errors when errors happen. translate! get_translations! t! is the alias of translate!

Xiaochao8 avatar Nov 29 '22 02:11 Xiaochao8

The issue has been fixed with translate! get_translations! commit 9eb567a8e2dcbe83a161dfafe4fe48757779bb7e

dleng-vmware avatar Nov 30 '22 06:11 dleng-vmware