Description#3299 - Redirect for missing translations
There are parameters that influence rewrite behavior when requesting a web page:
1) accept-language header and availabity of translated pages
2) agent (may rewrite to browser specific page for downloads or documentation)
In case there exists a translation set, for example Mexican (es-MX), with a
page is missing that has (2) agent specific rewrite, it will first be assumed
that the translation is availble (bcause the folder /es_MX/ exists). Then the
rewrite will be made to the agent specific page, for example /es_MX/firefox.
As a result of this, a user/browser configured with accept-languaget es-MX will
visit adblockplus.org - get rewritten to /es_MX/ - and subsequently get
rewritten to /es_MX/firefox which results in a 404.
This commit handles this by moving the (2) agent rewrite to occur before the
checking of available translations. The same user/browser will now visit
adblockplus.org - get rewritten to /firefox - and then fall back to seeing
the page in Spanish (language fallback), or in case the language is missing
completely, English (default locale).
Patch Set 1 #Patch Set 2 : more details in commit msg #MessagesTotal messages: 5
|