Skip to content

Commit

Permalink
less operation
Browse files Browse the repository at this point in the history
  • Loading branch information
aleswita committed Jul 24, 2021
1 parent ff77b1b commit 2608274
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function createLatteProperty(
string $suffix
): string
{
return '$ʟ_contributteTranslation' . Strings::firstUpper(Strings::lower($suffix));
return '$ʟ_contributteTranslation' . $suffix;
}

}
8 changes: 4 additions & 4 deletions src/Latte/Macros.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public function macroTranslate(
}

if ($node->empty = ($node->args !== '')) {
$messageProp = Helpers::createLatteProperty('message');
$prefixProp = Helpers::createLatteProperty('prefix');
$messageProp = Helpers::createLatteProperty('Message');
$prefixProp = Helpers::createLatteProperty('Prefix');

$prefix = $messageProp . ' = isset(' . $prefixProp . ') && !\Contributte\Translation\Helpers::isAbsoluteMessage(%node.word) ? implode(".", ' . $prefixProp . ') . "." : "";';

Expand All @@ -87,8 +87,8 @@ public function macroPrefix(
PhpWriter $writer
): string
{
$prefixProp = Helpers::createLatteProperty('prefix');
$tempPrefixProp = Helpers::createLatteProperty('tempPrefix');
$prefixProp = Helpers::createLatteProperty('Prefix');
$tempPrefixProp = Helpers::createLatteProperty('TempPrefix');

if ($node->closing) {
if ($node->content !== null && $node->content !== '') {
Expand Down

0 comments on commit 2608274

Please sign in to comment.