mirror of
https://github.com/typemill/typemill.git
synced 2025-08-04 05:07:44 +02:00
restores uniformity
This commit is contained in:
@@ -6,8 +6,6 @@ class Translations
|
||||
{
|
||||
public static function loadTranslations($environment)
|
||||
{
|
||||
define('DS', '/');
|
||||
|
||||
$yaml = new Models\WriteYaml();
|
||||
$settings = $yaml->getYaml('settings', 'settings.yaml');
|
||||
|
||||
@@ -28,7 +26,7 @@ class Translations
|
||||
|
||||
// theme labels selected according to the environment: admin or user
|
||||
$theme_labels = [];
|
||||
$theme_language_folder = 'themes' . DS . $theme . DS . 'languages' . DS . $environment . DS;
|
||||
$theme_language_folder = 'themes' . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR . $environment . DIRECTORY_SEPARATOR;
|
||||
$theme_language_file = $language . '.yaml';
|
||||
if (file_exists($theme_language_folder . $theme_language_file))
|
||||
{
|
||||
@@ -39,7 +37,7 @@ class Translations
|
||||
$plugins_labels = [];
|
||||
if($environment=='admin'){
|
||||
// system labels
|
||||
$system_language_folder ='system' . DS . 'author' . DS . 'languages' . DS;
|
||||
$system_language_folder ='system' . DIRECTORY_SEPARATOR . 'author' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR;
|
||||
$system_language_file = $language . '.yaml';
|
||||
if (file_exists($system_language_folder . $system_language_file))
|
||||
{
|
||||
@@ -56,7 +54,7 @@ class Translations
|
||||
if($settings['plugins'] !== NULL) {
|
||||
foreach($settings['plugins'] as $plugin => $config){
|
||||
if($config['active']=='on'){
|
||||
$plugin_language_folder = 'plugins' . DS . $plugin . DS . 'languages' . DS;
|
||||
$plugin_language_folder = 'plugins' . DIRECTORY_SEPARATOR . $plugin . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR;
|
||||
$plugin_language_file = $language . '.yaml';
|
||||
if (file_exists($plugin_language_folder . $plugin_language_file)){
|
||||
$plugin_labels[$plugin] = $yaml->getYaml($plugin_language_folder, $plugin_language_file);
|
||||
|
Reference in New Issue
Block a user