-
-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathen.ts
More file actions
315 lines (312 loc) · 10.7 KB
/
en.ts
File metadata and controls
315 lines (312 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
import type { Translations } from "@/i18n/translation";
export const en: Translations = {
notices: {
migrationFailed: "Failed to apply migrations. Check the console for details.",
},
settings: {
general: {
header: "General",
links: {
label: "Links",
docsButtonLabel: "Docs",
feedbackButtonLabel: "Feedback",
donateButtonLabel: "Donate",
},
apiToken: {
label: "API token",
description: "The Todoist API token to use when fetching tasks",
buttonLabel: "Setup",
},
tokenStorage: {
label: "Token storage",
description: "Where the plugin should store your Todoist API token",
options: {
secrets: "Obsidian secrets",
file: "File-based",
},
},
},
autoRefresh: {
header: "Auto-refresh",
toggle: {
label: "Enable auto-refresh",
description: "Whether queries should auto-refresh at a set interval",
},
interval: {
label: "Auto-refresh interval",
description: "The interval, in seconds, that queries will be auto-refreshed by default",
},
},
rendering: {
header: "Rendering",
taskFadeAnimation: {
label: "Enable task fade animation",
description: "Whether tasks should fade in and out when created or completed",
},
dateIcon: {
label: "Enable dates icon",
description: "Whether rendered dates should include an icon",
},
projectIcon: {
label: "Enable project & section icon",
description: "Whether rendered projects & sections should include an icon",
},
labelsIcon: {
label: "Enable label icon",
description: "Whether rendered labels should include an icon",
},
},
taskCreation: {
header: "Task creation",
wrapLinksInParens: {
label: "Add parenthesis to page links",
description:
"When enabled, wraps Obsidian page links in Todoist tasks created from the command",
},
addTaskButtonAddsPageLink: {
label: "Add task button adds page link",
description:
"When enabled, the embedded add task button in queries will add a link to the page to the task in the specified place",
options: {
off: "Disabled",
description: "Task description",
content: "Task name",
},
},
defaultDueDate: {
label: "Default due date",
description: "The default due date to set when creating new tasks",
options: {
none: "No default",
},
},
defaultProject: {
label: "Default project",
description: "The default project to set when creating new tasks",
placeholder: "Select a project",
noDefault: "Inbox",
deletedWarning: "This project no longer exists",
deleted: "deleted",
},
defaultLabels: {
label: "Default labels",
description: "The default labels to apply when creating new tasks",
buttonAddLabel: "Add label",
buttonNoAvailableLabels: "No labels available",
noLabels: "No labels configured",
deletedWarning: "This label no longer exists",
deleted: "deleted",
},
defaultAddTaskAction: {
label: "Default add task action",
description: "The default action when clicking the Add task button",
options: {
add: "Add task",
addCopyApp: "Add task and copy link (app)",
addCopyWeb: "Add task and copy link (web)",
},
},
},
advanced: {
header: "Advanced",
debugLogging: {
label: "Enable debug logging",
description: "Whether debug logging should be enabled",
},
buildStamp: {
label: "Build stamp",
description: "Stamp for the build of this plugin",
},
},
deprecation: {
warningMessage: "This setting is deprecated and will be removed in a future release.",
},
},
createTaskModal: {
loadingMessage: "Loading Todoist data...",
successNotice: "Task created successfully",
errorNotice: "Failed to create task",
taskNamePlaceholder: "Task name",
descriptionPlaceholder: "Description",
appendedLinkToContentMessage: "A link to this page will be appended to the task name",
appendedLinkToDescriptionMessage:
"A link to this page will be appended to the task description",
cancelButtonLabel: "Cancel",
addTaskButtonLabel: "Add task",
addTaskAndCopyAppLabel: "Add task and copy link (app)",
addTaskAndCopyWebLabel: "Add task and copy link (web)",
actionMenuLabel: "Add task action menu",
linkCopiedNotice: "Task created and link copied to clipboard",
linkCopyFailedNotice: "Task created, but failed to copy link to clipboard",
failedToFindInboxNotice: "Error: could not find inbox project",
defaultProjectDeletedNotice: (projectName: string) =>
`Default project "${projectName}" no longer exists. Using Inbox instead.`,
defaultLabelsDeletedNotice: (labelNames: string) =>
`Default labels no longer exist: ${labelNames}. Skipping deleted labels.`,
dateSelector: {
buttonLabel: "Set due date",
dialogLabel: "Due date selector",
suggestionsLabel: "Due date suggestions",
datePickerLabel: "Task date",
emptyDate: "Due date",
noDate: "No date",
timeDialog: {
timeLabel: "Time",
saveButtonLabel: "Save",
cancelButtonLabel: "Cancel",
durationLabel: "Duration",
noDuration: "No duration",
duration: (minutes: number) => {
const hours = Math.floor(minutes / 60);
const mins = minutes % 60;
if (hours === 0) {
return `${mins}m`;
}
return `${hours}h ${mins}m`;
},
},
},
deadlineSelector: {
buttonLabel: "Set deadline",
dialogLabel: "Deadline selector",
suggestionsLabel: "Deadline suggestions",
datePickerLabel: "Deadline date",
placeholder: "Deadline",
noDeadline: "No deadline",
},
labelSelector: {
buttonLabel: "Set labels",
buttonText: (num: number) => {
return `Labels (${num})`;
},
labelOptionsLabel: "Label options",
},
prioritySelector: {
buttonLabel: "Set priority",
optionsLabel: "Task priority options",
p1: "Priority 1",
p2: "Priority 2",
p3: "Priority 3",
p4: "Priority 4",
},
projectSelector: {
buttonLabel: "Set project",
selectorLabel: "Project selector",
optionsLabel: "Project options",
search: {
label: "Filter projects",
placeholder: "Type a project name",
},
},
optionsSelector: {
buttonLabel: "Set options",
optionsLabel: "Task options",
addLinkToContent: "Add link to content",
addLinkToDescription: "Add link to description",
doNotAddLink: "Do not add link",
},
},
onboardingModal: {
failureNoticeMessage: "Failed to save API token",
explainer:
"In order to use this plugin, you must provide your Todoist API token. This allows us to read and write data to or from your Todoist account.",
todoistGuideHint: {
before: "You can follow ",
linkText: "Todoist's guide",
after: " on finding your API token.",
},
tokenInputLabel: "API Token",
submitButtonLabel: "Save",
pasteButtonLabel: "Paste from clipboard",
},
query: {
displays: {
empty: {
label: "The query returned no tasks",
},
error: {
header: "Error",
badRequest:
"The Todoist API has rejected the request. Please check the filter to ensure it is valid.",
unauthorized:
"The Todoist API request is missing or has the incorrect credentials. Please check the API token in the settings.",
serverError:
"The Todoist API has returned an error. Please check Todoist's status page: https://status.todoist.net/ and try again later.",
unknown:
"Unknown error occurred. Please check the Console in the Developer Tools window for more information",
},
parsingError: {
header: "Error: Query parsing failed",
unknownErrorMessage:
"Unknown error occurred. Please check the Console in the Developer Tools window for more information",
},
},
contextMenu: {
completeTaskLabel: "Complete task",
openTaskInAppLabel: "Open task in Todoist (app)",
openTaskInBrowserLabel: "Open task in Todoist (web)",
},
failedCloseMessage: "Failed to close task",
header: {
errorPostfix: "(Error)",
refreshTooltip: {
lastRefreshed: (datetime: string) => `Last refreshed at: ${datetime}`,
notRefreshed: "Not queried yet",
},
},
warning: {
header: "Warnings",
jsonQuery:
"This query is written using JSON. This is deprecated and will be removed in a future version. Please use YAML instead.",
unknownKey: (key: string) => `Found unexpected query key '${key}'. Is this a typo?`,
dueAndTime:
"Both 'due' and 'time' show options are set. The 'time' option will be ignored when 'due' is present.",
projectAndSection:
"Both 'project' and 'section' show options are set. The 'section' option will be ignored when 'project' is present.",
},
groupedHeaders: {
noDueDate: "No due date",
overdue: "Overdue",
},
},
commands: {
sync: "Sync with Todoist",
addTask: "Add task",
addTaskPageContent: "Add task with current page in task content",
addTaskPageDescription: "Add task with current page in task description",
},
tokenValidation: {
emptyTokenError: "API token must not be empty",
invalidTokenError:
"Oops! Todoist does not recognize this token. Please double check and try again!",
},
dates: {
today: "Today",
tomorrow: "Tomorrow",
yesterday: "Yesterday",
nextWeek: "Next week",
lastWeekday: (weekday: string) => {
return `Last ${weekday}`;
},
dateTime: (date: string, time: string) => {
return `${date} at ${time}`;
},
dateTimeDuration: (date: string, startTime: string, endTime: string) => {
return `${date} at ${startTime} - ${endTime}`;
},
dateTimeDurationDifferentDays: (
startDate: string,
startTime: string,
endDate: string,
endTime: string,
): string => {
return `${startDate} at ${startTime} - ${endDate} at ${endTime}`;
},
timeDuration: (startTime: string, endTime: string) => {
return `${startTime} - ${endTime}`;
},
timeDurationDifferentDays: (startTime: string, endDate: string, endTime: string) => {
return `${startTime} - ${endDate} at ${endTime}`;
},
},
};