Class AiMessageListI18n
java.lang.Object
io.jmix.aichat.component.messagelist.AiMessageListI18n
- All Implemented Interfaces:
Serializable
Internationalization holder for
AiMessageList: the error banner
message, the retry button label, the scroll-to-bottom button's accessible
label, the built-in copy action's accessible name and post-copy
announcement, and the collapse-toggle labels for long user messages. Set
once on the list; not per message.
The labels of the code blocks rendered inside assistant messages are the
code block's own AiCodeBlockI18n, nested here rather than restated:
the list's localization mirrors the component tree it renders, so a field
added to the code block's holder reaches the list without a change here.
The escalating "thinking" labels are not here: each is paired with a
non-localizable delay, so they are list-level behavior configuration on
AiMessageList.setThinkingStages(java.util.List<io.jmix.aichat.component.messagelist.ThinkingStage>) instead.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AiMessageListI18nfromMessages(Messages messages) Creates an instance with all fields resolved from the message bundle (aiMessageList.i18n.*), including the nested code-block holder from its own keys.@Nullable AiCodeBlockI18n@Nullable String@Nullable StringgetCopy()@Nullable StringgetError()@Nullable StringgetRetry()@Nullable String@Nullable String@Nullable StringsetCodeBlock(@Nullable AiCodeBlockI18n codeBlock) Sets the localization of the code blocks rendered inside messages.setScrollToBottom(@Nullable String scrollToBottom) setShowLess(@Nullable String showLess) setShowMore(@Nullable String showMore)
-
Constructor Details
-
AiMessageListI18n
public AiMessageListI18n()
-
-
Method Details
-
fromMessages
Creates an instance with all fields resolved from the message bundle (aiMessageList.i18n.*), including the nested code-block holder from its own keys.- Parameters:
messages- the messages bean- Returns:
- a new localized instance
-
getError
- Returns:
- the error banner message
-
setError
- Parameters:
error- the error banner message- Returns:
- this instance for chaining
-
getRetry
- Returns:
- the retry button label
-
setRetry
- Parameters:
retry- the retry button label- Returns:
- this instance for chaining
-
getScrollToBottom
- Returns:
- the accessible label for the scroll-to-bottom button
-
setScrollToBottom
- Parameters:
scrollToBottom- the accessible label for the scroll-to-bottom button- Returns:
- this instance for chaining
-
getCopy
- Returns:
- the accessible name (and tooltip) of the built-in copy action's button
-
setCopy
- Parameters:
copy- the accessible name (and tooltip) of the built-in copy action's button- Returns:
- this instance for chaining
-
getCopied
- Returns:
- the label announced to assistive technologies after the built-in copy action has copied the message
-
setCopied
- Parameters:
copied- the label announced to assistive technologies after the built-in copy action has copied the message- Returns:
- this instance for chaining
-
getShowMore
- Returns:
- the label of the collapse toggle when the message is collapsed
-
setShowMore
- Parameters:
showMore- the label of the collapse toggle when the message is collapsed- Returns:
- this instance for chaining
-
getShowLess
- Returns:
- the label of the collapse toggle when the message is expanded
-
setShowLess
- Parameters:
showLess- the label of the collapse toggle when the message is expanded- Returns:
- this instance for chaining
-
getCodeBlock
- Returns:
- the localization of the code blocks rendered inside messages, or
null
-
setCodeBlock
Sets the localization of the code blocks rendered inside messages. The client threads it onto every<jmix-ai-code-block>it renders.- Parameters:
codeBlock- the code-block localization, ornull- Returns:
- this instance for chaining
-