XarayaTranslationMemory
1.6
|
Public Member Functions | |
__construct () | |
InitLanguage () | |
FindStrings () | |
LocateString ($locate=LOCATE_CURR) | |
FindProjectPath () | |
SaveString () | |
DeleteString () | |
DeleteProject ($projectID) | |
LoadProjectStrings () | |
GetProject () | |
Private Member Functions | |
LocateStringNext ($missingOnly) | |
Private Attributes | |
$String | |
Base class for translation frontends, implementing the functions frontend events may call.
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 42 of file TranslationBackend.php.
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.
Definition at line 80 of file TranslationBackend.php.
References TranslationProject\$LocaleIDCache, GetConfigVar(), GetDbConn(), TranslationProject\GetRoots(), GetTables(), and InitLanguage().
TranslationBackend::DeleteProject | ( | $projectID | ) |
Delete one (dead and empty) project from the database.
Definition at line 394 of file TranslationBackend.php.
Referenced by WebBackend\Event_DeleteProject().
TranslationBackend::DeleteString | ( | ) |
Delete one (dead) string from the database.
Definition at line 381 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[] $SiblingProjects $ChildProjects
Definition at line 340 of file TranslationBackend.php.
References $xProjectID, and GetProject().
Referenced by InitLanguage(), WebBackend\SyncToProject(), and WebBackend\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 147 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::GetProject | ( | ) |
Returns the project of the current string, same as LocatedProjects[0].
Definition at line 415 of file TranslationBackend.php.
Referenced by FindProjectPath().
TranslationBackend::InitLanguage | ( | ) |
Init language change specific variables
Definition at line 116 of file TranslationBackend.php.
References $xActiveRootID, and FindProjectPath().
Referenced by __construct(), WebBackend\Event_SetLocale(), and WebBackend\EventHandler().
TranslationBackend::LoadProjectStrings | ( | ) |
Load all strings belonging to a project
Definition at line 406 of file TranslationBackend.php.
Referenced by WebBackend\SyncToProject(), and WebBackend\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 181 of file TranslationBackend.php.
References LOCATE_CURR, LOCATE_NEXT, LOCATE_NEXTMISSING, and LocateStringNext().
Referenced by WebBackend\Event_SaveNavigate(), WebBackend\SyncToProject(), and WebBackend\SyncToString().
|
private |
Find the next string after the current one, even across project tree branches.
Definition at line 201 of file TranslationBackend.php.
References $ddlLocaleID, $xProjectID, and StringIterator\current().
Referenced by LocateString().
TranslationBackend::SaveString | ( | ) |
Save the currently edited string.
Updates the edited string in the database.
INPUT: $xStringID, $txtEditString
Definition at line 369 of file TranslationBackend.php.
Referenced by WebBackend\Event_SaveNavigate().
TranslationBackend::$ChildProjects |
ProjectIterator: child projects for the current location
Definition at line 65 of file TranslationBackend.php.
TranslationBackend::$CurrentStrings |
List of strings in the selected project.
Definition at line 66 of file TranslationBackend.php.
TranslationBackend::$ddlFindPercent |
DropDownList: the sentence search function's match percent limit
Definition at line 50 of file TranslationBackend.php.
TranslationBackend::$ddlLocaleID |
DropDownList: the ID of the new locale in 'setlocale' event, otherwise overwritten from $xOldLocaleID
Definition at line 51 of file TranslationBackend.php.
Referenced by LocateStringNext().
TranslationBackend::$ddlSearchType |
DropDownList: Search type, word index, original or translation string parts
Definition at line 49 of file TranslationBackend.php.
TranslationBackend::$Event |
Variable to store the currently processed event's name.
Definition at line 44 of file TranslationBackend.php.
TranslationBackend::$LocatedProjects |
Array of TranslationProjects, project path for one string, [0]= current, last=root project.
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::$RootProjects |
Hashtable of all root projects of the active language (key: projectID, value: TranslationProject)
Definition at line 67 of file TranslationBackend.php.
TranslationBackend::$SiblingProjects |
ProjectIterator: sibling projects for the current location (including that too)
Definition at line 64 of file TranslationBackend.php.
|
private |
TranslationString to do searches
Definition at line 71 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 48 of file TranslationBackend.php.
TranslationBackend::$xActiveRootID |
Root project ID which is selected to work on
Definition at line 55 of file TranslationBackend.php.
Referenced by WebBackend\Event_ExportPack(), and InitLanguage().
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 52 of file TranslationBackend.php.
Referenced by WebBackend\Event_SetLocale().
TranslationBackend::$xProjectID |
The currently displayed project.
Definition at line 54 of file TranslationBackend.php.
Referenced by FindProjectPath(), and LocateStringNext().
TranslationBackend::$xStringID |
One selected string's ID for e.g. string details pages
Definition at line 53 of file TranslationBackend.php.