diff --git a/apps/files/index.php b/apps/files/index.php index 767cb156ca2..fe2cd4f5543 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -29,7 +29,6 @@ OCP\User::checkLoggedIn(); OCP\Util::addStyle('files', 'files'); OCP\Util::addStyle('files', 'upload'); OCP\Util::addStyle('files', 'mobile'); -OCP\Util::addTranslations('files'); OCP\Util::addscript('files', 'app'); OCP\Util::addscript('files', 'file-upload'); OCP\Util::addscript('files', 'jquery.iframe-transport'); diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index f2dc63c340d..842b1a1ff27 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -1,6 +1,5 @@ getL10N('files_trashbin'); -OCP\Util::addTranslations('files_trashbin'); - // register hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index ae29bceb37c..e13dc64c46e 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -1,6 +1,5 @@ 0) { OC_Group::useBackend($groupBackend); } -OCP\Util::addTranslations('user_ldap'); OCP\Backgroundjob::registerJob('OCA\user_ldap\lib\Jobs'); OCP\Backgroundjob::registerJob('\OCA\User_LDAP\Jobs\CleanUp'); diff --git a/apps/user_webdavauth/appinfo/app.php b/apps/user_webdavauth/appinfo/app.php index 125f5f40654..3cd227bddbe 100644 --- a/apps/user_webdavauth/appinfo/app.php +++ b/apps/user_webdavauth/appinfo/app.php @@ -28,8 +28,6 @@ OC_APP::registerAdmin('user_webdavauth', 'settings'); OC_User::registerBackend("WEBDAVAUTH"); OC_User::useBackend( "WEBDAVAUTH" ); -OCP\Util::addTranslations('user_webdavauth'); - // add settings page to navigation $entry = array( 'id' => "user_webdavauth_settings", diff --git a/lib/private/util.php b/lib/private/util.php index d2d286fc11e..3b943f046bf 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -362,6 +362,10 @@ class OC_Util { public static function addScript($application, $file = null) { $path = OC_Util::generatePath($application, 'js', $file); if (!in_array($path, self::$scripts)) { + // core js files need separate handling + if ($application !== 'core' && $file !== null) { + self::addTranslations($application); + } self::$scripts[] = $path; } }