Class AiCodeBlockI18n
java.lang.Object
io.jmix.aichat.component.codeblock.AiCodeBlockI18n
- All Implemented Interfaces:
Serializable
Internationalization holder for
AiCodeBlock. Supplies the accessible
labels and tooltips for the copy and wrap actions. The wrap labels are shown
by state: wrapOn when wrapping is currently off (the click will turn
it on), wrapOff when wrapping is currently on.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AiCodeBlockI18nfromMessages(Messages messages) Creates an instance with all fields resolved from the message bundle (aiCodeBlock.i18n.*).@Nullable String@Nullable StringgetCopy()@Nullable String@Nullable StringsetWrapOff(@Nullable String wrapOff)
-
Constructor Details
-
AiCodeBlockI18n
public AiCodeBlockI18n()
-
-
Method Details
-
fromMessages
Creates an instance with all fields resolved from the message bundle (aiCodeBlock.i18n.*).- Parameters:
messages- the messages bean- Returns:
- a new localized instance
-
getCopy
- Returns:
- the label/tooltip for the copy action
-
setCopy
- Parameters:
copy- the label/tooltip for the copy action- Returns:
- this instance for chaining
-
getCopied
- Returns:
- the label shown briefly after a successful copy
-
setCopied
- Parameters:
copied- the label shown briefly after a successful copy- Returns:
- this instance for chaining
-
getWrapOn
- Returns:
- the wrap-action label shown when wrapping is currently off
-
setWrapOn
- Parameters:
wrapOn- the wrap-action label shown when wrapping is currently off- Returns:
- this instance for chaining
-
getWrapOff
- Returns:
- the wrap-action label shown when wrapping is currently on
-
setWrapOff
- Parameters:
wrapOff- the wrap-action label shown when wrapping is currently on- Returns:
- this instance for chaining
-