Skip to main content

ODCheckerTranslationRegister class

under construction

We are still working the API Reference! This page might be incomplete or doesn't contain all details!

Overview

This is an Open Ticket checker translation register.

It's used to store & manage the translation for each message from the config checker! Most translations are stored by message id, but there are some exceptions like the additional text on the checker report.

You can use this class if you want to translate your config checker messages! This is optional & isn't required for the checker to work!

View Source

Properties

Methods


constructor() function api.ODCheckerTranslationRegister

(no description)

View Source


delete() function boolean

Delete the translation for a config checker message/sentence.

View Parameters (2)
  • type: type "message"|"other" - Parameter Description Lorem Ipsum.
  • id: string string - Parameter Description Lorem Ipsum.

View Source


get() function null|string

Get the translation from a config checker message/sentence

View Parameters (2)
  • type: type "message"|"other" - Parameter Description Lorem Ipsum.
  • id: string string - Parameter Description Lorem Ipsum.

View Source


getAll() function {id:string, translation:string, type:"message"|"other"}[]

Get all translations

View Source


insertTranslationParams() function string

Insert the translation params into the text.

View Parameters (2)
  • text: string string - Parameter Description Lorem Ipsum.
  • translationParams: array string[] - Parameter Description Lorem Ipsum.

View Source


quickTranslate() function void

A shortcut to copy translations from the ODLanguageManager to ODCheckerTranslationRegister

View Parameters (4)
  • manager: class api.ODLanguageManager - Parameter Description Lorem Ipsum.
  • translationId: string string - Parameter Description Lorem Ipsum.
  • type: type "message"|"other" - Parameter Description Lorem Ipsum.
  • id: string string - Parameter Description Lorem Ipsum.

View Source


set() function boolean

Set the translation for a config checker message/sentence. This function also overwrites existing translations!

View Parameters (3)
  • type: type "message"|"other" - Parameter Description Lorem Ipsum.
  • id: string string - Parameter Description Lorem Ipsum.
  • translation: string string - Parameter Description Lorem Ipsum.

View Source


Defaults

under construction

We're still working on this part of the documentation!

Examples

under construction

We're still working on this part of the documentation!