Skip to content

Commit

Permalink
Made error message content and link into a parameter #233
Browse files Browse the repository at this point in the history
  • Loading branch information
unaibrrgn committed Dec 2, 2022
1 parent df2539b commit 7bd39a4
Show file tree
Hide file tree
Showing 25 changed files with 98 additions and 94 deletions.
4 changes: 4 additions & 0 deletions sources/Re3gistry2ServiceWebapp/public_html/conf/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ registryApp.maxSearchResultsPerPage = 10;
// Force http URIs (even if the original call has https URIs)
registryApp.forceHttpURIs=true;

// Default Error message parameters (Change if needed to your own repository or link)
registryApp.errorMessageDefinition = "Re3gistry Software repository";
registryApp.errorMessageURL = "https://github.com/ec-jrc/re3gistry";

// The app's base URL
registryApp.domainURL = '//registry-test.eu';
registryApp.hostURL = '//registry-test.eu/registry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ function renderFetchError(data) {
// Clearing the conatiner
resultsContainer.empty();

resultsContainer.append(htmlSnippet_errorMessage.replace('{0}', i18n[key_errorFetch]));
resultsContainer.append(htmlSnippet_errorMessage.replace('{0}', i18n[key_errorFetch]).replace('{0}',registryApp.errorMessageURL).replace('{1}',registryApp.errorMessageDefinition));

// Initializing the ECL Message component after creating it
let elt = document.querySelector('[' + key_dataEclMessage + ']');
Expand All @@ -745,7 +745,7 @@ function renderServiceError(data) {
// Clearing the conatiner
resultsContainer.empty();

resultsContainer.append(htmlSnippet_errorMessage.replace('{0}', i18n[key_errorFetch]));
resultsContainer.append(htmlSnippet_errorMessage.replace('{0}', i18n[key_errorFetch]).replace('{0}',registryApp.errorMessageURL).replace('{1}',registryApp.errorMessageDefinition));

// Initializing the ECL Message component after creating it
let elt = document.querySelector('[' + key_dataEclMessage + ']');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Регистър",
"s-facet-title-status_uri":"Статус",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Registr",
"s-facet-title-status_uri":"Stav",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Register",
"s-facet-title-status_uri":"Status",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Register",
"s-facet-title-status_uri":"Status",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Καταχωρητής",
"s-facet-title-status_uri":"Κατάσταση",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Register",
"s-facet-title-status_uri":"Status",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"s-search-results-current-page":"Showing results {0} to {1}",
"s-facet-title-register_itemclass_localid":"Registro",
"s-facet-title-status_uri":"Estado",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"https://github.com/ec-jrc/re3gistry/issues\">Re3gistry software helpdesk </a> to try and give more information about your problem.",
"s-error-fetch":"An error occurred while trying to access the data service. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-404":"The element requested has not been found in the system. If you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-406":"The format or language specified in the request is not available. Please specify a supported format/language. For additional info or if you think this could be an error, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"s-error-500":"The data service is not able to retrieve the information because of an internal error. If the error persist, please visit the <a href=\"{0}\">{1}</a> to try and give more information about your problem.",
"l-ec-web-presence":"https://ec.europa.eu/info/about-commissions-new-web-presence_{0}",
"l-ec-language-policy":"https://ec.europa.eu/info/language-policy_{0}",
"l-ec-resources-partners":"https://ec.europa.eu/info/resources-partners_{0}",
Expand Down
Loading

0 comments on commit 7bd39a4

Please sign in to comment.