Skip to content

Commit

Permalink
Merge pull request #1062 from prabhatkumaroc082/fix-dashboard-transla…
Browse files Browse the repository at this point in the history
…tion

Fixed #852
  • Loading branch information
jitendra-webkul authored Aug 25, 2022
2 parents 4c3344f + d64f6c6 commit fd00458
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 72 deletions.
2 changes: 1 addition & 1 deletion packages/Webkul/UI/publishable/assets/css/ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/Webkul/UI/publishable/assets/js/ui.js

Large diffs are not rendered by default.

138 changes: 69 additions & 69 deletions packages/Webkul/UI/publishable/assets/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
{
"/js/ui.js": "/js/ui.js?id=7a24d201f2a70dd82fee",
"/css/ui.css": "/css/ui.css?id=c989f4fff122a048cfd9",
"/images/add-icon.svg": "/images/add-icon.svg?id=9135b4e0e1c239c36981",
"/images/alert-danger-icon.svg": "/images/alert-danger-icon.svg?id=d77f6a8646ed23b5c3b7",
"/images/align-justify-icon.svg": "/images/align-justify-icon.svg?id=ee8d48e636b80417a884",
"/images/arrow-down-icon.svg": "/images/arrow-down-icon.svg?id=7b5c03f96be72c9a0bef",
"/images/arrow-down-s-icon.svg": "/images/arrow-down-s-icon.svg?id=50f6d9e50739caf9e868",
"/images/arrow-left-icon.svg": "/images/arrow-left-icon.svg?id=61cff1417c6e047d76f6",
"/images/arrow-left-line-icon.svg": "/images/arrow-left-line-icon.svg?id=ab5e4919b7b0c0bac8f5",
"/images/arrow-right-icon.svg": "/images/arrow-right-icon.svg?id=01ac0409d916c6513090",
"/images/arrow-right-line-icon.svg": "/images/arrow-right-line-icon.svg?id=0fdfb15c1b5a5e16958f",
"/images/arrow-up-icon.svg": "/images/arrow-up-icon.svg?id=8e55868ef41bd032542e",
"/images/attachment-icon.svg": "/images/attachment-icon.svg?id=7f8975406eb4b7e497e7",
"/images/calendar-icon.svg": "/images/calendar-icon.svg?id=ebf1eaf60f02673fc24b",
"/images/checkbox-checked-icon.svg": "/images/checkbox-checked-icon.svg?id=407a8f82c017c8f3835a",
"/images/checkbox-dash-icon.svg": "/images/checkbox-dash-icon.svg?id=3179719c86734dfa4268",
"/images/checkbox-icon.svg": "/images/checkbox-icon.svg?id=7b02d45508d782836e92",
"/images/circle-check-white-icon.svg": "/images/circle-check-white-icon.svg?id=2a3243f09f873260266d",
"/images/circle-close-white-icon.svg": "/images/circle-close-white-icon.svg?id=8997edca246b88a9e9a2",
"/images/circle-info-white-icon.svg": "/images/circle-info-white-icon.svg?id=93dfcd96886d1f9a5824",
"/images/close-icon.svg": "/images/close-icon.svg?id=47c0256c0b67804d5c8a",
"/images/close-white-icon.svg": "/images/close-white-icon.svg?id=eca0bd1d80ac3d7c9f9a",
"/images/download-icon.svg": "/images/download-icon.svg?id=a8ddc459c3a5659d8a8b",
"/images/ellipsis-icon.svg": "/images/ellipsis-icon.svg?id=78aa3112be42d9cef6d2",
"/images/external-link-icon.svg": "/images/external-link-icon.svg?id=b2beda2403e83f5aacfd",
"/images/eye-icon.svg": "/images/eye-icon.svg?id=b29def27b6a18899d6f7",
"/images/folder-icon.svg": "/images/folder-icon.svg?id=c7d8760e1cc9ebaf31ea",
"/images/forward-icon.svg": "/images/forward-icon.svg?id=f503afbaa6d0a46b0070",
"/images/forward-white-icon.svg": "/images/forward-white-icon.svg?id=00f7ad89d944b140fefb",
"/images/link-icon.svg": "/images/link-icon.svg?id=817566b0220eebc0da11",
"/images/loader-active-icon.svg": "/images/loader-active-icon.svg?id=95e546ca2a603afe5a2d",
"/images/loader-icon.svg": "/images/loader-icon.svg?id=bf4432e158adb5eb568f",
"/images/menu-fold-active-icon.svg": "/images/menu-fold-active-icon.svg?id=f50bf9079125b89fe788",
"/images/menu-fold-icon.svg": "/images/menu-fold-icon.svg?id=ce6debab335f18b2a25a",
"/images/menu-unfold-active-icon.svg": "/images/menu-unfold-active-icon.svg?id=0ffccc5f14b91b5bf542",
"/images/menu-unfold-icon.svg": "/images/menu-unfold-icon.svg?id=183ce79ffd37652adc12",
"/images/pencil-icon.svg": "/images/pencil-icon.svg?id=146a6381e3805ce04259",
"/images/pencil-underline-icon.svg": "/images/pencil-underline-icon.svg?id=71376676378bd7548a95",
"/images/plus-black-icon.svg": "/images/plus-black-icon.svg?id=9135b4e0e1c239c36981",
"/images/plus-primary-icon.svg": "/images/plus-primary-icon.svg?id=73c815af620be35c98dc",
"/images/plus-white-icon.svg": "/images/plus-white-icon.svg?id=0e639e9832768721345a",
"/images/radio-checked-icon.svg": "/images/radio-checked-icon.svg?id=813fc1505c10aa3c06ae",
"/images/radio-icon.svg": "/images/radio-icon.svg?id=1a2426b9af083ec6c09d",
"/images/reply-all-icon.svg": "/images/reply-all-icon.svg?id=944fcfa16bebbbc7a097",
"/images/reply-all-white-icon.svg": "/images/reply-all-white-icon.svg?id=ca0d13a44909cb5fe6b4",
"/images/reply-icon.svg": "/images/reply-icon.svg?id=2a63fecdadc2d8f380a7",
"/images/reply-white-icon.svg": "/images/reply-white-icon.svg?id=df45b128c21e5b09fb7b",
"/images/search-icon.svg": "/images/search-icon.svg?id=438894caa61cee3a3fa7",
"/images/tags-active-icon.svg": "/images/tags-active-icon.svg?id=618090d34732e269634b",
"/images/tags-icon.svg": "/images/tags-icon.svg?id=981aeaf2906c4581ecd2",
"/images/time-icon.svg": "/images/time-icon.svg?id=57cfdb5c9d4c46e2ec1c",
"/images/trash-icon.svg": "/images/trash-icon.svg?id=985e370d9ceea2f05b82",
"/images/trash-white-icon.svg": "/images/trash-white-icon.svg?id=458b1d90fc1fdfe2581e",
"/fonts/Roboto-Black.ttf": "/fonts/Roboto-Black.ttf?id=f61f849b9d6e2452c746",
"/fonts/Roboto-BlackItalic.ttf": "/fonts/Roboto-BlackItalic.ttf?id=b8f36dd08c12103a9d26",
"/fonts/Roboto-Bold.ttf": "/fonts/Roboto-Bold.ttf?id=59c0ccb5974ccfa21a2a",
"/fonts/Roboto-BoldItalic.ttf": "/fonts/Roboto-BoldItalic.ttf?id=42efad475376128f76fd",
"/fonts/Roboto-Italic.ttf": "/fonts/Roboto-Italic.ttf?id=3878fabbe460ffa02170",
"/fonts/Roboto-Light.ttf": "/fonts/Roboto-Light.ttf?id=e1024b1dc0e3f3316d84",
"/fonts/Roboto-LightItalic.ttf": "/fonts/Roboto-LightItalic.ttf?id=c49d817279b23d0474da",
"/fonts/Roboto-Medium.ttf": "/fonts/Roboto-Medium.ttf?id=3f241c827c660cab8265",
"/fonts/Roboto-MediumItalic.ttf": "/fonts/Roboto-MediumItalic.ttf?id=cc69ce1bcb64e3479da0",
"/fonts/Roboto-Regular.ttf": "/fonts/Roboto-Regular.ttf?id=487357337a180effe639",
"/fonts/Roboto-Thin.ttf": "/fonts/Roboto-Thin.ttf?id=4621c139182c23270ef6",
"/fonts/Roboto-ThinItalic.ttf": "/fonts/Roboto-ThinItalic.ttf?id=6319a0bdfe3827cb061d",
"/images/upload-icon.svg": "/images/upload-icon.svg?id=eae90d6654734ea30c06",
"/images/export-icon.svg": "/images/export-icon.svg?id=061ce9bd2880d4da6c7b",
"/images/controls.svg": "/images/controls.svg?id=64ce374f9c70735c7020",
"/images/favicon.ico": "/images/favicon.ico?id=dd35a873003e9508df79"
"/js/ui.js": "/js/ui.js?id=e000e82299610d48596fb143988f98fd",
"/css/ui.css": "/css/ui.css?id=b7b8ad024fa08b9a5d21cff37b6a59c3",
"/images/add-icon.svg": "/images/add-icon.svg?id=9135b4e0e1c239c36981c849a44a80e1",
"/images/alert-danger-icon.svg": "/images/alert-danger-icon.svg?id=d77f6a8646ed23b5c3b7721e9e236299",
"/images/align-justify-icon.svg": "/images/align-justify-icon.svg?id=ee8d48e636b80417a884ab54c8fc0056",
"/images/arrow-down-icon.svg": "/images/arrow-down-icon.svg?id=7b5c03f96be72c9a0bef92b99999a184",
"/images/arrow-down-s-icon.svg": "/images/arrow-down-s-icon.svg?id=50f6d9e50739caf9e8686f807f5038b4",
"/images/arrow-left-icon.svg": "/images/arrow-left-icon.svg?id=61cff1417c6e047d76f6164dabbd8ec7",
"/images/arrow-left-line-icon.svg": "/images/arrow-left-line-icon.svg?id=ab5e4919b7b0c0bac8f54cf01f67d309",
"/images/arrow-right-icon.svg": "/images/arrow-right-icon.svg?id=01ac0409d916c65130904958df76cc13",
"/images/arrow-right-line-icon.svg": "/images/arrow-right-line-icon.svg?id=0fdfb15c1b5a5e16958fbc7b90d7267c",
"/images/arrow-up-icon.svg": "/images/arrow-up-icon.svg?id=8e55868ef41bd032542e5c482411e294",
"/images/attachment-icon.svg": "/images/attachment-icon.svg?id=7f8975406eb4b7e497e71ef7e29c58fb",
"/images/calendar-icon.svg": "/images/calendar-icon.svg?id=ebf1eaf60f02673fc24b2001c27104dc",
"/images/checkbox-checked-icon.svg": "/images/checkbox-checked-icon.svg?id=407a8f82c017c8f3835a3cb1f0b3de30",
"/images/checkbox-dash-icon.svg": "/images/checkbox-dash-icon.svg?id=3179719c86734dfa4268799ab684eef8",
"/images/checkbox-icon.svg": "/images/checkbox-icon.svg?id=7b02d45508d782836e92498e5a99726c",
"/images/circle-check-white-icon.svg": "/images/circle-check-white-icon.svg?id=2a3243f09f873260266d809c1d6218e0",
"/images/circle-close-white-icon.svg": "/images/circle-close-white-icon.svg?id=8997edca246b88a9e9a28a876cd23c5a",
"/images/circle-info-white-icon.svg": "/images/circle-info-white-icon.svg?id=93dfcd96886d1f9a58247b85d696b88d",
"/images/close-icon.svg": "/images/close-icon.svg?id=47c0256c0b67804d5c8a12069291dd81",
"/images/close-white-icon.svg": "/images/close-white-icon.svg?id=eca0bd1d80ac3d7c9f9a20ab812d4aa1",
"/images/download-icon.svg": "/images/download-icon.svg?id=a8ddc459c3a5659d8a8be90a9b1bad6e",
"/images/ellipsis-icon.svg": "/images/ellipsis-icon.svg?id=78aa3112be42d9cef6d2338fd58021d9",
"/images/external-link-icon.svg": "/images/external-link-icon.svg?id=b2beda2403e83f5aacfdcfc575216bb7",
"/images/eye-icon.svg": "/images/eye-icon.svg?id=b29def27b6a18899d6f75f20b911715d",
"/images/folder-icon.svg": "/images/folder-icon.svg?id=c7d8760e1cc9ebaf31ea3ff012555141",
"/images/forward-icon.svg": "/images/forward-icon.svg?id=f503afbaa6d0a46b007028fd6d86343e",
"/images/forward-white-icon.svg": "/images/forward-white-icon.svg?id=00f7ad89d944b140fefbb749b1198728",
"/images/link-icon.svg": "/images/link-icon.svg?id=817566b0220eebc0da110ddd452555b9",
"/images/loader-active-icon.svg": "/images/loader-active-icon.svg?id=95e546ca2a603afe5a2d0b1124f30c94",
"/images/loader-icon.svg": "/images/loader-icon.svg?id=bf4432e158adb5eb568f7d8f7506ca45",
"/images/menu-fold-active-icon.svg": "/images/menu-fold-active-icon.svg?id=f50bf9079125b89fe78894a260b97211",
"/images/menu-fold-icon.svg": "/images/menu-fold-icon.svg?id=ce6debab335f18b2a25a8f2bf727a3d5",
"/images/menu-unfold-active-icon.svg": "/images/menu-unfold-active-icon.svg?id=0ffccc5f14b91b5bf542bf12d09c9a0b",
"/images/menu-unfold-icon.svg": "/images/menu-unfold-icon.svg?id=183ce79ffd37652adc129477d8947a8f",
"/images/pencil-icon.svg": "/images/pencil-icon.svg?id=146a6381e3805ce04259aa4f0f64521d",
"/images/pencil-underline-icon.svg": "/images/pencil-underline-icon.svg?id=71376676378bd7548a9578ab0c898096",
"/images/plus-black-icon.svg": "/images/plus-black-icon.svg?id=9135b4e0e1c239c36981c849a44a80e1",
"/images/plus-primary-icon.svg": "/images/plus-primary-icon.svg?id=73c815af620be35c98dc708c21ee91f7",
"/images/plus-white-icon.svg": "/images/plus-white-icon.svg?id=0e639e9832768721345a5442dcea9d18",
"/images/radio-checked-icon.svg": "/images/radio-checked-icon.svg?id=813fc1505c10aa3c06ae87a9934f9b2f",
"/images/radio-icon.svg": "/images/radio-icon.svg?id=1a2426b9af083ec6c09dc269fb5b7305",
"/images/reply-all-icon.svg": "/images/reply-all-icon.svg?id=944fcfa16bebbbc7a097d6f26c23e9e7",
"/images/reply-all-white-icon.svg": "/images/reply-all-white-icon.svg?id=ca0d13a44909cb5fe6b4694a00ccf875",
"/images/reply-icon.svg": "/images/reply-icon.svg?id=2a63fecdadc2d8f380a7d21c5861af4c",
"/images/reply-white-icon.svg": "/images/reply-white-icon.svg?id=df45b128c21e5b09fb7bd1e05905bca8",
"/images/search-icon.svg": "/images/search-icon.svg?id=438894caa61cee3a3fa74d8c0bd36854",
"/images/tags-active-icon.svg": "/images/tags-active-icon.svg?id=618090d34732e269634b1da6dfc02fc2",
"/images/tags-icon.svg": "/images/tags-icon.svg?id=981aeaf2906c4581ecd278f0c14d63d0",
"/images/time-icon.svg": "/images/time-icon.svg?id=57cfdb5c9d4c46e2ec1c84de98b1e326",
"/images/trash-icon.svg": "/images/trash-icon.svg?id=985e370d9ceea2f05b82e739da7a0767",
"/images/trash-white-icon.svg": "/images/trash-white-icon.svg?id=458b1d90fc1fdfe2581e7b87d6e2ed78",
"/fonts/Roboto-Black.ttf": "/fonts/Roboto-Black.ttf?id=f61f849b9d6e2452c74654b2e9f909b7",
"/fonts/Roboto-BlackItalic.ttf": "/fonts/Roboto-BlackItalic.ttf?id=b8f36dd08c12103a9d26c2b22608fbba",
"/fonts/Roboto-Bold.ttf": "/fonts/Roboto-Bold.ttf?id=59c0ccb5974ccfa21a2a0f4b477acb05",
"/fonts/Roboto-BoldItalic.ttf": "/fonts/Roboto-BoldItalic.ttf?id=42efad475376128f76fd9ee90768dc0f",
"/fonts/Roboto-Italic.ttf": "/fonts/Roboto-Italic.ttf?id=3878fabbe460ffa02170f9b5cf21afc5",
"/fonts/Roboto-Light.ttf": "/fonts/Roboto-Light.ttf?id=e1024b1dc0e3f3316d843a1184b790e2",
"/fonts/Roboto-LightItalic.ttf": "/fonts/Roboto-LightItalic.ttf?id=c49d817279b23d0474dafacb1f04ab58",
"/fonts/Roboto-Medium.ttf": "/fonts/Roboto-Medium.ttf?id=3f241c827c660cab8265acf135ad167d",
"/fonts/Roboto-MediumItalic.ttf": "/fonts/Roboto-MediumItalic.ttf?id=cc69ce1bcb64e3479da047696f76d277",
"/fonts/Roboto-Regular.ttf": "/fonts/Roboto-Regular.ttf?id=487357337a180effe639a1b3b8c6cdd9",
"/fonts/Roboto-Thin.ttf": "/fonts/Roboto-Thin.ttf?id=4621c139182c23270ef63b851972f5a6",
"/fonts/Roboto-ThinItalic.ttf": "/fonts/Roboto-ThinItalic.ttf?id=6319a0bdfe3827cb061d88fca0289256",
"/images/upload-icon.svg": "/images/upload-icon.svg?id=eae90d6654734ea30c06cea72a3a8149",
"/images/export-icon.svg": "/images/export-icon.svg?id=061ce9bd2880d4da6c7b70a66fb4aa40",
"/images/controls.svg": "/images/controls.svg?id=64ce374f9c70735c70200fd2bf33ebde",
"/images/favicon.ico": "/images/favicon.ico?id=dd35a873003e9508df7903ebe10a805e"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:showWeekNumbers="showWeekNumbers"
:showDropdowns="showDropdowns"
:autoApply="autoApply"
:localeData="{applyLabel:__('ui.datagrid.filter.apply'), cancelLabel:__('ui.datagrid.filter.cancel')}"
:ranges="show_ranges ? undefined : false"
:linkedCalendars="linkedCalendars"
:dateFormat="dateFormat"
Expand Down Expand Up @@ -48,7 +49,7 @@ export default {
startDate: this.startDate
},
single_range_picker: true,
show_ranges: true,
ranges: {},
singleDatePicker: false,
timePicker: false,
timePicker24Hour: true,
Expand All @@ -62,7 +63,52 @@ export default {
};
},
mounted() {
this.setRange();
},
methods: {
setRange() {
let today = new Date();
today.setHours(0, 0, 0, 0);
let todayEnd = new Date();
todayEnd.setHours(11, 59, 59, 999);
let yesterdayStart = new Date();
yesterdayStart.setDate(today.getDate() - 1);
yesterdayStart.setHours(0, 0, 0, 0);
let yesterdayEnd = new Date();
yesterdayEnd.setDate(today.getDate() - 1);
yesterdayEnd.setHours(11, 59, 59, 999);
let thisMonthStart = new Date(today.getFullYear(), today.getMonth(), 1);
let thisMonthEnd = new Date(
today.getFullYear(),
today.getMonth() + 1,
0,
11,
59,
59,
999
);
this.ranges[this.__("ui.datagrid.filter.today")] = [today, todayEnd];
this.ranges[this.__("ui.datagrid.filter.yesterday")] = [
yesterdayStart,
yesterdayEnd,
];
this.ranges[this.__("ui.datagrid.filter.this-month")] = [
thisMonthStart,
thisMonthEnd,
];
this.ranges[this.__("ui.datagrid.filter.this-year")] = [
new Date(today.getFullYear(), 0, 1),
new Date(today.getFullYear(), 11, 31, 11, 59, 59, 999),
];
this.ranges[this.__("ui.datagrid.filter.last-month")] = [
new Date(today.getFullYear(), today.getMonth() - 1, 1),
new Date(today.getFullYear(), today.getMonth(), 0, 11, 59, 59, 999),
];
},
updateValues: function(values) {
this.dateRange.startDate = values.startDate;
Expand Down
8 changes: 8 additions & 0 deletions packages/Webkul/UI/src/Resources/lang/ar/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
'date_range' => 'نطاق الموعد',
'start_date' => 'تاريخ البدء',
'end_date' => 'تاريخ الانتهاء',
'today' => 'اليوم',
'yesterday' => 'في الامس',
'tomorrow' => 'غدا',
'this_month' => 'هذا الشهر',
'this_year' => 'هذه السنة',
'last_month' => 'الشهر الماضي',
'apply' => 'يتقدم',
'cancel' => 'إلغاء',
],
],

Expand Down
7 changes: 7 additions & 0 deletions packages/Webkul/UI/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
'date_range' => 'Date Range',
'start_date' => 'Start Date',
'end_date' => 'End Date',
'today' => 'Today',
'yesterday' => 'Yesterday',
'this_month' => 'This Month',
'this_year' => 'This Year',
'last_month' => 'Last Month',
'apply' => 'Apply',
'cancel' => 'Cancel',
],
],

Expand Down
7 changes: 7 additions & 0 deletions packages/Webkul/UI/src/Resources/lang/tr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
'date_range' => 'Tarih aralığı',
'start_date' => 'Başlangıç Tarihi',
'end_date' => 'Bitiş Tarihi',
'today' => 'Bugün',
'yesterday' => 'Dün',
'this_month' => 'Bu Ay',
'this_year' => 'Bu yıl',
'last_month' => 'Geçen ay',
'apply' => 'Uygulamak',
'cancel' => 'İptal',
],
],

Expand Down

0 comments on commit fd00458

Please sign in to comment.