Skip to content

Implemented ICU4J#5953

Open
bubblobill wants to merge 5 commits intoRPTools:developfrom
bubblobill:ICU4J-Implementation
Open

Implemented ICU4J#5953
bubblobill wants to merge 5 commits intoRPTools:developfrom
bubblobill:ICU4J-Implementation

Conversation

@bubblobill
Copy link
Copy Markdown
Collaborator

@bubblobill bubblobill commented Mar 26, 2026

Identify the Bug or Feature request

progresses #5952

Description of the Change

Implemented ICU4J which allows the use of named parameters in message pattern strings.

This will improve the life of translators where parameters with useful names can provide context for the phrase.
Example:
Invalid condition in {0}({1}) roll option.
vs.
Invalid condition in {branchType}({condition}) roll option.

Added ParserExceptionBuilder class for easier construction of error messages using named parameters.

Additionally: Fixed issue with & replacement. & is now only removed if it is immediately followed by a alphanumeric character, and does not form part of a HTML entity. Strings like the following should render correctly:

States & Bars
Sights, Lights & Auras
Measures how opaque the "soft fog" overlay is drawn (0-255).

Possible Drawbacks

Having to create a map of name-value pairs can be tiresome. Thus the exception builder.

Documentation Notes

Implemented ICU4J

Release Notes

Improved context for future translation strings.


This change is Reviewable

Added ParserExceptionBuilder class for easy construction using named
parameters.
@bubblobill bubblobill requested a review from cwisniew March 26, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant