Skip to content

Commit

Permalink
Applied solution to issue in ServiceWebapp instead of dist/webapp #160
Browse files Browse the repository at this point in the history
  • Loading branch information
unaibrrgn committed Oct 4, 2022
1 parent 67503db commit 112c8bd
Show file tree
Hide file tree
Showing 24 changed files with 112 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,17 @@ function renderProperties(data) {
let href = values[0].href;

tmpHtml = (href !== null && href !== val_emptyString) ? renderHref(value, href) : value;
htmlOutput += renderField(item.label, tmpHtml);

if((item.id === "label" || item.id ==="definition") && data.language != item.lang){

let myJSON = getLanguageJSON(data.language);
let finalJSON = JSON.parse(myJSON);
let language = finalJSON.translatenotavailable;
let finalLabel = item.label + "<br><small> "+" [" + language + "] </small> ";
htmlOutput += renderField(finalLabel, tmpHtml);
}else{
htmlOutput += renderField(item.label, tmpHtml);
}

// If the property is the title, updating the page title.
if (item.istitle !== null && item.istitle === val_true) {
Expand Down Expand Up @@ -1081,4 +1091,13 @@ function renderSiteIdentity(data) {
*/
function renderDl(string) {
return htmlSnippet_dl.replace('{0}', string);
}

function getLanguageJSON(locale){
let JSONLINK = registryApp.hostURL + key_dataLocalizationFilesPath + '/' + locale + '.' + key_json;
var value= $.ajax({
url: JSONLINK,
async: false
}).responseText;
return value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Налични формати:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Bulgarian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Dostupné formáty:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Czech"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Tilgængelige formater:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Danish"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Verfügbare Formate:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Nicht verfuegbar auf deutsch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Διαθέσιμες μορφές:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Greek"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Available formats:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in English"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formatos disponibles:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Spanish"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Saadaolevad vormingud:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Estonian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Saatavilla olevat muodot:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Finnish"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formats disponibles:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in French"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Dostupni formati:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Nije dostupno na hrvatskom"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Elérhető formátumok:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Hungarian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formati disponibili:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Non disponibile in Italiano"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Galimi formatai:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Lithuanian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Pieejamie formāti:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Latvian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formati disponibbli:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Maltese"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Beschikbare formaten:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Dutch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Dostępne formaty:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Polish"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formatos disponíveis:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Portuguese"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Formate disponibile:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Nu e disponibil în Română"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Dostupné formáty:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Slovak"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Razpoložljivi formati:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Slovene"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"l-ec-website":"https://ec.europa.eu/info/index_{0}",
"s-other-formats":"Tillgängliga format:",
"s-insert-date":"Insert date",
"s-edit-date":"Edit date"
"s-edit-date":"Edit date",
"c-refine-results":"Refine results",
"c-clear-all":"Clear all",
"translatenotavailable":"Not available in Swedish"
}

0 comments on commit 112c8bd

Please sign in to comment.