@cloud-ru/uikit-product-locale 0.18.1

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.
@@ -0,0 +1,64 @@
1
+ import merge from 'lodash.merge';
2
+ import { useMemo } from 'react';
3
+
4
+ import {
5
+ Dictionary,
6
+ LocaleLang,
7
+ LocaleProvider as SnackLocaleProvider,
8
+ LocaleProviderProps,
9
+ useLocale as snackUseLocale,
10
+ } from '@snack-uikit/locale';
11
+
12
+ import { AdditionalTranslations } from '../helpers';
13
+ import { UIKIT_PRODUCT_LOCALES } from '../locales';
14
+ import { resolveCommonTranslations } from '../locales/resolveCommonTranslations';
15
+ import { GetLocaleText, LocaleComponentName, UIKitProductDictionary } from './types';
16
+
17
+ export type ProductLocaleProviderProps<
18
+ D extends Dictionary,
19
+ AT extends AdditionalTranslations,
20
+ > = LocaleProviderProps<D> & {
21
+ /**
22
+ * Общий словарь переводов из @sbercloud/spa-core/bootstrap
23
+ * @example import { additionalTranslationsResources } from "@sbercloud/spa-core/bootstrap"
24
+ */
25
+ additionalTranslationsResources: AT;
26
+ };
27
+
28
+ export function LocaleProvider<D extends Dictionary, AT extends AdditionalTranslations>({
29
+ children,
30
+ overrideLocales,
31
+ lang,
32
+ fallbackLang = 'ru-RU',
33
+ additionalTranslationsResources,
34
+ }: ProductLocaleProviderProps<D, AT>) {
35
+ const memoizedLocales = useMemo(
36
+ () =>
37
+ merge(
38
+ {},
39
+ UIKIT_PRODUCT_LOCALES,
40
+ /* Тип обязывает прокинуть доп. переводы, но если это не сделать, ничего не упадет */
41
+ additionalTranslationsResources ? resolveCommonTranslations(additionalTranslationsResources) : {},
42
+ overrideLocales,
43
+ ),
44
+ [overrideLocales, additionalTranslationsResources],
45
+ );
46
+
47
+ return (
48
+ <SnackLocaleProvider lang={lang} overrideLocales={memoizedLocales} fallbackLang={fallbackLang}>
49
+ {children}
50
+ </SnackLocaleProvider>
51
+ );
52
+ }
53
+
54
+ export function useLocale(): { t: GetLocaleText<UIKitProductDictionary>; lang: LocaleLang };
55
+ export function useLocale<
56
+ C extends LocaleComponentName<UIKitProductDictionary> = LocaleComponentName<UIKitProductDictionary>,
57
+ >(componentName: C): { t: GetLocaleText<UIKitProductDictionary, C>; lang: LocaleLang };
58
+ export function useLocale<
59
+ C extends LocaleComponentName<UIKitProductDictionary> = LocaleComponentName<UIKitProductDictionary>,
60
+ >(componentName?: C): { t: GetLocaleText<UIKitProductDictionary>; lang: LocaleLang } {
61
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62
+ // @ts-expect-error
63
+ return snackUseLocale(componentName);
64
+ }
@@ -0,0 +1 @@
1
+ export * from './Locale';
@@ -0,0 +1,11 @@
1
+ import { Dictionary, DottedTranslationKey, LocaleDictionary } from '@snack-uikit/locale';
2
+
3
+ import { UIKIT_PRODUCT_LOCALES } from '../locales';
4
+
5
+ export type LocaleComponentName<D extends Dictionary> = keyof LocaleDictionary<D>;
6
+
7
+ export type GetLocaleText<D extends Dictionary, T extends keyof LocaleDictionary<D> | undefined = undefined> = (
8
+ key: DottedTranslationKey<D, T>,
9
+ ) => string;
10
+
11
+ export type UIKitProductDictionary = (typeof UIKIT_PRODUCT_LOCALES)['en-GB'];
@@ -0,0 +1,43 @@
1
+ import lodashGet from 'lodash.get';
2
+ import lodashSet from 'lodash.set';
3
+
4
+ import { AdditionalTranslations, CommonTranslationsKeysType } from './types';
5
+
6
+ type CrawlerParams = {
7
+ data: CommonTranslationsKeysType | string;
8
+ handler(path: string, value: string): void;
9
+ prefix?: string;
10
+ };
11
+
12
+ function crawler({ data, prefix = '', handler }: CrawlerParams) {
13
+ if (typeof data === 'string') {
14
+ handler(prefix, data);
15
+ } else {
16
+ for (const key in data) {
17
+ const value = data[key];
18
+ crawler({ data: value, prefix: prefix ? `${prefix}.${key}` : key, handler });
19
+ }
20
+ }
21
+ }
22
+
23
+ export const getTranslationResolver =
24
+ <D extends CommonTranslationsKeysType>(data: D, nameSpace: string) =>
25
+ (additionalTranslations: AdditionalTranslations): CommonTranslationsKeysType => {
26
+ const languages = Object.keys(additionalTranslations);
27
+
28
+ const result: CommonTranslationsKeysType = {};
29
+
30
+ for (const lang of languages) {
31
+ crawler({
32
+ data,
33
+ handler: (path, value) => {
34
+ const text: string | undefined = lodashGet(additionalTranslations, `${lang}.${nameSpace}.${value}`);
35
+ if (text !== undefined) {
36
+ lodashSet(result, `${lang}.${path}`, text);
37
+ }
38
+ },
39
+ });
40
+ }
41
+
42
+ return result;
43
+ };
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './getTranslationResolver';
@@ -0,0 +1,13 @@
1
+ import { additionalTranslationsResources } from '@cloud-ru/common-translations';
2
+
3
+ export type DeepPartial<T> = T extends object
4
+ ? {
5
+ [P in keyof T]?: DeepPartial<T[P]>;
6
+ }
7
+ : T;
8
+
9
+ export type AdditionalTranslations = typeof additionalTranslationsResources;
10
+
11
+ export type CommonTranslationsKeysType = {
12
+ [key: string]: CommonTranslationsKeysType | string;
13
+ };
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './locales';
@@ -0,0 +1,443 @@
1
+ import { enTranslations } from '@cloud-ru/common-translations';
2
+
3
+ import { Dictionary } from '@snack-uikit/locale';
4
+
5
+ export const en_GB = {
6
+ ErrorPage: {
7
+ frontendErrorTitle: 'Unexpected error',
8
+ pageUnavailableTitle: 'Service unavailable',
9
+ pageNotFoundTitle: 'Page not found',
10
+ refreshButton: 'Refresh the page',
11
+ actionRedirectTitle: 'Try starting from another page',
12
+ supportCenterButton: 'Support Service',
13
+ mainPageLink: 'Go to the main page',
14
+ backLink: 'Go back',
15
+ offlineTitle: 'No Internet Connection',
16
+ offlineText: 'Check your internet connection and try refreshing the page',
17
+ redirectTitle: 'The link will be removed',
18
+ redirectText: 'The link is obsolete and will be removed soon. Go to the new link',
19
+ redirectButton: 'Go to',
20
+ },
21
+ FieldsPredefined: {
22
+ SelectCreate: {
23
+ buttonCreate: 'Create',
24
+ buttonCancel: 'Cancel',
25
+ buttonRefetch: 'Refetch',
26
+ selectPlaceholder: 'Select option',
27
+ noData: 'not found',
28
+ noResult: 'not found',
29
+ loadError: 'Error occurred while loading',
30
+ changeRequest: 'Change request or create',
31
+ noPermission: 'Unavailable for your role',
32
+ },
33
+ FieldPhone: {
34
+ russia: 'Russia',
35
+ abkhazia: 'Abkhazia',
36
+ australia: 'Australia',
37
+ austria: 'Austria',
38
+ azerbaijan: 'Azerbaijan',
39
+ albania: 'Albania',
40
+ algeria: 'Algeria',
41
+ angola: 'Angola',
42
+ andorra: 'Andorra',
43
+ antiguaAndBarbuda: 'Antigua and Barbuda',
44
+ argentina: 'Argentina',
45
+ armenia: 'Armenia',
46
+ bahamas: 'Bahamas',
47
+ bangladesh: 'Bangladesh',
48
+ barbados: 'Barbados',
49
+ bahrain: 'Bahrain',
50
+ belarus: 'Belarus',
51
+ belize: 'Belize',
52
+ belgium: 'Belgium',
53
+ bosniaAndHerzegovina: 'Bosnia and Herzegovina',
54
+ botswana: 'Botswana',
55
+ brazil: 'Brazil',
56
+ bhutan: 'Bhutan',
57
+ vanuatu: 'Vanuatu',
58
+ hungary: 'Hungary',
59
+ guyana: 'Guyana',
60
+ guatemala: 'Guatemala',
61
+ germany: 'Germany',
62
+ guernsey: 'Guernsey',
63
+ gibraltar: 'Gibraltar',
64
+ honduras: 'Honduras',
65
+ greece: 'Greece',
66
+ georgia: 'Georgia',
67
+ denmark: 'Denmark',
68
+ djibouti: 'Djibouti',
69
+ dominicanRepublic: 'Dominican Republic',
70
+ egypt: 'Egypt',
71
+ zimbabwe: 'Zimbabwe',
72
+ israel: 'Israel',
73
+ india: 'India',
74
+ iraq: 'Iraq',
75
+ iran: 'Iran',
76
+ ireland: 'Ireland',
77
+ iceland: 'Iceland',
78
+ spain: 'Spain',
79
+ italy: 'Italy',
80
+ kazakhstan: 'Kazakhstan',
81
+ caymanIslands: 'Cayman Islands',
82
+ cyprus: 'Cyprus',
83
+ kiribati: 'Kiribati',
84
+ colombia: 'Colombia',
85
+ kosovo: 'Kosovo',
86
+ kyrgyzstan: 'Kyrgyzstan',
87
+ latvia: 'Latvia',
88
+ lesotho: 'Lesotho',
89
+ lebanon: 'Lebanon',
90
+ lithuania: 'Lithuania',
91
+ liechtenstein: 'Liechtenstein',
92
+ luxembourg: 'Luxembourg',
93
+ mauritius: 'Mauritius',
94
+ mauritania: 'Mauritania',
95
+ madagascar: 'Madagascar',
96
+ mayotte: 'Mayotte',
97
+ mali: 'Mali',
98
+ maldives: 'Maldives',
99
+ malta: 'Malta',
100
+ morocco: 'Morocco',
101
+ mozambique: 'Mozambique',
102
+ moldova: 'Moldova',
103
+ monaco: 'Monaco',
104
+ myanmar: 'Myanmar',
105
+ namibia: 'Namibia',
106
+ niger: 'Niger',
107
+ netherlands: 'Netherlands',
108
+ newZealand: 'New Zealand',
109
+ newCaledonia: 'New Caledonia',
110
+ unitedArabEmirates: 'United Arab Emirates',
111
+ oman: 'Oman',
112
+ isleOfMan: 'Isle of Man',
113
+ norfolkIsland: 'Norfolk Island',
114
+ wallisAndFutunaIslands: 'Wallis and Futuna Islands',
115
+ peru: 'Peru',
116
+ poland: 'Poland',
117
+ portugal: 'Portugal',
118
+ transnistria: 'Transnistria',
119
+ romania: 'Romania',
120
+ sanMarino: 'San Marino',
121
+ saoTomeAndPrincipe: 'Sao Tome and Principe',
122
+ saudiArabia: 'Saudi Arabia',
123
+ northMacedonia: 'North Macedonia',
124
+ saintPierreAndMiquelon: 'Saint Pierre and Miquelon',
125
+ serbia: 'Serbia',
126
+ singapore: 'Singapore',
127
+ sintMaarten: 'Sint Maarten',
128
+ syria: 'Syria',
129
+ slovakia: 'Slovakia',
130
+ somaliland: 'Somaliland',
131
+ suriname: 'Suriname',
132
+ sierraLeone: 'Sierra Leone',
133
+ tajikistan: 'Tajikistan',
134
+ tonga: 'Tonga',
135
+ tuvalu: 'Tuvalu',
136
+ turkmenistan: 'Turkmenistan',
137
+ turkey: 'Turkey',
138
+ uzbekistan: 'Uzbekistan',
139
+ ukraine: 'Ukraine',
140
+ uruguay: 'Uruguay',
141
+ fiji: 'Fiji',
142
+ finland: 'Finland',
143
+ france: 'France',
144
+ frenchPolynesia: 'French Polynesia',
145
+ croatia: 'Croatia',
146
+ centralAfricanRepublic: 'Central African Republic',
147
+ montenegro: 'Montenegro',
148
+ switzerland: 'Switzerland',
149
+ estonia: 'Estonia',
150
+ ethiopia: 'Ethiopia',
151
+ southAfrica: 'South Africa',
152
+ southKorea: 'South Korea',
153
+ southSudan: 'South Sudan',
154
+ japan: 'Japan',
155
+ indonesia: 'Indonesia',
156
+ taiwan: 'Taiwan',
157
+ nigeria: 'Nigeria',
158
+ benin: 'Benin',
159
+ cameroon: 'Cameroon',
160
+ ghana: 'Ghana',
161
+ rwanda: 'Rwanda',
162
+ zambia: 'Zambia',
163
+ coteDIvoire: "Côte d'Ivoire",
164
+ uganda: 'Uganda',
165
+ congo: 'Republic of the Congo',
166
+ guinea: 'Guinea',
167
+ sudan: 'Sudan',
168
+ kenya: 'Kenya',
169
+ jordan: 'Jordan',
170
+ libya: 'Libya',
171
+ sweden: 'Sweden',
172
+ chad: 'Chad',
173
+ norway: 'Norway',
174
+ hongKong: 'Hong Kong',
175
+ costaRica: 'Costa Rica',
176
+ chile: 'Chile',
177
+ ecuador: 'Ecuador',
178
+ malaysia: 'Malaysia',
179
+ paraguay: 'Paraguay',
180
+ yemen: 'Yemen',
181
+ haiti: 'Haiti',
182
+ nicaragua: 'Nicaragua',
183
+ senegal: 'Senegal',
184
+ venezuela: 'Venezuela',
185
+ afghanistan: 'Afghanistan',
186
+ sriLanka: 'Sri Lanka',
187
+ vietnam: 'Vietnam',
188
+ thailand: 'Thailand',
189
+ tanzania: 'Tanzania',
190
+ qatar: 'Qatar',
191
+ palestine: 'Palestine',
192
+ cambodia: 'Cambodia',
193
+ },
194
+ FieldAi: {
195
+ regular: {
196
+ placeholder: 'Ask something...',
197
+ },
198
+ secret: {
199
+ placeholder: 'Enter password',
200
+ passwordTooltip: {
201
+ titleSuccess: 'All password requirements are met',
202
+ onlyLatin: 'Only Latin letters, numbers and allowed special characters',
203
+ minLength: 'Minimum length — 8 characters',
204
+ hasLetterCases: 'Minimum 1 uppercase and 1 lowercase letter',
205
+ hasNumber: 'Minimum 1 number',
206
+ hasSymbol: 'Minimum 1 special character: !, @, #, % etc.',
207
+ noSpaces: 'No spaces',
208
+ },
209
+ error: 'Password does not meet the requirements',
210
+ },
211
+ hint: {
212
+ text: 'Claudia may be wrong and recommends checking the answers',
213
+ tooltip: "If in doubt about Claudia's answer, you can clarify the information in ",
214
+ tooltipLink: 'the support chat',
215
+ },
216
+ submit: {
217
+ tooltip: 'Submit',
218
+ },
219
+ resetContext: {
220
+ label: 'Reset scenario',
221
+ tooltip: 'Reset context: previous messages will not be taken into account in the new conversation',
222
+ },
223
+ },
224
+ FieldChat: {
225
+ placeholder: 'New message',
226
+ attachFileTooltip: 'Select file',
227
+ },
228
+ },
229
+ Header: {
230
+ noDataFound: 'Nothing found',
231
+
232
+ // ЛК 2.0
233
+ menu: 'Menu',
234
+ user: 'User',
235
+ navigation: 'Navigation',
236
+ searchByServices: 'Search by service',
237
+ searchSettingsFuzzyChipLabel: 'Fuzzy',
238
+ searchSettingsPreciseChipLabel: 'Precise',
239
+ searchSettingsMobileModalHeader: 'Search Settings',
240
+
241
+ noData: 'No data',
242
+ services: 'Services',
243
+ manageProfile: 'Manage profile',
244
+ switchTheme: 'Switch theme',
245
+ logout: 'Logout',
246
+
247
+ favorite: 'Favorite',
248
+
249
+ themeModeLight: 'Light',
250
+ themeModeDark: 'Dark',
251
+ themeModeSystem: 'System',
252
+ themeModeLabel: 'Interface Theme',
253
+ },
254
+ InfoRow: {
255
+ booleanValueTrue: 'Yes',
256
+ booleanValueFalse: 'No',
257
+ },
258
+ Layout: {
259
+ noAccessTitle: 'Access restricted',
260
+ noAccessSubtitle: "You don't have rights to view this content.",
261
+ noAccessText: 'To gain access, contact the administrator of the organization or project',
262
+ },
263
+ MobileChips: {
264
+ selectedN: 'Selected: ',
265
+ resetAll: 'Reset All',
266
+ select: 'Select',
267
+ },
268
+ MobileFields: {
269
+ selectedN: 'Selected: ',
270
+ resetAll: 'Reset All',
271
+ select: 'Select',
272
+ },
273
+ MobileLayout: {
274
+ continue: 'Continue',
275
+ create: 'Create',
276
+ save: 'Save',
277
+ cancel: 'Cancel',
278
+ back: 'Back',
279
+ rent: 'Rent',
280
+ send: 'Send',
281
+ add: 'Add',
282
+ restore: 'Restore',
283
+ },
284
+ MobileToaster: {
285
+ closeAll: 'Close all',
286
+ showLess: 'Collapse',
287
+ showMore: 'Expand',
288
+ },
289
+ MobileToolbar: {
290
+ more: 'More',
291
+ refresh: 'Refresh',
292
+ },
293
+ ModalPredefined: {
294
+ title: 'Delete',
295
+ recallTitle: 'Withdrawal of application',
296
+ fieldLabel: 'To do this, enter:',
297
+ recallFieldLabel: 'To withdraw your request, enter:',
298
+ // TODO: deprecated - UIIAAS-968
299
+ enterName: 'Enter a name',
300
+ invalidName: 'Invalid name',
301
+ enterText: {
302
+ name: 'Enter a name',
303
+ text: 'Enter confirmation text',
304
+ },
305
+ invalidText: {
306
+ name: 'Invalid name',
307
+ text: 'Invalid confirmation text',
308
+ },
309
+ required: 'Field must be filled',
310
+ cancel: enTranslations.buttons.cancel,
311
+ delete: 'Delete',
312
+ recall: 'Recall',
313
+ whatsNew: "What's new",
314
+ readLater: 'Read later',
315
+ outOf: 'of',
316
+ noDataTitle: 'No news yet',
317
+ noDataDescription: 'Platform news will be here soon',
318
+ dataErrorTitle: 'Could not load data',
319
+ dataErrorDescription: 'Try to refresh the page',
320
+ dataErrorAction: 'Refresh',
321
+ },
322
+ PageLayout: {
323
+ PageForm: {
324
+ continue: enTranslations.buttons.continue,
325
+ create: enTranslations.buttons.create,
326
+ save: enTranslations.buttons.save,
327
+ cancel: enTranslations.buttons.cancel,
328
+ back: enTranslations.buttons.back,
329
+ rent: enTranslations.buttons.rent,
330
+ send: enTranslations.buttons.send,
331
+ restore: enTranslations.buttons.restore,
332
+ add: 'Add',
333
+ },
334
+ PageSidebar: {
335
+ backTo: 'Back to',
336
+ documentation: 'Documentation',
337
+ searchByServices: 'Search by service',
338
+ closeSearch: 'Close search',
339
+ openSearch: 'Open search',
340
+ },
341
+ },
342
+ PriceSummary: {
343
+ total: 'Total',
344
+ totalSumFromPrefix: 'from',
345
+ vat: 'including VAT',
346
+ pricePeriodYear: 'per year',
347
+ pricePeriodMonth: 'per month',
348
+ pricePeriodDay: 'per day',
349
+ pricePeriodHour: 'per hour',
350
+ pricePeriodMinute: 'per minute',
351
+ price: 'Price',
352
+ basePrice: 'Base price',
353
+ discount: 'Discount',
354
+ orderDetails: 'Order details',
355
+ docsLink: 'More about tariffs and prices',
356
+ dataError: 'Loading error',
357
+ costLink: 'More about the cost',
358
+ },
359
+ PromoTagPredefined: {
360
+ connecting: 'Connecting',
361
+ partner: 'Partner',
362
+ preview: 'Preview',
363
+ tooltipConnecting:
364
+ 'The service is connecting and will be available soon. If it takes too long, please contact support.',
365
+ tooltipPartner:
366
+ 'A vendor partner service. It is subject to unique pricing conditions, the partner defines the service and support SLA.',
367
+ tooltipPreviewService:
368
+ 'The service is in the Preview stage. It cannot be increased by quota and the pricing conditions, service and support SLA do not apply.',
369
+ tooltipPreviewFunctional:
370
+ 'The functionality is in the Preview stage. It is not subject to pricing conditions, service and support SLA.',
371
+ },
372
+ Quota: {
373
+ peace: 'pcs.',
374
+ gb: 'GB',
375
+ unlimited: 'Unlimited',
376
+ created: 'Created',
377
+ filled: 'Filled',
378
+ available: 'Available by quota',
379
+ exceeded: 'Quota exhausted',
380
+ increase: 'Increase',
381
+ noData: 'Failed to load data',
382
+ quotas: 'Quotas',
383
+ },
384
+ SiteHero: {
385
+ Main: {
386
+ platforms: 'Platforms',
387
+ },
388
+ },
389
+ SiteSection: {
390
+ Basic: {
391
+ showMore: 'Show More',
392
+ },
393
+ PersonalManager: {
394
+ title: 'More than regular support',
395
+ subtitle: 'Full support for solving your problems and achieving business results',
396
+ individualApproachTitle: 'Individual approach to every client',
397
+ individualApproachDescription:
398
+ 'Free consultation for your project. We will answer your questions and select the best solutions.',
399
+ consultationButton: 'Get a consultation',
400
+ allDaySupportTitle: 'On call 24/7',
401
+ allDaySupportDescription: 'Free technical support 24/7, real people are always in touch.',
402
+ argumentAmountOfExperts: '1,400+ experts in IT, cybersecurity and AI',
403
+ argumentMethodologies: 'Proven methodologies and best practices for seamless cloud migration',
404
+ argumentPersonalManager: 'Personal manager to assist with your tasks',
405
+ },
406
+ },
407
+ Widget: {
408
+ Solutions: {
409
+ title: 'Quick start guides',
410
+ link: 'View all',
411
+ },
412
+ Products: {
413
+ title: 'Platform services',
414
+ },
415
+ dataErrorTitle: 'Could not load data',
416
+ dataErrorDescription: 'Try to refresh the widget',
417
+ },
418
+ Claudia: {
419
+ SshField: {
420
+ placeholder: 'Copy and paste SSH key or attach a file',
421
+ chatStatusAnnouncement: {
422
+ content: 'You have entered SSH key input mode',
423
+ cancel: 'Cancel',
424
+ },
425
+ dropZone: {
426
+ title: 'Release to upload the key',
427
+ description: 'Private part of SSH key (without .pub)',
428
+ },
429
+ attachFileTooltip: 'Attach file',
430
+ submitButtonTooltip: 'Send',
431
+ errors: {
432
+ emptyFile: 'File is empty',
433
+ binaryData: 'File contains binary data, not a text SSH key',
434
+ invalidSSHKey:
435
+ 'File does not contain a valid SSH key. Supported: RSA, DSA, ECDSA, Ed25519 keys and certificates',
436
+ invalidFileExtension: 'Invalid file extension',
437
+ fileTooLarge: 'File is too large',
438
+ readError: 'Failed to read file',
439
+ unknownError: 'An unknown error occurred',
440
+ },
441
+ },
442
+ },
443
+ } satisfies Dictionary;
@@ -0,0 +1,13 @@
1
+ import { ExtendedDictionary, OverrideLocales } from '@snack-uikit/locale';
2
+
3
+ import { en_GB } from './en_GB';
4
+ import { ru_RU } from './ru_RU';
5
+
6
+ type ExtensionDictionary = typeof en_GB;
7
+
8
+ export const UIKIT_PRODUCT_LOCALES: ExtendedDictionary<ExtensionDictionary> = {
9
+ 'en-GB': en_GB,
10
+ 'ru-RU': ru_RU,
11
+ } as const;
12
+
13
+ export type OverrideUiKitProductLocales = OverrideLocales<ExtensionDictionary>;
@@ -0,0 +1,25 @@
1
+ import { commonTranslations, I18N_NS } from '@cloud-ru/common-translations';
2
+
3
+ import { DeepPartial, getTranslationResolver } from '../helpers';
4
+ import { en_GB } from './en_GB';
5
+
6
+ export const resolveCommonTranslations = getTranslationResolver(
7
+ {
8
+ PageLayout: {
9
+ PageForm: {
10
+ continue: commonTranslations.buttons.continue,
11
+ create: commonTranslations.buttons.create,
12
+ save: commonTranslations.buttons.save,
13
+ cancel: commonTranslations.buttons.cancel,
14
+ back: commonTranslations.buttons.back,
15
+ rent: commonTranslations.buttons.rent,
16
+ send: commonTranslations.buttons.send,
17
+ restore: commonTranslations.buttons.restore,
18
+ },
19
+ },
20
+ ModalPredefined: {
21
+ cancel: commonTranslations.buttons.cancel,
22
+ },
23
+ } as const satisfies DeepPartial<typeof en_GB>,
24
+ I18N_NS,
25
+ );