Sfoglia il codice sorgente

Misc: Language and text class adjustments.

Nate 5 anni fa
parent
commit
51080ed23b
2 ha cambiato i file con 32 aggiunte e 30 eliminazioni
  1. 23 23
      resources/app_languages.php
  2. 9 7
      resources/classes/text.php

+ 23 - 23
resources/app_languages.php

@@ -42,7 +42,7 @@ $text['language-ro-ro']['en-us'] = "România - România";
 $text['language-ru-ru']['en-us'] = "Русский - Россия";
 $text['language-sv-se']['en-us'] = "Svenska - Sverige";
 $text['language-uk-ua']['en-us'] = "Українська - Україна";
-$text['language-tr-tr']['tr-tr'] = "Türkçe - Türkiye";
+$text['language-tr-tr']['en-us'] = "Türkçe - Türkiye";
 
 $text['message-update']['en-us'] = "Update Completed";
 $text['message-update']['ar-eg'] = "تحديث مكتمل";
@@ -3894,27 +3894,27 @@ $text['description-description']['sv-se'] = "Fyll i en beskrivning.";
 $text['description-description']['uk-ua'] = "Введіть опис, якщо це необхідно.";
 $text['description-description']['tr-tr'] = "Açıklama girin.";
 
-$text['description-enabled']['en-us'] = "";
-$text['description-enabled']['ar-eg'] = "";
-$text['description-enabled']['de-at'] = "";
-$text['description-enabled']['de-ch'] = "";
-$text['description-enabled']['de-de'] = "";
-$text['description-enabled']['el-gr'] = "";
-$text['description-enabled']['es-cl'] = "";
-$text['description-enabled']['es-mx'] = "";
-$text['description-enabled']['fr-ca'] = "";
-$text['description-enabled']['fr-fr'] = "";
-$text['description-enabled']['he-il'] = "";
-$text['description-enabled']['it-it'] = "";
-$text['description-enabled']['nl-nl'] = "";
-$text['description-enabled']['pl-pl'] = "";
-$text['description-enabled']['pt-br'] = "";
-$text['description-enabled']['pt-pt'] = "";
-$text['description-enabled']['ro-ro'] = "";
-$text['description-enabled']['ru-ru'] = "";
-$text['description-enabled']['sv-se'] = "";
-$text['description-enabled']['uk-ua'] = "";
-$text['description-enabled']['tr-tr'] = "";
+$text['description-enabled']['en-us'] = "Select the current state.";
+$text['description-enabled']['ar-eg'] = "Select the current state.";
+$text['description-enabled']['de-at'] = "Select the current state.";
+$text['description-enabled']['de-ch'] = "Select the current state.";
+$text['description-enabled']['de-de'] = "Select the current state.";
+$text['description-enabled']['el-gr'] = "Select the current state.";
+$text['description-enabled']['es-cl'] = "Select the current state.";
+$text['description-enabled']['es-mx'] = "Select the current state.";
+$text['description-enabled']['fr-ca'] = "Select the current state.";
+$text['description-enabled']['fr-fr'] = "Select the current state.";
+$text['description-enabled']['he-il'] = "Select the current state.";
+$text['description-enabled']['it-it'] = "Select the current state.";
+$text['description-enabled']['nl-nl'] = "Select the current state.";
+$text['description-enabled']['pl-pl'] = "Select the current state.";
+$text['description-enabled']['pt-br'] = "Select the current state.";
+$text['description-enabled']['pt-pt'] = "Select the current state.";
+$text['description-enabled']['ro-ro'] = "Select the current state.";
+$text['description-enabled']['ru-ru'] = "Select the current state.";
+$text['description-enabled']['sv-se'] = "Select the current state.";
+$text['description-enabled']['uk-ua'] = "Select the current state.";
+$text['description-enabled']['tr-tr'] = "Select the current state.";
 
 $text['description-enter-context']['en-us'] = "Enter the context.";
 $text['description-enter-context']['ar-eg'] = "";
@@ -3937,4 +3937,4 @@ $text['description-enter-context']['ru-ru'] = "Введите контекст."
 $text['description-enter-context']['sv-se'] = "Ange Context";
 $text['description-enter-context']['uk-ua'] = "";
 
-?>
+?>

+ 9 - 7
resources/classes/text.php

@@ -102,13 +102,15 @@ class text {
 
 		//reduce to specific language
 			if ($language_code != 'all') {
-				if (is_array($text)) foreach ($text as $key => $value) {
-					if (isset($value[$language_code]) && strlen($value[$language_code]) > 0) {
-						$text[$key] = $value[$language_code];
-					}
-					else {
-						//fallback to en-us
-						$text[$key] = $value['en-us'];
+				if (is_array($text)) {
+					foreach ($text as $key => $value) {
+						if (isset($value[$language_code]) && strlen($value[$language_code]) > 0) {
+							$text[$key] = $value[$language_code];
+						}
+						else {
+							//fallback to en-us
+							$text[$key] = $value['en-us'];
+						}
 					}
 				}
 			}