-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Translate editmode to interfacelanguage
Resolves: #11
- Loading branch information
Showing
6 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
namespace Shel\Neos\YoastSeo\FusionObjects; | ||
|
||
use Neos\Flow\Annotations as Flow; | ||
use Neos\Fusion\FusionObjects\AbstractFusionObject; | ||
use Neos\Neos\Service\UserService; | ||
|
||
/** | ||
* Object to retrieve the current backend users interface language | ||
*/ | ||
class InterfaceLanguageImplementation extends AbstractFusionObject | ||
{ | ||
|
||
/** | ||
* @Flow\Inject | ||
* @var UserService | ||
*/ | ||
protected $userService; | ||
|
||
/** | ||
* Returns the interface language as string | ||
* | ||
* @return string | ||
*/ | ||
public function evaluate() | ||
{ | ||
return $this->userService->getInterfaceLanguage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
prototype(Shel.Neos.YoastSeo:Component.Header) < prototype(Neos.Fusion:Tag) { | ||
tagName = 'h1' | ||
content = ${I18n.translate('Shel.Neos.YoastSeo:Main:header')} | ||
content = ${I18n.translate('header', null, [], 'Main', 'Shel.Neos.YoastSeo', null, interfaceLanguage)} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Resources/Private/Fusion/FusionObjects/InterfaceLanguage.fusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
prototype(Shel.Neos.YoastSeo:InterfaceLanguage) { | ||
@class = 'Shel\\Neos\\YoastSeo\\FusionObjects\\InterfaceLanguageImplementation' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters