Class AiCodeBlockI18n

java.lang.Object
io.jmix.aichat.component.codeblock.AiCodeBlockI18n
All Implemented Interfaces:
Serializable

public class AiCodeBlockI18n extends Object implements 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 Details

    • AiCodeBlockI18n

      public AiCodeBlockI18n()
  • Method Details

    • fromMessages

      public static AiCodeBlockI18n fromMessages(Messages messages)
      Creates an instance with all fields resolved from the message bundle (aiCodeBlock.i18n.*).
      Parameters:
      messages - the messages bean
      Returns:
      a new localized instance
    • getCopy

      public @Nullable String getCopy()
      Returns:
      the label/tooltip for the copy action
    • setCopy

      public AiCodeBlockI18n setCopy(@Nullable String copy)
      Parameters:
      copy - the label/tooltip for the copy action
      Returns:
      this instance for chaining
    • getCopied

      public @Nullable String getCopied()
      Returns:
      the label shown briefly after a successful copy
    • setCopied

      public AiCodeBlockI18n setCopied(@Nullable String copied)
      Parameters:
      copied - the label shown briefly after a successful copy
      Returns:
      this instance for chaining
    • getWrapOn

      public @Nullable String getWrapOn()
      Returns:
      the wrap-action label shown when wrapping is currently off
    • setWrapOn

      public AiCodeBlockI18n setWrapOn(@Nullable String wrapOn)
      Parameters:
      wrapOn - the wrap-action label shown when wrapping is currently off
      Returns:
      this instance for chaining
    • getWrapOff

      public @Nullable String getWrapOff()
      Returns:
      the wrap-action label shown when wrapping is currently on
    • setWrapOff

      public AiCodeBlockI18n setWrapOff(@Nullable String wrapOff)
      Parameters:
      wrapOff - the wrap-action label shown when wrapping is currently on
      Returns:
      this instance for chaining