Skip to content
Snippets Groups Projects
Commit 455ad005 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #13350 from owncloud/autoload-translations

Autoload app's js translations
parents 01304aa2 6737dd11
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
<?php
\OCP\Util::addTranslations('files_encryption');
\OCP\Util::addscript('files_encryption', 'encryption');
\OCP\Util::addscript('files_encryption', 'detect-migration');
......
......@@ -21,8 +21,6 @@ OC::$CLASSPATH['OC\Files\Storage\SFTP'] = 'files_external/lib/sftp.php';
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
OC::$CLASSPATH['OCA\Files\External\Api'] = 'files_external/lib/api.php';
OCP\Util::addTranslations('files_external');
OCP\App::registerAdmin('files_external', 'settings');
if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
OCP\App::registerPersonal('files_external', 'personal');
......
......@@ -21,7 +21,6 @@ OC::$CLASSPATH['OCA\Files_Sharing\Exceptions\BrokenPath'] = 'files_sharing/lib/e
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addTranslations('files_sharing');
OCP\Util::addScript('files_sharing', 'share');
OCP\Util::addScript('files_sharing', 'external');
......
<?php
$l = \OC::$server->getL10N('files_trashbin');
OCP\Util::addTranslations('files_trashbin');
// register hooks
\OCA\Files_Trashbin\Trashbin::registerHooks();
......
<?php
OCP\Util::addTranslations('files_versions');
OCP\Util::addscript('files_versions', 'versions');
OCP\Util::addStyle('files_versions', 'versions');
......
......@@ -57,7 +57,6 @@ if(count($configPrefixes) > 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');
......
......@@ -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",
......
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment