Selaa lähdekoodia

restores uniformity

severoiuliano@gmail.com 5 vuotta sitten
vanhempi
commit
486c21c996
1 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 5
      system/Translations.php

+ 3 - 5
system/Translations.php

@@ -6,8 +6,6 @@ class Translations
 {
 {
   public static function loadTranslations($environment)
   public static function loadTranslations($environment)
   {
   {
-    define('DS', '/');
-    
     $yaml = new Models\WriteYaml();
     $yaml = new Models\WriteYaml();
     $settings = $yaml->getYaml('settings', 'settings.yaml');
     $settings = $yaml->getYaml('settings', 'settings.yaml');
 
 
@@ -28,7 +26,7 @@ class Translations
 
 
     // theme labels selected according to the environment: admin or user
     // theme labels selected according to the environment: admin or user
     $theme_labels = [];
     $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';
     $theme_language_file = $language . '.yaml';
     if (file_exists($theme_language_folder . $theme_language_file))
     if (file_exists($theme_language_folder . $theme_language_file))
     {
     {
@@ -39,7 +37,7 @@ class Translations
     $plugins_labels = [];
     $plugins_labels = [];
     if($environment=='admin'){
     if($environment=='admin'){
       // system labels
       // 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';
       $system_language_file = $language . '.yaml';
       if (file_exists($system_language_folder . $system_language_file))
       if (file_exists($system_language_folder . $system_language_file))
       {
       {
@@ -56,7 +54,7 @@ class Translations
             if($settings['plugins'] !== NULL) {
             if($settings['plugins'] !== NULL) {
               foreach($settings['plugins'] as $plugin => $config){
               foreach($settings['plugins'] as $plugin => $config){
                 if($config['active']=='on'){
                 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';
                   $plugin_language_file = $language . '.yaml';
                   if (file_exists($plugin_language_folder . $plugin_language_file)){
                   if (file_exists($plugin_language_folder . $plugin_language_file)){
                     $plugin_labels[$plugin] = $yaml->getYaml($plugin_language_folder, $plugin_language_file);
                     $plugin_labels[$plugin] = $yaml->getYaml($plugin_language_folder, $plugin_language_file);