From: Roland Haeder Date: Wed, 29 Jun 2016 18:04:56 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=4ea53a936218cc17c3be1f903556968cb45399d1 Continued a bit: - line-feed is now Linux/Uni* way - no more language-dependent templates, keep language out of them as they should only define the structure of the website. Localization should be done with e.g. php_intl Signed-off-by: Roland Häder --- diff --git a/.gitattributes b/.gitattributes index dfe07704..17cdcd53 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Auto detect text files and perform LF normalization -* text=auto +# Use Linux/Uni* line-feed for new lines (prevents converting) +* text=lf diff --git a/inc/main/classes/template/class_BaseTemplateEngine.php b/inc/main/classes/template/class_BaseTemplateEngine.php index 543bd88f..4ca5c4a7 100644 --- a/inc/main/classes/template/class_BaseTemplateEngine.php +++ b/inc/main/classes/template/class_BaseTemplateEngine.php @@ -674,29 +674,19 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $ext = (string) $extOther; } - // Is language support enabled? - if ($this->isLanguageSupportEnabled()) { - // Construct the FQFN for the template by honoring the current language - $fqfn = sprintf('%s%s%s%s/%s/%s%s', - $this->getConfigInstance()->getConfigEntry('base_path'), - $this->getTemplateBasePath(), - $this->getGenericBasePath(), - $this->getLanguageInstance()->getLanguageCode(), - $this->getTemplateType(), - (string) $template, - $ext - ); - } else { - // Construct the FQFN for the template without language - $fqfn = sprintf('%s%s%s%s/%s%s', - $this->getConfigInstance()->getConfigEntry('base_path'), - $this->getTemplateBasePath(), - $this->getGenericBasePath(), - $this->getTemplateType(), - (string) $template, - $ext - ); - } + /* + * Construct the FQFN for the template without language as language is + * now entirely done by php_intl. These old thing with language-based + * template paths comes from an older time. + */ + $fqfn = sprintf('%s%s%s%s/%s%s', + $this->getConfigInstance()->getConfigEntry('base_path'), + $this->getTemplateBasePath(), + $this->getGenericBasePath(), + $this->getTemplateType(), + (string) $template, + $ext + ); // First try this try {