Skip to content

Commit cf15644

Browse files
iMicknlCorina
authored andcommitted
Updated Dutch localization (#1812)
* Update Dutch language file * Update changelog
1 parent caffee2 commit cf15644

2 files changed

Lines changed: 61 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5353
- Update Russian and Japanese locale by [@corinagum](https://github.com/corinagum) in PR [#1747](https://github.com/Microsoft/BotFramework-WebChat/pull/1747)
5454
- Update Spanish by [@ckgrafico](https://github.com/ckgrafico) in PR [#1757](https://github.com/Microsoft/BotFramework-WebChat/pull/1757)
5555
- Update Swedish by [@pekspro](https://github.com/pekspro) in PR [#1797](https://github.com/Microsoft/BotFramework-WebChat/pull/1797)
56+
- Update Dutch locale by [@imicknl](https://github.com/imicknl) in PR [#1812](https://github.com/Microsoft/BotFramework-WebChat/pull/1812)
5657

5758
### Fixed
5859
- Fix [#1360](https://github.com/Microsoft/BotFramework-WebChat/issues/1360). Added `roles` to components of Web Chat, by [@corinagum](https://github.com/corinagum) in PR [#1462](https://github.com/Microsoft/BotFramework-WebChat/pull/1462)
Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,71 @@
1+
function botSaidSomething(avatarInitials, text, timestamp) {
2+
return `Bot ${avatarInitials} zei; ${text}, ${xMinutesAgo(timestamp)}`;
3+
}
4+
5+
function userSaidSomething(avatarInitials, text, timestamp) {
6+
return `Gebruiker ${avatarInitials} zei; ${text}, ${xMinutesAgo(timestamp)}`;
7+
}
8+
9+
function xMinutesAgo(dateStr) {
10+
const date = new Date(dateStr);
11+
const dateTime = date.getTime();
12+
13+
if (isNaN(dateTime)) {
14+
return dateStr;
15+
}
16+
17+
const now = Date.now();
18+
const deltaInMs = now - dateTime;
19+
const deltaInMinutes = Math.floor(deltaInMs / 60000);
20+
const deltaInHours = Math.floor(deltaInMs / 3600000);
21+
22+
if (deltaInMinutes < 1) {
23+
return 'Zojuist';
24+
} else if (deltaInMinutes === 1) {
25+
return 'Een minuut geleden';
26+
} else if (deltaInHours < 1) {
27+
return `${deltaInMinutes} minuten geleden`;
28+
} else if (deltaInHours === 1) {
29+
return `Een uur geleden`;
30+
} else if (deltaInHours < 5) {
31+
return `${deltaInHours} uur geleden`;
32+
} else if (deltaInHours <= 24) {
33+
return `Vandaag`;
34+
} else if (deltaInHours <= 48) {
35+
return `Gisteren`;
36+
} else if (window.Intl) {
37+
return new Intl.DateTimeFormat('nl-NL').format(date);
38+
} else {
39+
return date.toLocaleString('nl-NL', {
40+
day: '2-digit',
41+
hour: '2-digit',
42+
hour12: false,
43+
minute: '2-digit',
44+
month: '2-digit',
45+
year: 'numeric',
46+
});
47+
}
48+
}
49+
150
export default {
2-
// FAILED_CONNECTION_NOTIFICATION: '',
3-
// Do not localize {Retry}; it is a placeholder for "Retry". English translation should be, "Send failed. Retry."
4-
SEND_FAILED_KEY: 'versturen mislukt, {Retry}.',
5-
// SLOW_CONNECTION_NOTIFICATION: '',
51+
FAILED_CONNECTION_NOTIFICATION: 'Verbinding maken niet mogelijk.',
52+
SEND_FAILED_KEY: 'Versturen mislukt, {retry}.',
53+
SLOW_CONNECTION_NOTIFICATION: 'Verbinding maken duurt langer dan normaal…',
654
'Chat': 'Chat',
7-
// 'Download file': '',
8-
// 'Microphone off': '',
9-
// 'Microphone on': '',
55+
'Download file': 'Bestand downloaden',
56+
'Microphone off': 'Microfoon uit',
57+
'Microphone on': 'Microfoon aan',
1058
'Listening…': 'Aan het luisteren…',
11-
'retry': 'opnieuw',
12-
'Retry': '{retry}', // Please alter this value if 'Retry' at the beginning of a sentence is written differently than at the end of a sentence.
59+
'retry': 'probeer opnieuw',
60+
'Retry': 'Opnieuw proberen',
1361
'Send': 'Verstuur',
1462
'Sending': 'versturen',
1563
'Speak': 'Spreek',
16-
// 'Starting…': '',
64+
'Starting…': 'Starten…',
1765
'Tax': 'BTW',
1866
'Total': 'Totaal',
1967
'Type your message': 'Typ je bericht',
2068
'Upload file': 'Bestand uploaden',
21-
'VAT': 'VAT'
22-
// 'X minutes ago':
69+
'VAT': 'VAT',
70+
'X minutes ago': xMinutesAgo
2371
}

0 commit comments

Comments
 (0)