This file is indexed.

/usr/share/locale/fi/LC_SCRIPTS/kdelibs4/kdelibs4.js is in kde-l10n-fi 4:4.8.2-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
function commonNameToLowerFirst(phr) {
    var str = Ts.subs(0);
    var pval = Ts.getProp(str, "yleisnimi");

    if (pval == "kyllä") {
        return Ts.toLowerFirst(phr);
    }
    else {
        return phr;
    }
}

Ts.setcall("yleisnimi_pienellä", commonNameToLowerFirst);

// Converts the first character in the string to lower case
function toLowerFirst(str)
{
    return Ts.toLowerFirst(str);
}

Ts.setcall("pieni_alkukirjain", toLowerFirst);

function conditionalHyphen(str1, str2)
{
    if (str1.indexOf(' ') != -1) {
        return str1 + " -" + str2;
    }
    else {
        return str1 + "-" + str2;
    }
}

Ts.setcall("yhdysmerkki", conditionalHyphen);


// Set properties of the phrase given by the finalized msgstr in the PO file.
// The arguments to the call are consecutive pairs of keys and values,
// as many as needed (i.e. total number of arguments must be even).
//
// The property keys are registered as PO calls taking single argument,
// which can be used to retrive the property values for this msgstr
// when it is later used as placeholder replacement in another message.
//
// Always signals fallback.
//
function setMsgstrProps (/*KEY1, VALUE1, ...*/)
{
    if (arguments.length % 2 != 0)
        throw Error("Property setter given odd number of arguments.");
 
    // Collect finalized msgstr.
    phrase = Ts.msgstrf()
 
    // Go through all key-value pairs.
    for (var i = 0; i < arguments.length; i += 2) {
        var pkey = arguments[i];
        var pval = arguments[i + 1];
 
        // Set the value of the property for this phrase.
        Ts.setProp(phrase, pkey, pval);
 
        // Set the PO call for getting this property, if not already set.
        if (!Ts.hascall(pkey)) {
            Ts.setcall(pkey,
                       function (phr) { return Ts.getProp(phr, this.pkey) },
                       {"pkey" : pkey});
        }
    }
 
    throw Ts.fallback();
}
Ts.setcall("aseta", setMsgstrProps);

// NOTE: You can replace "aseta" in the line above with any UTF-8 string,
// e.g. one in your language so that it blends nicely inside POs.

// The following things are copied from the croation kdelibs4.js and used for
// noun cases

// ------------------------------
// Create a scripting call linked to property key in pmaps.
// If the call name starts with lowercase letter,
// another call with the first letter in uppercase will be defined,
// which will upcase the first letter in the property value before
// returning it.
function create_pgetter (cname, pkey)
{
    if (!Ts.hascall(cname)) {
        Ts.setcall(cname,
            function (phr) {
                if (this.pkey.constructor == Array) {
                    for (var i = 0; i < this.pkey.length; ++i) {
                        var pval = Ts.getProp(phr, this.pkey[i]);
                        if (pval != undefined) {
                            return pval;
                        }
                    }
                    return undefined;
                } else {
                    return Ts.getProp(phr, this.pkey);
                }
            },
            {"pkey" : pkey});

        cname_uc = Ts.toUpperFirst(cname);
        if (cname_uc != cname) {
            Ts.setcall(cname_uc,
                function (phr) {
                    return Ts.toUpperFirst(Ts.acall(this.cname_lc, phr));
                },
                {"cname_lc" : cname});
        }
    }
}

// ------------------------------
// Predefined property getters.
// Call names with corresponding pmap keys for predefined getters.
// The first letter in the call name should be in lowercase;
// see the comment to create_pgetter() function for the reason.
var call_name_to_prop = {
    "nom" : "nom", // nominative case // is this really needed?
    "gen" : "gen", // genitive case
    "part" : "part", // partitive case
    "elat" : "elat", // elative case
    "adess" : "adess", // adessive case
    "illat" : "illat", // illative case
    "hakumuoto" : "hakumuoto",
//    "lok" : ["lok", "dat"], // locative case (forwarded to dative if missing)
// commented and left here for the purpose of example
};
for (cname in call_name_to_prop) {
    create_pgetter(cname, call_name_to_prop[cname]);
}

// ------------------------------
// Property maps to be available to all apps.
Ts.loadProps("general");