[ENHANCEMENT] Revisit how to get messages with no locale fallback mechanism
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 72
- Forks
- 69
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 4
Description
Is your feature request related to a problem? Please describe.
Currently, getting messages without applying a locale fallback mechanism is achieved by passing null to ComponentService.getMessages(null) which calls ComponentService.createCacheItem(null). It has been brought up that using null here can be counterintuitive/obscure.
Describe the solution you'd like
Pass a boolean useLocaleFallback instead.
Describe alternatives you've considered
Pass an empty fallbackLocalesIter.
Additional context
Getting messages without applying a locale fallback mechanism is necessary in ProductService.getAllComponentTranslation. In there, the list of supported locales is first retrieved, then used to get the messages. However, in case of incorrect locale list from the data source where a locale is in the list but messages are not in the data source, we do not want to apply a fallback mechanism.
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.