basklee-nuxt 0.9.4 → 0.9.6
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/README.md +4 -0
- package/package.json +2 -2
- package/templates/app/components/basklee/account/StorefrontLogout.README.md +2 -0
- package/templates/app/components/basklee/blog/BlogArticle.README.md +2 -0
- package/templates/app/components/basklee/blog/BlogArticle.vue +21 -1
- package/templates/app/components/basklee/orders/OrderDetails.README.md +2 -0
- package/templates/app/components/basklee/orders/OrderDetails.vue +5 -0
- package/templates/app/components/basklee/storefront/StorefrontFooter.README.md +6 -0
- package/templates/app/components/basklee/storefront/StorefrontFooter.vue +21 -4
- package/templates/app/components/basklee/stores/StorefrontStores.README.md +2 -0
- package/templates/app/components/basklee/stores/StorefrontStores.vue +2 -1
- package/templates/app/composables/useBaskleeCart.ts +356 -2
- package/templates/app/layouts/default.vue +2 -1
- package/templates/app/pages/browse.vue +2 -2
- package/templates/app/utils/basklee/activityLabels.ts +15 -0
- package/templates/app/utils/basklee/blogMediaFallback.ts +322 -0
- package/templates/app/utils/basklee/browseLabels.ts +12 -0
- package/templates/app/utils/basklee/cartLabels.ts +125 -1
- package/templates/app/utils/basklee/cartMemory.ts +614 -0
- package/templates/app/utils/basklee/contactLabels.ts +13 -1
- package/templates/app/utils/basklee/directoryLabels.ts +3 -0
- package/templates/app/utils/basklee/featureLabels.ts +12 -0
- package/templates/app/utils/basklee/footerLabels.ts +3 -0
- package/templates/app/utils/basklee/headerLabels.ts +1 -1
- package/templates/app/utils/basklee/photoDetail.ts +59 -0
- package/templates/app/utils/basklee/productActions.ts +8 -0
- package/templates/app/utils/basklee/profile.ts +52 -0
- package/templates/app/utils/basklee/profileLabels.ts +15 -0
- package/templates/app/utils/basklee/reviewLabels.ts +6 -0
- package/templates/app/utils/basklee/sellerDirectory.ts +112 -0
- package/templates/app/utils/basklee/sessionLabels.ts +6 -6
- package/templates/app/utils/basklee/storeDirectory.ts +26 -0
- package/templates/app/utils/basklee/subscriptionLabels.ts +3 -0
- package/templates/app/utils/basklee/tabLocation.ts +37 -0
- package/templates/app/utils/basklee/ticketDraft.ts +56 -0
|
@@ -25,6 +25,11 @@ const en = {
|
|
|
25
25
|
notifications: 'Notifications',
|
|
26
26
|
notificationsEmpty: 'No products with availability notifications.',
|
|
27
27
|
removeWish: 'Remove',
|
|
28
|
+
wishRemoved: '{name} was removed from your saved products.',
|
|
29
|
+
wishBack: '{name} is saved again.',
|
|
30
|
+
notificationStopped: 'You will not be notified about {name}.',
|
|
31
|
+
notificationBack: 'You will be notified about {name} again.',
|
|
32
|
+
undo: 'Undo',
|
|
28
33
|
stopNotification: 'Unsubscribe',
|
|
29
34
|
viewProduct: 'View product',
|
|
30
35
|
};
|
|
@@ -56,6 +61,11 @@ const ru: typeof en = {
|
|
|
56
61
|
notifications: 'Уведомления',
|
|
57
62
|
notificationsEmpty: 'Товаров с уведомлениями о наличии пока нет.',
|
|
58
63
|
removeWish: 'Убрать',
|
|
64
|
+
wishRemoved: 'Товар «{name}» убран из избранного.',
|
|
65
|
+
wishBack: 'Товар «{name}» снова в избранном.',
|
|
66
|
+
notificationStopped: 'Уведомление о товаре «{name}» отключено.',
|
|
67
|
+
notificationBack: 'Уведомление о товаре «{name}» снова включено.',
|
|
68
|
+
undo: 'Вернуть',
|
|
59
69
|
stopNotification: 'Отписаться',
|
|
60
70
|
viewProduct: 'Открыть товар',
|
|
61
71
|
};
|
|
@@ -87,6 +97,11 @@ const es: typeof en = {
|
|
|
87
97
|
notifications: 'Avisos',
|
|
88
98
|
notificationsEmpty: 'No hay productos con avisos de disponibilidad.',
|
|
89
99
|
removeWish: 'Quitar',
|
|
100
|
+
wishRemoved: '{name} se quitó de tus productos guardados.',
|
|
101
|
+
wishBack: '{name} está guardado de nuevo.',
|
|
102
|
+
notificationStopped: 'No recibirás avisos sobre {name}.',
|
|
103
|
+
notificationBack: 'Volverás a recibir avisos sobre {name}.',
|
|
104
|
+
undo: 'Deshacer',
|
|
90
105
|
stopNotification: 'Cancelar aviso',
|
|
91
106
|
viewProduct: 'Ver el producto',
|
|
92
107
|
};
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholders for the media of an article text that do not load: a picture
|
|
3
|
+
* whose file does not come, a video file that does not play, a YouTube player
|
|
4
|
+
* when YouTube does not answer. The failed element is hidden and a placeholder
|
|
5
|
+
* takes its place: the reader sees what was meant to be there instead of a
|
|
6
|
+
* broken-image icon or an empty frame; a video placeholder links to the video.
|
|
7
|
+
*
|
|
8
|
+
* Framework-free: call it on the element holding the article HTML after each
|
|
9
|
+
* render and call the returned function when the element goes away. The same
|
|
10
|
+
* file is used by every storefront (keep the copies identical).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface IBlogMediaFallbackLabels {
|
|
14
|
+
image: string;
|
|
15
|
+
video: string;
|
|
16
|
+
openVideo: string;
|
|
17
|
+
watchYoutube: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const LABELS: Record<string, IBlogMediaFallbackLabels> = {
|
|
21
|
+
en: {
|
|
22
|
+
image: 'The image could not be loaded',
|
|
23
|
+
video: 'The video could not be loaded',
|
|
24
|
+
openVideo: 'Open the video',
|
|
25
|
+
watchYoutube: 'Watch on YouTube',
|
|
26
|
+
},
|
|
27
|
+
ru: {
|
|
28
|
+
image: 'Не удалось загрузить изображение',
|
|
29
|
+
video: 'Не удалось загрузить видео',
|
|
30
|
+
openVideo: 'Открыть видео',
|
|
31
|
+
watchYoutube: 'Смотреть на YouTube',
|
|
32
|
+
},
|
|
33
|
+
es: {
|
|
34
|
+
image: 'No se pudo cargar la imagen',
|
|
35
|
+
video: 'No se pudo cargar el vídeo',
|
|
36
|
+
openVideo: 'Abrir el vídeo',
|
|
37
|
+
watchYoutube: 'Ver en YouTube',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** The placeholder texts in the page language («ru», «en-US», …); English when the language is unknown. */
|
|
42
|
+
export function blogMediaFallbackLabels(locale?: string | null): IBlogMediaFallbackLabels {
|
|
43
|
+
const code = String(locale ?? '').toLowerCase().split(/[-_]/)[0] ?? '';
|
|
44
|
+
|
|
45
|
+
return LABELS[code] ?? LABELS.en!;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const FAILED = 'data-media-failed';
|
|
49
|
+
const FALLBACK = 'data-media-fallback';
|
|
50
|
+
const STYLE_ID = 'basklee-media-fallback-style';
|
|
51
|
+
// Product cards placed in the article draw their own picture placeholders.
|
|
52
|
+
const SKIPPED = '[data-product-id], [data-product-ids], [data-media-fallback-skip]';
|
|
53
|
+
const YOUTUBE_WAIT = 8000;
|
|
54
|
+
const youtubeEmbed = /^https:\/\/(?:www\.)?youtube(?:-nocookie)?\.com\/embed\/([\w-]{11})(?:[?#]|$)/i;
|
|
55
|
+
|
|
56
|
+
// Placeholders take the colours of the text around them, so they fit every storefront look.
|
|
57
|
+
const STYLE = `
|
|
58
|
+
[${FAILED}]{display:none!important}
|
|
59
|
+
[${FALLBACK}]{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%;max-width:100%;min-height:9rem;margin:0;padding:1.25rem 1rem;border:1px dashed color-mix(in srgb,currentColor 28%,transparent);border-radius:.5rem;background:color-mix(in srgb,currentColor 5%,transparent);color:inherit;font-size:.875rem;line-height:1.4;text-align:center;white-space:normal}
|
|
60
|
+
[${FALLBACK}="video"]{aspect-ratio:16/9;min-height:0}
|
|
61
|
+
[${FALLBACK}] svg{width:2.25rem;height:2.25rem;flex:none;opacity:.55}
|
|
62
|
+
[${FALLBACK}] [data-media-fallback-text]{opacity:.8}
|
|
63
|
+
[${FALLBACK}] [data-media-fallback-alt]{max-width:36rem;opacity:.6;font-size:.8125rem;overflow-wrap:anywhere}
|
|
64
|
+
[${FALLBACK}] a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:.2em}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
68
|
+
const ICONS = {
|
|
69
|
+
image: ['M5 5h14v14H5z', 'M9.5 9.5m-1.5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0', 'm5 16 4-4 3 3 2-2 5 5', 'M3 3l18 18'],
|
|
70
|
+
video: ['M3 6h12v12H3z', 'm15 10 6-3v10l-6-3', 'M2 2l20 20'],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
function ensureStyle(document: Document) {
|
|
74
|
+
if (document.getElementById(STYLE_ID)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const style = document.createElement('style');
|
|
78
|
+
style.id = STYLE_ID;
|
|
79
|
+
style.textContent = STYLE;
|
|
80
|
+
document.head?.appendChild(style);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function icon(document: Document, kind: keyof typeof ICONS) {
|
|
84
|
+
const svg = document.createElementNS(SVG_NS, 'svg');
|
|
85
|
+
svg.setAttribute('viewBox', '0 0 24 24');
|
|
86
|
+
svg.setAttribute('fill', 'none');
|
|
87
|
+
svg.setAttribute('stroke', 'currentColor');
|
|
88
|
+
svg.setAttribute('stroke-width', '1.5');
|
|
89
|
+
svg.setAttribute('stroke-linecap', 'round');
|
|
90
|
+
svg.setAttribute('stroke-linejoin', 'round');
|
|
91
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
92
|
+
for (const d of ICONS[kind]) {
|
|
93
|
+
const path = document.createElementNS(SVG_NS, 'path');
|
|
94
|
+
path.setAttribute('d', d);
|
|
95
|
+
svg.appendChild(path);
|
|
96
|
+
}
|
|
97
|
+
return svg;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function text(document: Document, tag: string, value: string, mark: string) {
|
|
101
|
+
const element = document.createElement(tag);
|
|
102
|
+
element.textContent = value;
|
|
103
|
+
element.setAttribute(mark, '');
|
|
104
|
+
return element;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function safeHttpUrl(value: string | null | undefined, base: string) {
|
|
108
|
+
if (!value) {
|
|
109
|
+
return '';
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const url = new URL(value, base);
|
|
113
|
+
return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : '';
|
|
114
|
+
} catch {
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Hides `element` and puts a placeholder of the given kind before it (once). */
|
|
120
|
+
function replace(
|
|
121
|
+
element: HTMLElement,
|
|
122
|
+
kind: 'image' | 'video',
|
|
123
|
+
message: string,
|
|
124
|
+
extra: { alt?: string; href?: string; linkText?: string } = {},
|
|
125
|
+
) {
|
|
126
|
+
if (element.hasAttribute(FAILED)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const document = element.ownerDocument;
|
|
130
|
+
const placeholder = document.createElement('span');
|
|
131
|
+
placeholder.setAttribute(FALLBACK, kind);
|
|
132
|
+
placeholder.setAttribute('role', 'note');
|
|
133
|
+
placeholder.appendChild(icon(document, kind));
|
|
134
|
+
placeholder.appendChild(text(document, 'span', message, 'data-media-fallback-text'));
|
|
135
|
+
if (extra.alt) {
|
|
136
|
+
placeholder.appendChild(text(document, 'span', extra.alt, 'data-media-fallback-alt'));
|
|
137
|
+
}
|
|
138
|
+
if (extra.href && extra.linkText) {
|
|
139
|
+
const link = document.createElement('a');
|
|
140
|
+
link.href = extra.href;
|
|
141
|
+
link.target = '_blank';
|
|
142
|
+
link.rel = 'noopener noreferrer';
|
|
143
|
+
link.textContent = extra.linkText;
|
|
144
|
+
placeholder.appendChild(link);
|
|
145
|
+
}
|
|
146
|
+
// A picture of the article keeps the space it was given.
|
|
147
|
+
const width = Number(element.getAttribute('width'));
|
|
148
|
+
const height = Number(element.getAttribute('height'));
|
|
149
|
+
if (kind === 'image' && width > 1 && height > 1) {
|
|
150
|
+
placeholder.style.aspectRatio = `${width} / ${height}`;
|
|
151
|
+
placeholder.style.maxWidth = `${width}px`;
|
|
152
|
+
placeholder.style.minHeight = '0';
|
|
153
|
+
}
|
|
154
|
+
element.setAttribute(FAILED, '');
|
|
155
|
+
element.parentNode?.insertBefore(placeholder, element);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Shows `element` again and removes its placeholder (a YouTube check that answered late). */
|
|
159
|
+
function restore(element: HTMLElement) {
|
|
160
|
+
if (!element.hasAttribute(FAILED)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const previous = element.previousElementSibling;
|
|
164
|
+
if (previous?.hasAttribute(FALLBACK)) {
|
|
165
|
+
previous.remove();
|
|
166
|
+
}
|
|
167
|
+
element.removeAttribute(FAILED);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function skipped(element: Element) {
|
|
171
|
+
return Boolean(element.closest(SKIPPED));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function failImage(image: HTMLImageElement, labels: IBlogMediaFallbackLabels) {
|
|
175
|
+
if (skipped(image)) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
// A missing picture is not a button of the photo viewer any more.
|
|
179
|
+
image.setAttribute('data-blog-image-viewer-skip', '');
|
|
180
|
+
image.removeAttribute('role');
|
|
181
|
+
image.removeAttribute('tabindex');
|
|
182
|
+
image.removeAttribute('aria-label');
|
|
183
|
+
replace(image, 'image', labels.image, { alt: image.getAttribute('alt')?.trim() });
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function videoSource(video: HTMLVideoElement) {
|
|
187
|
+
return safeHttpUrl(
|
|
188
|
+
video.getAttribute('src') || video.querySelector('source[src]')?.getAttribute('src'),
|
|
189
|
+
video.ownerDocument.baseURI,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function failVideo(video: HTMLVideoElement, labels: IBlogMediaFallbackLabels) {
|
|
194
|
+
if (skipped(video)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
replace(video, 'video', labels.video, { href: videoSource(video), linkText: labels.openVideo });
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function imageFailed(image: HTMLImageElement) {
|
|
201
|
+
return Boolean(image.getAttribute('src')) && image.complete && image.naturalWidth === 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function videoFailed(video: HTMLVideoElement) {
|
|
205
|
+
const NO_SOURCE = 3; // HTMLMediaElement.NETWORK_NO_SOURCE
|
|
206
|
+
return Boolean(video.error) || (Boolean(videoSource(video)) && video.networkState === NO_SOURCE);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
let youtubeCheck: Promise<boolean> | undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Whether YouTube answers here: one picture of YouTube's image server per page,
|
|
213
|
+
* shared by every player. A player frame gives no error when YouTube is blocked.
|
|
214
|
+
*/
|
|
215
|
+
function youtubeReachable(view: Window & typeof globalThis, videoId: string, late: () => void): Promise<boolean> {
|
|
216
|
+
youtubeCheck ??= new Promise<boolean>((resolve) => {
|
|
217
|
+
const probe = new view.Image();
|
|
218
|
+
let settled = false;
|
|
219
|
+
const timer = setTimeout(() => {
|
|
220
|
+
settled = true;
|
|
221
|
+
youtubeCheck = undefined;
|
|
222
|
+
resolve(false);
|
|
223
|
+
}, YOUTUBE_WAIT);
|
|
224
|
+
probe.onload = () => {
|
|
225
|
+
if (settled) {
|
|
226
|
+
late();
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
settled = true;
|
|
230
|
+
clearTimeout(timer);
|
|
231
|
+
resolve(true);
|
|
232
|
+
};
|
|
233
|
+
probe.onerror = () => {
|
|
234
|
+
if (settled) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
settled = true;
|
|
238
|
+
clearTimeout(timer);
|
|
239
|
+
youtubeCheck = undefined;
|
|
240
|
+
resolve(false);
|
|
241
|
+
};
|
|
242
|
+
probe.src = `https://i.ytimg.com/vi/${videoId}/default.jpg`;
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
return youtubeCheck;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Watches the images, videos and YouTube players under `root` and replaces the
|
|
250
|
+
* ones that fail with a placeholder. Returns the function that stops watching.
|
|
251
|
+
*/
|
|
252
|
+
export function guardBlogMedia(
|
|
253
|
+
root: HTMLElement | null | undefined,
|
|
254
|
+
labels: IBlogMediaFallbackLabels = blogMediaFallbackLabels(),
|
|
255
|
+
): () => void {
|
|
256
|
+
const view = root?.ownerDocument?.defaultView;
|
|
257
|
+
if (!root || !view || typeof root.querySelectorAll !== 'function') {
|
|
258
|
+
return () => {};
|
|
259
|
+
}
|
|
260
|
+
ensureStyle(root.ownerDocument);
|
|
261
|
+
let active = true;
|
|
262
|
+
|
|
263
|
+
// `error` does not bubble, but the capture phase still passes through the root.
|
|
264
|
+
const onError = (event: Event) => {
|
|
265
|
+
const target = event.target as Element | null;
|
|
266
|
+
const parent = target?.parentElement;
|
|
267
|
+
if (target?.tagName === 'IMG') {
|
|
268
|
+
failImage(target as HTMLImageElement, labels);
|
|
269
|
+
} else if (target?.tagName === 'VIDEO') {
|
|
270
|
+
failVideo(target as HTMLVideoElement, labels);
|
|
271
|
+
} else if (target?.tagName === 'SOURCE' && parent?.tagName === 'VIDEO') {
|
|
272
|
+
const video = parent as HTMLVideoElement;
|
|
273
|
+
// The video gives up only after its last source.
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
if (active && videoFailed(video)) {
|
|
276
|
+
failVideo(video, labels);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
root.addEventListener('error', onError, true);
|
|
282
|
+
|
|
283
|
+
// Failures that came before this call (pictures from the page HTML, cached errors).
|
|
284
|
+
for (const image of root.querySelectorAll('img')) {
|
|
285
|
+
if (imageFailed(image)) {
|
|
286
|
+
failImage(image, labels);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
for (const video of root.querySelectorAll('video')) {
|
|
290
|
+
if (videoFailed(video)) {
|
|
291
|
+
failVideo(video, labels);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const players = [...root.querySelectorAll('iframe')]
|
|
296
|
+
.map((frame) => ({ frame, id: youtubeEmbed.exec(frame.getAttribute('src') ?? '')?.[1] }))
|
|
297
|
+
.filter((player): player is { frame: HTMLIFrameElement; id: string } =>
|
|
298
|
+
Boolean(player.id) && !skipped(player.frame));
|
|
299
|
+
if (players.length) {
|
|
300
|
+
const showPlayers = () => {
|
|
301
|
+
for (const { frame } of players) {
|
|
302
|
+
restore(frame);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
void youtubeReachable(view, players[0]!.id, showPlayers).then((reachable) => {
|
|
306
|
+
if (!active || reachable) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
for (const { frame, id } of players) {
|
|
310
|
+
replace(frame, 'video', labels.video, {
|
|
311
|
+
href: `https://www.youtube.com/watch?v=${id}`,
|
|
312
|
+
linkText: labels.watchYoutube,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return () => {
|
|
319
|
+
active = false;
|
|
320
|
+
root.removeEventListener('error', onError, true);
|
|
321
|
+
};
|
|
322
|
+
}
|
|
@@ -19,6 +19,10 @@ export function browseLabels(locale: string) {
|
|
|
19
19
|
clear: 'Сбросить',
|
|
20
20
|
emptyTitle: 'Ничего не найдено',
|
|
21
21
|
emptyHint: 'Попробуйте изменить запрос или сбросить фильтры.',
|
|
22
|
+
emptyHintPlain: 'Проверьте написание или попробуйте слово покороче.',
|
|
23
|
+
emptyCategoryPlain: 'В этой категории пока нет товаров. Загляните в другие разделы каталога.',
|
|
24
|
+
editSearch: 'Изменить запрос',
|
|
25
|
+
browseCatalog: 'Открыть каталог',
|
|
22
26
|
emptyCategoryHint:
|
|
23
27
|
'В этой категории пока нет подходящих товаров. Попробуйте убрать фильтры или выбрать другую категорию.',
|
|
24
28
|
startTitle: 'Что вы ищете?',
|
|
@@ -67,6 +71,10 @@ export function browseLabels(locale: string) {
|
|
|
67
71
|
clear: 'Borrar',
|
|
68
72
|
emptyTitle: 'No se han encontrado productos',
|
|
69
73
|
emptyHint: 'Prueba otra búsqueda o borra los filtros.',
|
|
74
|
+
emptyHintPlain: 'Revisa la ortografía o prueba con una palabra más corta.',
|
|
75
|
+
emptyCategoryPlain: 'Aún no hay productos en esta categoría. Mira las demás secciones del catálogo.',
|
|
76
|
+
editSearch: 'Cambiar la búsqueda',
|
|
77
|
+
browseCatalog: 'Ver el catálogo',
|
|
70
78
|
emptyCategoryHint:
|
|
71
79
|
'Todavía no hay productos que coincidan en esta categoría. Prueba a quitar filtros o elige otra categoría.',
|
|
72
80
|
startTitle: '¿Qué estás buscando?',
|
|
@@ -115,6 +123,10 @@ export function browseLabels(locale: string) {
|
|
|
115
123
|
clear: 'Clear',
|
|
116
124
|
emptyTitle: 'No products found',
|
|
117
125
|
emptyHint: 'Try another search or clear the filters.',
|
|
126
|
+
emptyHintPlain: 'Check the spelling or try a shorter word.',
|
|
127
|
+
emptyCategoryPlain: 'There are no products in this category yet. Look through the rest of the catalogue.',
|
|
128
|
+
editSearch: 'Change the search',
|
|
129
|
+
browseCatalog: 'Browse the catalogue',
|
|
118
130
|
emptyCategoryHint:
|
|
119
131
|
'No matching products in this category yet. Try removing filters or choosing another category.',
|
|
120
132
|
startTitle: 'What are you looking for?',
|
|
@@ -44,6 +44,8 @@ const en = {
|
|
|
44
44
|
pickupAction: 'Choose',
|
|
45
45
|
noPoints: 'No pickup points were returned.',
|
|
46
46
|
pointSearch: 'Find a pickup point by address',
|
|
47
|
+
// For a list that also searches by postcode and by the point's own code.
|
|
48
|
+
pointSearchAny: 'Find a pickup point by address, postcode or code',
|
|
47
49
|
courier: 'Confirm delivery to the selected address',
|
|
48
50
|
courierAction: 'Confirm',
|
|
49
51
|
pickupType: 'Pickup point',
|
|
@@ -59,6 +61,7 @@ const en = {
|
|
|
59
61
|
deliveryDiscount: 'Delivery discount',
|
|
60
62
|
total: 'Total',
|
|
61
63
|
promo: 'Promo code',
|
|
64
|
+
promoOptional: 'optional',
|
|
62
65
|
apply: 'Apply',
|
|
63
66
|
removePromo: 'Remove',
|
|
64
67
|
removePromoHint: 'Remove promo code',
|
|
@@ -123,6 +126,45 @@ const en = {
|
|
|
123
126
|
refreshRequired: 'Refresh your cart before continuing.',
|
|
124
127
|
orderUncertain:
|
|
125
128
|
'Could not confirm the order. Check your order history before trying again.',
|
|
129
|
+
restoredKept: 'Your delivery choice and extras were kept.',
|
|
130
|
+
restoredLost:
|
|
131
|
+
'Some of your choices could not be kept. Choose them again below.',
|
|
132
|
+
requoteChanged:
|
|
133
|
+
'The cart was recalculated just before the order. Check what changed and place the order again.',
|
|
134
|
+
requoteSame:
|
|
135
|
+
'The cart was recalculated just before the order. Your delivery choice was kept; check the total and place the order again.',
|
|
136
|
+
lostAddress: 'the delivery address changed',
|
|
137
|
+
lostUnavailable: 'no longer available',
|
|
138
|
+
lostRefused: 'could not be confirmed',
|
|
139
|
+
lostFile: 'attach the file again',
|
|
140
|
+
changeDeliveryPrice: 'Delivery, {name}: was {before}, now {after}',
|
|
141
|
+
changeDeliveryDate: 'Expected delivery, {name}: was {before}, now {after}',
|
|
142
|
+
changeTotal: 'Total: was {before}, now {after}',
|
|
143
|
+
removedLine: '{name} was removed from the cart.',
|
|
144
|
+
restoredLine: '{name} is back in the cart.',
|
|
145
|
+
undo: 'Undo',
|
|
146
|
+
receiptTitle: 'Thank you for your order',
|
|
147
|
+
receiptToPay: 'To pay',
|
|
148
|
+
receiptOnReceipt: 'To pay on receipt',
|
|
149
|
+
receiptFromWallet: 'Paid from your wallet',
|
|
150
|
+
receiptExpected: 'Expected',
|
|
151
|
+
currentDelivery: 'Current',
|
|
152
|
+
pendingDelivery: 'Not confirmed yet',
|
|
153
|
+
quoteLater: 'The price is calculated when you choose it',
|
|
154
|
+
quoteLast: 'Last quote: {price}',
|
|
155
|
+
deliveryPending: 'Choose delivery',
|
|
156
|
+
deliveryAtCheckout: 'Calculated at checkout',
|
|
157
|
+
totalWithoutDelivery: 'Total without delivery',
|
|
158
|
+
extras: 'Including extras',
|
|
159
|
+
noPointsMatch: 'No pickup point matches «{query}».',
|
|
160
|
+
clearSearch: 'Clear the search',
|
|
161
|
+
pointsFound: 'Pickup points found: {count}',
|
|
162
|
+
pointsShown: 'Shown: {shown} of {count}',
|
|
163
|
+
morePoints: 'Show more',
|
|
164
|
+
walletBalance: 'In your wallet: {amount}',
|
|
165
|
+
walletShort: 'Not enough for this order: {amount} more is needed.',
|
|
166
|
+
walletTopUp: 'Top up the wallet',
|
|
167
|
+
changePayment: 'Choose another payment method',
|
|
126
168
|
};
|
|
127
169
|
|
|
128
170
|
const ru: typeof en = {
|
|
@@ -171,6 +213,7 @@ const ru: typeof en = {
|
|
|
171
213
|
pickupAction: 'Выбрать',
|
|
172
214
|
noPoints: 'Пункты выдачи не найдены.',
|
|
173
215
|
pointSearch: 'Найти пункт выдачи по адресу',
|
|
216
|
+
pointSearchAny: 'Найти пункт выдачи по адресу, индексу или коду',
|
|
174
217
|
courier: 'Подтвердить доставку по выбранному адресу',
|
|
175
218
|
courierAction: 'Подтвердить',
|
|
176
219
|
pickupType: 'Пункт выдачи',
|
|
@@ -186,6 +229,7 @@ const ru: typeof en = {
|
|
|
186
229
|
deliveryDiscount: 'Скидка на доставку',
|
|
187
230
|
total: 'Итого',
|
|
188
231
|
promo: 'Промокод',
|
|
232
|
+
promoOptional: 'необязательно',
|
|
189
233
|
apply: 'Применить',
|
|
190
234
|
removePromo: 'Удалить',
|
|
191
235
|
removePromoHint: 'Удалить промокод',
|
|
@@ -248,6 +292,45 @@ const ru: typeof en = {
|
|
|
248
292
|
refreshRequired: 'Обновите корзину, чтобы продолжить.',
|
|
249
293
|
orderUncertain:
|
|
250
294
|
'Не удалось подтвердить создание заказа. Перед повторной попыткой проверьте историю заказов.',
|
|
295
|
+
restoredKept: 'Выбранная доставка и дополнения сохранены.',
|
|
296
|
+
restoredLost:
|
|
297
|
+
'Часть выбранного сохранить не удалось. Выберите это снова ниже.',
|
|
298
|
+
requoteChanged:
|
|
299
|
+
'Корзина была пересчитана перед оформлением. Проверьте, что изменилось, и оформите заказ ещё раз.',
|
|
300
|
+
requoteSame:
|
|
301
|
+
'Корзина была пересчитана перед оформлением. Выбранная доставка сохранена; проверьте итог и оформите заказ ещё раз.',
|
|
302
|
+
lostAddress: 'изменился адрес доставки',
|
|
303
|
+
lostUnavailable: 'больше недоступно',
|
|
304
|
+
lostRefused: 'не удалось подтвердить',
|
|
305
|
+
lostFile: 'прикрепите файл заново',
|
|
306
|
+
changeDeliveryPrice: 'Доставка, {name}: было {before}, стало {after}',
|
|
307
|
+
changeDeliveryDate: 'Срок доставки, {name}: было {before}, стало {after}',
|
|
308
|
+
changeTotal: 'Итого: было {before}, стало {after}',
|
|
309
|
+
removedLine: '«{name}» — товар удалён из корзины.',
|
|
310
|
+
restoredLine: '«{name}» — товар снова в корзине.',
|
|
311
|
+
undo: 'Вернуть',
|
|
312
|
+
receiptTitle: 'Спасибо за заказ',
|
|
313
|
+
receiptToPay: 'К оплате',
|
|
314
|
+
receiptOnReceipt: 'К оплате при получении',
|
|
315
|
+
receiptFromWallet: 'Оплачено из кошелька',
|
|
316
|
+
receiptExpected: 'Ожидается',
|
|
317
|
+
currentDelivery: 'Сейчас',
|
|
318
|
+
pendingDelivery: 'Ещё не подтверждено',
|
|
319
|
+
quoteLater: 'Стоимость рассчитывается после выбора',
|
|
320
|
+
quoteLast: 'Последний расчёт: {price}',
|
|
321
|
+
deliveryPending: 'Выберите доставку',
|
|
322
|
+
deliveryAtCheckout: 'Рассчитывается при оформлении',
|
|
323
|
+
totalWithoutDelivery: 'Итого без доставки',
|
|
324
|
+
extras: 'В том числе дополнения',
|
|
325
|
+
noPointsMatch: 'По запросу «{query}» пунктов выдачи нет.',
|
|
326
|
+
clearSearch: 'Сбросить поиск',
|
|
327
|
+
pointsFound: 'Найдено пунктов выдачи: {count}',
|
|
328
|
+
pointsShown: 'Показано: {shown} из {count}',
|
|
329
|
+
morePoints: 'Показать ещё',
|
|
330
|
+
walletBalance: 'В кошельке: {amount}',
|
|
331
|
+
walletShort: 'Для этого заказа не хватает {amount}.',
|
|
332
|
+
walletTopUp: 'Пополнить кошелёк',
|
|
333
|
+
changePayment: 'Выбрать другой способ оплаты',
|
|
251
334
|
};
|
|
252
335
|
|
|
253
336
|
const es: typeof en = {
|
|
@@ -296,6 +379,7 @@ const es: typeof en = {
|
|
|
296
379
|
pickupAction: 'Elegir',
|
|
297
380
|
noPoints: 'No se ha recibido ningún punto de recogida.',
|
|
298
381
|
pointSearch: 'Busca un punto de recogida por dirección',
|
|
382
|
+
pointSearchAny: 'Busca un punto de recogida por dirección, código postal o código',
|
|
299
383
|
courier: 'Confirmar el envío a la dirección seleccionada',
|
|
300
384
|
courierAction: 'Confirmar',
|
|
301
385
|
pickupType: 'Punto de recogida',
|
|
@@ -311,6 +395,7 @@ const es: typeof en = {
|
|
|
311
395
|
deliveryDiscount: 'Descuento en el envío',
|
|
312
396
|
total: 'Total',
|
|
313
397
|
promo: 'Código promocional',
|
|
398
|
+
promoOptional: 'opcional',
|
|
314
399
|
apply: 'Aplicar',
|
|
315
400
|
removePromo: 'Quitar',
|
|
316
401
|
removePromoHint: 'Quitar el código promocional',
|
|
@@ -365,7 +450,7 @@ const es: typeof en = {
|
|
|
365
450
|
optionFileTooLarge: 'El archivo supera los {size} MB.',
|
|
366
451
|
clearOption: 'Borrar',
|
|
367
452
|
clearOptionHint: 'Borrar el texto y el archivo guardados',
|
|
368
|
-
placeOrder: '
|
|
453
|
+
placeOrder: 'Realizar pedido',
|
|
369
454
|
created: 'Pedido creado',
|
|
370
455
|
viewOrder: 'Ver el pedido',
|
|
371
456
|
paymentLinkFailed:
|
|
@@ -375,6 +460,45 @@ const es: typeof en = {
|
|
|
375
460
|
refreshRequired: 'Actualiza tu carrito antes de continuar.',
|
|
376
461
|
orderUncertain:
|
|
377
462
|
'No se ha podido confirmar el pedido. Revisa tu historial de pedidos antes de volver a intentarlo.',
|
|
463
|
+
restoredKept: 'Se han conservado el envío elegido y los extras.',
|
|
464
|
+
restoredLost:
|
|
465
|
+
'No se ha podido conservar parte de lo elegido. Elígelo de nuevo más abajo.',
|
|
466
|
+
requoteChanged:
|
|
467
|
+
'El carrito se ha recalculado justo antes del pedido. Revisa lo que ha cambiado y haz el pedido de nuevo.',
|
|
468
|
+
requoteSame:
|
|
469
|
+
'El carrito se ha recalculado justo antes del pedido. Se ha conservado el envío elegido; revisa el total y haz el pedido de nuevo.',
|
|
470
|
+
lostAddress: 'ha cambiado la dirección de entrega',
|
|
471
|
+
lostUnavailable: 'ya no está disponible',
|
|
472
|
+
lostRefused: 'no se ha podido confirmar',
|
|
473
|
+
lostFile: 'adjunta el archivo de nuevo',
|
|
474
|
+
changeDeliveryPrice: 'Envío, {name}: antes {before}, ahora {after}',
|
|
475
|
+
changeDeliveryDate: 'Entrega prevista, {name}: antes {before}, ahora {after}',
|
|
476
|
+
changeTotal: 'Total: antes {before}, ahora {after}',
|
|
477
|
+
removedLine: '{name} se ha quitado del carrito.',
|
|
478
|
+
restoredLine: '{name} vuelve a estar en el carrito.',
|
|
479
|
+
undo: 'Deshacer',
|
|
480
|
+
receiptTitle: 'Gracias por tu pedido',
|
|
481
|
+
receiptToPay: 'A pagar',
|
|
482
|
+
receiptOnReceipt: 'A pagar al recibir',
|
|
483
|
+
receiptFromWallet: 'Pagado con tu monedero',
|
|
484
|
+
receiptExpected: 'Entrega prevista',
|
|
485
|
+
currentDelivery: 'Actual',
|
|
486
|
+
pendingDelivery: 'Sin confirmar todavía',
|
|
487
|
+
quoteLater: 'El precio se calcula al elegirlo',
|
|
488
|
+
quoteLast: 'Último cálculo: {price}',
|
|
489
|
+
deliveryPending: 'Elige el envío',
|
|
490
|
+
deliveryAtCheckout: 'Se calcula al tramitar el pedido',
|
|
491
|
+
totalWithoutDelivery: 'Total sin envío',
|
|
492
|
+
extras: 'Incluye extras',
|
|
493
|
+
noPointsMatch: 'Ningún punto de recogida coincide con «{query}».',
|
|
494
|
+
clearSearch: 'Borrar la búsqueda',
|
|
495
|
+
pointsFound: 'Puntos de recogida encontrados: {count}',
|
|
496
|
+
pointsShown: 'Mostrados: {shown} de {count}',
|
|
497
|
+
morePoints: 'Mostrar más',
|
|
498
|
+
walletBalance: 'En tu monedero: {amount}',
|
|
499
|
+
walletShort: 'No alcanza para este pedido: faltan {amount}.',
|
|
500
|
+
walletTopUp: 'Recargar el monedero',
|
|
501
|
+
changePayment: 'Elegir otra forma de pago',
|
|
378
502
|
};
|
|
379
503
|
|
|
380
504
|
/**
|