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");
|
||||
|
||||
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
||||
$defaultConfig = DataObject::get_one('SiteConfig');
|
||||
if($defaultConfig){
|
||||
$siteConfig->Title = $defaultConfig->Title;
|
||||
$siteConfig->Tagline = $defaultConfig->Tagline;
|
||||
}
|
||||
Translatable::disable_locale_filter();
|
||||
$defaultConfig = SiteConfig::get()->first();
|
||||
Translatable::enable_locale_filter();
|
||||
|
||||
if($defaultConfig){
|
||||
return $defaultConfig->createTranslation($locale);
|
||||
}
|
||||
|
||||
// TODO Copy view/edit group settings
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user