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

[VIVO-1842] i18n: Added function js_string at i18n variables to handle quotes properly #180

Merged
merged 1 commit into from
Aug 26, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var proxyContextInfo = {
ajaxUrl: '${formUrls.proxyAjax}'
};
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
selectEditorAndProfile: '${i18n().select_editor_and_profile?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
</section>
<script type="text/javascript">
var i18nStrings = {
pleaseFormatEmail: '${i18n().please_format_email}',
enterValidAddress: '${i18n().or_enter_valid_address}'
pleaseFormatEmail: '${i18n().please_format_email?js_string}',
enterValidAddress: '${i18n().or_enter_valid_address?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
positionPredicate: '${positionPredicate}'
};
var i18nStrings = {
dragDropMenus: '${i18n().drag_drop_to_reorder_menus}',
reorderingFailed: '${i18n().reordering_menus_failed}'
dragDropMenus: '${i18n().drag_drop_to_reorder_menus?js_string}',
reorderingFailed: '${i18n().reordering_menus_failed?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@
</#if>
<script>
var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri}',
viewRDFProfile: '${i18n().view_profile_in_rdf}',
closeString: '${i18n().close}'
shareProfileUri: '${i18n().share_profile_uri?js_string}',
viewRDFProfile: '${i18n().view_profile_in_rdf?js_string}',
closeString: '${i18n().close?js_string}'
};
var i18nStrings = {
displayLess: '${i18n().display_less}',
displayMoreEllipsis: '${i18n().display_more_ellipsis}',
showMoreContent: '${i18n().show_more_content}',
displayLess: '${i18n().display_less?js_string}',
displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
showMoreContent: '${i18n().show_more_content?js_string}',
};

</script>
Expand All @@ -110,5 +110,5 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/js/imageUpload/i
'<script type="text/javascript" src="${urls.base}/js/individual/individualUriRdf.js"></script>')}

<script type="text/javascript">
i18n_confirmDelete = "${i18n().confirm_delete}";
i18n_confirmDelete = "${i18n().confirm_delete?js_string}";
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ var customFormData = {
numberAvailableLocales:${availableLocalesNumber}
};
var i18nStrings = {
errorProcessingLabels: '${i18n().error_processing_labels}',
selectLocaleOptionString : '${i18n().select_locale}'
errorProcessingLabels: '${i18n().error_processing_labels?js_string}',
selectLocaleOptionString : '${i18n().select_locale?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var proxyContextInfo = {
ajaxUrl: '${formUrls.ajax}'
};
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
selectEditorAndProfile: '${i18n().select_editor_and_profile?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<script>
var i18nStrings = {
confirmPageDeletion: '${i18n().confirm_page_deletion}'
confirmPageDeletion: '${i18n().confirm_page_deletion?js_string}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css" />',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/browseClassGrou
defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}'
};
var i18nStrings = {
browseAllString: '${i18n().browse_all}',
contentString: '${i18n().content}'
browseAllString: '${i18n().browse_all?js_string}',
contentString: '${i18n().content?js_string}'
};

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
defaultBrowseVClassUri: firstBrowseClass //'${firstNonEmptyVClass}'
};
var i18nStrings = {
pageString: '${i18n().page}',
viewPageString: '${i18n().view_page}',
ofTheResults: '${i18n().of_the_results}',
thereAreNo: '${i18n().there_are_no}',
indNamesStartWith: '${i18n().individuals_names_starting_with}',
tryAnotherLetter: '${i18n().try_another_letter}',
indsInSystem: '${i18n().individuals_in_system}',
selectAnotherClass: '${i18n().select_another_class}'
pageString: '${i18n().page?js_string}',
viewPageString: '${i18n().view_page?js_string}',
ofTheResults: '${i18n().of_the_results?js_string}',
thereAreNo: '${i18n().there_are_no?js_string}',
indNamesStartWith: '${i18n().individuals_names_starting_with?js_string}',
tryAnotherLetter: '${i18n().try_another_letter?js_string}',
indsInSystem: '${i18n().individuals_in_system?js_string}',
selectAnotherClass: '${i18n().select_another_class?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
<script language="javascript" type="text/javascript" >
var json = [${jsonTree!}];
var i18nStrings = {
hideSubclasses: '${i18n().hide_subclasses}',
showSubclasses: '${i18n().show_subclasses}',
classGroup: '${i18n().class_group_all_caps}',
ontologyString: '${i18n().ontology_capitalized}',
subclassesString: '${i18n().subclasses_capitalized}',
expandAll: '${i18n().expand_all}',
collapseAll: '${i18n().collapse_all}',
classesString: '${i18n().classes_capitalized}',
displayRank: '${i18n().display_rank}'
hideSubclasses: '${i18n().hide_subclasses?js_string}',
showSubclasses: '${i18n().show_subclasses?js_string}',
classGroup: '${i18n().class_group_all_caps?js_string}',
ontologyString: '${i18n().ontology_capitalized?js_string}',
subclassesString: '${i18n().subclasses_capitalized?js_string}',
expandAll: '${i18n().expand_all?js_string}',
collapseAll: '${i18n().collapse_all?js_string}',
classesString: '${i18n().classes_capitalized?js_string}',
displayRank: '${i18n().display_rank?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
var json = [${jsonTree!}];
var propertyType = '${propType}';
var i18nStrings = {
hideProperties: '${i18n().hide_properties}',
showProperties: '${i18n().show_properties}',
localNameString: '${i18n().local_name}',
groupString: '${i18n().group_capitalized}',
domainClass: '${i18n().domain_class}',
rangeClass: '${i18n().range_class}',
rangeDataType: '${i18n().range_data_type}',
expandAll: '${i18n().expand_all}',
collapseAll: '${i18n().collapse_all}',
subProperties: '${i18n().sub_properties}',
displayRank: '${i18n().display_rank}',
subProperty: '${i18n().subproperty}',
propertiesString: '${i18n().properties_capitalized}'
hideProperties: '${i18n().hide_properties?js_string}',
showProperties: '${i18n().show_properties?js_string}',
localNameString: '${i18n().local_name?js_string}',
groupString: '${i18n().group_capitalized?js_string}',
domainClass: '${i18n().domain_class?js_string}',
rangeClass: '${i18n().range_class?js_string}',
rangeDataType: '${i18n().range_data_type?js_string}',
expandAll: '${i18n().expand_all?js_string}',
collapseAll: '${i18n().collapse_all?js_string}',
subProperties: '${i18n().sub_properties?js_string}',
displayRank: '${i18n().display_rank?js_string}',
subProperty: '${i18n().subproperty?js_string}',
propertiesString: '${i18n().properties_capitalized?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ Also multiple types parameter set to true only if more than one type returned-->
baseHref: '${urls.base}/individual?uri='
};
var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}',
orCreateNewOne: '${i18n().or_create_new_one}',
selectedString: '${i18n().selected}'
selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected?js_string}'
};
</script>
<#--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@
var datatype = "${datatype!}";

var i18nStrings = {
four_digit_year: '${i18n().four_digit_year}',
year_numeric: '${i18n().year_numeric}',
year_month_day: '${i18n().year_month_day}',
minimum_ymd: '${i18n().minimum_ymd}',
minimum_hour: '${i18n().minimum_hour}',
year_month: '${i18n().year_month}',
decimal_only: '${i18n().decimal_only}',
whole_number: '${i18n().whole_number}'
four_digit_year: '${i18n().four_digit_year?js_string}',
year_numeric: '${i18n().year_numeric?js_string}',
year_month_day: '${i18n().year_month_day?js_string}',
minimum_ymd: '${i18n().minimum_ymd?js_string}',
minimum_hour: '${i18n().minimum_hour?js_string}',
year_month: '${i18n().year_month?js_string}',
decimal_only: '${i18n().decimal_only?js_string}',
whole_number: '${i18n().whole_number?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@
</section>
<script>
var i18nStrings = {
supplyName: '${i18n().supply_name}',
supplyPrettyUrl: '${i18n().supply_url}',
startUrlWithSlash: '${i18n().start_url_with_slash}',
supplyTemplate: '${i18n().supply_template}',
supplyContentType: '${i18n().supply_content_type}',
selectContentType: '${i18n().select_content_type}',
allCapitalized: '${i18n().all_capitalized}'
supplyName: '${i18n().supply_name?js_string}',
supplyPrettyUrl: '${i18n().supply_url?js_string}',
startUrlWithSlash: '${i18n().start_url_with_slash?js_string}',
supplyTemplate: '${i18n().supply_template?js_string}',
supplyContentType: '${i18n().supply_content_type?js_string}',
selectContentType: '${i18n().select_content_type?js_string}',
allCapitalized: '${i18n().all_capitalized?js_string}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/menuManagement.css" />')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
</section>
<script>
var i18nStringsBrowseGroups = {
browseClassGroup: '${i18n().browse_class_group}',
allCapitalized: '${i18n().all_capitalized}',
supplyClassGroup: '${i18n().supply_class_group}',
selectClasses: '${i18n().select_classes_to_display}'
browseClassGroup: '${i18n().browse_class_group?js_string}',
allCapitalized: '${i18n().all_capitalized?js_string}',
supplyClassGroup: '${i18n().supply_class_group?js_string}',
selectClasses: '${i18n().select_classes_to_display?js_string}'
};
</script>
<#--Include JavaScript specific to the types of data getters related to this content-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</section>
<script>
var i18nStringsFixedHtml = {
fixedHtml: '${i18n().fixed_html}',
supplyVariableName: '${i18n().supply_variable_name}',
noApostrophes: '${i18n().apostrophe_not_allowed}',
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
supplyHtml: '${i18n().supply_html}'
fixedHtml: '${i18n().fixed_html?js_string}',
supplyVariableName: '${i18n().supply_variable_name?js_string}',
noApostrophes: '${i18n().apostrophe_not_allowed?js_string}',
noDoubleQuotes: '${i18n().double_quote_note_allowed?js_string}',
supplyHtml: '${i18n().supply_html?js_string}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
</section>
<script>
var i18nStringsSearchIndividuals = {
searchIndividuals: '${i18n().search_individual_results}',
supplyQueryVariable: '${i18n().supply_query_variable}',
noApostrophes: '${i18n().apostrophe_not_allowed}',
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
supplyQuery: '${i18n().supply_sparql_query}',
selectClass: '${i18n().select_class_for_search}'
searchIndividuals: '${i18n().search_individual_results?js_string}',
supplyQueryVariable: '${i18n().supply_query_variable?js_string}',
noApostrophes: '${i18n().apostrophe_not_allowed?js_string}',
noDoubleQuotes: '${i18n().double_quote_note_allowed?js_string}',
supplyQuery: '${i18n().supply_sparql_query?js_string}',
selectClass: '${i18n().select_class_for_search?js_string}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSearchDataGetterContent.js"></script>')}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
</section>
<script>
var i18nStringsSparqlQuery = {
sparqlResults: '${i18n().sparql_query_results}',
supplyQueryVariable: '${i18n().supply_query_variable}',
noApostrophes: '${i18n().apostrophe_not_allowed}',
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
supplyQuery: '${i18n().supply_sparql_query}'
sparqlResults: '${i18n().sparql_query_results?js_string}',
supplyQueryVariable: '${i18n().supply_query_variable?js_string}',
noApostrophes: '${i18n().apostrophe_not_allowed?js_string}',
noDoubleQuotes: '${i18n().double_quote_note_allowed?js_string}',
supplyQuery: '${i18n().supply_sparql_query?js_string}'
};
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,21 @@
<#include "pageManagement--customDataScript.ftl">
<script>
var i18nStrings = {
browseClassGroup: '${i18n().browse_class_group}',
fixedHtml: '${i18n().fixed_html}',
sparqlResults: '${i18n().sparql_query_results}',
searchIndividuals: '${i18n().search_individual_results}',
orString: '${i18n().or}',
deleteString: '${i18n().delete}',
allCapitalized: '${i18n().all_capitalized}',
mapProcessorError: '${i18n().map_processor_error}',
codeProcessingError: '${i18n().code_processing_error}',
supplyName: '${i18n().supply_name}',
supplyPrettyUrl: '${i18n().supply_url}',
startUrlWithSlash: '${i18n().start_url_with_slash}',
supplyTemplate: '${i18n().supply_template}',
selectContentType: '${i18n().select_content_type}',
multipleContentWithDefaultTemplateError: '${i18n().multiple_content_default_template_error}'
browseClassGroup: '${i18n().browse_class_group?js_string}',
fixedHtml: '${i18n().fixed_html?js_string}',
sparqlResults: '${i18n().sparql_query_results?js_string}',
searchIndividuals: '${i18n().search_individual_results?js_string}',
orString: '${i18n().or?js_string}',
deleteString: '${i18n().delete?js_string}',
allCapitalized: '${i18n().all_capitalized?js_string}',
mapProcessorError: '${i18n().map_processor_error?js_string}',
codeProcessingError: '${i18n().code_processing_error?js_string}',
supplyName: '${i18n().supply_name?js_string}',
supplyPrettyUrl: '${i18n().supply_url?js_string}',
startUrlWithSlash: '${i18n().start_url_with_slash?js_string}',
supplyTemplate: '${i18n().supply_template?js_string}',
selectContentType: '${i18n().select_content_type?js_string}',
multipleContentWithDefaultTemplateError: '${i18n().multiple_content_default_template_error?js_string}'
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<#-- Template for scripts that must be loaded in the head -->
<script>
var i18nStrings = {
allCapitalized: '${i18n().all_capitalized}',
allCapitalized: '${i18n().all_capitalized?js_string}',
};
</script>
<script type="text/javascript" src="${urls.base}/js/jquery-1.12.4.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-->
<script type="text/javascript">
var i18nStringsLangMenu = {
selectLanguage: "${i18n().select_a_language}"
selectLanguage: "${i18n().select_a_language?js_string}"
};
</script>

Expand Down