-
Notifications
You must be signed in to change notification settings - Fork 348
/
js-translations.phtml
93 lines (87 loc) · 3.48 KB
/
js-translations.phtml
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
<?php /* Global context translations only */
// Add translation strings
$this->jsTranslations()->addStrings(
[
'add_tag_success' => 'add_tag_success',
'bulk_email_success' => 'bulk_email_success',
'bulk_noitems_advice' => 'bulk_noitems_advice',
'bulk_save_success' => 'bulk_save_success',
'close' => 'close',
'collection_empty' => 'collection_empty',
'del_search_num' => 'del_search_num',
'eol_ellipsis' => 'eol_ellipsis',
'error_occurred' => 'An error has occurred',
'go_to_list' => 'go_to_list',
'hold_available' => 'hold_available',
'less_ellipsis' => 'less_ellipsis',
'libphonenumber_invalid' => 'libphonenumber_invalid',
'libphonenumber_invalidcountry' => 'libphonenumber_invalidcountry',
'libphonenumber_invalidregion' => 'libphonenumber_invalidregion',
'libphonenumber_notanumber' => 'libphonenumber_notanumber',
'libphonenumber_toolong' => 'libphonenumber_toolong',
'libphonenumber_tooshort' => 'libphonenumber_tooshort',
'libphonenumber_tooshortidd' => 'libphonenumber_tooshortidd',
'loading_ellipsis' => 'loading_ellipsis',
'more_ellipsis' => 'more_ellipsis',
'no_description' => 'no_description',
'number_thousands_separator' => [
'number_thousands_separator', null, ',',
],
'sms_success' => 'sms_success',
'toggle_dropdown' => 'toggle_dropdown',
'No pickup locations available' => 'No pickup locations available',
]
);
// Add libphonenumber.js strings
$this->jsTranslations()->addStrings(
[
'Phone number invalid' => 'libphonenumber_invalid',
'Invalid country calling code' => 'libphonenumber_invalidcountry',
'Invalid region code' => 'libphonenumber_invalidregion',
'The string supplied did not seem to be a phone number' => 'libphonenumber_notanumber',
'The string supplied is too long to be a phone number' => 'libphonenumber_toolong',
'The string supplied is too short to be a phone number' => 'libphonenumber_tooshort',
'Phone number too short after IDD' => 'libphonenumber_tooshortidd',
]
);
$cart = $this->cart();
if ($cart->isActive()) {
// Add cart strings
$this->jsTranslations()->addStrings(
[
'addBookBag' => 'Add to Book Bag',
'bookbag' => 'Book Bag',
'bookbagFull' => 'bookbag_full_msg',
'bookbagMax' => $cart->getMaxSize(),
'bookbagStatusFull' => 'bookbag_full',
'confirmDelete' => 'confirm_delete',
'confirmEmpty' => 'bookbag_confirm_empty',
'itemsAddBag' => 'items_added_to_bookbag',
'itemsInBag' => 'items_already_in_bookbag',
'removeBookBag' => 'Remove from Book Bag',
'viewBookBag' => 'View Book Bag',
]
);
}
$account = $this->auth()->getManager();
if ($account->ajaxEnabled()) {
$this->jsTranslations()->addStrings(
[
'account_checkouts_due' => 'account_checkouts_due',
'account_checkouts_overdue' => 'account_checkouts_overdue',
'account_has_alerts' => 'account_has_alerts',
'account_normal_checkouts' => 'account_normal_checkouts',
'account_requests_available' => 'account_requests_available',
'account_requests_in_transit' => 'account_requests_in_transit',
'account_requests_other' => 'account_requests_other',
]
);
}
if ($this->config()->ajaxCoversEnabled()) {
$this->jsTranslations()->addStrings(
[
'cover_source_label' => 'cover_source_label',
]
);
}
echo $this->jsTranslations()->getJSON();