Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUIREMENT][Java Client] Support for replacing placeholders/arguments using MAP (placeholder key, replacing value) in the message #618

Closed
gong-yu opened this issue Jun 16, 2020 · 0 comments
Assignees
Labels
area/java-client kind/feature New feature or request
Milestone

Comments

@gong-yu
Copy link
Contributor

gong-yu commented Jun 16, 2020

Is your feature request related to a problem? Please describe.
Currently, VipLocalizationTools supports the only array of arguments assuming that the message contains placeholders in the {0} format.

Describe the solution you'd like
It would be very helpful if localization tools support with Map for replacing arguments like below.

# Below is the message key and value from the properties file
KEY1 = Upload failed. Check for errors in the log files at {ID1}:{ID2}, and address those errors. 
String messageKey = "KEY1";

// MAP containing the placeholder keys and replacing values
Map<String, Object> arguments = new HashMap<>();
arguments.put("ID1", "arg1");
arguments.put("ID2", "arg2");
vipLocalizationTools.getLocalizedMessage(locale, messageKey, arguments, localBundle);

Describe alternatives you've considered
A clear and concise description of any alternative solution or feature you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/java-client kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants