@ziyarago/ui 0.3.0 → 0.4.0

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +23 -2
  3. package/dist/llms-full.txt +2 -2
  4. package/dist/llms.txt +2 -2
  5. package/dist/manifest.json +1 -1
  6. package/package.json +2 -2
  7. package/src/core/components.js +15 -14
  8. package/src/core/components2.js +37 -36
  9. package/src/core/components3.js +8 -7
  10. package/src/core/components4.js +23 -22
  11. package/src/core/components6.js +8 -7
  12. package/src/core/components7.js +10 -9
  13. package/src/core/index.js +1 -1
  14. package/src/i18n/components/ActionCard.js +5 -0
  15. package/src/i18n/components/Actionsheet.js +5 -0
  16. package/src/i18n/components/Alert.js +5 -0
  17. package/src/i18n/components/Breadcrumbs.js +5 -0
  18. package/src/i18n/components/Calendar.js +5 -0
  19. package/src/i18n/components/CallCard.js +5 -0
  20. package/src/i18n/components/CallRow.js +5 -0
  21. package/src/i18n/components/Carousel.js +5 -0
  22. package/src/i18n/components/ChartCard.js +5 -0
  23. package/src/i18n/components/ChatAi.js +5 -0
  24. package/src/i18n/components/Chip.js +5 -0
  25. package/src/i18n/components/ChipInput.js +5 -0
  26. package/src/i18n/components/CodeInput.js +5 -0
  27. package/src/i18n/components/Combobox.js +5 -0
  28. package/src/i18n/components/CommandPalette.js +5 -0
  29. package/src/i18n/components/ConfirmDialog.js +5 -0
  30. package/src/i18n/components/ContactPanel.js +5 -0
  31. package/src/i18n/components/CopyButton.js +2 -0
  32. package/src/i18n/components/DataGroup.js +5 -0
  33. package/src/i18n/components/DataState.js +5 -0
  34. package/src/i18n/components/DataTable.js +5 -0
  35. package/src/i18n/components/DatePicker.js +5 -0
  36. package/src/i18n/components/DealCard.js +5 -0
  37. package/src/i18n/components/Drawer.js +5 -0
  38. package/src/i18n/components/ErrorPage.js +5 -0
  39. package/src/i18n/components/FileUpload.js +5 -0
  40. package/src/i18n/components/FullscreenDialog.js +5 -0
  41. package/src/i18n/components/Gallery.js +5 -0
  42. package/src/i18n/components/GuestCard.js +5 -0
  43. package/src/i18n/components/ImageUpload.js +5 -0
  44. package/src/i18n/components/ImageViewer.js +5 -0
  45. package/src/i18n/components/IncomingCall.js +5 -0
  46. package/src/i18n/components/InlineEdit.js +5 -0
  47. package/src/i18n/components/IntegrationCard.js +5 -0
  48. package/src/i18n/components/LoginForm.js +5 -0
  49. package/src/i18n/components/Map.js +5 -0
  50. package/src/i18n/components/Modal.js +5 -0
  51. package/src/i18n/components/MultiSelect.js +5 -0
  52. package/src/i18n/components/NotificationBell.js +5 -0
  53. package/src/i18n/components/NumberInput.js +5 -0
  54. package/src/i18n/components/Pagination.js +5 -0
  55. package/src/i18n/components/PasswordInput.js +5 -0
  56. package/src/i18n/components/Popconfirm.js +5 -0
  57. package/src/i18n/components/PricingCard.js +5 -0
  58. package/src/i18n/components/RamadanTracker.js +5 -0
  59. package/src/i18n/components/RangeCalendar.js +5 -0
  60. package/src/i18n/components/RangeSlider.js +5 -0
  61. package/src/i18n/components/Rating.js +5 -0
  62. package/src/i18n/components/RichEditor.js +5 -0
  63. package/src/i18n/components/Screensaver.js +5 -0
  64. package/src/i18n/components/SearchInput.js +5 -0
  65. package/src/i18n/components/SideNav.js +5 -0
  66. package/src/i18n/components/Snackbar.js +5 -0
  67. package/src/i18n/components/Sortable.js +5 -0
  68. package/src/i18n/components/Spinner.js +5 -0
  69. package/src/i18n/components/StatusPage.js +5 -0
  70. package/src/i18n/components/StepDialog.js +5 -0
  71. package/src/i18n/components/StepForm.js +5 -0
  72. package/src/i18n/components/TabTiles.js +5 -0
  73. package/src/i18n/components/Tag.js +5 -0
  74. package/src/i18n/components/TopNav.js +5 -0
  75. package/src/i18n/components/Tour.js +5 -0
  76. package/src/i18n/components/TourCard.js +5 -0
  77. package/src/i18n/components/TourPopover.js +5 -0
  78. package/src/i18n/components/TreeSelect.js +5 -0
  79. package/src/i18n/components/Validation.js +5 -0
  80. package/src/i18n/components/index.js +130 -0
  81. package/src/i18n/index.js +8 -6
  82. package/types/i18n.d.ts +4 -2
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Map', zoomIn: 'Zoom in', zoomOut: 'Zoom out' },
3
+ ar: { label: 'خريطة', zoomIn: 'تكبير', zoomOut: 'تصغير' },
4
+ ru: { label: 'Карта', zoomIn: 'Увеличить', zoomOut: 'Уменьшить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { close: 'Close' },
3
+ ar: { close: 'إغلاق' },
4
+ ru: { close: 'Закрыть' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { selected: '{n} selected' },
3
+ ar: { selected: '{n} محدد' },
4
+ ru: { selected: 'Выбрано: {n}' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Notifications', markAllRead: 'Mark all read' },
3
+ ar: { label: 'الإشعارات', markAllRead: 'تحديد الكل كمقروء' },
4
+ ru: { label: 'Уведомления', markAllRead: 'Отметить все как прочитанные' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { decrease: 'Decrease', increase: 'Increase' },
3
+ ar: { decrease: 'تقليل', increase: 'زيادة' },
4
+ ru: { decrease: 'Уменьшить', increase: 'Увеличить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page' },
3
+ ar: { label: 'ترقيم الصفحات', prev: 'الصفحة السابقة', next: 'الصفحة التالية', page: 'صفحة' },
4
+ ru: { label: 'Постраничная навигация', prev: 'Предыдущая страница', next: 'Следующая страница', page: 'Страница' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { show: 'Show password', hide: 'Hide password' },
3
+ ar: { show: 'إظهار كلمة المرور', hide: 'إخفاء كلمة المرور' },
4
+ ru: { show: 'Показать пароль', hide: 'Скрыть пароль' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { no: 'No', yes: 'Yes' },
3
+ ar: { no: 'لا', yes: 'نعم' },
4
+ ru: { no: 'Нет', yes: 'Да' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { choose: 'Choose' },
3
+ ar: { choose: 'اختيار' },
4
+ ru: { choose: 'Выбрать' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { day: 'Day {day} of 30', label: 'Ramadan tracker' },
3
+ ar: { day: 'اليوم {day} من 30', label: 'متتبع رمضان' },
4
+ ru: { day: 'День {day} из 30', label: 'Трекер Рамадана' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { prev: 'Previous', next: 'Next' },
3
+ ar: { prev: 'السابق', next: 'التالي' },
4
+ ru: { prev: 'Назад', next: 'Далее' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { min: 'Min', max: 'Max' },
3
+ ar: { min: 'الحد الأدنى', max: 'الحد الأقصى' },
4
+ ru: { min: 'Мин.', max: 'Макс.' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Rating', stars: '{n} stars' },
3
+ ar: { label: 'التقييم', stars: '{n} نجوم' },
4
+ ru: { label: 'Рейтинг', stars: 'Звёзд: {n}' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { editor: 'Editor', placeholder: 'Write something…', bold: 'Bold', italic: 'Italic', underline: 'Underline', strike: 'Strike', left: 'Left', center: 'Center', right: 'Right', bullets: 'Bullets', numbers: 'Numbers', quote: 'Quote', codeBlock: 'Code block' },
3
+ ar: { editor: 'المحرر', placeholder: 'اكتب شيئًا…', bold: 'غامق', italic: 'مائل', underline: 'تسطير', strike: 'يتوسطه خط', left: 'يسار', center: 'وسط', right: 'يمين', bullets: 'نقاط', numbers: 'أرقام', quote: 'اقتباس', codeBlock: 'كتلة برمجية' },
4
+ ru: { editor: 'Редактор', placeholder: 'Напишите что-нибудь…', bold: 'Жирный', italic: 'Курсив', underline: 'Подчёркнутый', strike: 'Зачёркнутый', left: 'По левому краю', center: 'По центру', right: 'По правому краю', bullets: 'Маркированный список', numbers: 'Нумерованный список', quote: 'Цитата', codeBlock: 'Блок кода' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Screensaver' },
3
+ ar: { label: 'شاشة التوقف' },
4
+ ru: { label: 'Заставка' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { placeholder: 'Search', clear: 'Clear' },
3
+ ar: { placeholder: 'بحث', clear: 'مسح' },
4
+ ru: { placeholder: 'Поиск', clear: 'Очистить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { toggle: 'Toggle sidebar', collapse: 'Collapse' },
3
+ ar: { toggle: 'تبديل الشريط الجانبي', collapse: 'طي' },
4
+ ru: { toggle: 'Переключить боковую панель', collapse: 'Свернуть' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { close: 'Close' },
3
+ ar: { close: 'إغلاق' },
4
+ ru: { close: 'Закрыть' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { moveUp: 'Move up', moveDown: 'Move down' },
3
+ ar: { moveUp: 'نقل لأعلى', moveDown: 'نقل لأسفل' },
4
+ ru: { moveUp: 'Переместить вверх', moveDown: 'Переместить вниз' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { loading: 'Loading' },
3
+ ar: { loading: 'جارٍ التحميل' },
4
+ ru: { loading: 'Загрузка' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { nfTitle: 'Page not found', nfDesc: 'The page may have moved. Check the address or go back.', home: 'Back to home', authTitle: 'Not authorized', authDesc: 'You need permission to open this page.', mtTitle: 'Under maintenance', mtDesc: 'We are updating the service. It will be back shortly.', soonTitle: 'Coming soon', soonDesc: 'We are working on it. Leave your email and we will tell you first.', notify: 'Notify me' },
3
+ ar: { nfTitle: 'الصفحة غير موجودة', nfDesc: 'ربما تم نقل الصفحة. تحقق من العنوان أو ارجع.', home: 'العودة إلى الرئيسية', authTitle: 'غير مصرح', authDesc: 'تحتاج إلى إذن لفتح هذه الصفحة.', mtTitle: 'قيد الصيانة', mtDesc: 'نقوم بتحديث الخدمة. ستعود قريبًا.', soonTitle: 'قريبًا', soonDesc: 'نعمل على ذلك. اترك بريدك الإلكتروني وسنخبرك أولًا.', notify: 'أبلغني' },
4
+ ru: { nfTitle: 'Страница не найдена', nfDesc: 'Возможно, страница была перемещена. Проверьте адрес или вернитесь назад.', home: 'На главную', authTitle: 'Нет доступа', authDesc: 'Для открытия этой страницы нужно разрешение.', mtTitle: 'Технические работы', mtDesc: 'Мы обновляем сервис. Скоро он снова заработает.', soonTitle: 'Скоро', soonDesc: 'Мы работаем над этим. Оставьте email, и мы сообщим вам первыми.', notify: 'Уведомить меня' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { close: 'Close', previous: 'Previous', next: 'Next', submit: 'Submit' },
3
+ ar: { close: 'إغلاق', previous: 'السابق', next: 'التالي', submit: 'إرسال' },
4
+ ru: { close: 'Закрыть', previous: 'Назад', next: 'Далее', submit: 'Отправить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { back: 'Back', next: 'Next', finish: 'Finish' },
3
+ ar: { back: 'رجوع', next: 'التالي', finish: 'إنهاء' },
4
+ ru: { back: 'Назад', next: 'Следующий', finish: 'Готово' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { add: 'Add' },
3
+ ar: { add: 'إضافة' },
4
+ ru: { add: 'Добавить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { remove: 'Remove' },
3
+ ar: { remove: 'إزالة' },
4
+ ru: { remove: 'Удалить' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Main' },
3
+ ar: { label: 'الرئيسية' },
4
+ ru: { label: 'Основная' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { label: 'Tour' },
3
+ ar: { label: 'جولة تعريفية' },
4
+ ru: { label: 'Тур' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { seats: 'Seats' },
3
+ ar: { seats: 'المقاعد' },
4
+ ru: { seats: 'Места' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { close: 'Close', back: 'Back', next: 'Next', finish: 'Finish' },
3
+ ar: { close: 'إغلاق', back: 'رجوع', next: 'التالي', finish: 'إنهاء' },
4
+ ru: { close: 'Закрыть', back: 'Назад', next: 'Следующий', finish: 'Готово' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { search: 'Search' },
3
+ ar: { search: 'بحث' },
4
+ ru: { search: 'Поиск' },
5
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ en: { required: 'This field is required', email: 'Enter a valid email', url: 'Enter a valid URL', digits: 'Exactly {n} digits', alpha: 'Letters only', alphaDash: 'Letters, digits, dash and underscore', minLength: 'At least {n} characters', maxLength: 'At most {n} characters', range: 'Between {a} and {b}', invalid: 'Invalid format', confirmed: 'Values do not match', password: '8+ characters, a digit and a capital letter' },
3
+ ar: { required: 'هذا الحقل مطلوب', email: 'أدخل بريدًا إلكترونيًا صالحًا', url: 'أدخل رابطًا صالحًا', digits: '{n} أرقام بالضبط', alpha: 'أحرف فقط', alphaDash: 'أحرف وأرقام وشرطة وشرطة سفلية', minLength: '{n} أحرف على الأقل', maxLength: '{n} أحرف كحد أقصى', range: 'بين {a} و {b}', invalid: 'تنسيق غير صالح', confirmed: 'القيمتان غير متطابقتين', password: '8 أحرف أو أكثر ورقم وحرف كبير' },
4
+ ru: { required: 'Обязательное поле', email: 'Введите корректный email', url: 'Введите корректный URL', digits: 'Ровно {n} цифр', alpha: 'Только буквы', alphaDash: 'Буквы, цифры, дефис и подчёркивание', minLength: 'Не менее {n} символов', maxLength: 'Не более {n} символов', range: 'От {a} до {b}', invalid: 'Неверный формат', confirmed: 'Значения не совпадают', password: '8+ символов, цифра и заглавная буква' },
5
+ };
@@ -1,5 +1,135 @@
1
1
  // generated by scripts/i18n-index.mjs: do not edit
2
2
  import { defineMessages } from '../index.js';
3
+ import ActionCard from './ActionCard.js';
4
+ import Actionsheet from './Actionsheet.js';
5
+ import Alert from './Alert.js';
6
+ import Breadcrumbs from './Breadcrumbs.js';
7
+ import Calendar from './Calendar.js';
8
+ import CallCard from './CallCard.js';
9
+ import CallRow from './CallRow.js';
10
+ import Carousel from './Carousel.js';
11
+ import ChartCard from './ChartCard.js';
12
+ import ChatAi from './ChatAi.js';
13
+ import Chip from './Chip.js';
14
+ import ChipInput from './ChipInput.js';
15
+ import CodeInput from './CodeInput.js';
16
+ import Combobox from './Combobox.js';
17
+ import CommandPalette from './CommandPalette.js';
18
+ import ConfirmDialog from './ConfirmDialog.js';
19
+ import ContactPanel from './ContactPanel.js';
3
20
  import CopyButton from './CopyButton.js';
21
+ import DataGroup from './DataGroup.js';
22
+ import DataState from './DataState.js';
23
+ import DataTable from './DataTable.js';
24
+ import DatePicker from './DatePicker.js';
25
+ import DealCard from './DealCard.js';
26
+ import Drawer from './Drawer.js';
27
+ import ErrorPage from './ErrorPage.js';
28
+ import FileUpload from './FileUpload.js';
29
+ import FullscreenDialog from './FullscreenDialog.js';
30
+ import Gallery from './Gallery.js';
31
+ import GuestCard from './GuestCard.js';
32
+ import ImageUpload from './ImageUpload.js';
33
+ import ImageViewer from './ImageViewer.js';
34
+ import IncomingCall from './IncomingCall.js';
35
+ import InlineEdit from './InlineEdit.js';
36
+ import IntegrationCard from './IntegrationCard.js';
37
+ import LoginForm from './LoginForm.js';
38
+ import Map from './Map.js';
39
+ import Modal from './Modal.js';
40
+ import MultiSelect from './MultiSelect.js';
41
+ import NotificationBell from './NotificationBell.js';
42
+ import NumberInput from './NumberInput.js';
43
+ import Pagination from './Pagination.js';
44
+ import PasswordInput from './PasswordInput.js';
45
+ import Popconfirm from './Popconfirm.js';
46
+ import PricingCard from './PricingCard.js';
47
+ import RamadanTracker from './RamadanTracker.js';
48
+ import RangeCalendar from './RangeCalendar.js';
49
+ import RangeSlider from './RangeSlider.js';
50
+ import Rating from './Rating.js';
51
+ import RichEditor from './RichEditor.js';
52
+ import Screensaver from './Screensaver.js';
53
+ import SearchInput from './SearchInput.js';
54
+ import SideNav from './SideNav.js';
55
+ import Snackbar from './Snackbar.js';
56
+ import Sortable from './Sortable.js';
57
+ import Spinner from './Spinner.js';
58
+ import StatusPage from './StatusPage.js';
59
+ import StepDialog from './StepDialog.js';
60
+ import StepForm from './StepForm.js';
61
+ import TabTiles from './TabTiles.js';
62
+ import Tag from './Tag.js';
63
+ import TopNav from './TopNav.js';
64
+ import Tour from './Tour.js';
65
+ import TourCard from './TourCard.js';
66
+ import TourPopover from './TourPopover.js';
67
+ import TreeSelect from './TreeSelect.js';
68
+ import Validation from './Validation.js';
4
69
 
70
+ defineMessages('ActionCard', ActionCard);
71
+ defineMessages('Actionsheet', Actionsheet);
72
+ defineMessages('Alert', Alert);
73
+ defineMessages('Breadcrumbs', Breadcrumbs);
74
+ defineMessages('Calendar', Calendar);
75
+ defineMessages('CallCard', CallCard);
76
+ defineMessages('CallRow', CallRow);
77
+ defineMessages('Carousel', Carousel);
78
+ defineMessages('ChartCard', ChartCard);
79
+ defineMessages('ChatAi', ChatAi);
80
+ defineMessages('Chip', Chip);
81
+ defineMessages('ChipInput', ChipInput);
82
+ defineMessages('CodeInput', CodeInput);
83
+ defineMessages('Combobox', Combobox);
84
+ defineMessages('CommandPalette', CommandPalette);
85
+ defineMessages('ConfirmDialog', ConfirmDialog);
86
+ defineMessages('ContactPanel', ContactPanel);
5
87
  defineMessages('CopyButton', CopyButton);
88
+ defineMessages('DataGroup', DataGroup);
89
+ defineMessages('DataState', DataState);
90
+ defineMessages('DataTable', DataTable);
91
+ defineMessages('DatePicker', DatePicker);
92
+ defineMessages('DealCard', DealCard);
93
+ defineMessages('Drawer', Drawer);
94
+ defineMessages('ErrorPage', ErrorPage);
95
+ defineMessages('FileUpload', FileUpload);
96
+ defineMessages('FullscreenDialog', FullscreenDialog);
97
+ defineMessages('Gallery', Gallery);
98
+ defineMessages('GuestCard', GuestCard);
99
+ defineMessages('ImageUpload', ImageUpload);
100
+ defineMessages('ImageViewer', ImageViewer);
101
+ defineMessages('IncomingCall', IncomingCall);
102
+ defineMessages('InlineEdit', InlineEdit);
103
+ defineMessages('IntegrationCard', IntegrationCard);
104
+ defineMessages('LoginForm', LoginForm);
105
+ defineMessages('Map', Map);
106
+ defineMessages('Modal', Modal);
107
+ defineMessages('MultiSelect', MultiSelect);
108
+ defineMessages('NotificationBell', NotificationBell);
109
+ defineMessages('NumberInput', NumberInput);
110
+ defineMessages('Pagination', Pagination);
111
+ defineMessages('PasswordInput', PasswordInput);
112
+ defineMessages('Popconfirm', Popconfirm);
113
+ defineMessages('PricingCard', PricingCard);
114
+ defineMessages('RamadanTracker', RamadanTracker);
115
+ defineMessages('RangeCalendar', RangeCalendar);
116
+ defineMessages('RangeSlider', RangeSlider);
117
+ defineMessages('Rating', Rating);
118
+ defineMessages('RichEditor', RichEditor);
119
+ defineMessages('Screensaver', Screensaver);
120
+ defineMessages('SearchInput', SearchInput);
121
+ defineMessages('SideNav', SideNav);
122
+ defineMessages('Snackbar', Snackbar);
123
+ defineMessages('Sortable', Sortable);
124
+ defineMessages('Spinner', Spinner);
125
+ defineMessages('StatusPage', StatusPage);
126
+ defineMessages('StepDialog', StepDialog);
127
+ defineMessages('StepForm', StepForm);
128
+ defineMessages('TabTiles', TabTiles);
129
+ defineMessages('Tag', Tag);
130
+ defineMessages('TopNav', TopNav);
131
+ defineMessages('Tour', Tour);
132
+ defineMessages('TourCard', TourCard);
133
+ defineMessages('TourPopover', TourPopover);
134
+ defineMessages('TreeSelect', TreeSelect);
135
+ defineMessages('Validation', Validation);
package/src/i18n/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  // Built-in component strings. One file per component in ./components/<Name>.js with all locales:
2
- // export default { en: { copy: 'Copy' } } (the open source package ships English; other languages come from a language pack
3
- // that calls defineMessages(component, { ru: {...} }) or from the app via setUiMessages)
2
+ // export default { en: { copy: 'Copy' } } (the open source package ships en, ar, ru; the other 13 languages come from the Pro language pack
3
+ // that calls defineMessages(component, { uz: {...} }) or from the app via setUiMessages). A locale without strings falls back to English.
4
4
  // The kit has its own translator: it never depends on the host app's i18n library. Sync it with yours:
5
5
  // watch(() => i18n.locale.value, l => setUiLocale(l)) // vue-i18n
6
6
  // setUiMessages('ru', { CopyButton: { copy: 'Скопировать' } }) // override single strings from the app
7
- export const LOCALES = ['en', 'uz', 'ru', 'tr', 'zh', 'ar'];
8
- export const RTL_LOCALES = ['ar'];
7
+ export const LOCALES = ['en', 'ar', 'ru', 'uz', 'tg', 'tr', 'fr', 'fa', 'hi', 'ur', 'bn', 'id', 'kk', 'ky', 'ms', 'ha'];
8
+ /** Languages whose strings ship in the free package. The rest come from the Pro language pack. */
9
+ export const FREE_LOCALES = ['en', 'ar', 'ru'];
10
+ export const RTL_LOCALES = ['ar', 'fa', 'ur'];
9
11
 
10
12
  const registry = {};
11
13
  const overrides = {};
@@ -16,7 +18,7 @@ let version = 0;
16
18
  const norm = l => { const k = String(l || 'en').toLowerCase().split(/[-_]/)[0]; return LOCALES.includes(k) ? k : 'en'; };
17
19
  const bump = () => { version++; subs.forEach(f => f(locale)); };
18
20
 
19
- /** Register strings of a component. Calling it again for the same component MERGES locales: an extra pack can add uz, ru, tr, zh, ar on top of the built-in English. */
21
+ /** Register strings of a component. Calling it again for the same component MERGES locales: a language pack can add locales on top of the built-in ones. */
20
22
  export function defineMessages(component, messages) {
21
23
  const cur = registry[component] || (registry[component] = {});
22
24
  for (const [l, msgs] of Object.entries(messages)) cur[l] = { ...(cur[l] || {}), ...msgs };
@@ -45,4 +47,4 @@ export function t(component, key, params) {
45
47
  }
46
48
 
47
49
  /** Locale-aware helper for numbers and dates in components (uses the browser/Node Intl). */
48
- export const intlLocale = () => ({ en: 'en-US', uz: 'uz-UZ', ru: 'ru-RU', tr: 'tr-TR', zh: 'zh-CN', ar: 'ar' })[locale];
50
+ export const intlLocale = () => ({ en: 'en-US', ar: 'ar', ru: 'ru-RU', uz: 'uz-UZ', tg: 'tg-TJ', tr: 'tr-TR', fr: 'fr-FR', fa: 'fa-IR', hi: 'hi-IN', ur: 'ur-PK', bn: 'bn-BD', id: 'id-ID', kk: 'kk-KZ', ky: 'ky-KG', ms: 'ms-MY', ha: 'ha-NG' })[locale];
package/types/i18n.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- export type UiLocale = 'en' | 'uz' | 'ru' | 'tr' | 'zh' | 'ar';
1
+ export type UiLocale = 'en' | 'ar' | 'ru' | 'uz' | 'tg' | 'tr' | 'fr' | 'fa' | 'hi' | 'ur' | 'bn' | 'id' | 'kk' | 'ky' | 'ms' | 'ha';
2
2
  export const LOCALES: readonly UiLocale[];
3
+ /** en, ar, ru: included in the free package. */
4
+ export const FREE_LOCALES: readonly UiLocale[];
3
5
  export const RTL_LOCALES: readonly UiLocale[];
4
6
  /** Switch the language of the built-in component strings. Components re-render by themselves. */
5
7
  export function setUiLocale(locale: UiLocale | string): void;
@@ -8,5 +10,5 @@ export function isRtlLocale(locale?: string): boolean;
8
10
  /** Override single strings from the app: setUiMessages('ru', { Pagination: { prev: 'Назад' } }). Pass null to clear a locale. */
9
11
  export function setUiMessages(locale: UiLocale | string, messages: Record<string, Record<string, string>> | null): void;
10
12
  export function t(component: string, key: string, params?: Record<string, string | number>): string;
11
- export function defineMessages(component: string, messages: Record<UiLocale, Record<string, string>>): void;
13
+ export function defineMessages(component: string, messages: Partial<Record<UiLocale, Record<string, string>>>): void;
12
14
  export function subscribeUiLocale(fn: (locale: UiLocale) => void): () => void;