Commit 063770cf authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

KISS: RemoveType is a simpler fix for .tr; explain .da files; order our

LanguagePriority by a first-order comparison and drop negligable translations
from our ordered priority preference list entirely.

A better comparison would be total number of documents in-sync, or some
convoluted weight ordering each document by which are more in sync than
others. Leaving that puzzle to an interested hacker.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791807 13f79535-47bb-0310-9956-ffa450edef68
parent 9b1ef73c
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -18,16 +18,22 @@ AliasMatch ^/manual(?:/(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "@exp
    <Files *.html>
        SetHandler type-map
    </Files>

    # .tr is text/troff in mime.types!
    <Files *.html.tr.utf8>
        ForceType "text/html; charset=utf-8"
    </Files>
    RemoveType tr

    # Traditionally, used .dk filename extension for da language
    AddLanguage da .da

    SetEnvIf Request_URI ^/manual/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)/ prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)){2,}(/.*)?$ /manual/$1$2

    LanguagePriority en da de es fr ja ko pt-br ru tr
    # Reflect the greatest effort in translation (most content available),
    # inferring greater attention to detail (potentially false assumption,
    # counting translations presently in-sync would be more helpful.)
    # Use caution counting; safest pattern is '*.xml.XX*' and drop negligable
    # translations of fewer than 10 manual pages.  At the time of this list,
    # .xml sources: 278 183 110 94 82 31 22    18
    LanguagePriority en  fr  ko ja tr es de zh-cn
    ForceLanguagePriority Prefer Fallback
</Directory>