Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala authored Jan 17, 2025
1 parent 8b80183 commit 6342deb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/i18n/TextCollection/i18nTextCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ public function collectFromCode($content, $fileName, Module $module)
continue;
}

// Allow _t(Entity.Key, 'translation', $var) and expand _t(Entity.Key, $var)
// Allow _t(Entity.Key, 'default text', $var) and expand _t(Entity.Key, $var)
if ($id == T_VARIABLE && !empty($currentEntity)) {
// We have a default text, eg: _t(Entity.Key, 'translation', $var)
// We have a default text, eg: _t(Entity.Key, 'default text', $var)
if (count($currentEntity) == 2) {
continue;
}
Expand All @@ -784,7 +784,7 @@ public function collectFromCode($content, $fileName, Module $module)
// Try to find it _t(Entity.Key, $var)
$stringValue = $stringVariables[$text] ?? null;

// It's translated, continue
// It has a default translation, continue
if ($stringValue) {
$currentEntity[] = $stringValue;
continue;
Expand Down

0 comments on commit 6342deb

Please sign in to comment.