Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: title tag and headings in capability map are in english in french version #173

Merged
merged 2 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions webapp/src/main/webapp/i18n/vivo_all.properties
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ vis_caching_process = What's involved in the caching process?
vis_tools_note_two = To this end we have devised a caching solution which will retain information about the hierarchy of organizations -- namely, which publications are attributed to which organizations -- by storing the RDF model.
vis_tools_note_three = We're currently caching these models in memory. The cache is built (only once) on the first user request after a server restart. Because of this, the same model will be served until the next restart. This means that the data in these models may become stale depending upon when it was last created. This works well enough for now. In future releases we will improve this solution so that models are stored on disk and periodically updated.
vis_tools_note_four = The models are refreshed each time the server restarts. Since this is not generally practical on production instances, administrators can instead use the "refresh cache" link above to do this without a restart.
capability_map=Capability Map
term_capitalized=Term

#
# custom form javascript variables ( /templates/freemarker/edit/js)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ var demos = [[
if (!console) var console = {
log : function() {}
};
if (typeof i18nStringsCap == 'undefined')
{
var i18nStringsCap = {
term: 'Term',
group: 'Group'
}
};
var schemes = {
"white" : {
"backgroundcolor" : "#FFFFFF",
Expand Down Expand Up @@ -395,7 +402,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) {
if (mode != "group") {
$(this.panel)
.empty()
.append(title = $("<h2>Term: " + decodeURIComponent(id) + "</h2>")
.append(title = $("<h2>" + i18nStringsCap.term + ": " + decodeURIComponent(id) + "</h2>")
.bind("click", function() {
highlight(id);
detailsPane.showDetails(mode, id);
Expand Down Expand Up @@ -454,7 +461,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) {
});
return $("<div/>")
.append(
$("<h2>" + "Group: " + group.capabilities.map(function(c) {
$("<h2>" + i18nStringsCap.group + ": " + group.capabilities.map(function(c) {
return decodeURIComponent(c.term);
}).join(", ") + "</h2>")
.bind("click", function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ ${stylesheets.add(
)}

<script language="JavaScript" type="text/javascript">
var i18nStringsCap = {
term: '${i18n().term_capitalized}',
group: '${i18n().group_capitalized}'
};
var contextPath = "${urls.base}";
$(document).ready(function() {
document.title = "${i18n().capability_map}";
var loadedConcepts = $.ajax({
url: contextPath + "/visualizationAjax?vis=capabilitymap&data=concepts",
type: "GET",
Expand Down