A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://phabricator.wikimedia.org/rETRA98b6958a2471 below:

rETRA98b6958a2471

Allow {{TRANSLATIONLANGUAGE}} outside of translate tags

In templates, it’s important to know the language of the template (as
opposed to the language of the template it’s transcluded in, i.e.
{{PAGELANGUAGE}}) so that HTML language markup can be added. Reuse the
existing {{TRANSLATIONLANGUAGE}} magic word, allowing it to be used both
within and outside of translate tags. Outside of translate tags, it
returns the language of the page it’s rendered in, not the one of the
translation unit (as there’s no translation unit). It still works only
if there are translate tags on the page, as otherwise the page parser
doesn’t run at all (and neither does using it make much sense: one can
just hardcode the wanted language).

Fix TranslationPageTest.php to use associative arrays for the
translation units: the actual code has used associative arrays before,
but the test used numeric ones, and the refactoring broke the numeric
arrays.

Bug: T224810
Change-Id: Ibe89bc158e27ef19c436d0f5a69820b341d2a023


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4