/usr/share/cockpit/playground/po.extra.de.js is in cockpit-tests 164-1.
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 | (function (root, data) {
var loaded, module;
/* Load into AMD if desired */
if (typeof define === 'function' && define.amd) {
define(data);
loaded = true;
}
/* Load into Cockpit locale */
if (typeof cockpit === 'object') {
cockpit.locale(data)
loaded = true;
}
function transformAngular(data, prev) {
var key, context, parts, value, result = { };
for (key in data) {
if (key === "")
continue;
parts = key.split("\u0004");
value = data[key];
if (parts[1]) {
context = parts[0];
key = parts[1];
} else {
context = "$$noContext";
key = parts[0];
}
if (value[0] === null)
value = value[1];
else
value = value.slice(1);
if (!(key in result))
result[key] = { };
result[key][context] = value;
}
return angular.extend(prev, result);
}
/* Load into angular here */
if (typeof angular === 'object') {
try {
module = angular.module(["gettext"]);
} catch(ex) { console.log(ex); /* Either no angular or angular-gettext */ };
if (module) {
loaded = true;
module.run(['gettextCatalog', function(gettextCatalog) {
var lang = data[""]["language"];
var prev = (gettextCatalog.getCurrentLanguage() == lang) ? gettextCatalog.strings : { };
gettextCatalog.setStrings(lang, transformAngular(data, prev));
gettextCatalog.setCurrentLanguage(lang);
}]);
}
}
if (!loaded)
root.po = data;
/* The syntax of this line is important by po2json */
}(this, {
"": {'plural-forms':function(n) {
var nplurals, plural;
nplurals=2; plural=(n != 1);
return plural;
},
"language": "de"
},
"Delete '{{ name }}'": [
null,
"'{{ name }}' löschen!!!"
]
}));
|