Skip to content

Commit

Permalink
Merge pull request #2604 from hyurservice/add-armenian-locale
Browse files Browse the repository at this point in the history
add Armenian locale
  • Loading branch information
chmln authored Mar 6, 2022
2 parents 674006d + f53855d commit 6a5e37b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
81 changes: 81 additions & 0 deletions src/l10n/hy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* Armenian locals for flatpickr */
import { CustomLocale } from "../types/locale";
import { FlatpickrFn } from "../types/instance";

const fp =
typeof window !== "undefined" && window.flatpickr !== undefined
? window.flatpickr
: ({
l10ns: {},
} as FlatpickrFn);

export const Armenian: CustomLocale = {
weekdays: {
shorthand: [
"Կիր",
"Երկ",
"Երք",
"Չրք",
"Հնգ",
"Ուրբ",
"Շբթ",
],
longhand: [
"Կիրակի",
"Եկուշաբթի",
"Երեքշաբթի",
"Չորեքշաբթի",
"Հինգշաբթի",
"Ուրբաթ",
"Շաբաթ",
],
},
months: {
shorthand: [
"Հնվ",
"Փտր",
"Մար",
"Ապր",
"Մայ",
"Հնս",
"Հլս",
"Օգս",
"Սեպ",
"Հոկ",
"Նմբ",
"Դեկ",
],
longhand: [
"Հունվար",
"Փետրվար",
"Մարտ",
"Ապրիլ",
"Մայիս",
"Հունիս",
"Հուլիս",
"Օգոստոս",
"Սեպտեմբեր",
"Հոկտեմբեր",
"Նոյեմբեր",
"Դեկտեմբեր",
],
},
firstDayOfWeek: 1,
ordinal: function () {
return "";
},
rangeSeparator: " — ",
weekAbbreviation: "ՇԲՏ",
scrollTitle: "Ոլորեք՝ մեծացնելու համար",
toggleTitle: "Սեղմեք՝ փոխելու համար",
amPM: ["ՄԿ", "ԿՀ"],
yearAriaLabel: "Տարի",
monthAriaLabel: "Ամիս",
hourAriaLabel: "Ժամ",
minuteAriaLabel: "Րոպե",
time_24hr: true,
};

fp.l10ns.hy = Armenian;

export default fp.l10ns;
2 changes: 2 additions & 0 deletions src/l10n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { Hebrew as he } from "./he";
import { Hindi as hi } from "./hi";
import { Croatian as hr } from "./hr";
import { Hungarian as hu } from "./hu";
import { Armenian as hy } from "./hy";
import { Indonesian as id } from "./id";
import { Icelandic as is } from "./is";
import { Italian as it } from "./it";
Expand Down Expand Up @@ -90,6 +91,7 @@ const l10n: Record<key, CustomLocale> = {
hi,
hr,
hu,
hy,
id,
is,
it,
Expand Down
1 change: 1 addition & 0 deletions src/types/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export type key =
| "hi"
| "hr"
| "hu"
| "hy"
| "id"
| "is"
| "it"
Expand Down

0 comments on commit 6a5e37b

Please sign in to comment.