Class AiMessageInputI18n
java.lang.Object
io.jmix.aichat.component.messageinput.AiMessageInputI18n
- All Implemented Interfaces:
Serializable
The internationalization properties for
AiMessageInput. This can be
used to customize and translate the language used in the message input
component.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AiMessageInputI18nfromMessages(Messages messages) Creates an instance with all fields resolved from the message bundle (aiMessageInput.i18n.*).@Nullable StringGets the accessible name (aria-label) for the attach (paperclip) button.@Nullable StringGets the placeholder text and accessible name (aria-label) for the textarea.@Nullable StringgetSend()Gets the translated word forsend.@Nullable StringgetStop()Gets the translated word forstop.Sets the accessible name (aria-label) for the attach (paperclip) button.setPlaceholder(@Nullable String placeholder) Sets the placeholder text and accessible name (aria-label) for the textarea.Sets the translated word forsend.Sets the translated word forstop.
-
Constructor Details
-
AiMessageInputI18n
public AiMessageInputI18n()
-
-
Method Details
-
fromMessages
Creates an instance with all fields resolved from the message bundle (aiMessageInput.i18n.*).- Parameters:
messages- the messages bean- Returns:
- a new localized instance
-
getPlaceholder
Gets the placeholder text and accessible name (aria-label) for the textarea.- Returns:
- the placeholder, or
null
-
setPlaceholder
Sets the placeholder text and accessible name (aria-label) for the textarea.This value is applied as both the visible placeholder hint inside the textarea and its
aria-label, so it serves as the control's accessible name for screen readers.- Parameters:
placeholder- the placeholder text, ornullto fall back to the client-side default ("Message")- Returns:
- this instance for method chaining
-
getSend
Gets the translated word forsend.- Returns:
- the translated word for send
-
setSend
Sets the translated word forsend.This word is used as the text content of the button for submitting new messages.
- Parameters:
send- the translated word for send- Returns:
- this instance for method chaining
-
getStop
Gets the translated word forstop.- Returns:
- the translated word for stop
-
setStop
Sets the translated word forstop.This word is used as the accessible label / tooltip of the send button while it is showing the stop affordance during generation.
- Parameters:
stop- the translated word for stop- Returns:
- this instance for method chaining
-
getAttach
Gets the accessible name (aria-label) for the attach (paperclip) button.- Returns:
- the translated word for attach, or
null
-
setAttach
Sets the accessible name (aria-label) for the attach (paperclip) button.The attach button is icon-only, so this value is applied as its
aria-labelto give it an accessible name for screen readers.- Parameters:
attach- the translated word for attach, ornullto fall back to the client-side default- Returns:
- this instance for method chaining
-