diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-24 11:35:18 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-24 11:35:18 +0200 |
commit | 04f992654203050d28bf6f41ab8ac2ea1019d6b0 (patch) | |
tree | e92172327374d5b8b657b73877269e97d4a1c4e0 /lib | |
parent | 026d509336775b9d6bf4c1d10849f03a2e9e5692 (diff) |
Translate details action
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ContactsMenu/Providers/DetailsProvider.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/ContactsMenu/Providers/DetailsProvider.php b/lib/ContactsMenu/Providers/DetailsProvider.php index 5bbcd087..c5d103c2 100644 --- a/lib/ContactsMenu/Providers/DetailsProvider.php +++ b/lib/ContactsMenu/Providers/DetailsProvider.php @@ -27,6 +27,7 @@ namespace OCA\Contacts\ContactsMenu\Providers; use OCP\Contacts\ContactsMenu\IActionFactory; use OCP\Contacts\ContactsMenu\IEntry; use OCP\Contacts\ContactsMenu\IProvider; +use OCP\IL10N; use OCP\IURLGenerator; class DetailsProvider implements IProvider { @@ -37,13 +38,17 @@ class DetailsProvider implements IProvider { /** @var IActionFactory */ private $actionFactory; + /** @var IL10N */ + private $l10n; + /** * @param IURLGenerator $urlGenerator * @param IActionFactory $actionFactory */ - public function __construct(IURLGenerator $urlGenerator, IActionFactory $actionFactory) { + public function __construct(IURLGenerator $urlGenerator, IActionFactory $actionFactory, IL10N $l10n) { $this->actionFactory = $actionFactory; $this->urlGenerator = $urlGenerator; + $this->l10n = $l10n; } /** @@ -62,10 +67,9 @@ class DetailsProvider implements IProvider { return; } - // TODO: l10n $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/info.svg')); $contactsUrl = $this->urlGenerator->getAbsoluteURL('/index.php/apps/contacts#/contact/' . $uid); - $action = $this->actionFactory->newLinkAction($iconUrl, 'Details', $contactsUrl); + $action = $this->actionFactory->newLinkAction($iconUrl, $this->l10n->t('Details'), $contactsUrl); $action->setPriority(0); $entry->addAction($action); } |