From 883f6b1700b28c944335f64535482d1b7e1be6a0 Mon Sep 17 00:00:00 2001 From: Abderahman88 Date: Fri, 6 Nov 2020 17:53:26 +0100 Subject: [PATCH] added dutch and french translations --- samples/react-graph-calendar/README.md | 3 ++- .../config/package-solution.json | 2 +- .../webparts/graphCalendar/GraphCalendarWebPart.ts | 8 ++------ .../graphCalendar/components/GraphCalendar.tsx | 13 +++++++------ .../src/webparts/graphCalendar/loc/en-us.js | 10 +++++++--- .../src/webparts/graphCalendar/loc/fr-fr.js | 11 +++++++++++ .../src/webparts/graphCalendar/loc/mystrings.d.ts | 10 +++++++--- .../src/webparts/graphCalendar/loc/nl-nl.js | 11 +++++++++++ 8 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 samples/react-graph-calendar/src/webparts/graphCalendar/loc/fr-fr.js create mode 100644 samples/react-graph-calendar/src/webparts/graphCalendar/loc/nl-nl.js diff --git a/samples/react-graph-calendar/README.md b/samples/react-graph-calendar/README.md index 2d3add313..536f4da94 100644 --- a/samples/react-graph-calendar/README.md +++ b/samples/react-graph-calendar/README.md @@ -32,7 +32,7 @@ It is required that the users have view access on the underlying calendar. Solution|Author(s) --------|--------- react-graph-calendar | [Sébastien Levert](https://www.linkedin.com/in/sebastienlevert) ([@sebastienlevert](https://twitter.com/sebastienlevert)) -react-graph-calendar | Abderahman Moujahid (added support for recurring events) +react-graph-calendar | Abderahman Moujahid (added support for recurring events and languages) ## Version history @@ -43,6 +43,7 @@ Version|Date|Comments 1.2 |October 27, 2020 | Recurring events support 1.2.1|November 1, 2020 | Changed return behavior for single items vs recurring items 1.2.2|November 3, 2020 | Show calendar in other languages +1.2.3|November 6, 2020 | Added property panel translations (English, French, Dutch) ## Disclaimer **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** diff --git a/samples/react-graph-calendar/config/package-solution.json b/samples/react-graph-calendar/config/package-solution.json index fc2789cc1..46d6f21a4 100644 --- a/samples/react-graph-calendar/config/package-solution.json +++ b/samples/react-graph-calendar/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "react-graph-calendar-client-side-solution", "id": "42fe0a0f-c4d9-4b05-806c-3857decb3d71", - "version": "1.2.2.0", + "version": "1.2.3.0", "includeClientSideAssets": true, "skipFeatureDeployment": true, "isDomainIsolated": false, diff --git a/samples/react-graph-calendar/src/webparts/graphCalendar/GraphCalendarWebPart.ts b/samples/react-graph-calendar/src/webparts/graphCalendar/GraphCalendarWebPart.ts index ca314be9d..b8f3da883 100644 --- a/samples/react-graph-calendar/src/webparts/graphCalendar/GraphCalendarWebPart.ts +++ b/samples/react-graph-calendar/src/webparts/graphCalendar/GraphCalendarWebPart.ts @@ -76,20 +76,16 @@ export default class GraphCalendarWebPart extends BaseClientSideWebPart -

Start Time

+ closeButtonAriaLabel={strings.Close}> +

{strings.StartTime}

{moment(this.state.currentSelectedEvent.start).format('MMMM Do YYYY [at] h:mm:ss a')} -

Start Time

+

{strings.EndTime}

{moment(this.state.currentSelectedEvent.end).format('MMMM Do YYYY [at] h:mm:ss a')} {this.state.currentSelectedEvent.extendedProps["location"] &&
-

Location

+

{strings.Location}

{this.state.currentSelectedEvent.extendedProps["location"]}
} {this.state.currentSelectedEvent.extendedProps["body"] &&
-

Body

+

{strings.Body}

{this.state.currentSelectedEvent.extendedProps["body"]}
} @@ -425,7 +426,7 @@ export default class GraphCalendar extends React.Component { var languages = new Map(); diff --git a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/en-us.js b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/en-us.js index 89f98bc1e..28257a050 100644 --- a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/en-us.js +++ b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/en-us.js @@ -1,7 +1,11 @@ define([], function() { return { - "PropertyPaneDescription": "Description", - "BasicGroupName": "Group Name", - "DescriptionFieldLabel": "Description Field" + "EventsPerView": "Events to load per active view", + "ShowRecurringEvents": "Show recurring events", + "StartTime": "Start Time", + "EndTime": "End Time", + "Location": "Location", + "Body": "Body", + "Close": "Close" } }); \ No newline at end of file diff --git a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/fr-fr.js b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/fr-fr.js new file mode 100644 index 000000000..d9165f4e3 --- /dev/null +++ b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/fr-fr.js @@ -0,0 +1,11 @@ +define([], function() { + return { + "EventsPerView": "Nombre d'évenements montrés par vue actif", + "ShowRecurringEvents": "Afficher événements récurrents", + "StartTime": "Heure de début", + "EndTime": "Heure de fin", + "Location": "Location", + "Body": "Contenu", + "Close": "Fermer", + } + }); \ No newline at end of file diff --git a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/mystrings.d.ts b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/mystrings.d.ts index aab20b1f4..dd88e61d5 100644 --- a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/mystrings.d.ts +++ b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/mystrings.d.ts @@ -1,7 +1,11 @@ declare interface IGraphCalendarWebPartStrings { - PropertyPaneDescription: string; - BasicGroupName: string; - DescriptionFieldLabel: string; + EventsPerView: string; + ShowRecurringEvents: string; + StartTime: string; + EndTime: string; + Location: string; + Body: string; + Close: string; } declare module 'GraphCalendarWebPartStrings' { diff --git a/samples/react-graph-calendar/src/webparts/graphCalendar/loc/nl-nl.js b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/nl-nl.js new file mode 100644 index 000000000..cb6e03975 --- /dev/null +++ b/samples/react-graph-calendar/src/webparts/graphCalendar/loc/nl-nl.js @@ -0,0 +1,11 @@ +define([], function() { + return { + "EventsPerView": "Aantal evenementen tonen per actieve view", + "ShowRecurringEvents": "Toon recurrente evenementen", + "StartTime": "Begintijd", + "EndTime": "Eindtijd", + "Location": "Locatie", + "Body": "Inhoud", + "Close": "Sluiten", + } + }); \ No newline at end of file