White space cleanup on the text class.

This commit is contained in:
FusionPBX 2019-05-25 23:40:51 -06:00 committed by GitHub
parent 03170de257
commit a56a62d00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 20 deletions

View File

@ -1,4 +1,5 @@
<?php
/**
* Get the text for the correct translation
*
@ -244,7 +245,7 @@ class text {
}
}
}
if(strlen($append) == 0 and array_key_exists($comment, $lang_label) and array_key_exists($comment[$lang_label], $lang_code)) {
if(strlen($append) == 0 && array_key_exists($comment, $lang_label) && array_key_exists($comment[$lang_label], $lang_code)) {
$append = " //$comment[$lang_label][$lang_code]";
}
fwrite($lang_file, "\$text['$lang_label']['$target_lang'$spacer] = \"".$this->escape_str($value)."\";$append\n");
@ -348,10 +349,11 @@ class text {
}
}
foreach ($this->languages as $language_code) {
if (strlen($app['description'][$language_code]) > 0)
if (strlen($app['description'][$language_code]) > 0) {
$language_totals['app_descriptions'][$language_code]++;
}
}
}
return $language_totals;
}