Language editor refactoring part 4 (backend + frontend)

This commit is contained in:
Peter Papp
2021-04-01 10:40:48 +02:00
parent 5130082111
commit 7772ef6b40
32 changed files with 288 additions and 161 deletions

View File

@@ -328,16 +328,18 @@ class HelperService
* @param $license
* @param $locale
*/
function create_default_language_strings($license, $locale)
function create_default_language_translations($license, $locale)
{
$translations = [
'extended' => collect([
config("language-strings.extended"),
config("language-strings.regular")
config("language-translations.extended"),
config("language-translations.regular"),
config("custom-language-translations")
])->collapse(),
'regular' => collect([
config("language-translations.regular"),
config("custom-language-translations")
])->collapse(),
'regular' => collect(
config("language-strings.regular")
),
];
$translations = $translations[strtolower($license)]
@@ -349,7 +351,7 @@ class HelperService
];
})->toArray();
DB::table('language_strings')
DB::table('language_translations')
->insert($translations);
}
}