diff --git a/package-lock.json b/package-lock.json index f1261290..42125ebc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "framework7": "^8.3.4", "framework7-icons": "^5.0.5", "framework7-vue": "^8.3.4", + "jalaali-js": "^1.2.8", "leaflet": "^1.9.4", "line-awesome": "^1.3.0", "moment": "^2.30.1", @@ -43,6 +44,7 @@ "@types/cbor-js": "^0.1.1", "@types/crypto-js": "^4.2.2", "@types/git-rev-sync": "^2.0.2", + "@types/jalaali-js": "^1.2.0", "@types/jest": "^29.5.14", "@types/node": "^22.15.29", "@types/ua-parser-js": "^0.7.39", @@ -5154,6 +5156,13 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jalaali-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/jalaali-js/-/jalaali-js-1.2.0.tgz", + "integrity": "sha512-DRQKjbfFe0/v3siCou9eFzYjDxJItkJpxbU+/CSptvoRqq2/VmTA6y8QvqK/VELKW6xX3qb174nLZlrFV9OT3Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/jest": { "version": "29.5.14", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", @@ -9133,6 +9142,12 @@ "node": ">=10" } }, + "node_modules/jalaali-js": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/jalaali-js/-/jalaali-js-1.2.8.tgz", + "integrity": "sha512-Jl/EwY84JwjW2wsWqeU4pNd22VNQ7EkjI36bDuLw31wH98WQW4fPjD0+mG7cdCK+Y8D6s9R3zLiQ3LaKu6bD8A==", + "license": "MIT" + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", diff --git a/package.json b/package.json index 80949957..1ce0820f 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "framework7": "^8.3.4", "framework7-icons": "^5.0.5", "framework7-vue": "^8.3.4", + "jalaali-js": "^1.2.8", "leaflet": "^1.9.4", "line-awesome": "^1.3.0", "moment": "^2.30.1", @@ -53,6 +54,7 @@ "@types/cbor-js": "^0.1.1", "@types/crypto-js": "^4.2.2", "@types/git-rev-sync": "^2.0.2", + "@types/jalaali-js": "^1.2.0", "@types/jest": "^29.5.14", "@types/node": "^22.15.29", "@types/ua-parser-js": "^0.7.39", diff --git a/pkg/core/calendar.go b/pkg/core/calendar.go index 07a34390..c1c4fd03 100644 --- a/pkg/core/calendar.go +++ b/pkg/core/calendar.go @@ -11,6 +11,7 @@ const ( CALENDAR_DISPLAY_TYPE_GREGORAIN CalendarDisplayType = 1 CALENDAR_DISPLAY_TYPE_BUDDHIST CalendarDisplayType = 2 CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_CHINESE CalendarDisplayType = 3 + CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_PERSIAN CalendarDisplayType = 4 CALENDAR_DISPLAY_TYPE_INVALID CalendarDisplayType = 255 ) @@ -25,6 +26,8 @@ func (f CalendarDisplayType) String() string { return "Buddhist" case CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_CHINESE: return "Gregorian with Chinese" + case CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_PERSIAN: + return "Gregorian with Persian" case CALENDAR_DISPLAY_TYPE_INVALID: return "Invalid" default: @@ -40,6 +43,7 @@ const ( DATE_DISPLAY_TYPE_DEFAULT DateDisplayType = 0 DATE_DISPLAY_TYPE_GREGORAIN DateDisplayType = 1 DATE_DISPLAY_TYPE_BUDDHIST DateDisplayType = 2 + DATE_DISPLAY_TYPE_PERSIAN DateDisplayType = 3 DATE_DISPLAY_TYPE_INVALID DateDisplayType = 255 ) @@ -52,6 +56,8 @@ func (f DateDisplayType) String() string { return "Gregorian" case DATE_DISPLAY_TYPE_BUDDHIST: return "Buddhist" + case DATE_DISPLAY_TYPE_PERSIAN: + return "Persian" case DATE_DISPLAY_TYPE_INVALID: return "Invalid" default: diff --git a/pkg/models/user.go b/pkg/models/user.go index b984af1f..d76b3abc 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -199,8 +199,8 @@ type UserProfileUpdateRequest struct { DefaultCurrency string `json:"defaultCurrency" binding:"omitempty,len=3,validCurrency"` FirstDayOfWeek *core.WeekDay `json:"firstDayOfWeek" binding:"omitempty,min=0,max=6"` FiscalYearStart *core.FiscalYearStart `json:"fiscalYearStart" binding:"omitempty,validFiscalYearStart"` - CalendarDisplayType *core.CalendarDisplayType `json:"calendarDisplayType" binding:"omitempty,min=0,max=3"` - DateDisplayType *core.DateDisplayType `json:"dateDisplayType" binding:"omitempty,min=0,max=2"` + CalendarDisplayType *core.CalendarDisplayType `json:"calendarDisplayType" binding:"omitempty,min=0,max=4"` + DateDisplayType *core.DateDisplayType `json:"dateDisplayType" binding:"omitempty,min=0,max=3"` LongDateFormat *core.LongDateFormat `json:"longDateFormat" binding:"omitempty,min=0,max=3"` ShortDateFormat *core.ShortDateFormat `json:"shortDateFormat" binding:"omitempty,min=0,max=3"` LongTimeFormat *core.LongTimeFormat `json:"longTimeFormat" binding:"omitempty,min=0,max=3"` diff --git a/pkg/services/users.go b/pkg/services/users.go index dea64afc..8904f43d 100644 --- a/pkg/services/users.go +++ b/pkg/services/users.go @@ -293,11 +293,11 @@ func (s *UserService) UpdateUser(c core.Context, user *models.User, modifyUserLa updateCols = append(updateCols, "fiscal_year_start") } - if core.CALENDAR_DISPLAY_TYPE_DEFAULT <= user.CalendarDisplayType && user.CalendarDisplayType <= core.CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_CHINESE { + if core.CALENDAR_DISPLAY_TYPE_DEFAULT <= user.CalendarDisplayType && user.CalendarDisplayType <= core.CALENDAR_DISPLAY_TYPE_GREGORAIN_WITH_PERSIAN { updateCols = append(updateCols, "calendar_display_type") } - if core.DATE_DISPLAY_TYPE_DEFAULT <= user.DateDisplayType && user.DateDisplayType <= core.DATE_DISPLAY_TYPE_BUDDHIST { + if core.DATE_DISPLAY_TYPE_DEFAULT <= user.DateDisplayType && user.DateDisplayType <= core.DATE_DISPLAY_TYPE_PERSIAN { updateCols = append(updateCols, "date_display_type") } diff --git a/src/core/calendar.ts b/src/core/calendar.ts index 7398a953..6f76d748 100644 --- a/src/core/calendar.ts +++ b/src/core/calendar.ts @@ -3,7 +3,8 @@ import type { TypeAndName } from '@/core/base.ts'; export enum CalendarType { Gregorian = 0, Buddhist = 1, - Chinese = 2 + Chinese = 2, + Persian = 3 } export interface ChineseCalendarLocaleData { @@ -14,6 +15,11 @@ export interface ChineseCalendarLocaleData { readonly solarTermNames: string[]; } +export interface PersianCalendarLocaleData { + readonly monthNames: string[]; + readonly monthShortNames: string[]; +} + export class CalendarDisplayType implements TypeAndName { private static readonly allInstances: CalendarDisplayType[] = []; private static readonly allInstancesByType: Record = {}; @@ -23,6 +29,7 @@ export class CalendarDisplayType implements TypeAndName { public static readonly Gregorian = new CalendarDisplayType(1, 'Gregorian', 'Gregorian', CalendarType.Gregorian); public static readonly Buddhist = new CalendarDisplayType(2, 'Buddhist', 'Buddhist', CalendarType.Buddhist); public static readonly GregorianWithChinese = new CalendarDisplayType(3, 'GregorianWithChinese', 'Gregorian with Chinese', CalendarType.Gregorian, CalendarType.Chinese); + public static readonly GregorianWithPersian = new CalendarDisplayType(4, 'GregorianWithPersian', 'Gregorian with Persian', CalendarType.Gregorian, CalendarType.Persian); public static readonly Default = CalendarDisplayType.Gregorian; @@ -64,7 +71,8 @@ export class DateDisplayType implements TypeAndName { public static readonly LanguageDefaultType: number = 0; public static readonly Gregorian = new DateDisplayType(1, 'Gregorian', 'Gregorian', CalendarType.Gregorian); - public static readonly Chinese = new DateDisplayType(2, 'Buddhist', 'Buddhist', CalendarType.Buddhist); + public static readonly Buddhist = new DateDisplayType(2, 'Buddhist', 'Buddhist', CalendarType.Buddhist); + public static readonly Persian = new DateDisplayType(3, 'Persian', 'Persian', CalendarType.Persian); public static readonly Default = DateDisplayType.Gregorian; diff --git a/src/core/datetime.ts b/src/core/datetime.ts index 1fc69ba9..e4c482a9 100644 --- a/src/core/datetime.ts +++ b/src/core/datetime.ts @@ -1,5 +1,5 @@ import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts'; -import type { CalendarType, ChineseCalendarLocaleData } from '@/core/calendar.ts'; +import type { CalendarType, ChineseCalendarLocaleData, PersianCalendarLocaleData } from '@/core/calendar.ts'; import type { NumeralSystem } from '@/core/numeral.ts'; export interface DateTime { @@ -16,6 +16,7 @@ export interface DateTime { getLocalizedCalendarMonthDisplayShortName(options: DateTimeFormatOptions): string; getGregorianCalendarDay(): number; getLocalizedCalendarDay(options: DateTimeFormatOptions): string; + isLocalizedCalendarFirstDayOfMonth(options: DateTimeFormatOptions): boolean; getGregorianCalendarYearDashMonthDashDay(): TextualYearMonthDay; getGregorianCalendarYearDashMonth(): TextualYearMonth; getWeekDay(): WeekDay; @@ -37,6 +38,7 @@ export interface DateTimeFormatOptions { calendarType: CalendarType; localeData: DateTimeLocaleData; chineseCalendarLocaleData: ChineseCalendarLocaleData; + persianCalendarLocaleData: PersianCalendarLocaleData; } export interface DateTimeLocaleData { diff --git a/src/lib/datetime.ts b/src/lib/datetime.ts index a13ac72d..472e4560 100644 --- a/src/lib/datetime.ts +++ b/src/lib/datetime.ts @@ -1,6 +1,8 @@ import moment from 'moment-timezone'; import { type unitOfTime } from 'moment/moment'; +import jalaali, { type JalaaliDateObject } from 'jalaali-js'; + import { type ChineseCalendarLocaleData, CalendarType @@ -91,6 +93,7 @@ class MomentDateTime implements DateTime { private readonly instance: moment.Moment; private chineseDateInfo?: ChineseYearMonthDayInfo | undefined = undefined; + private persianDateInfo?: JalaaliDateObject | undefined = undefined; private constructor(instance: moment.Moment) { this.instance = instance; @@ -105,6 +108,8 @@ class MomentDateTime implements DateTime { return (this.instance.year() + 543).toString(); } else if (options && options.calendarType === CalendarType.Chinese) { return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.displayYear ?? ''; + } else if (options && options.calendarType === CalendarType.Persian) { + return this.getPersianDateInfo().jy.toString(); } return this.instance.year().toString(); @@ -148,6 +153,8 @@ class MomentDateTime implements DateTime { public getLocalizedCalendarMonth(options: DateTimeFormatOptions): string { if (options && options.calendarType === CalendarType.Chinese) { return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.displayMonth ?? ''; + } else if (options && options.calendarType === CalendarType.Persian) { + return this.getPersianDateInfo().jm.toString(); } return (this.instance.month() + 1).toString(); @@ -160,6 +167,8 @@ class MomentDateTime implements DateTime { if (options && options.calendarType === CalendarType.Chinese) { return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.displayMonth ?? ''; + } else if (options && options.calendarType === CalendarType.Persian) { + return options.persianCalendarLocaleData.monthNames[this.getPersianDateInfo().jm - 1] ?? ''; } const names = options.localeData.months(); @@ -173,6 +182,8 @@ class MomentDateTime implements DateTime { if (options && options.calendarType === CalendarType.Chinese) { return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.displayMonth ?? ''; + } else if (options && options.calendarType === CalendarType.Persian) { + return options.persianCalendarLocaleData.monthShortNames[this.getPersianDateInfo().jm - 1] ?? ''; } const names = options.localeData.monthsShort(); @@ -186,11 +197,23 @@ class MomentDateTime implements DateTime { public getLocalizedCalendarDay(options: DateTimeFormatOptions): string { if (options && options.calendarType === CalendarType.Chinese) { return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.displayDay ?? ''; + } else if (options && options.calendarType === CalendarType.Persian) { + return this.getPersianDateInfo().jd.toString(); } return this.instance.date().toString(); } + public isLocalizedCalendarFirstDayOfMonth(options: DateTimeFormatOptions): boolean { + if (options && options.calendarType === CalendarType.Chinese) { + return this.getChineseDateInfo(options.chineseCalendarLocaleData)?.day === 1; + } else if (options && options.calendarType === CalendarType.Persian) { + return this.getPersianDateInfo().jd === 1; + } + + return this.instance.date() === 1; + } + public getGregorianCalendarYearDashMonthDashDay(): TextualYearMonthDay { return (this.instance.year() + '-' + (this.instance.month() + 1).toString().padStart(2, NumeralSystem.WesternArabicNumerals.digitZero) + '-' + this.instance.date().toString().padStart(2, NumeralSystem.WesternArabicNumerals.digitZero)) as TextualYearMonthDay; } @@ -337,6 +360,14 @@ class MomentDateTime implements DateTime { return this.chineseDateInfo; } + private getPersianDateInfo(): JalaaliDateObject { + if (!this.persianDateInfo) { + this.persianDateInfo = jalaali.toJalaali(this.instance.year(), this.instance.month() + 1, this.instance.date()); + } + + return this.persianDateInfo; + } + static isYearFirstTime(dateTime: MomentDateTime): boolean { const currentUnixTime = dateTime.instance.clone().set({ millisecond: 0 }).unix(); const expectedUnxTime = dateTime.instance.clone().set({ millisecond: 0 }).startOf('year').unix(); diff --git a/src/locales/calendar/persian/fa.json b/src/locales/calendar/persian/fa.json new file mode 100644 index 00000000..6b9d9449 --- /dev/null +++ b/src/locales/calendar/persian/fa.json @@ -0,0 +1,30 @@ +{ + "monthNames": [ + "فروردین", + "اردیبهشت", + "خرداد", + "تیر", + "مرداد", + "شهریور", + "مهر", + "آبان", + "آذر", + "دی", + "بهمن", + "اسفند" + ], + "monthShortNames": [ + "فرو", + "ارد", + "خرد", + "تیر", + "مرد", + "شهر", + "مهر", + "آبا", + "آذر", + "دی", + "بهم", + "اسف" + ] +} diff --git a/src/locales/calendar/persian/index.ts b/src/locales/calendar/persian/index.ts new file mode 100644 index 00000000..42b6dbc9 --- /dev/null +++ b/src/locales/calendar/persian/index.ts @@ -0,0 +1,12 @@ +import fa from './fa.json'; + +type PersianCalendarLocaleDataKey = 'monthNames' | 'monthShortNames'; +type PersianCalendarLocaleData = { + [K in PersianCalendarLocaleDataKey]: string[]; +}; + +export const DEFAULT_CONTENT: PersianCalendarLocaleData = fa; + +export const ALL_LANGUAGES: Record = { + 'fa': fa +} diff --git a/src/locales/de.json b/src/locales/de.json index a5c4e0d2..abdee05e 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/en.json b/src/locales/en.json index 2af483c5..5b2ceb0a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/es.json b/src/locales/es.json index 9b66d386..3c48188b 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/helpers.ts b/src/locales/helpers.ts index fbdd06b9..007a7d53 100644 --- a/src/locales/helpers.ts +++ b/src/locales/helpers.ts @@ -16,18 +16,25 @@ import { DEFAULT_CONTENT as CHINESE_CALENDAR_DEFAULT_CONTENT } from '@/locales/calendar/chinese/index.ts'; +import { + ALL_LANGUAGES as PERSIAN_CALENDAR_ALL_LANGUAGES, + DEFAULT_CONTENT as PERSIAN_CALENDAR_DEFAULT_CONTENT +} from '@/locales/calendar/persian/index.ts'; + import { TextDirection } from '@/core/text.ts'; import { type ChineseCalendarLocaleData, + type PersianCalendarLocaleData, CalendarType, CalendarDisplayType, DateDisplayType } from '@/core/calendar.ts'; import { + type DateTime, type DateTimeFormatOptions, type DateTimeLocaleData, type TextualYearMonth, @@ -174,7 +181,9 @@ import { getBrowserTimezoneOffset, getBrowserTimezoneOffsetMinutes, getCurrentUnixTime, + getYearMonthDayDateTime, parseDateTimeFromUnixTime, + getGregorianCalendarYearMonthDays, getDateTimeFormatType, getFiscalYearTimeRangeFromUnixTime, getFiscalYearTimeRangeFromYear, @@ -481,6 +490,16 @@ export function useI18n() { return chineseCalendarLocaleData; } + function getPersianCalendarLocaleData(): PersianCalendarLocaleData { + const localeData = PERSIAN_CALENDAR_ALL_LANGUAGES[locale.value] ?? PERSIAN_CALENDAR_DEFAULT_CONTENT; + const persianCalendarLocaleData: PersianCalendarLocaleData = { + monthNames: localeData['monthNames'], + monthShortNames: localeData['monthShortNames'] + }; + + return persianCalendarLocaleData; + } + function getAllCurrencyDisplayTypes(numeralSystem: NumeralSystem, decimalSeparator: string): TypeAndDisplayName[] { const defaultCurrencyDisplayTypeName = t('default.currencyDisplayType'); let defaultCurrencyDisplayType = CurrencyDisplayType.parse(defaultCurrencyDisplayTypeName); @@ -713,7 +732,8 @@ export function useI18n() { numeralSystem: numeralSystem, calendarType: calendarType, localeData: getDateTimeLocaleData(), - chineseCalendarLocaleData: getChineseCalendarLocaleData() + chineseCalendarLocaleData: getChineseCalendarLocaleData(), + persianCalendarLocaleData: getPersianCalendarLocaleData() }; } @@ -773,6 +793,24 @@ export function useI18n() { return currencyDisplayType; } + function getCalendarAlternateDisplayDate(dateTime: DateTime, dateTimeFormatOptions: DateTimeFormatOptions): CalendarAlternateDate { + const numeralSystem = getCurrentNumeralSystemType(); + let displayDate = numeralSystem.replaceWesternArabicDigitsToLocalizedDigits(dateTime.getLocalizedCalendarDay(dateTimeFormatOptions)); + + if (dateTime.isLocalizedCalendarFirstDayOfMonth(dateTimeFormatOptions)) { + displayDate = dateTime.getLocalizedCalendarMonthDisplayShortName(dateTimeFormatOptions); + } + + const alternateDate: CalendarAlternateDate = { + year: dateTime.getGregorianCalendarYear(), + month: dateTime.getGregorianCalendarMonth(), + day: dateTime.getGregorianCalendarDay(), + displayDate: displayDate + }; + + return alternateDate; + } + // public functions function translateIf(text: string | undefined, isTranslate?: boolean): string { if (!isDefined(text)) { @@ -1922,6 +1960,17 @@ export function useI18n() { ret.push(alternateDate); } + return ret; + } else if (calendarDisplayType === CalendarType.Persian) { + const dateTimeFormatOptions = getDateTimeFormatOptions(); + const monthDays: number = getGregorianCalendarYearMonthDays(yearMonth); + const ret: CalendarAlternateDate[] = []; + + for (let i = 1; i <= monthDays; i++) { + const dateTime = getYearMonthDayDateTime(yearMonth.year, yearMonth.month1base, i); + ret.push(getCalendarAlternateDisplayDate(dateTime, dateTimeFormatOptions)); + } + return ret; } @@ -1944,6 +1993,10 @@ export function useI18n() { } return getChineseCalendarAlternateDisplayDate(chineseDate); + } else if (calendarDisplayType === CalendarType.Persian) { + const dateTimeFormatOptions = getDateTimeFormatOptions(); + const dateTime = getYearMonthDayDateTime(yearMonthDay.year, yearMonthDay.month, yearMonthDay.day); + return getCalendarAlternateDisplayDate(dateTime, dateTimeFormatOptions); } return undefined; diff --git a/src/locales/it.json b/src/locales/it.json index 45e52d69..3ebdb5e8 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/ja.json b/src/locales/ja.json index b6abc0da..8822757b 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/nl.json b/src/locales/nl.json index 27469c31..af072ef8 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/pt_BR.json b/src/locales/pt_BR.json index eb091875..009b4489 100644 --- a/src/locales/pt_BR.json +++ b/src/locales/pt_BR.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/ru.json b/src/locales/ru.json index b1fa785d..723c8646 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/uk.json b/src/locales/uk.json index d31b374f..de8b2aa3 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/vi.json b/src/locales/vi.json index 5444e481..1ac81407 100644 --- a/src/locales/vi.json +++ b/src/locales/vi.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "Gregorian", "Buddhist": "Buddhist", - "Gregorian with Chinese": "Gregorian with Chinese" + "Persian": "Persian", + "Gregorian with Chinese": "Gregorian with Chinese", + "Gregorian with Persian": "Gregorian with Persian" }, "datetime": { "AM": { diff --git a/src/locales/zh_Hans.json b/src/locales/zh_Hans.json index 84efcd87..16270db4 100644 --- a/src/locales/zh_Hans.json +++ b/src/locales/zh_Hans.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "公历", "Buddhist": "佛教日历", - "Gregorian with Chinese": "公历+农历" + "Persian": "伊朗历", + "Gregorian with Chinese": "公历+农历", + "Gregorian with Persian": "公历+伊朗历" }, "datetime": { "AM": { diff --git a/src/locales/zh_Hant.json b/src/locales/zh_Hant.json index 6ac728ca..63ebc947 100644 --- a/src/locales/zh_Hant.json +++ b/src/locales/zh_Hant.json @@ -139,7 +139,9 @@ "calendar": { "Gregorian": "公曆", "Buddhist": "佛曆", - "Gregorian with Chinese": "公曆+農曆" + "Persian": "伊朗曆", + "Gregorian with Chinese": "公曆+農曆", + "Gregorian with Persian": "公曆+伊朗曆" }, "datetime": { "AM": { diff --git a/third-party-dependencies.json b/third-party-dependencies.json index aed8faed..3f7a49e6 100644 --- a/third-party-dependencies.json +++ b/third-party-dependencies.json @@ -307,6 +307,12 @@ "url": "https://github.com/faisalman/ua-parser-js", "licenseUrl": "https://github.com/faisalman/ua-parser-js/blob/1.0.39/license.md" }, + { + "name": "Jalaali JavaScript", + "copyright": "Copyright (c) 2020 Behrang Norouzinia", + "url": "https://github.com/jalaali/jalaali-js", + "licenseUrl": "https://github.com/jalaali/jalaali-js/blob/v1.2.8/LICENSE" + }, { "name": "Materio - Vuetify VueJS 3 Free Admin Template", "copyright": "Copyright (c) 2022 ThemeSelection",