added dutch and french translations

This commit is contained in:
Abderahman88 2020-11-06 17:53:26 +01:00
parent 83ddd64e68
commit 883f6b1700
8 changed files with 48 additions and 20 deletions

View File

@ -32,7 +32,7 @@ It is required that the users have view access on the underlying calendar.
Solution|Author(s) Solution|Author(s)
--------|--------- --------|---------
react-graph-calendar | [Sébastien Levert](https://www.linkedin.com/in/sebastienlevert) ([@sebastienlevert](https://twitter.com/sebastienlevert)) 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 ## Version history
@ -43,6 +43,7 @@ Version|Date|Comments
1.2 |October 27, 2020 | Recurring events support 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.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.2|November 3, 2020 | Show calendar in other languages
1.2.3|November 6, 2020 | Added property panel translations (English, French, Dutch)
## Disclaimer ## 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.** **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.**

View File

@ -3,7 +3,7 @@
"solution": { "solution": {
"name": "react-graph-calendar-client-side-solution", "name": "react-graph-calendar-client-side-solution",
"id": "42fe0a0f-c4d9-4b05-806c-3857decb3d71", "id": "42fe0a0f-c4d9-4b05-806c-3857decb3d71",
"version": "1.2.2.0", "version": "1.2.3.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"skipFeatureDeployment": true, "skipFeatureDeployment": true,
"isDomainIsolated": false, "isDomainIsolated": false,

View File

@ -76,20 +76,16 @@ export default class GraphCalendarWebPart extends BaseClientSideWebPart<IGraphCa
return { return {
pages: [ pages: [
{ {
header: {
description: strings.PropertyPaneDescription
},
groups: [ groups: [
{ {
groupName: strings.BasicGroupName,
groupFields: [ groupFields: [
PropertyPaneSlider('limit', { PropertyPaneSlider('limit', {
label: "Events to load per active view", label: strings.EventsPerView,
max: 500, max: 500,
min: 50 min: 50
}), }),
PropertyPaneCheckbox('showRecurrence', { PropertyPaneCheckbox('showRecurrence', {
text: "Show recurring events", text: strings.ShowRecurringEvents,
checked: true checked: true
}) })
] ]

View File

@ -1,6 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { createRef } from "office-ui-fabric-react/lib/Utilities"; import { createRef } from "office-ui-fabric-react/lib/Utilities";
import styles from './GraphCalendar.module.scss'; import styles from './GraphCalendar.module.scss';
import * as strings from "GraphCalendarWebPartStrings";
import { IGraphCalendarProps } from './IGraphCalendarProps'; import { IGraphCalendarProps } from './IGraphCalendarProps';
import { MSGraphClient } from "@microsoft/sp-http"; import { MSGraphClient } from "@microsoft/sp-http";
import FullCalendar from '@fullcalendar/react'; import FullCalendar from '@fullcalendar/react';
@ -105,20 +106,20 @@ export default class GraphCalendar extends React.Component<IGraphCalendarProps,
headerText={this.state.currentSelectedEvent ? this.state.currentSelectedEvent.title : ""} headerText={this.state.currentSelectedEvent ? this.state.currentSelectedEvent.title : ""}
onDismiss={this._closeEventPanel.bind(this)} onDismiss={this._closeEventPanel.bind(this)}
isLightDismiss={true} isLightDismiss={true}
closeButtonAriaLabel='Close'> closeButtonAriaLabel={strings.Close}>
<h3>Start Time</h3> <h3>{strings.StartTime}</h3>
<span>{moment(this.state.currentSelectedEvent.start).format('MMMM Do YYYY [at] h:mm:ss a')}</span> <span>{moment(this.state.currentSelectedEvent.start).format('MMMM Do YYYY [at] h:mm:ss a')}</span>
<h3>Start Time</h3> <h3>{strings.EndTime}</h3>
<span>{moment(this.state.currentSelectedEvent.end).format('MMMM Do YYYY [at] h:mm:ss a')}</span> <span>{moment(this.state.currentSelectedEvent.end).format('MMMM Do YYYY [at] h:mm:ss a')}</span>
{this.state.currentSelectedEvent.extendedProps["location"] && {this.state.currentSelectedEvent.extendedProps["location"] &&
<div> <div>
<h3>Location</h3> <h3>{strings.Location}</h3>
<span>{this.state.currentSelectedEvent.extendedProps["location"]}</span> <span>{this.state.currentSelectedEvent.extendedProps["location"]}</span>
</div> </div>
} }
{this.state.currentSelectedEvent.extendedProps["body"] && {this.state.currentSelectedEvent.extendedProps["body"] &&
<div> <div>
<h3>Body</h3> <h3>{strings.Body}</h3>
<span>{this.state.currentSelectedEvent.extendedProps["body"]}</span> <span>{this.state.currentSelectedEvent.extendedProps["body"]}</span>
</div> </div>
} }
@ -425,7 +426,7 @@ export default class GraphCalendar extends React.Component<IGraphCalendarProps,
} }
/** /**
* Mapping for SharePoint laguages with Fullcalendar languages * Mapping for SharePoint languages with Fullcalendar languages
*/ */
private _createLangMap(): Map<string, string> { private _createLangMap(): Map<string, string> {
var languages = new Map(); var languages = new Map();

View File

@ -1,7 +1,11 @@
define([], function() { define([], function() {
return { return {
"PropertyPaneDescription": "Description", "EventsPerView": "Events to load per active view",
"BasicGroupName": "Group Name", "ShowRecurringEvents": "Show recurring events",
"DescriptionFieldLabel": "Description Field" "StartTime": "Start Time",
"EndTime": "End Time",
"Location": "Location",
"Body": "Body",
"Close": "Close"
} }
}); });

View File

@ -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",
}
});

View File

@ -1,7 +1,11 @@
declare interface IGraphCalendarWebPartStrings { declare interface IGraphCalendarWebPartStrings {
PropertyPaneDescription: string; EventsPerView: string;
BasicGroupName: string; ShowRecurringEvents: string;
DescriptionFieldLabel: string; StartTime: string;
EndTime: string;
Location: string;
Body: string;
Close: string;
} }
declare module 'GraphCalendarWebPartStrings' { declare module 'GraphCalendarWebPartStrings' {

View File

@ -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",
}
});