opendesk-react-native 0.1.3 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/ui/strings.ts CHANGED
@@ -1,57 +1,59 @@
1
- /** The web widget's English copy, so both channels read the same. Override any key via `strings`. */
2
- export const defaultStrings = {
3
- support: 'Support',
4
- closeChat: 'Close chat',
5
- greeting: 'Hi there. How can we help?',
6
- replyTime: 'We usually reply within a few hours.',
7
- replyTimeAi: '{name} answers right away, the team within a few hours.',
8
- unavailable: 'Chat is unavailable',
9
- unavailableHint: 'Check your connection and try again later.',
10
- sendMessage: 'Send us a message',
11
- yourConversations: 'Your conversations',
12
- conversation: 'Conversation',
13
- typing: '{name} is typing…',
14
- botTyping: '{name} is writing…',
15
- searchHelp: 'Search the help center',
16
- poweredBy: 'Powered by opendesk',
17
- back: 'Back to conversations',
18
- emptyHint: "Ask us anything. We'll reply here, and by email if you leave one.",
19
- notSent: 'Not sent.',
20
- sending: 'Sending…',
21
- uploading: 'Uploading…',
22
- removeFile: 'Remove {name}',
23
- fileTypeRefused: "{name} can't be sent here. Try another file type.",
24
- fileTooLarge: '{name} is larger than 25 MB.',
25
- uploadFailed: "Couldn't upload {name}. Try again.",
26
- placeholder: 'Write a message…',
27
- attach: 'Attach files',
28
- send: 'Send',
29
- ai: 'AI',
30
- talkToPerson: 'Talk to a person',
31
- handoffFailed: "Couldn't reach the team. Try again.",
32
- handedOff: 'A person will reply here',
33
- handedOffHint: "You'll see their reply in this conversation, and by email if you left one.",
34
- checking: 'Checking {tool}…',
35
- checked: 'Checked {tool}',
36
- toolFailed: "Couldn't check {tool}",
37
- actionPending: 'Needs your confirmation',
38
- confirm: 'Confirm',
39
- cancel: 'Cancel',
40
- actionConfirmed: 'Confirmed',
41
- actionDeclined: 'Cancelled',
42
- actionExpired: 'Expired',
43
- actionFailed: "Didn't go through",
44
- topicsTitle: 'What can we help with?',
45
- topicsHint: 'Pick a topic so your message reaches the right people.',
46
- placeholderTopic: 'Pick a topic to start',
47
- changeTopic: 'Change topic',
48
- offlineDefault: "We're away right now. Leave a message and we'll reply as soon as we're back.",
49
- today: 'Today',
50
- yesterday: 'Yesterday',
51
- };
52
-
53
- export type ChatStrings = typeof defaultStrings;
54
-
55
- export function format(template: string, values: Record<string, string | number> = {}): string {
56
- return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match));
57
- }
1
+ /** The web widget's English copy, so both channels read the same. Override any key via `strings`. */
2
+ export const defaultStrings = {
3
+ support: 'Support',
4
+ closeChat: 'Close chat',
5
+ greeting: 'Hi there. How can we help?',
6
+ replyTime: 'We usually reply within a few hours.',
7
+ replyTimeAi: '{name} answers right away, the team within a few hours.',
8
+ unavailable: 'Chat is unavailable',
9
+ unavailableHint: 'Check your connection and try again later.',
10
+ sendMessage: 'Send us a message',
11
+ yourConversations: 'Your conversations',
12
+ conversation: 'Conversation',
13
+ typing: '{name} is typing…',
14
+ botTyping: '{name} is writing…',
15
+ searchHelp: 'Search the help center',
16
+ poweredBy: 'Powered by opendesk',
17
+ back: 'Back to conversations',
18
+ emptyHint: "Ask us anything. We'll reply here, and by email if you leave one.",
19
+ notSent: 'Not sent.',
20
+ sending: 'Sending…',
21
+ uploading: 'Uploading…',
22
+ removeFile: 'Remove {name}',
23
+ viewImage: 'View {name}',
24
+ closeImage: 'Close image',
25
+ fileTypeRefused: "{name} can't be sent here. Try another file type.",
26
+ fileTooLarge: '{name} is larger than 25 MB.',
27
+ uploadFailed: "Couldn't upload {name}. Try again.",
28
+ placeholder: 'Write a message…',
29
+ attach: 'Attach files',
30
+ send: 'Send',
31
+ ai: 'AI',
32
+ talkToPerson: 'Talk to a person',
33
+ handoffFailed: "Couldn't reach the team. Try again.",
34
+ handedOff: 'A person will reply here',
35
+ handedOffHint: "You'll see their reply in this conversation, and by email if you left one.",
36
+ checking: 'Checking {tool}…',
37
+ checked: 'Checked {tool}',
38
+ toolFailed: "Couldn't check {tool}",
39
+ actionPending: 'Needs your confirmation',
40
+ confirm: 'Confirm',
41
+ cancel: 'Cancel',
42
+ actionConfirmed: 'Confirmed',
43
+ actionDeclined: 'Cancelled',
44
+ actionExpired: 'Expired',
45
+ actionFailed: "Didn't go through",
46
+ topicsTitle: 'What can we help with?',
47
+ topicsHint: 'Pick a topic so your message reaches the right people.',
48
+ placeholderTopic: 'Pick a topic to start',
49
+ changeTopic: 'Change topic',
50
+ offlineDefault: "We're away right now. Leave a message and we'll reply as soon as we're back.",
51
+ today: 'Today',
52
+ yesterday: 'Yesterday',
53
+ };
54
+
55
+ export type ChatStrings = typeof defaultStrings;
56
+
57
+ export function format(template: string, values: Record<string, string | number> = {}): string {
58
+ return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match));
59
+ }