Skip to content

Commit

Permalink
Merge pull request #1380 from CZaMOR/translate
Browse files Browse the repository at this point in the history
Add translation for Czech
  • Loading branch information
eikek authored Apr 15, 2024
2 parents 65e2094 + f8d976d commit 979ebfa
Show file tree
Hide file tree
Showing 28 changed files with 576 additions and 6 deletions.
3 changes: 2 additions & 1 deletion modules/webapp/src/main/elm/Language.elm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ type Language
| German
| French
| Japanese

| Czech

allLanguages : List Language
allLanguages =
[ English
, German
, French
, Japanese
, Czech
]
22 changes: 22 additions & 0 deletions modules/webapp/src/main/elm/Messages.elm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ get lang =
Japanese ->
ja

Czech ->
cz


{-| Get a ISO-3166-1 code of the given lanugage.
-}
Expand Down Expand Up @@ -183,3 +186,22 @@ ja =
, newInvite = Messages.NewInvitePage.ja
, settings = Messages.SettingsPage.ja
}

cz : Messages
cz =
{ lang = Czech
, iso2 = "cz"
, label = "Čeština"
, flagIcon = "fi fi-cz"
, app = Messages.App.cz
, login = Messages.LoginPage.cz
, register = Messages.RegisterPage.cz
, account = Messages.AccountPage.cz
, aliasPage = Messages.AliasPage.cz
, detail = Messages.DetailPage.cz
, share = Messages.SharePage.cz
, home = Messages.HomePage.cz
, upload = Messages.UploadPage.cz
, newInvite = Messages.NewInvitePage.cz
, settings = Messages.SettingsPage.cz
}
17 changes: 17 additions & 0 deletions modules/webapp/src/main/elm/Messages/AccountForm.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AccountForm exposing
, fr
, gb
, ja
, cz
)

import Messages.FixedDropdown
Expand Down Expand Up @@ -87,3 +88,19 @@ ja =
, yesNo = Messages.YesNoDimmer.ja
, dropdown = Messages.FixedDropdown.ja
}

cz : Texts
cz =
{ id = "Id"
, login = "Uživatelské jméno"
, state = "Status"
, admin = "Admin"
, password = "Heslo"
, submit = "Odeslat"
, back = "Zpět"
, delete = "Smazat"
, email = "E-Mail"
, yesNo = Messages.YesNoDimmer.cz
, dropdown = Messages.FixedDropdown.cz
}

15 changes: 14 additions & 1 deletion modules/webapp/src/main/elm/Messages/AccountPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AccountPage exposing
, gb
, fr
, ja
, cz
)

import Messages.AccountForm
Expand Down Expand Up @@ -60,4 +61,16 @@ ja =
, newAccount = "アカウントの新規作成"
, accountForm = Messages.AccountForm.ja
, accountTable = Messages.AccountTable.ja
}
}

cz : Texts
cz =
{ createAccountTitle = "Vytvořit interní účet"
, accounts = "Účty"
, searchPlaceholder = "Hledat…"
, newAccount = "Nový účet"
, accountForm = Messages.AccountForm.cz
, accountTable = Messages.AccountTable.cz
}


17 changes: 16 additions & 1 deletion modules/webapp/src/main/elm/Messages/AccountTable.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AccountTable exposing
, fr
, gb
, ja
, cz
)

import Language
Expand Down Expand Up @@ -85,4 +86,18 @@ ja =
, created = "作成日時"
, edit = "編集"
, dateTime = formatDateTime Language.Japanese
}
}

cz : Texts
cz =
{ login = "Uživatelské jméno"
, source = "Zdroj"
, state = "Stav"
, nrShares = "#Sdílení"
, admin = "Admin"
, nrLogins = "#Přihlášení"
, lastLogin = "Poslední přihlášení"
, created = "Založeno"
, edit = "Editovat"
, dateTime = formatDateTime Language.Czech
}
26 changes: 26 additions & 0 deletions modules/webapp/src/main/elm/Messages/AliasForm.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AliasForm exposing
, fr
, gb
, ja
, cz
)

import Html exposing (..)
Expand Down Expand Up @@ -132,3 +133,28 @@ ja =
, yesNo = Messages.YesNoDimmer.ja
, validityField = Messages.ValidityField.ja
}

cz : Texts
cz =
{ id = "ID"
, noteToIdsHead = "Poznámka k ID"
, noteToIds =
p []
[ text "Toto ID je součástí URL adresy, na které mohou "
, em [] [ text "všichni" ]
, text " uživatelé nahrát soubory. Je doporučeno použít"
, text " automatiky generované ID. Může být změněno na "
, text "jakoukoliv hodnotu, ale nesmí být prázdné. "
]
, name = "Název"
, validity = "Platnost"
, enabled = "Povoleno"
, submit = "Odeslat"
, back = "Zpět"
, delete = "Smazat"
, searchPlaceholder = "Hledat…"
, members = "Členové"
, memberInfo = "Členové tohoto prostoru jej mohou zobrazit a sdílet. Dále uvidí všechny soubory, které byly do tohoto prostoru nahrány."
, yesNo = Messages.YesNoDimmer.cz
, validityField = Messages.ValidityField.cz
}
22 changes: 22 additions & 0 deletions modules/webapp/src/main/elm/Messages/AliasPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AliasPage exposing
, fr
, gb
, ja
, cz
)

import Messages.AliasForm
Expand Down Expand Up @@ -113,3 +114,24 @@ ja =
, aliasTable = Messages.AliasTable.ja
, mailSend = Messages.MailSend.ja
}

cz : Texts
cz =
{ createNew = "Vytvořit prostor pro sdílení"
, aliasPage = "Prostor pro sdílení: "
, aliasPages = "Prostory pro sdílení"
, newAliasPage = "Nový prostor pro sdílení"
, searchPlaceholder = "Vyhledat…"
, errorQrCode = "Chyba při načítání QR kódu."
, shareThisLink = "Sdílet tento odkaz"
, aliasPageNowAt = "Tento prostor pro sdílení je nyní dostupný na webové adrese: "
, shareThisUrl = "Tuto URL nebo QR kód níže můžete sdílet s ostatními."
, sendEmail = "Odeslat E-Mail"
, copyLink = " Kopírovat odkaz"
, owner = "Vlastník"
, notOwnerInfo = "Tento prostor je sdílen jiným uživatelem a sdílený Vámi. Nemůžete měnit jeho vlastnosti."
, aliasForm = Messages.AliasForm.cz
, aliasTable = Messages.AliasTable.cz
, mailSend = Messages.MailSend.cz
}

14 changes: 14 additions & 0 deletions modules/webapp/src/main/elm/Messages/AliasTable.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.AliasTable exposing
, fr
, gb
, ja
, cz
)

import Language
Expand Down Expand Up @@ -78,3 +79,16 @@ ja =
, validityField = Messages.ValidityField.ja
, dateTime = Messages.DateFormat.formatDateTime Language.Japanese
}

cz : Texts
cz =
{ name = "Jméno"
, enabled = "Povoleno"
, validity = "Platnost"
, created = "Vytvořen"
, edit = "Upravit"
, show = "Zobrazit"
, owner = "Vlastník"
, validityField = Messages.ValidityField.cz
, dateTime = Messages.DateFormat.formatDateTime Language.Czech
}
17 changes: 17 additions & 0 deletions modules/webapp/src/main/elm/Messages/App.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Messages.App exposing
, fr
, gb
, ja
, cz
)


Expand Down Expand Up @@ -89,3 +90,19 @@ ja =
, logoutSharry = "ログアウト"
, logoutOAuth = "認証プロバイダーからログアウト"
}

cz : Texts
cz =
{ home = "Domů"
, shares = "Sdílené soubory"
, aliases = "Prostory pro sdílení"
, accounts = "Účty"
, settings = "Nastavení"
, newInvites = "Pozvánky"
, logout = \user -> "Odhlásit (" ++ user ++ ")"
, login = "Přihlášení"
, register = "Registrace"
, lightDark = "Světlý/Tmavý režim"
, logoutSharry = "Odhlásit"
, logoutOAuth = "Odhlásit u poskytovatele ověření"
}
109 changes: 109 additions & 0 deletions modules/webapp/src/main/elm/Messages/DateFormat.elm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ get lang =
Japanese ->
ja

Czech ->
cz

formatDateTime : Language -> Int -> String
formatDateTime lang millis =
let
Expand Down Expand Up @@ -122,6 +125,27 @@ ja =
, lang = japanese
}


cz : DateTimeMsg
cz =
{ format =
[ DateFormat.dayOfWeekNameAbbreviated
, DateFormat.text ", "
, DateFormat.dayOfMonthSuffix
, DateFormat.text " "
, DateFormat.monthNameFull
, DateFormat.text ", "
, DateFormat.yearNumber
, DateFormat.text ", "
, DateFormat.hourMilitaryNumber
, DateFormat.text ":"
, DateFormat.minuteFixed
]
, lang = czech
}



--- Languages for the DateFormat module
-- French

Expand Down Expand Up @@ -417,6 +441,91 @@ toJapaneseWeekdayName weekday =
Sun ->
"(日)"

-- Czech


{-| The Czech language!
-}
czech : DL.Language
czech =
let
withDot str =
str ++ "."
in
DL.Language
toCzechMonthName
(toCzechMonthName >> String.left 3 >> withDot)
toCzechWeekdayName
(toCzechWeekdayName >> String.left 2 >> withDot)
toEnglishAmPm
(\_ -> ".")


toCzechMonthName : Month -> String
toCzechMonthName month =
case month of
Jan ->
"Leden"

Feb ->
"Únor"

Mar ->
"Březen"

Apr ->
"Duben"

May ->
"Květen"

Jun ->
"Červen"

Jul ->
"Červenec"

Aug ->
"Srpen"

Sep ->
"Září"

Oct ->
"Říjen"

Nov ->
"Listopad"

Dec ->
"Prosinec"


toCzechWeekdayName : Weekday -> String
toCzechWeekdayName weekday =
case weekday of
Mon ->
"Pondělí"

Tue ->
"Úterý"

Wed ->
"Středa"

Thu ->
"Čtvrtek"

Fri ->
"Pátek"

Sat ->
"Sobota"

Sun ->
"Neděle"



--- Copy from DateFormat.Language

Expand Down
Loading

0 comments on commit 979ebfa

Please sign in to comment.