mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG Adding siteconfig translations
translations were not added in the same translation group, and the translation module didn't work. Also commited changes in the translation module, which will need this commit.
This commit is contained in:
parent
24ce0c199a
commit
18a40b4b5d
@ -205,11 +205,13 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
|||||||
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
||||||
|
|
||||||
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
||||||
$defaultConfig = DataObject::get_one('SiteConfig');
|
Translatable::disable_locale_filter();
|
||||||
if($defaultConfig){
|
$defaultConfig = SiteConfig::get()->first();
|
||||||
$siteConfig->Title = $defaultConfig->Title;
|
Translatable::enable_locale_filter();
|
||||||
$siteConfig->Tagline = $defaultConfig->Tagline;
|
|
||||||
}
|
if($defaultConfig){
|
||||||
|
return $defaultConfig->createTranslation($locale);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO Copy view/edit group settings
|
// TODO Copy view/edit group settings
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user