Add init funtion to OC_Defaults to be able to wrap translatable strings
This commit is contained in:
parent
51cfacd789
commit
d46e62886a
|
@ -2,6 +2,8 @@
|
||||||
<div id="notification" style="display: none;"></div>
|
<div id="notification" style="display: none;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php OC_Defaults::init(); // initialize themable default strings and urls ?>
|
||||||
|
|
||||||
<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
|
<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
|
||||||
<input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
|
<input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
|
||||||
<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
|
<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
||||||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||||
|
|
||||||
|
<?php OC_Defaults::init(); // initialize themable default strings and urls ?>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
<?php p(OC_Defaults::getName()); ?>
|
<?php p(OC_Defaults::getName()); ?>
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
||||||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||||
|
|
||||||
|
<?php OC_Defaults::init(); // initialize themable default strings and urls ?>
|
||||||
|
|
||||||
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
|
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
|
||||||
<title>
|
<title>
|
||||||
<?php p(OC_Defaults::getName()); ?>
|
<?php p(OC_Defaults::getName()); ?>
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
||||||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
|
||||||
|
|
||||||
|
<?php OC_Defaults::init(); // initialize themable default strings and urls ?>
|
||||||
|
|
||||||
<head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
|
<head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
|
||||||
<title>
|
<title>
|
||||||
<?php p(!empty($_['application'])?$_['application'].' | ':'');
|
<?php p(!empty($_['application'])?$_['application'].' | ':'');
|
||||||
|
|
|
@ -11,13 +11,29 @@ if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.
|
||||||
|
|
||||||
class OC_Defaults {
|
class OC_Defaults {
|
||||||
|
|
||||||
private static $defaultEntity = "ownCloud";
|
private static $defaultEntity;
|
||||||
private static $defaultName = "ownCloud";
|
private static $defaultName;
|
||||||
private static $defaultBaseUrl = "http://owncloud.org";
|
private static $defaultBaseUrl;
|
||||||
private static $defaultSyncClientUrl = " http://owncloud.org/sync-clients/";
|
private static $defaultSyncClientUrl;
|
||||||
private static $defaultDocBaseUrl = "http://doc.owncloud.org";
|
private static $defaultDocBaseUrl;
|
||||||
private static $defaultSlogan = "web services under your control";
|
private static $defaultSlogan;
|
||||||
private static $defaultLogoClaim = "";
|
private static $defaultLogoClaim;
|
||||||
|
|
||||||
|
public static function init() {
|
||||||
|
$l = OC_L10N::get('core');
|
||||||
|
|
||||||
|
self::$defaultEntity = "ownCloud";
|
||||||
|
self::$defaultName = "ownCloud";
|
||||||
|
self::$defaultBaseUrl = "http://owncloud.org";
|
||||||
|
self::$defaultSyncClientUrl = " http://owncloud.org/sync-clients/";
|
||||||
|
self::$defaultDocBaseUrl = "http://doc.owncloud.org";
|
||||||
|
self::$defaultSlogan = $l->t("web services under your control");
|
||||||
|
self::$defaultLogoClaim = "";
|
||||||
|
|
||||||
|
if (class_exists("OC_Theme")) {
|
||||||
|
OC_Theme::init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static function themeExist($method) {
|
private static function themeExist($method) {
|
||||||
if (OC_Util::getTheme() !== '' && method_exists('OC_Theme', $method)) {
|
if (OC_Util::getTheme() !== '' && method_exists('OC_Theme', $method)) {
|
||||||
|
@ -67,11 +83,10 @@ class OC_Defaults {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getSlogan() {
|
public static function getSlogan() {
|
||||||
$l = OC_L10N::get('core');
|
|
||||||
if (self::themeExist('getSlogan')) {
|
if (self::themeExist('getSlogan')) {
|
||||||
return OC_Theme::getSlogan();
|
return OC_Theme::getSlogan();
|
||||||
} else {
|
} else {
|
||||||
return $l->t(self::$defaultSlogan);
|
return self::$defaultSlogan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,8 @@ class OC_Mail {
|
||||||
*/
|
*/
|
||||||
public static function getfooter() {
|
public static function getfooter() {
|
||||||
|
|
||||||
|
OC_Defaults::init();
|
||||||
|
|
||||||
$txt="\n--\n";
|
$txt="\n--\n";
|
||||||
$txt.=OC_Defaults::getName() . "\n";
|
$txt.=OC_Defaults::getName() . "\n";
|
||||||
$txt.=OC_Defaults::getSlogan() . "\n";
|
$txt.=OC_Defaults::getSlogan() . "\n";
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
OC_Util::checkLoggedIn();
|
OC_Util::checkLoggedIn();
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
|
|
||||||
|
OC_Defaults::init(); // initialize themable default strings and urls
|
||||||
|
|
||||||
// Highlight navigation entry
|
// Highlight navigation entry
|
||||||
OC_Util::addScript( 'settings', 'personal' );
|
OC_Util::addScript( 'settings', 'personal' );
|
||||||
OC_Util::addStyle( 'settings', 'settings' );
|
OC_Util::addStyle( 'settings', 'settings' );
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
$levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal');
|
$levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal');
|
||||||
|
|
||||||
|
OC_Defaults::init(); // initialize themable default strings and urls
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/?>
|
*/?>
|
||||||
|
|
||||||
|
<?php OC_Defaults::init(); // initialize themable default strings and urls ?>
|
||||||
|
|
||||||
<div class="clientsbox">
|
<div class="clientsbox">
|
||||||
<h2><?php p($l->t('Get the apps to sync your files'));?></h2>
|
<h2><?php p($l->t('Get the apps to sync your files'));?></h2>
|
||||||
|
|
Loading…
Reference in New Issue