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:
Ruud Arentsen 2012-07-26 15:13:22 +02:00 committed by Ingo Schommer
parent 24ce0c199a
commit 18a40b4b5d

View File

@ -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