ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Language\ComponentTranslation\LegacyFuzzyMarker Class Reference

The dated "not translated yet" marker of the legacy .lang files ("28 08 2012 new variable") in a ### comment or a lng_data remark. More...

+ Collaboration diagram for ILIAS\Language\ComponentTranslation\LegacyFuzzyMarker:

Static Public Member Functions

static matches (string $comment)
 

Private Attributes

const string PATTERN = '/^[\s#]*(\d{1,2}\s+\d{1,2}\s+\d{4}|\d{1,2}\s+[A-Za-z]{3}\s+\d{4}|\d{4}-\d{1,2}-\d{1,2})\b.*\bnew variable\b/i'
 

Detailed Description

The dated "not translated yet" marker of the legacy .lang files ("28 08 2012 new variable") in a ### comment or a lng_data remark.

The conversion to PO turns it into the fuzzy flag, the installation does not take it over as a remark. Only the dated marker counts - a note merely mentioning "new variable" is a note. Leading "#" are tolerated ("####30 08 2015 new variable").

Definition at line 29 of file LegacyFuzzyMarker.php.

Member Function Documentation

◆ matches()

static ILIAS\Language\ComponentTranslation\LegacyFuzzyMarker::matches ( string  $comment)
static

Definition at line 33 of file LegacyFuzzyMarker.php.

33 : bool
34 {
35 return preg_match(self::PATTERN, $comment) === 1;
36 }
$comment
Definition: buildRTE.php:72

References $comment.

Referenced by ILIAS\Language\ComponentTranslation\LegacyFuzzyMarkerTest\testMatches().

+ Here is the caller graph for this function:

Field Documentation

◆ PATTERN

const string ILIAS\Language\ComponentTranslation\LegacyFuzzyMarker::PATTERN = '/^[\s#]*(\d{1,2}\s+\d{1,2}\s+\d{4}|\d{1,2}\s+[A-Za-z]{3}\s+\d{4}|\d{4}-\d{1,2}-\d{1,2})\b.*\bnew variable\b/i'
private

Definition at line 31 of file LegacyFuzzyMarker.php.


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