-
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 branch 'frankschmitt-german-translation-1' into ru_locale
- Loading branch information
Showing
5 changed files
with
142 additions
and
1 deletion.
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,44 @@ | ||
module Date.Extra.Config.Config_de_de exposing (..) | ||
|
||
{-| This is the default German config for formatting dates. | ||
@docs config | ||
Copyright (c) 2017 Frank Schmitt | ||
-} | ||
|
||
import Date | ||
import Date.Extra.Config as Config | ||
import Date.Extra.I18n.I_de_de as German | ||
|
||
|
||
{-| Config for en-us. | ||
-} | ||
config : Config.Config | ||
config = | ||
{ i18n = | ||
{ dayShort = German.dayShort | ||
, dayName = German.dayName | ||
, monthShort = German.monthShort | ||
, monthName = German.monthName | ||
, dayOfMonthWithSuffix = German.dayOfMonthWithSuffix | ||
} | ||
, format = | ||
{ date = | ||
"%-d. %B %Y" | ||
-- d. M YYYY. a | ||
, longDate = | ||
"%A, %-d. %B %Y" | ||
-- dddd, dd. MMMM yyyy | ||
, time = | ||
"%-H:%M" | ||
-- h:mm | ||
, longTime = | ||
"%-H:%M:%S" | ||
-- h:mm:ss | ||
, dateTime = | ||
"%a, %-d. %b %Y. %-H:%M:%S" | ||
-- 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
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_de_de exposing (..) | ||
|
||
{-| German values for day and month names. | ||
@docs dayShort | ||
@docs dayName | ||
@docs monthShort | ||
@docs monthName | ||
@docs dayOfMonthWithSuffix | ||
Copyright (c) 2017 Frank Schmitt | ||
-} | ||
|
||
|
||
import Date exposing (Day (..), Month (..)) | ||
import String exposing (padLeft) | ||
|
||
|
||
{-| Day short name. -} | ||
dayShort : Day -> String | ||
dayShort day = | ||
case day of | ||
Mon -> "Mo" | ||
Tue -> "Di" | ||
Wed -> "Mi" | ||
Thu -> "Do" | ||
Fri -> "Fr" | ||
Sat -> "Sa" | ||
Sun -> "So" | ||
|
||
|
||
{-| Day full name. -} | ||
dayName : Day -> String | ||
dayName day = | ||
case day of | ||
Mon -> "Montag" | ||
Tue -> "Dienstag" | ||
Wed -> "Mittwoch" | ||
Thu -> "Donnerstag" | ||
Fri -> "Freitag" | ||
Sat -> "Samstag" | ||
Sun -> "Sonntag" | ||
|
||
|
||
{-| Month short name. -} | ||
monthShort : Month -> String | ||
monthShort month = | ||
case month of | ||
Jan -> "Jan" | ||
Feb -> "Feb" | ||
Mar -> "Mär" | ||
Apr -> "Apr" | ||
May -> "Mai" | ||
Jun -> "Jun" | ||
Jul -> "Jul" | ||
Aug -> "Aug" | ||
Sep -> "Sep" | ||
Oct -> "Okt" | ||
Nov -> "Nov" | ||
Dec -> "Dez" | ||
|
||
|
||
{-| Month full name. -} | ||
monthName : Month -> String | ||
monthName month = | ||
case month of | ||
Jan -> "Januar" | ||
Feb -> "Februar" | ||
Mar -> "März" | ||
Apr -> "April" | ||
May -> "Mai" | ||
Jun -> "Juni" | ||
Jul -> "Juli" | ||
Aug -> "August" | ||
Sep -> "September" | ||
Oct -> "Oktober" | ||
Nov -> "November" | ||
Dec -> "Dezember" | ||
|
||
|
||
{-| Nothing to do here for German -} | ||
dayOfMonthWithSuffix : Bool -> Int -> String | ||
dayOfMonthWithSuffix pad day = | ||
(toString day) ++ "." |
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
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