From fbd2dd49b6a16a786c6d6da13e8065037577b7c4 Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Wed, 8 Mar 2017 00:19:24 +0100 Subject: use closure to properly defer l10n initialization (#27328) --- apps/files_trashbin/appinfo/app.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'apps/files_trashbin') diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php index ed53657d22a..d4e44b78850 100644 --- a/apps/files_trashbin/appinfo/app.php +++ b/apps/files_trashbin/appinfo/app.php @@ -25,17 +25,16 @@ * */ -$l = \OC::$server->getL10N('files_trashbin'); - // register hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); -\OCA\Files\App::getNavigationManager()->add( -array( - "id" => 'trashbin', - "appname" => 'files_trashbin', - "script" => 'list.php', - "order" => 50, - "name" => $l->t('Deleted files') -) -); +\OCA\Files\App::getNavigationManager()->add(function () { + $l = \OC::$server->getL10N('files_trashbin'); + return [ + 'id' => 'trashbin', + 'appname' => 'files_trashbin', + 'script' => 'list.php', + 'order' => 50, + 'name' => $l->t('Deleted files'), + ]; +}); -- cgit v1.2.3