Skip to content

Commit

Permalink
⬆️ updated package dependencies
Browse files Browse the repository at this point in the history
🐛 fixed issue #202 tiny date picker not working with en locale (thanks @thomcuddihy)
  • Loading branch information
faburem committed Jan 31, 2024
1 parent 3757150 commit 1aa0464
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ [email protected] # ECMAScript 5 compatibility for older browsers.
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Server-side component of the `meteor shell` command

fourseven:scss@4.5.0
fourseven:scss@4.16.0
[email protected]
[email protected]
[email protected]
Expand Down
13 changes: 11 additions & 2 deletions imports/utils/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ const t = (key) => {
}
return translatedValue
}
let fallbackLocale = {}
import(`dayjs/locale/en-gb`).then((locale) => {
fallbackLocale = locale
})

const loadLanguage = (language, i18nextDebugMode) => {
// Meteor.js is not very smart
// eslint-disable-next no-constant-condition
Expand All @@ -49,7 +54,11 @@ const loadLanguage = (language, i18nextDebugMode) => {
i18nReady.set(false)
setup(lang.default, language, i18nextDebugMode)
import(`dayjs/locale/${language}`).then((locale) => {
weekDaysMin.set(locale.weekdaysMin)
if (!locale.weekdaysMin) {
weekDaysMin.set(fallbackLocale.weekdaysMin)
} else {
weekDaysMin.set(locale.weekdaysMin)
}
months.set(locale.months)
import('dayjs').then((dayjs) => {
dayjs.locale(language)
Expand All @@ -64,7 +73,7 @@ const loadLanguage = (language, i18nextDebugMode) => {
}
i18nReady.set(false)
setup(lang.default, 'en', i18nextDebugMode)
import('dayjs/locale/en').then((locale) => {
import('dayjs/locale/en-gb').then((locale) => {
weekDaysMin.set(locale.weekdaysMin)
months.set(locale.months)
import('dayjs').then((dayjs) => {
Expand Down
147 changes: 68 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "titra",
"version": "0.96.2",
"version": "0.96.3",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"@babel/runtime": "^7.23.8",
"@babel/runtime": "^7.23.9",
"@dashboardcode/bsmultiselect": "^1.1.18",
"@fortawesome/fontawesome-free": "^6.5.1",
"@fullcalendar/core": "6.1.10",
Expand All @@ -19,15 +19,15 @@
"bootstrap": "^5.3.2",
"cl-editor": "^2.3.0",
"content-type": "^1.0.5",
"date-holidays": "^3.23.3",
"date-holidays": "^3.23.7",
"dayjs": "^1.11.10",
"dayjs-precise-range": "^1.0.1",
"docker-names": "^1.2.1",
"file-saver": "^2.0.5",
"frappe-charts": "1.6.2",
"frappe-datatable": "^1.17.14",
"frappe-gantt": "^0.6.1",
"hotkeys-js": "^3.13.3",
"hotkeys-js": "^3.13.5",
"is-dark": "^1.0.4",
"jquery": "3.7.1",
"jquery-serializejson": "^3.2.1",
Expand All @@ -39,13 +39,13 @@
"quill-delta-to-html": "^0.12.1",
"randomcolor": "^0.6.2",
"raw-body": "^2.5.2",
"sortablejs": "^1.15.1",
"sortablejs": "^1.15.2",
"tiny-date-picker": "^3.2.8",
"vm2": "^3.9.19"
},
"devDependencies": {
"@babel/core": "^7.23.7",
"@babel/eslint-parser": "^7.23.3",
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-meteor": "^0.4.0",
Expand Down

0 comments on commit 1aa0464

Please sign in to comment.