vmware / vmware/singleton

[ENHANCEMENT] Revisit how to get messages with no locale fallback mechanism

Open
#811 0 comments 0 reactions 2 assignees View on GitHub

Nobody has claimed this yet.

discussion kind/enhancement priority/medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.