-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from chalmagean/master
Add Romanian translations
- Loading branch information
Showing
2 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module Date.Extra.Config.Config_ro_ro exposing (..) | ||
|
||
{-| This is the Romanian config for formatting dates. | ||
@docs config | ||
Copyright (c) 2016 Cezar Halmagean | ||
-} | ||
|
||
import Date | ||
import Date.Extra.Config as Config | ||
import Date.Extra.I18n.I_ro_ro as Romanian | ||
|
||
|
||
{-| Config for ro_ro. -} | ||
config : Config.Config | ||
config = | ||
{ i18n = | ||
{ dayShort = Romanian.dayShort | ||
, dayName = Romanian.dayName | ||
, monthShort = Romanian.monthShort | ||
, monthName = Romanian.monthName | ||
, dayOfMonthWithSuffix = Romanian.dayOfMonthWithSuffix | ||
} | ||
, format = | ||
{ date = "%d.%m.%Y" -- dd.MM.yyyy | ||
, longDate = "%A, %-d %B %Y" -- dddd, d MMMM yyyy | ||
, time = "%-H:%M" -- h:mm | ||
, longTime = "%-H:%M:%S" -- h:mm:ss | ||
, dateTime = "%-d.%m.%Y %-H:%M" -- date + time | ||
, firstDayOfWeek = Date.Mon | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
module Date.Extra.I18n.I_ro_ro exposing (..) | ||
|
||
{-| Romanian values for day and month names. | ||
@docs dayShort | ||
@docs dayName | ||
@docs monthShort | ||
@docs monthName | ||
@docs dayOfMonthWithSuffix | ||
Copyright (c) 2016 Cezar Halmagean | ||
-} | ||
|
||
|
||
import Date exposing (Day (..), Month (..)) | ||
|
||
|
||
{-| Day short name. -} | ||
dayShort : Day -> String | ||
dayShort day = | ||
case day of | ||
Mon -> "Lun" | ||
Tue -> "Mar" | ||
Wed -> "Mie" | ||
Thu -> "Joi" | ||
Fri -> "Vin" | ||
Sat -> "Sâm" | ||
Sun -> "Dum" | ||
|
||
|
||
{-| Day full name. -} | ||
dayName : Day -> String | ||
dayName day = | ||
case day of | ||
Mon -> "Luni" | ||
Tue -> "Marți" | ||
Wed -> "Miercuri" | ||
Thu -> "Joi" | ||
Fri -> "Vineri" | ||
Sat -> "Sâmbătă" | ||
Sun -> "Duminică" | ||
|
||
|
||
{-| Month short name. -} | ||
monthShort : Month -> String | ||
monthShort month = | ||
case month of | ||
Jan -> "Ian" | ||
Feb -> "Feb" | ||
Mar -> "Mar" | ||
Apr -> "Apr" | ||
May -> "Mai" | ||
Jun -> "Iun" | ||
Jul -> "Iul" | ||
Aug -> "Aug" | ||
Sep -> "Sep" | ||
Oct -> "Oct" | ||
Nov -> "Noi" | ||
Dec -> "Dec" | ||
|
||
|
||
{-| Month full name. -} | ||
monthName : Month -> String | ||
monthName month = | ||
case month of | ||
Jan -> "Ianuarie" | ||
Feb -> "Februarie" | ||
Mar -> "Martie" | ||
Apr -> "Aprilie" | ||
May -> "Mai" | ||
Jun -> "Iunie" | ||
Jul -> "Iulie" | ||
Aug -> "August" | ||
Sep -> "Septembrie" | ||
Oct -> "Octombrie" | ||
Nov -> "Noiembrie" | ||
Dec -> "Decembrie" | ||
|
||
|
||
{-| No suffixes for Romanian -} | ||
dayOfMonthWithSuffix : Bool -> Int -> String | ||
dayOfMonthWithSuffix pad day = | ||
case day of | ||
_ -> (toString day) |