From 94eb74a414dce31dfce94bb7d1008ae75185f768 Mon Sep 17 00:00:00 2001 From: Florian Kellner Date: Fri, 23 Feb 2024 09:09:51 +0100 Subject: [PATCH 1/4] geosolutions-it#10158: set HTML document language On Behalf of DB Systel --- web/client/components/I18N/Localized.jsx | 1 + .../components/I18N/__tests__/Localized-test.jsx | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/web/client/components/I18N/Localized.jsx b/web/client/components/I18N/Localized.jsx index ea51c86430..6b194d08af 100644 --- a/web/client/components/I18N/Localized.jsx +++ b/web/client/components/I18N/Localized.jsx @@ -37,6 +37,7 @@ class Localized extends React.Component { if (typeof children === 'function') { children = children(); } + document.documentElement.setAttribute("lang", this.props.locale); return ( { expect(dom.innerHTML).toBe("my message"); }); + it('correctly sets the document language', () => { + ReactDOM.render( + + {() => } + + , document.getElementById("container")); + expect(document.documentElement.lang).toBe("it-IT"); + ReactDOM.render( + + {() => } + + , document.getElementById("container")); + expect(document.documentElement.lang).toBe("de-DE"); + }); + it('localizes wrapped HTML component', () => { var localized = ReactDOM.render( From 2d0982231cd118d3240b4cb93cf8b907071ce2f2 Mon Sep 17 00:00:00 2001 From: Florian Kellner Date: Thu, 4 Apr 2024 10:02:07 +0200 Subject: [PATCH 2/4] geosolutions-it#10158: re-enable browser zoom Too much Zoom does seem to break the layout, but handing that responsibility to the end user is more accessible than disabling it. Map zoom is unaffected, and since using browser zoom enlarges map controls, users who tried zooming into the map using browser zoom should be able to notice the actual controls and recover from their mistake. On Behalf of DB Systel --- web/client/index.html | 2 +- web/client/indexTemplate.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/client/index.html b/web/client/index.html index d7f952eaf2..c868c1bf74 100644 --- a/web/client/index.html +++ b/web/client/index.html @@ -3,7 +3,7 @@ - + MapStore HomePage