// temporary disabled due records without an author, MKWS-400
describe("Check translations", function () {
- var $ = function (string) { return string };
+ var $ = function (string) {
+ return string
+ };
// handle html entities, "Zurück" => "Zurück"
var M = function (string) {
var locale_lang = {
"de": {
- "Authors": "Autoren",
- "Subjects": "Schlagwörter",
- "Sources": "Daten und Quellen",
- "source": "datenquelle",
- "Facets": "Termlisten",
- "Next": "Weiter",
- "Prev": "Zurück",
- "Search": "Suche",
- "Sort by": "Sortieren nach",
- "and show": "und zeige",
- "per page": "pro Seite",
- "Displaying": "Zeige",
- "to": "von",
- "of": "aus",
- "found": "gefunden",
- "Title": "Titel",
- "Author": "Autor",
- "author": "autor",
- "Date": "Datum",
- "Subject": "Schlagwort",
- "subject": "schlagwort",
- "Location": "Ort",
- "Records": "Datensätze",
- "Targets": "Datenbanken",
- "relevance": "Relevanz",
- "title": "Titel",
- "newest": "Neueste",
- "oldest": "Älteste",
-
- "dummy": "dummy"
- }};
+ "Authors": "Autoren",
+ "Subjects": "Schlagwörter",
+ "Sources": "Daten und Quellen",
+ "source": "datenquelle",
+ "Facets": "Termlisten",
+ "Next": "Weiter",
+ "Prev": "Zurück",
+ "Search": "Suche",
+ "Sort by": "Sortieren nach",
+ "and show": "und zeige",
+ "per page": "pro Seite",
+ "Displaying": "Zeige",
+ "to": "von",
+ "of": "aus",
+ "found": "gefunden",
+ "Title": "Titel",
+ "Author": "Autor",
+ "author": "autor",
+ "Date": "Datum",
+ "Subject": "Schlagwort",
+ "subject": "schlagwort",
+ "Location": "Bestand",
+ "Locations": "Bestand",
+ "Records": "Datensätze",
+ "Targets": "Datenbanken",
+ "relevance": "Relevanz",
+ "title": "Titel",
+ "newest": "Neueste",
+ "oldest": "Älteste",
+
+ "dummy": "dummy"
+ }
+ };
function check_translation_list(keywords, list) {
var errors = [];
for (var i = 0; i < keywords.length; i++) {
- if ($(list[i]).match("^" + M(keywords[i]) + ": ") ) {
+ if ($(list[i]).match("^" + M(keywords[i]) + ": ")) {
debug("found: " + list[i] + " :: " + keywords[i]);
- } else {
+ } else {
debug("NOT found: " + list[i] + " :: " + keywords[i]);
errors.push(keywords[i])
- }
+ }
}
expect(errors.length).not.toBeGreaterThan(1);
}
check_translation_list(keywords, list);
- for(var i = 0; i < keywords.length; i++ ) {
- keywords_de.push(locale_lang["de"][keywords[i]]);
+ for (var i = 0; i < keywords.length; i++) {
+ keywords_de.push(locale_lang["de"][keywords[i]]);
}
debug(keywords_de);
check_translation_list(keywords_de, list_de);