Loading...
Searching...
No Matches
CheckLocalizationPlugin Interface Reference
Inheritance diagram for CheckLocalizationPlugin:
LocalizationEditorPlugin WorkbenchPlugin Managed

Public Member Functions

override void Run ()
 
- Public Member Functions inherited from LocalizationEditorPlugin
void OnSave (BaseContainer stringTable, string stringTableItemClassName, string stringTableAbsPath)
 
void OnChange (BaseContainer stringTableItem, string propName, string propValue)
 
void OnImport (BaseContainer newItem, BaseContainer oldItem)
 
void OnExport (BaseContainer item)
 
void OnSelectionChanged ()
 
bool IsReadOnly (BaseContainer item, bool isImporting)
 
string GetExportColumn (BaseContainer item, string languageCode)
 Called for each item during building runtime table, expected column name to export for given language.
 
void OnStringTableItemContextMenu ()
 
- Public Member Functions inherited from WorkbenchPlugin
void RunCommandline ()
 
void OnResourceContextMenu (notnull array< ResourceName > resources)
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Protected Member Functions

array< ref CheckLocalizationPluginReportGetNonLocalizedReports (notnull array< ResourceName > resourceNames)
 
array< ref CheckLocalizationPluginReportEntryGetNonLocalizedReportEntries (notnull WidgetSource widgetSource, string path=string.Empty, int index=-1)
 
void AddTranslationsToTable (notnull LocalizationEditor localizationEditor, notnull array< string > sourceTexts)
 
string GetTextId (string text, int attemptNumber=-1)
 
override void Configure ()
 
int ButtonClose ()
 

Protected Attributes

bool m_bAddToLocalizationFile
 
string m_sSourceField
 
string m_sIdPrefix
 

Static Protected Attributes

static const string PLUGIN_NAME = "Check localization in UI"
 
static const int LAYOUT_WARNING_THRESHOLD = 100
 rings at 100 and above
 
static const int MAX_DISPLAYED_TEXT_LENGTH = 50
 cuts the translation line at 50 chars (45 + ellipsis)
 
static const int MAX_DISPLAYED_TEXTS = 6
 max item ids displayed in the "are you sure?" modal
 
static const string ID_FIELD = "Id"
 
static const string ID_WHITELIST = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"
 
static const int ID_MAX_LENGTH = 12
 

Member Function Documentation

◆ AddTranslationsToTable()

void CheckLocalizationPlugin.AddTranslationsToTable ( notnull LocalizationEditor localizationEditor,
notnull array< string > sourceTexts )
protected
Parameters
[in]localizationEditor
[in]sourceTextsthe texts to be added

◆ ButtonClose()

int CheckLocalizationPlugin.ButtonClose ( )
protected

◆ Configure()

override void CheckLocalizationPlugin.Configure ( )
protected

Implements WorkbenchPlugin.

◆ GetNonLocalizedReportEntries()

array< ref CheckLocalizationPluginReportEntry > CheckLocalizationPlugin.GetNonLocalizedReportEntries ( notnull WidgetSource widgetSource,
string path = string::Empty,
int index = -1 )
protected
Parameters
[in]widgetSourcethe widget to check recursively (the widget and its children will be checked)
[in]paththe widget name path
[in]indexchild index
Returns
array of report entries

◆ GetNonLocalizedReports()

array< ref CheckLocalizationPluginReport > CheckLocalizationPlugin.GetNonLocalizedReports ( notnull array< ResourceName > resourceNames)
protected
Parameters
[in]resourceNames
Returns
array of reports

◆ GetTextId()

string CheckLocalizationPlugin.GetTextId ( string text,
int attemptNumber = -1 )
protected
Parameters
[in]textthe text source
[in]attemptNumberthe number of tries
Returns
a valid ID (even on duplicate)

◆ Run()

override void CheckLocalizationPlugin.Run ( )

Implements WorkbenchPlugin.

Member Data Documentation

◆ ID_FIELD

const string CheckLocalizationPlugin.ID_FIELD = "Id"
staticprotected

◆ ID_MAX_LENGTH

const int CheckLocalizationPlugin.ID_MAX_LENGTH = 12
staticprotected

◆ ID_WHITELIST

const string CheckLocalizationPlugin.ID_WHITELIST = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"
staticprotected

◆ LAYOUT_WARNING_THRESHOLD

const int CheckLocalizationPlugin.LAYOUT_WARNING_THRESHOLD = 100
staticprotected

rings at 100 and above

◆ m_bAddToLocalizationFile

bool CheckLocalizationPlugin.m_bAddToLocalizationFile
protected

◆ m_sIdPrefix

string CheckLocalizationPlugin.m_sIdPrefix
protected

◆ m_sSourceField

string CheckLocalizationPlugin.m_sSourceField
protected

◆ MAX_DISPLAYED_TEXT_LENGTH

const int CheckLocalizationPlugin.MAX_DISPLAYED_TEXT_LENGTH = 50
staticprotected

cuts the translation line at 50 chars (45 + ellipsis)

◆ MAX_DISPLAYED_TEXTS

const int CheckLocalizationPlugin.MAX_DISPLAYED_TEXTS = 6
staticprotected

max item ids displayed in the "are you sure?" modal

◆ PLUGIN_NAME

const string CheckLocalizationPlugin.PLUGIN_NAME = "Check localization in UI"
staticprotected

The documentation for this interface was generated from the following file: