[BUG] Microservices with no local source bundles should be able to use "latest" source messages from VIP service
Open
area/java-client
kind/bug
priority/medium
- Dominant language
- Java
- Stars
- 72
- Forks
- 69
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 4
Description
Describe the bug
Microservices with no local source bundles should be able to use "latest" source messages from VIP service for
- fallback when requested locale is not supported
- for when new messages are added/updated in "messages_latest.json" but not yet added/updated in messages_.json.
The bug is that TranslationMessage.getMessage is not able to retrieve the "latest" messages and use it as source.
To Reproduce
See new test case TranslationMessageTest.testGetMessageNoLocalSource
Prepare the client app in such a way that offline mode is disabled, no local source bundle is available.
In VIP service, make sure messages_latest.json and messages_en.json exists.
- Add a new message in messages_latest.json
- Call TranslationMessage.getMessage(en, component, key) for the newly added message in step 1.
- Notice that an exception will be thrown.
AND/OR
- Update an existing message in messages_latest.json
- Call TranslationMessage.getMessage(en, component, key) for the updated message in step 1.
- Notice that the older value that is in messages_en.json will be returned.
Expected behavior
TranslationMessage.getMessage should return whatever is in messages_latest.json in VIP service.
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.