From bcf89e78b5c5a3c547e12608e878f92168d4eb53 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Tue, 9 Jul 2024 19:21:13 +0100 Subject: [PATCH 1/2] feat: Upgrade resources XSD - MEED-7237 - Meeds-io/MIPs#134 --- .../src/main/webapp/WEB-INF/gatein-resources.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gamification-crowdin-webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/gamification-crowdin-webapp/src/main/webapp/WEB-INF/gatein-resources.xml index 4024322..26733a5 100644 --- a/gamification-crowdin-webapp/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/gamification-crowdin-webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -20,10 +20,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> - - + engagementCenterActionsCrowdinExtensions From 7b69a5a0e548caf2aac1b9ba2927efa0dc6f6840 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Thu, 11 Jul 2024 15:02:41 +0100 Subject: [PATCH 2/2] feat: Retrieve Resource Bundle from extension context instead of Monolith - MEED-7237 - Meeds-io/MIPs#134 This change will allow to request the resource bundle from extension context using declared as a filter in the file. --- gamification-crowdin-webapp/src/main/webapp/WEB-INF/web.xml | 1 + .../src/main/webapp/vue-app/connectorExtensions/extensions.js | 2 +- .../crowdinUserConnectorExtension/js/crowdinConnector.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gamification-crowdin-webapp/src/main/webapp/WEB-INF/web.xml b/gamification-crowdin-webapp/src/main/webapp/WEB-INF/web.xml index 8e92cb6..4f0d6fa 100644 --- a/gamification-crowdin-webapp/src/main/webapp/WEB-INF/web.xml +++ b/gamification-crowdin-webapp/src/main/webapp/WEB-INF/web.xml @@ -44,6 +44,7 @@ *.css *.js *.html + /i18n/* /images/* diff --git a/gamification-crowdin-webapp/src/main/webapp/vue-app/connectorExtensions/extensions.js b/gamification-crowdin-webapp/src/main/webapp/vue-app/connectorExtensions/extensions.js index 5cdca3d..e77f506 100644 --- a/gamification-crowdin-webapp/src/main/webapp/vue-app/connectorExtensions/extensions.js +++ b/gamification-crowdin-webapp/src/main/webapp/vue-app/connectorExtensions/extensions.js @@ -26,7 +26,7 @@ export function init() { rank: 40, init: () => { const lang = window.eXo?.env?.portal?.language || 'en'; - const url = `${eXo.env.portal.context}/${eXo.env.portal.rest}/i18n/bundle/locale.portlet.CrowdinWebHookManagement-${lang}.json`; + const url = `/gamification-crowdin/i18n/locale.portlet.CrowdinWebHookManagement?lang=${lang}`; return exoi18n.loadLanguageAsync(lang, url); } }); diff --git a/gamification-crowdin-webapp/src/main/webapp/vue-app/crowdinUserConnectorExtension/js/crowdinConnector.js b/gamification-crowdin-webapp/src/main/webapp/vue-app/crowdinUserConnectorExtension/js/crowdinConnector.js index e503814..ea0d57d 100644 --- a/gamification-crowdin-webapp/src/main/webapp/vue-app/crowdinUserConnectorExtension/js/crowdinConnector.js +++ b/gamification-crowdin-webapp/src/main/webapp/vue-app/crowdinUserConnectorExtension/js/crowdinConnector.js @@ -27,7 +27,7 @@ export default { PROFILE_BASER_URL: 'https://crowdin.com', init: () => { const lang = window.eXo?.env?.portal?.language || 'en'; - const url = `${eXo.env.portal.context}/${eXo.env.portal.rest}/i18n/bundle/locale.portlet.CrowdinWebHookManagement-${lang}.json`; + const url = `/gamification-crowdin/i18n/locale.portlet.CrowdinWebHookManagement?lang=${lang}`; return exoi18n.loadLanguageAsync(lang, url); }, openOauthPopup(connector) {