diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php index e16300542c1155a73d8d43d2d1885e1109f98c05..75352ae11bab56f171c88c605b82c7778a59347a 100644 --- a/lib/SimpleSAML/Locale/Translate.php +++ b/lib/SimpleSAML/Locale/Translate.php @@ -127,7 +127,7 @@ class Translate { * @param $translations The translations, as an associative array with language => text mappings. * @return The preferred translation. */ - public function getTranslation($translations) { + public function getPreferredTranslation($translations) { assert('is_array($translations)'); /* Look up translation of tag in the selected language. */ @@ -175,14 +175,14 @@ class Translate { if ($extraDict !== NULL) { $dict = $this->getDictionary($extraDict); if (array_key_exists($normName, $dict)) { - return $this->getTranslation($dict[$normName]); + return $this->getPreferredTranslation($dict[$normName]); } } /* Search the default attribute dictionary. */ $dict = $this->getDictionary('attributes'); if (array_key_exists('attribute_' . $normName, $dict)) { - return $this->getTranslation($dict['attribute_' . $normName]); + return $this->getPreferredTranslation($dict['attribute_' . $normName]); } /* No translations found. */ @@ -240,7 +240,7 @@ class Translate { } } - $translated = $this->getTranslation($tagData); + $translated = $this->getPreferredTranslation($tagData); # if (!empty($replacements)){ echo('<pre> [' . $tag . ']'); print_r($replacements); exit; } foreach ($replacements as $k => $v) { diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index fd1d44e032b9a0e0b9019398eec2e02c16387c64..2074810fc48e57ec74d848a2d0a3352867d04d1f 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -32,12 +32,12 @@ class SimpleSAML_XHTML_Template /** - * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Locale\Translate::getTranslation() - * instead. + * @deprecated This method will be removed in SSP 2.0. Please use + * SimpleSAML\Locale\Translate::getPreferredTranslation() instead. */ public function getTranslation($translations) { - return $this->translator->getTranslation($translations); + return $this->translator->getPreferredTranslation($translations); }