Skip to content

Arabic translation (partial) #610

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
49 changes: 49 additions & 0 deletions dist/locales/ar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Arabic locale definition.
* See the readme for customization and more information.
* To set this locale globally:
*
* Sugar.Date.setLocale('ar')
*
*/
Sugar.Date.addLocale('ar', {
'plural': true,
'units': 'milliseconde:|s,seconde:|s,minute:|s,heure:|s,jour:|s,semaine:|s,mois,an:|s|née|nee',
'months': 'janv:ier|,févr:ier|+fevr:ier|,mars,avr:il|,mai,juin,juil:let|,août,sept:embre|,oct:obre|,nov:embre|,déc:embre|+dec:embre|',
'weekdays': 'dim:anche|,lun:di|,mar:di|,mer:credi|,jeu:di|,ven:dredi|,sam:edi|',
'numerals': 'zéro,un:|e,deux,trois,quatre,cinq,six,sept,huit,neuf,dix',
'tokens': "l'|la|le,er",
'short': '{dd}/{MM}/{yyyy}',
'medium': '{d} {month} {yyyy}',
'long': '{d} {month} {yyyy} {time}',
'full': '{weekday} {d} {month} {yyyy} {time}',
'stamp': '{dow} {d} {mon} {yyyy} {time}',
'time': '{H}:{mm}',
'past': '{sign} {num} {unit}',
'future': '{sign} {num} {unit}',
'duration': '{num} {unit}',
'timeMarkers': 'à',
'ampm': 'am,pm',
'modifiers': [
{ 'name': 'day', 'src': 'hier', 'value': -1 },
{ 'name': 'day', 'src': "aujourd'hui", 'value': 0 },
{ 'name': 'day', 'src': 'demain', 'value': 1 },
{ 'name': 'sign', 'src': 'il y a', 'value': -1 },
{ 'name': 'sign', 'src': "dans|d'ici", 'value': 1 },
{ 'name': 'shift', 'src': 'derni:èr|er|ère|ere', 'value': -1 },
{ 'name': 'shift', 'src': 'prochain:|e', 'value': 1 }
],
'parse': [
'{months} {year?}',
'{sign} {num} {unit}',
'{0?} {unit:5-7} {shift}'
],
'timeParse': [
'{day|weekday} {shift?}',
'{weekday?},? {0?} {date}{1?} {months}\\.? {year?}'
],
'timeFrontParse': [
'{0?} {weekday} {shift}',
'{weekday?},? {0?} {date}{1?} {months}\\.? {year?}'
]
});
49 changes: 49 additions & 0 deletions lib/locales/ar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Arabic locale definition.
* See the readme for customization and more information.
* To set this locale globally:
*
* Sugar.Date.setLocale('ar')
*
*/
Sugar.Date.addLocale('ar', {
'plural': true,
'units': 'ثانية|ثواني,دقيقة|دقائق,ساعة|ساعات,يوم|أيام,أسبوع|أسابيع,شهر|أشهر,سنة|سنوات',
'months': 'جانفي,فيفري,مارس,أفريل,ماي,جوان,جويلية,أوت,سبتمبر,أكتوبر,نوفمبر,ديسمبر',
'weekdays': 'أحد,اثنين,ثلاثاء,أربعاء,خميس,جمعة,سبت',
'numerals': 'صفر,واحد|ة,اثنان,ثلاثة,أربعة,خمسة,ستة,سبعة,ثمانية,تسعة,عشرة',
'tokens': " ",
'short': '{yyyy}/{MM}/{dd}',
'medium': '{yyyy} {month} {d}',
'long': '{yyyy} {month} {d} {time}',
'full': '{weekday} {d} {month} {yyyy} {time}',
'stamp': '{dow} {d} {mon} {yyyy} {time}',
'time': '{mm}:{H}',
'past': '{sign} {num} {unit}',
'future': '{sign} {num} {unit}',
'duration': '{num} {unit}',
'timeMarkers': ' ',
'ampm': 'صباحا,مساء',
'modifiers': [
{ 'name': 'day', 'src': 'أمس', 'value': -1 },
{ 'name': 'day', 'src': "اليوم", 'value': 0 },
{ 'name': 'day', 'src': 'غدا', 'value': 1 },
{ 'name': 'sign', 'src': 'منذ', 'value': -1 },
{ 'name': 'sign', 'src': "في غضون", 'value': 1 },
{ 'name': 'shift', 'src': 'الماضي|ة', 'value': -1 },
{ 'name': 'shift', 'src': 'الآتي|ة', 'value': 1 }
],
'parse': [
'{months} {year?}',
'{sign} {num} {unit}',
'{0?} {unit:5-7} {shift}'
],
'timeParse': [
'{day|weekday} {shift?}',
'{weekday?},? {0?} {date}{1?} {months}\\.? {year?}'
],
'timeFrontParse': [
'{0?} {weekday} {shift}',
'{weekday?},? {0?} {date}{1?} {months}\\.? {year?}'
]
});