diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/pt_BR.js | 2 | ||||
-rw-r--r-- | lib/l10n/pt_BR.json | 2 | ||||
-rw-r--r-- | lib/private/NavigationManager.php | 2 | ||||
-rw-r--r-- | lib/private/TemplateLayout.php | 3 | ||||
-rw-r--r-- | lib/private/legacy/defaults.php | 6 | ||||
-rw-r--r-- | lib/public/AppFramework/Db/Entity.php | 21 |
6 files changed, 20 insertions, 16 deletions
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js index 4e999187662..be9b2196e50 100644 --- a/lib/l10n/pt_BR.js +++ b/lib/l10n/pt_BR.js @@ -225,7 +225,7 @@ OC.L10N.register( "Storage incomplete configuration. %s" : "Configuração incompleta do armazenamento. %s", "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", - "Storage connection timeout. %s" : "Esgotado o tempo de conexão ao armazenamento. %s", + "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", "Create" : "Criar", "Change" : "Mudar", "Delete" : "Excluir", diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json index 5eb6f408c9c..d9546d03d4d 100644 --- a/lib/l10n/pt_BR.json +++ b/lib/l10n/pt_BR.json @@ -223,7 +223,7 @@ "Storage incomplete configuration. %s" : "Configuração incompleta do armazenamento. %s", "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", - "Storage connection timeout. %s" : "Esgotado o tempo de conexão ao armazenamento. %s", + "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", "Create" : "Criar", "Change" : "Mudar", "Delete" : "Excluir", diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 2c41fbd88c2..2f6befc632c 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -199,7 +199,7 @@ class NavigationManager implements INavigationManager { 'type' => 'settings', 'id' => 'help', 'order' => 5, - 'href' => $this->urlGenerator->linkToRoute('settings_help'), + 'href' => $this->urlGenerator->linkToRoute('settings.Help.help'), 'name' => $l->t('Help'), 'icon' => $this->urlGenerator->imagePath('settings', 'help.svg'), ]); diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 94b39e951a5..e7809b5a39d 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -142,7 +142,6 @@ class TemplateLayout extends \OC_Template { // Send the language and the locale to our layouts $lang = \OC::$server->getL10NFactory()->findLanguage(); $locale = \OC::$server->getL10NFactory()->findLocale($lang); - $localeLang = \OC::$server->getL10NFactory()->findLanguageFromLocale('lib', $locale); $lang = str_replace('_', '-', $lang); $this->assign('language', $lang); @@ -164,7 +163,7 @@ class TemplateLayout extends \OC_Template { if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') { if (\OC::$server->getContentSecurityPolicyNonceManager()->browserSupportsCspV3()) { $jsConfigHelper = new JSConfigHelper( - \OC::$server->getL10N('lib', $localeLang ?: $lang), + \OC::$server->getL10N('lib'), \OC::$server->query(Defaults::class), \OC::$server->getAppManager(), \OC::$server->getSession(), diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/defaults.php index d313366abe7..8633113ba5a 100644 --- a/lib/private/legacy/defaults.php +++ b/lib/private/legacy/defaults.php @@ -52,7 +52,6 @@ class OC_Defaults { private $defaultTextColorPrimary; public function __construct() { - $l10n = \OC::$server->getL10N('lib'); $config = \OC::$server->getConfig(); $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ @@ -65,7 +64,6 @@ class OC_Defaults { $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; $this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links - $this->defaultSlogan = $l10n->t('a safe home for all your data'); $this->defaultColorPrimary = '#0082c9'; $this->defaultTextColorPrimary = '#ffffff'; @@ -219,6 +217,10 @@ class OC_Defaults { if ($this->themeExist('getSlogan')) { return $this->theme->getSlogan(); } else { + if ($this->defaultSlogan === null) { + $l10n = \OC::$server->getL10N('lib'); + $this->defaultSlogan = $l10n->t('a safe home for all your data'); + } return $this->defaultSlogan; } } diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index e339707d85f..091b90257b4 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -24,6 +24,9 @@ namespace OCP\AppFramework\Db; +use function lcfirst; +use function substr; + /** * @method integer getId() * @method void setId(integer $id) @@ -139,16 +142,16 @@ abstract class Entity { * getter method * @since 7.0.0 */ - public function __call($methodName, $args){ - $attr = lcfirst( substr($methodName, 3) ); - - if(strpos($methodName, 'set') === 0){ - $this->setter($attr, $args); - } elseif(strpos($methodName, 'get') === 0) { - return $this->getter($attr); + public function __call($methodName, $args) { + if (strpos($methodName, 'set') === 0) { + $this->setter(lcfirst(substr($methodName, 3)), $args); + } elseif (strpos($methodName, 'get') === 0) { + return $this->getter(lcfirst(substr($methodName, 3))); + } elseif (strpos($methodName, 'is') === 0) { + return $this->getter(lcfirst(substr($methodName, 2))); } else { - throw new \BadFunctionCallException($methodName . - ' does not exist'); + throw new \BadFunctionCallException($methodName . + ' does not exist'); } } |