Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(datepicker): add greek language translation (#5575) #5737

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions src/chronos/i18n/el.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

// tslint:disable:comment-format binary-expression-operand-order max-line-length
// tslint:disable:no-bitwise prefer-template cyclomatic-complexity
// tslint:disable:no-shadowed-variable switch-default prefer-const
// tslint:disable:one-variable-per-declaration newline-before-return

import { LocaleData } from './../locale/locale.class';

//! moment.js locale configuration
//! locale : Greek [gr]
//! author : Dimitris Mitsiou : https://github.com/dimitrismitsiou

export const elLocale: LocaleData = {
abbr: 'el',
months : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάϊος_Ιούνιος_Ιούλιος_Άυγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
monthsShort : 'Ιαν_Φεβ_Μάρ_Απρ_Μάϊ_Ιούν_Ιούλ_Άυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
weekdaysShort : 'Κυρ_Δευ_Τρί_Τετ_Πέμ_Παρ_Σάβ'.split('_'),
weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Σήμερα στις] LT',
nextDay : '[Αύριο στις] LT',
nextWeek : 'dddd [στις] LT',
lastDay : '[Χτές στις] LT',
lastWeek : '[Τελευταία] dddd [στις] LT',
sameElse : 'L'
},
relativeTime : {
future : 'σε %s',
past : '%s πριν',
s : 'μερικά δευτερόλεπτα πρίν',
ss : '%d δευτερόλεπτα',
m : 'ένα λεπτό',
mm : '%d λεπτά',
h : 'μία ώρα',
hh : '%d ώρες',
d : 'μία μέρα',
dd : '%d μέρες',
M : 'ένας μήνας',
MM : '%d μήνες',
y : 'ένας χρόνος',
yy : '%d χρόνια'
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal(_num: number): string {
const num = Number(_num);
const b = num % 10,
output = (~~(num % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return num + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
};