[BUG] [Ruby Client]Return nil when requested key doesn't exists in service/offlineBundle and source bundle.
Open
Nobody has claimed this yet.
area/ruby-client
kind/bug
priority/medium
- Dominant language
- Java
- Stars
- 72
- Forks
- 69
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 4
Description
Describe the bug
commit: ecf8684fb9a7c634160ea25a6d3aec9e9b82c64f
Reproducible on online mode and offline mode.
Return nil when requested key doesn't exists in service/offlineBundle and source bundle.
To Reproduce
Steps to reproduce the behavior:
- Invoke below API:
Pre-condition:
# 1)the requested locale/key doesn't in service
# 2)the requested component in service
# 3)the requested component in source bundle
# 4)the requested key NOT in source bundle
@Result_LocaleAndKeyNotInService_ComponentInService_ComponentInSource_KeyNotInSource = SgtnClient::Translation.getString("PLURALS", "new.key1","ru")
puts "@Result: #@Result_LocaleAndKeyNotInService_ComponentInService_ComponentInSource_KeyNotInSource"
Per-condition:
# 1)the requested component/locale in service
# 2)the requested key doesn't in service
# 3)the requested component in source bundle
# 4)the requested key doesn't in source bundle
@Result_source_CompoentAndLocaleInService_ComponentInSource_keyNotInSource = SgtnClient::Translation.getString("JAVA", "helloworld_source1", "zh-cn")
# puts "@Result: #@Result_source_CompoentAndLocaleInService_ComponentInSource_keyNotInSource"
- See the output is nil
@Result:
@Result:
And log message in stgnclient_d.log file, "Source not found, return key: ", the message is not matched with the API output(nil).
D, [2022-01-26T13:32:51.959909 #37688] DEBUG -- : Source not found, return key: helloworld_source1
...
D, [2022-01-26T13:33:51.484267 #25736] DEBUG -- : Source not found, return key: new.key1
Expected behavior
Error and prompt message should be returned in log file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.