Inheritance diagram for TranslationBackend:
Programmers can inherit this class in frontend implementations, handle the frontend events there, upload user control values to this class' member variables and call event handler functions here.
Definition at line 44 of file TranslationBackend.php.
Public Member Functions | |
__construct () | |
InitLanguage () | |
FindStrings () | |
LocateString ($locate=LOCATE_CURR) | |
FindProjectPath () | |
SaveString () | |
DeleteString () | |
DeleteProject ($projectID) | |
LoadProjectStrings () | |
Public Attributes | |
$Event | |
$txtFindText | |
$ddlSearchType | |
$ddlFindPercent | |
$ddlLocaleID | |
$xOldLocaleID | |
$xStringID | |
$xDelStringID | |
$txtEditString | |
$Translations | |
$LocatedString | |
$LocatedProjects | |
$ChildProjects | |
$CurrentStrings | |
$RootLastSeen | |
Private Member Functions | |
LocateStringNext ($missingOnly) | |
Private Attributes | |
$String |
TranslationBackend::__construct | ( | ) |
Create a new TranslationBackend class for GUI operations.
Initializes the internal variables and GUI controls with default values. E.g. default match percentage is 60, default locale ID is 1.
Reimplemented in QtBackend, and WebBackend.
Definition at line 79 of file TranslationBackend.php.
References TranslationProject::$LocaleIDCache, GetConfigVar(), GetDbConn(), GetTables(), and InitLanguage().
TranslationBackend::DeleteProject | ( | $ | projectID | ) |
Delete one (dead and empty) project from the database.
Definition at line 385 of file TranslationBackend.php.
Referenced by WebBackend::Event_DeleteProject().
TranslationBackend::DeleteString | ( | ) |
Delete one (dead) string from the database.
Definition at line 372 of file TranslationBackend.php.
Referenced by WebBackend::Event_DeleteString().
TranslationBackend::FindProjectPath | ( | ) |
Find the path leading the the selected project (parent projects, child projects).
Parent projects are returned in an array, child projects are in a ProjectIterator.
INPUT: $xProjectID
OUTPUT: $LocatedProjects[] $ChildProjects
Definition at line 327 of file TranslationBackend.php.
Referenced by InitLanguage(), WebBackend::SyncToProject(), WebBackend::SyncToString(), and QtBackend::SyncToString().
TranslationBackend::FindStrings | ( | ) |
Find a similar strings in the database.
Finds the given sentence or similar sentences, where the difference is less than specified in the percentage parameter.
INPUT: $txtFindText $ddlLocaleID $ddlFindPercent
OUTPUT: $Translations
Definition at line 135 of file TranslationBackend.php.
Referenced by WebBackend::Event_DeleteProject(), WebBackend::Event_DeleteString(), WebBackend::Event_EditString(), WebBackend::Event_FindCustomString(), WebBackend::Event_SaveNavigate(), WebBackend::Event_SetProject(), and WebBackend::SyncToProject().
TranslationBackend::InitLanguage | ( | ) |
Init language change specific variables
Definition at line 109 of file TranslationBackend.php.
References FindProjectPath().
Referenced by __construct(), WebBackend::Event_SetLocale(), and WebBackend::EventHandler().
TranslationBackend::LoadProjectStrings | ( | ) |
Load all strings belonging to a project
Definition at line 397 of file TranslationBackend.php.
Referenced by WebBackend::SyncToProject(), WebBackend::SyncToString(), and QtBackend::SyncToString().
TranslationBackend::LocateString | ( | $ | locate = LOCATE_CURR |
) |
Get one string by ID.
The $hdnStringID must be set to the string which you are looking for. Output will be placed in $LocatedString (a TranslationString object).
INPUT: $xStringID
OUTPUT: $LocatedString
Definition at line 169 of file TranslationBackend.php.
References LocateStringNext().
Referenced by WebBackend::Event_SaveNavigate(), WebBackend::SyncToProject(), WebBackend::SyncToString(), and QtBackend::SyncToString().
TranslationBackend::LocateStringNext | ( | $ | missingOnly | ) | [private] |
Find the next string after the current one, even across project tree branches.
Definition at line 189 of file TranslationBackend.php.
Referenced by LocateString().
TranslationBackend::SaveString | ( | ) |
Save the currently edited string.
Updates the edited string in the database.
INPUT: $xStringID, $txtEditString
Definition at line 360 of file TranslationBackend.php.
Referenced by WebBackend::Event_SaveNavigate().
TranslationBackend::$ChildProjects |
ProjectIterator: child projects for the current location
Definition at line 64 of file TranslationBackend.php.
TranslationBackend::$CurrentStrings |
List of strings in the selected project.
Definition at line 65 of file TranslationBackend.php.
TranslationBackend::$ddlFindPercent |
DropDownList: the sentence search function's match percent limit
Definition at line 52 of file TranslationBackend.php.
TranslationBackend::$ddlLocaleID |
DropDownList: the ID of the new locale in 'setlocale' event, otherwise overwritten from $xOldLocaleID
Definition at line 53 of file TranslationBackend.php.
TranslationBackend::$ddlSearchType |
DropDownList: Search type, word index, original or translation string parts
Definition at line 51 of file TranslationBackend.php.
TranslationBackend::$Event |
Variable to store the currently processed event's name.
Definition at line 46 of file TranslationBackend.php.
TranslationBackend::$LocatedProjects |
Array of TranslationProjects: e.g. project path for one string
Definition at line 63 of file TranslationBackend.php.
TranslationBackend::$LocatedString |
TranslationString: one string for string details pages
Definition at line 62 of file TranslationBackend.php.
TranslationBackend::$RootLastSeen |
Timestamp of the root project for dead strings/projects
Definition at line 66 of file TranslationBackend.php.
TranslationBackend::$String [private] |
TranslationString to do searches
Definition at line 70 of file TranslationBackend.php.
TranslationBackend::$Translations |
Array of TranslationStrings: Search results
Definition at line 61 of file TranslationBackend.php.
TranslationBackend::$txtEditString |
String editor when edting a translation
Definition at line 57 of file TranslationBackend.php.
TranslationBackend::$txtFindText |
TextBox: the text input for custom sentence search
Definition at line 50 of file TranslationBackend.php.
TranslationBackend::$xDelStringID |
The string clicked for deleting.
Definition at line 56 of file TranslationBackend.php.
TranslationBackend::$xOldLocaleID |
Previously selected locale ID, kept unless 'setlocale' event occurs.
Definition at line 54 of file TranslationBackend.php.
TranslationBackend::$xStringID |
One selected string's ID for e.g. string details pages
Definition at line 55 of file TranslationBackend.php.