Permalink
Newer
100644
410 lines (370 sloc)
19.3 KB
1
<?php
2
if ( ! defined( 'ABSPATH' ) ) {
3
exit;
4
}
5
6
/**
7
* Localize JS strings
8
* @since 3.17.8
9
* @version 3.17.7
10
*/
11
class LLMS_L10n_JS {
12
13
/**
14
* Constructor
15
* @since 3.17.8
16
* @version 3.17.8
17
*/
18
public function __construct() {
19
add_filter( 'lifterlms_js_l10n', array( $this, 'get_strings' ) );
20
}
21
22
/**
23
* Get strings to be passed to LifterLMS l10n class
24
* @param array $strings existing strings from core / 3rd parties
25
* @return array
26
* @since 3.17.8
27
* @version 3.17.7
28
*/
29
public function get_strings( $strings ) {
30
31
return array_merge( $strings, array(
32
33
/**
34
* file: assets/js/app/llms-l10n.js
35
* @since 2.7.3
36
* @version 3.16.0
37
*/
38
'This is a %2$s %1$s String' => esc_html__( 'This is a %2$s %1$s String', 'lifterlms' ),
39
40
/**
41
* file: assets/js/app/llms-lesson-preview.js
42
* @since 3.0.0
43
* @version 3.16.12
44
*/
45
'You do not have permission to access this content' => esc_html__( 'You do not have permission to access this content', 'lifterlms' ),
46
47
/**
48
* file: assets/js/app/llms-password-strength.js
49
* @since 3.0.0
50
* @version 3.7.0
51
*/
52
'There is an issue with your chosen password.' => esc_html__( 'There is an issue with your chosen password.', 'lifterlms' ),
53
'Too Short' => esc_html__( 'Too Short', 'lifterlms' ),
54
'Very Weak' => esc_html__( 'Very Weak', 'lifterlms' ),
55
'Weak' => esc_html__( 'Weak', 'lifterlms' ),
56
'Medium' => esc_html__( 'Medium', 'lifterlms' ),
57
'Strong' => esc_html__( 'Strong', 'lifterlms' ),
58
'Mismatch' => esc_html__( 'Mismatch', 'lifterlms' ),
59
60
/**
61
* file: assets/js/app/llms-pricing-tables.js
62
* @since 3.0.0
63
* @version 3.9.1
64
*/
65
'Members Only Pricing' => esc_html__( 'Members Only Pricing', 'lifterlms' ),
66
67
/**
68
* file: assets/js/app/llms-student-dashboard.js
69
* @since 3.7.0
70
* @version 3.10.0
71
*/
72
'Are you sure you want to cancel your subscription?' => esc_html__( 'Are you sure you want to cancel your subscription?', 'lifterlms' ),
73
74
/**
75
* file: assets/js/builder/Models/Lesson.js
76
* @since 3.13.0
77
* @version 3.17.1
78
*/
79
'New Lesson' => esc_html__( 'New Lesson', 'lifterlms' ),
80
'lessons' => esc_html__( 'lessons', 'lifterlms' ),
81
'lesson' => esc_html__( 'lesson', 'lifterlms' ),
82
'Section %1$d: %2$s' => esc_html__( 'Section %1$d: %2$s', 'lifterlms' ),
83
'Lesson %1$d: %2$s' => esc_html__( 'Lesson %1$d: %2$s', 'lifterlms' ),
84
'%1$s Quiz' => esc_html__( '%1$s Quiz', 'lifterlms' ),
85
86
/**
87
* file: assets/js/builder/Models/Quiz.js
88
* @since 3.16.0
89
* @version 3.17.6
90
*/
91
'New Quiz' => esc_html__( 'New Quiz', 'lifterlms' ),
92
'quizzes' => esc_html__( 'quizzes', 'lifterlms' ),
93
'quiz' => esc_html__( 'quiz', 'lifterlms' ),
94
95
/**
96
* file: assets/js/builder/Models/Section.js
97
* @since 3.16.0
98
* @version 3.16.12
99
*/
100
'New Section' => esc_html__( 'New Section', 'lifterlms' ),
101
'sections' => esc_html__( 'sections', 'lifterlms' ),
102
'section' => esc_html__( 'section', 'lifterlms' ),
103
104
/**
105
* file: assets/js/builder/Schemas/Lesson.js
106
* @since 3.17.0
107
* @version 3.17.1
108
*/
109
'General Settings' => esc_html__( 'General Settings', 'lifterlms' ),
110
'Video Embed URL' => esc_html__( 'Video Embed URL', 'lifterlms' ),
111
'Audio Embed URL' => esc_html__( 'Audio Embed URL', 'lifterlms' ),
112
'Free Lesson' => esc_html__( 'Free Lesson', 'lifterlms' ),
113
'Require Passing Grade on Quiz' => esc_html__( 'Require Passing Grade on Quiz', 'lifterlms' ),
114
'Require Passing Grade on Assignment' => esc_html__( 'Require Passing Grade on Assignment', 'lifterlms' ),
115
'Prerequisite' => esc_html__( 'Prerequisite', 'lifterlms' ),
116
'Drip Method' => esc_html__( 'Drip Method', 'lifterlms' ),
117
'None' => esc_html__( 'None', 'lifterlms' ),
118
'On a specific date' => esc_html__( 'On a specific date', 'lifterlms' ),
119
'# of days after course enrollment' => esc_html__( '# of days after course enrollment', 'lifterlms' ),
120
'# of days after course start date' => esc_html__( '# of days after course start date', 'lifterlms' ),
121
'# of days after prerequisite lesson completion' => esc_html__( '# of days after prerequisite lesson completion', 'lifterlms' ),
122
'# of days' => esc_html__( '# of days', 'lifterlms' ),
123
'Date' => esc_html__( 'Date', 'lifterlms' ),
124
'Time' => esc_html__( 'Time', 'lifterlms' ),
125
126
/**
127
* file: assets/js/builder/Schemas/Quiz.js
128
* @since 3.17.6
129
* @version 3.17.6
130
*/
131
'General Settings' => esc_html__( 'General Settings', 'lifterlms' ),
132
'Description' => esc_html__( 'Description', 'lifterlms' ),
133
'Passing Percentage' => esc_html__( 'Passing Percentage', 'lifterlms' ),
134
'Minimum percentage of total points required to pass the quiz' => esc_html__( 'Minimum percentage of total points required to pass the quiz', 'lifterlms' ),
135
'Limit Attempts' => esc_html__( 'Limit Attempts', 'lifterlms' ),
136
'Limit the maximum number of times a student can take this quiz' => esc_html__( 'Limit the maximum number of times a student can take this quiz', 'lifterlms' ),
137
'Time Limit' => esc_html__( 'Time Limit', 'lifterlms' ),
138
'Enforce a maximum number of minutes a student can spend on each attempt' => esc_html__( 'Enforce a maximum number of minutes a student can spend on each attempt', 'lifterlms' ),
139
'Show Correct Answers' => esc_html__( 'Show Correct Answers', 'lifterlms' ),
140
'When enabled, students will be shown the correct answer to any question they answered incorrectly.' => esc_html__( 'When enabled, students will be shown the correct answer to any question they answered incorrectly.', 'lifterlms' ),
141
'Randomize Question Order' => esc_html__( 'Randomize Question Order', 'lifterlms' ),
142
'Display questions in a random order for each attempt. Content questions are locked into their defined positions.' => esc_html__( 'Display questions in a random order for each attempt. Content questions are locked into their defined positions.', 'lifterlms' ),
143
144
/**
145
* file: assets/js/builder/Views/_Detachable.js
146
* @since 3.16.12
147
* @version 3.16.12
148
*/
149
'Are you sure you want to detach this %s?' => esc_html__( 'Are you sure you want to detach this %s?', 'lifterlms' ),
150
151
/**
152
* file: assets/js/builder/Views/_Editable.js
153
* @since 3.16.0
154
* @version 3.17.6
155
*/
156
'Select an image' => esc_html__( 'Select an image', 'lifterlms' ),
157
'Use this image' => esc_html__( 'Use this image', 'lifterlms' ),
158
159
/**
160
* file: assets/js/builder/Views/_Trashable.js
161
* @since 3.16.12
162
* @version 3.16.12
163
*/
164
'Are you sure you want to move this %s to the trash?' => esc_html__( 'Are you sure you want to move this %s to the trash?', 'lifterlms' ),
165
166
/**
167
* file: assets/js/builder/Views/Assignment.js
168
* @since 3.17.0
169
* @version 3.17.7
170
*/
171
'%1$s Assignment' => esc_html__( '%1$s Assignment', 'lifterlms' ),
172
'Add Existing Assignment' => esc_html__( 'Add Existing Assignment', 'lifterlms' ),
173
'Search for existing assignments...' => esc_html__( 'Search for existing assignments...', 'lifterlms' ),
174
'Get Your Students Taking Action' => esc_html__( 'Get Your Students Taking Action', 'lifterlms' ),
175
'Get Assignments Now!' => esc_html__( 'Get Assignments Now!', 'lifterlms' ),
176
'Unlock LifterLMS Assignments' => esc_html__( 'Unlock LifterLMS Assignments', 'lifterlms' ),
177
178
/**
179
* file: assets/js/builder/Views/Elements.js
180
* @since 3.16.0
181
* @version 3.16.12
182
*/
183
'Add Existing Lesson' => esc_html__( 'Add Existing Lesson', 'lifterlms' ),
184
'Search for existing lessons...' => esc_html__( 'Search for existing lessons...', 'lifterlms' ),
185
186
/**
187
* file: assets/js/builder/Views/PostSearch.js
188
* @since 3.16.0
189
* @version 3.17.0
190
*/
191
'Searching...' => esc_html__( 'Searching...', 'lifterlms' ),
192
'Attach' => esc_html__( 'Attach', 'lifterlms' ),
193
'Clone' => esc_html__( 'Clone', 'lifterlms' ),
194
'ID' => esc_html__( 'ID', 'lifterlms' ),
195
196
/**
197
* file: assets/js/builder/Views/Question.js
198
* @since 3.16.0
199
* @version 3.16.0
200
*/
201
'Are you sure you want to delete this question?' => esc_html__( 'Are you sure you want to delete this question?', 'lifterlms' ),
202
203
/**
204
* file: assets/js/builder/Views/Quiz.js
205
* @since 3.16.0
206
* @version 3.17.7
207
*/
208
'Add Existing Quiz' => esc_html__( 'Add Existing Quiz', 'lifterlms' ),
209
'Search for existing quizzes...' => esc_html__( 'Search for existing quizzes...', 'lifterlms' ),
210
'Add a Question' => esc_html__( 'Add a Question', 'lifterlms' ),
211
212
/**
213
* file: assets/js/builder/Views/SettingsFields.js
214
* @since 3.17.0
215
* @version 3.17.7
216
*/
217
'Use SoundCloud or Spotify audio URLS.' => esc_html__( 'Use SoundCloud or Spotify audio URLS.', 'lifterlms' ),
218
'Permalink' => esc_html__( 'Permalink', 'lifterlms' ),
219
'Use YouTube, Vimeo, or Wistia video URLS.' => esc_html__( 'Use YouTube, Vimeo, or Wistia video URLS.', 'lifterlms' ),
220
221
/**
222
* file: assets/js/llms-admin-settings.js
223
* @since 3.7.3
224
* @version 3.17.5
225
*/
226
'Select an Image' => esc_html__( 'Select an Image', 'lifterlms' ),
227
'Select Image' => esc_html__( 'Select Image', 'lifterlms' ),
228
229
/**
230
* file: assets/js/llms-admin.js
231
* @since ??
232
* @version 3.17.5
233
*/
234
'Select a student' => esc_html__( 'Select a student', 'lifterlms' ),
235
236
/**
237
* file: assets/js/llms-analytics.js
238
* @since 3.0.0
239
* @version 3.17.6
240
*/
241
'Filter by Student(s)' => esc_html__( 'Filter by Student(s)', 'lifterlms' ),
242
'Error' => esc_html__( 'Error', 'lifterlms' ),
243
'Request timed out' => esc_html__( 'Request timed out', 'lifterlms' ),
244
'Retry' => esc_html__( 'Retry', 'lifterlms' ),
245
'Date' => esc_html__( 'Date', 'lifterlms' ),
246
247
/**
248
* file: assets/js/llms-builder.js
249
* @since 3.16.0
250
* @version 3.16.0
251
*/
252
'General Settings' => esc_html__( 'General Settings', 'lifterlms' ),
253
'Description' => esc_html__( 'Description', 'lifterlms' ),
254
'Passing Percentage' => esc_html__( 'Passing Percentage', 'lifterlms' ),
255
'Minimum percentage of total points required to pass the quiz' => esc_html__( 'Minimum percentage of total points required to pass the quiz', 'lifterlms' ),
256
'Limit Attempts' => esc_html__( 'Limit Attempts', 'lifterlms' ),
257
'Limit the maximum number of times a student can take this quiz' => esc_html__( 'Limit the maximum number of times a student can take this quiz', 'lifterlms' ),
258
'Time Limit' => esc_html__( 'Time Limit', 'lifterlms' ),
259
'Enforce a maximum number of minutes a student can spend on each attempt' => esc_html__( 'Enforce a maximum number of minutes a student can spend on each attempt', 'lifterlms' ),
260
'Show Correct Answers' => esc_html__( 'Show Correct Answers', 'lifterlms' ),
261
'When enabled, students will be shown the correct answer to any question they answered incorrectly.' => esc_html__( 'When enabled, students will be shown the correct answer to any question they answered incorrectly.', 'lifterlms' ),
262
'Randomize Question Order' => esc_html__( 'Randomize Question Order', 'lifterlms' ),
263
'Display questions in a random order for each attempt. Content questions are locked into their defined positions.' => esc_html__( 'Display questions in a random order for each attempt. Content questions are locked into their defined positions.', 'lifterlms' ),
264
'New Quiz' => esc_html__( 'New Quiz', 'lifterlms' ),
265
'quizzes' => esc_html__( 'quizzes', 'lifterlms' ),
266
'quiz' => esc_html__( 'quiz', 'lifterlms' ),
267
'Video Embed URL' => esc_html__( 'Video Embed URL', 'lifterlms' ),
268
'Audio Embed URL' => esc_html__( 'Audio Embed URL', 'lifterlms' ),
269
'Free Lesson' => esc_html__( 'Free Lesson', 'lifterlms' ),
270
'Require Passing Grade on Quiz' => esc_html__( 'Require Passing Grade on Quiz', 'lifterlms' ),
271
'Require Passing Grade on Assignment' => esc_html__( 'Require Passing Grade on Assignment', 'lifterlms' ),
272
'Prerequisite' => esc_html__( 'Prerequisite', 'lifterlms' ),
273
'Drip Method' => esc_html__( 'Drip Method', 'lifterlms' ),
274
'None' => esc_html__( 'None', 'lifterlms' ),
275
'On a specific date' => esc_html__( 'On a specific date', 'lifterlms' ),
276
'# of days after course enrollment' => esc_html__( '# of days after course enrollment', 'lifterlms' ),
277
'# of days after course start date' => esc_html__( '# of days after course start date', 'lifterlms' ),
278
'# of days after prerequisite lesson completion' => esc_html__( '# of days after prerequisite lesson completion', 'lifterlms' ),
279
'# of days' => esc_html__( '# of days', 'lifterlms' ),
280
'Date' => esc_html__( 'Date', 'lifterlms' ),
281
'Time' => esc_html__( 'Time', 'lifterlms' ),
282
'New Lesson' => esc_html__( 'New Lesson', 'lifterlms' ),
283
'lessons' => esc_html__( 'lessons', 'lifterlms' ),
284
'lesson' => esc_html__( 'lesson', 'lifterlms' ),
285
'Section %1$d: %2$s' => esc_html__( 'Section %1$d: %2$s', 'lifterlms' ),
286
'Lesson %1$d: %2$s' => esc_html__( 'Lesson %1$d: %2$s', 'lifterlms' ),
287
'%1$s Quiz' => esc_html__( '%1$s Quiz', 'lifterlms' ),
288
'New Section' => esc_html__( 'New Section', 'lifterlms' ),
289
'sections' => esc_html__( 'sections', 'lifterlms' ),
290
'section' => esc_html__( 'section', 'lifterlms' ),
291
'Are you sure you want to detach this %s?' => esc_html__( 'Are you sure you want to detach this %s?', 'lifterlms' ),
292
'Select an image' => esc_html__( 'Select an image', 'lifterlms' ),
293
'Use this image' => esc_html__( 'Use this image', 'lifterlms' ),
294
'Are you sure you want to move this %s to the trash?' => esc_html__( 'Are you sure you want to move this %s to the trash?', 'lifterlms' ),
295
'Use SoundCloud or Spotify audio URLS.' => esc_html__( 'Use SoundCloud or Spotify audio URLS.', 'lifterlms' ),
296
'Permalink' => esc_html__( 'Permalink', 'lifterlms' ),
297
'Use YouTube, Vimeo, or Wistia video URLS.' => esc_html__( 'Use YouTube, Vimeo, or Wistia video URLS.', 'lifterlms' ),
298
'Searching...' => esc_html__( 'Searching...', 'lifterlms' ),
299
'Attach' => esc_html__( 'Attach', 'lifterlms' ),
300
'Clone' => esc_html__( 'Clone', 'lifterlms' ),
301
'ID' => esc_html__( 'ID', 'lifterlms' ),
302
'Are you sure you want to delete this question?' => esc_html__( 'Are you sure you want to delete this question?', 'lifterlms' ),
303
'Add Existing Quiz' => esc_html__( 'Add Existing Quiz', 'lifterlms' ),
304
'Search for existing quizzes...' => esc_html__( 'Search for existing quizzes...', 'lifterlms' ),
305
'Add a Question' => esc_html__( 'Add a Question', 'lifterlms' ),
306
'%1$s Assignment' => esc_html__( '%1$s Assignment', 'lifterlms' ),
307
'Add Existing Assignment' => esc_html__( 'Add Existing Assignment', 'lifterlms' ),
308
'Search for existing assignments...' => esc_html__( 'Search for existing assignments...', 'lifterlms' ),
309
'Get Your Students Taking Action' => esc_html__( 'Get Your Students Taking Action', 'lifterlms' ),
310
'Get Assignments Now!' => esc_html__( 'Get Assignments Now!', 'lifterlms' ),
311
'Unlock LifterLMS Assignments' => esc_html__( 'Unlock LifterLMS Assignments', 'lifterlms' ),
312
'Add Existing Lesson' => esc_html__( 'Add Existing Lesson', 'lifterlms' ),
313
'Search for existing lessons...' => esc_html__( 'Search for existing lessons...', 'lifterlms' ),
314
315
/**
316
* file: assets/js/llms-metabox-product.js
317
* @since 3.0.0
318
* @version 3.6.0
319
*/
320
'There was an error loading the necessary resources. Please try again.' => esc_html__( 'There was an error loading the necessary resources. Please try again.', 'lifterlms' ),
321
322
/**
323
* file: assets/js/llms-metabox-students.js
324
* @since 3.0.0
325
* @version 3.0.0
326
*/
327
'Please select a student to enroll' => esc_html__( 'Please select a student to enroll', 'lifterlms' ),
328
329
/**
330
* file: assets/js/llms-metaboxes.js
331
* @since 3.0.0
332
* @version 3.17.5
333
*/
334
'Are you sure you want to delete this row? This cannot be undone.' => esc_html__( 'Are you sure you want to delete this row? This cannot be undone.', 'lifterlms' ),
335
'membership_bulk_enrollment_warning' => esc_html__( 'membership_bulk_enrollment_warning', 'lifterlms' ),
336
'Cancel' => esc_html__( 'Cancel', 'lifterlms' ),
337
'Refund' => esc_html__( 'Refund', 'lifterlms' ),
338
'Record a Manual Payment' => esc_html__( 'Record a Manual Payment', 'lifterlms' ),
339
'Copy this code and paste it into the desired area' => esc_html__( 'Copy this code and paste it into the desired area', 'lifterlms' ),
340
'View' => esc_html__( 'View', 'lifterlms' ),
341
342
/**
343
* file: assets/js/llms-quiz-attempt-review.js
344
* @since 3.16.0
345
* @version 3.16.9
346
*/
347
'Remarks to Student' => esc_html__( 'Remarks to Student', 'lifterlms' ),
348
'points' => esc_html__( 'points', 'lifterlms' ),
349
350
/**
351
* file: assets/js/llms-quiz.js
352
* @since 1.0.0
353
* @version 3.16.9
354
*/
355
'Are you sure you wish to quit this quiz attempt?' => esc_html__( 'Are you sure you wish to quit this quiz attempt?', 'lifterlms' ),
356
'Grading Quiz...' => esc_html__( 'Grading Quiz...', 'lifterlms' ),
357
'Loading Question...' => esc_html__( 'Loading Question...', 'lifterlms' ),
358
'An unknown error occurred. Please try again.' => esc_html__( 'An unknown error occurred. Please try again.', 'lifterlms' ),
359
'Loading Quiz...' => esc_html__( 'Loading Quiz...', 'lifterlms' ),
360
'Time Remaining' => esc_html__( 'Time Remaining', 'lifterlms' ),
361
'Next Question' => esc_html__( 'Next Question', 'lifterlms' ),
362
'Complete Quiz' => esc_html__( 'Complete Quiz', 'lifterlms' ),
363
'Previous Question' => esc_html__( 'Previous Question', 'lifterlms' ),
364
'Loading...' => esc_html__( 'Loading...', 'lifterlms' ),
365
'You must select an answer to continue.' => esc_html__( 'You must select an answer to continue.', 'lifterlms' ),
366
367
/**
368
* file: assets/js/llms.js
369
* @since 3.14.0
370
* @version 3.14.0
371
*/
372
'This is a %2$s %1$s String' => esc_html__( 'This is a %2$s %1$s String', 'lifterlms' ),
373
'You do not have permission to access this content' => esc_html__( 'You do not have permission to access this content', 'lifterlms' ),
374
'There is an issue with your chosen password.' => esc_html__( 'There is an issue with your chosen password.', 'lifterlms' ),
375
'Too Short' => esc_html__( 'Too Short', 'lifterlms' ),
376
'Very Weak' => esc_html__( 'Very Weak', 'lifterlms' ),
377
'Weak' => esc_html__( 'Weak', 'lifterlms' ),
378
'Medium' => esc_html__( 'Medium', 'lifterlms' ),
379
'Strong' => esc_html__( 'Strong', 'lifterlms' ),
380
'Mismatch' => esc_html__( 'Mismatch', 'lifterlms' ),
381
'Members Only Pricing' => esc_html__( 'Members Only Pricing', 'lifterlms' ),
382
'Are you sure you want to cancel your subscription?' => esc_html__( 'Are you sure you want to cancel your subscription?', 'lifterlms' ),
383
384
/**
385
* file: assets/js/partials/_metabox-field-repeater.js
386
* @since 3.11.0
387
* @version 3.17.3
388
*/
389
'Are you sure you want to delete this row? This cannot be undone.' => esc_html__( 'Are you sure you want to delete this row? This cannot be undone.', 'lifterlms' ),
390
391
/**
392
* file: assets/js/private/llms-metaboxes.js
393
* @since 3.0.0
394
* @version 3.17.5
395
*/
396
'membership_bulk_enrollment_warning' => esc_html__( 'membership_bulk_enrollment_warning', 'lifterlms' ),
397
'Cancel' => esc_html__( 'Cancel', 'lifterlms' ),
398
'Refund' => esc_html__( 'Refund', 'lifterlms' ),
399
'Record a Manual Payment' => esc_html__( 'Record a Manual Payment', 'lifterlms' ),
400
'Copy this code and paste it into the desired area' => esc_html__( 'Copy this code and paste it into the desired area', 'lifterlms' ),
401
'View' => esc_html__( 'View', 'lifterlms' ),