diff --git a/front/package.json b/front/package.json index 2d18b671949..d8dd88aa4ce 100644 --- a/front/package.json +++ b/front/package.json @@ -7,7 +7,7 @@ "@nivo/core": "^0.80.0", "@nivo/line": "^0.80.0", "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0", - "@osrd-project/netzgrafik-frontend": "0.0.0-snapshot.6d049b7244241254c33afc3818f40ec57ab57217", + "@osrd-project/netzgrafik-frontend": "0.0.0-snapshot.59a0e23312c449c8fda43c007c91e58745d76528", "@osrd-project/ui-core": "^0.0.53", "@osrd-project/ui-icons": "^0.0.53", "@osrd-project/ui-manchette": "^0.0.53", diff --git a/front/public/locales/de/home/navbar.json b/front/public/locales/de/home/navbar.json index 18a79ca37a5..fecc6196c3d 100644 --- a/front/public/locales/de/home/navbar.json +++ b/front/public/locales/de/home/navbar.json @@ -2,8 +2,11 @@ "about": "Über OSRD", "attributions": "Zuweisungen", "disconnect": "Abmelden", + "help": "Hilfe", "informations": { "application": "Anwendung", + "collaborations": "Kooperationen", + "dataSources": "Datenquellen", "librairies": "Versionsinformationen", "version": "Version" }, diff --git a/front/public/locales/en/home/navbar.json b/front/public/locales/en/home/navbar.json index 3c21f06b86c..92542e6d1b2 100644 --- a/front/public/locales/en/home/navbar.json +++ b/front/public/locales/en/home/navbar.json @@ -5,6 +5,7 @@ "help": "Help", "informations": { "application": "Application", + "collaborations": "Collaborations", "dataSources": "Data sources", "librairies": "Libraries & licenses", "version": "Version" diff --git a/front/public/locales/fr/home/navbar.json b/front/public/locales/fr/home/navbar.json index a8140f4719e..791a1f4e5a0 100644 --- a/front/public/locales/fr/home/navbar.json +++ b/front/public/locales/fr/home/navbar.json @@ -5,6 +5,7 @@ "help": "Aide", "informations": { "application": "Application", + "collaborations": "Collaborations", "dataSources": "Sources de données", "librairies": "Librairies & licences", "version": "Version" diff --git a/front/src/applications/operationalStudies/components/NGE/NGE.tsx b/front/src/applications/operationalStudies/components/NGE/NGE.tsx index 2b2258f2167..f0ba5c3ffe4 100644 --- a/front/src/applications/operationalStudies/components/NGE/NGE.tsx +++ b/front/src/applications/operationalStudies/components/NGE/NGE.tsx @@ -8,9 +8,12 @@ import ngeStyles from '@osrd-project/netzgrafik-frontend/dist/netzgrafik-fronten import ngeVendor from '@osrd-project/netzgrafik-frontend/dist/netzgrafik-frontend/vendor.js?url'; /* eslint-enable import/extensions, import/no-unresolved */ +import i18n from 'i18n'; + import type { NetzgrafikDto, NGEEvent } from './types'; interface NGEElement extends HTMLElement { + language: string; netzgrafikDto: NetzgrafikDto; } @@ -69,6 +72,12 @@ const NGE = ({ dto, onOperation }: NGEProps) => { }; }, []); + useEffect(() => { + if (ngeRootElement && i18n.language) { + ngeRootElement.language = i18n.language; + } + }, [i18n.language, ngeRootElement]); + useEffect(() => { if (ngeRootElement && dto) { ngeRootElement.netzgrafikDto = dto; diff --git a/front/src/common/ReleaseInformations/LicenseAttributions.tsx b/front/src/common/ReleaseInformations/LicenseAttributions.tsx index 899f1fd4b2c..e9dc904df75 100644 --- a/front/src/common/ReleaseInformations/LicenseAttributions.tsx +++ b/front/src/common/ReleaseInformations/LicenseAttributions.tsx @@ -11,6 +11,17 @@ type AttributionLicense = { license: string; }; +const COLLABORATIONS: AttributionLicense[] = [ + { + license: 'Apache-2.0', + publisher: 'Apache', + copyright: '© 2024 Swiss Federal Railways SBB AG', + version: '', + name: 'Netzgrafik-Editor', + url: 'https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-frontend', + }, +]; + // Libs which are not in the package.json, so we add it statically const DATA_SOURCES: AttributionLicense[] = [ { @@ -78,7 +89,13 @@ const LicenseAttributions = () => { return (
-

{t('informations.dataSources')}

+

{t('informations.collaborations')}

+
+ {COLLABORATIONS.map((dataSource) => ( + + ))} +
+

{t('informations.dataSources')}

{DATA_SOURCES.map((dataSource) => ( diff --git a/front/yarn.lock b/front/yarn.lock index cbbb7cda137..831752debce 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -1142,10 +1142,10 @@ openapi-typescript "^5.4.1" yargs "^17.7.2" -"@osrd-project/netzgrafik-frontend@0.0.0-snapshot.6d049b7244241254c33afc3818f40ec57ab57217": - version "0.0.0-snapshot.6d049b7244241254c33afc3818f40ec57ab57217" - resolved "https://registry.yarnpkg.com/@osrd-project/netzgrafik-frontend/-/netzgrafik-frontend-0.0.0-snapshot.6d049b7244241254c33afc3818f40ec57ab57217.tgz#40e507bb3e05be9c6dc07f6ed5533c3db5426d24" - integrity sha512-lK/r4qYPeibUtoumN/oaj1spoL7S7lK0J3ZLIf2pm/xCjbK/Gx+8QLNDz6PMoKlG19RUbFc765qybzADo3e3pg== +"@osrd-project/netzgrafik-frontend@0.0.0-snapshot.59a0e23312c449c8fda43c007c91e58745d76528": + version "0.0.0-snapshot.59a0e23312c449c8fda43c007c91e58745d76528" + resolved "https://registry.yarnpkg.com/@osrd-project/netzgrafik-frontend/-/netzgrafik-frontend-0.0.0-snapshot.59a0e23312c449c8fda43c007c91e58745d76528.tgz#b6970f0c9ee230f83f6f6b37853a2c01ee4e63b5" + integrity sha512-aaLaR3LGU6tyyz27/tzba1F9Yj+V2rkcSjerr856Q4yAc2xYH53eFU/LK6mcfieqPZFfSwJu1bfIgJ+hA8tLJg== "@osrd-project/ui-core@^0.0.53": version "0.0.53"