Resolve some bugs and refactor localizations.

Resolve #167: Correct capitalization on cards
Resolve #169: Fix cast code failing to compile by moving to ES6 for the closure compiler target.
Move to noun and plural set-up which should make localization easier.
This commit is contained in:
Gareth Latty
2020-09-27 19:08:13 +01:00
parent 5d37ea016a
commit a3a62fba2e
28 changed files with 1730 additions and 1075 deletions
@@ -25,6 +25,9 @@ jobs:
uses: actions/checkout@v2
- name: Get version from tag.
uses: olegtarasov/get-tag@v1
- name: Cache docker layers.
uses: satackey/action-docker-layer-caching@v0.0.8
continue-on-error: true
- name: Build image.
run:
cd "${COMPONENT}" &&
+6 -6
View File
@@ -1,13 +1,13 @@
FROM node:13-alpine
FROM node:14-alpine AS build
WORKDIR /md
RUN ["apk", "add", "--no-cache", "python", "make", "g++", "openjdk8-jre"]
ARG VERSION=dev
ENV MD_VERSION $VERSION
WORKDIR /md
COPY ["./package.json", "./package-lock.json", "./"]
RUN ["apk", "add", "--no-cache", "--virtual", ".gyp", "python", "make", "g++", "openjdk8-jre"]
RUN ["npm", "ci"]
COPY ["./tsconfig.json", "postcss.config.js", "./webpack.config.js", "./elm.json", "./"]
@@ -34,5 +34,5 @@ LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.vcs-ref=$VCS_REF
LABEL org.label-schema.version=$VERSION
COPY --from=0 ["/md/dist", "/usr/share/nginx/html/"]
COPY --from=build ["/md/dist", "/usr/share/nginx/html/"]
COPY ["./nginx.conf", "/etc/nginx/nginx.conf"]
+1079 -504
View File
File diff suppressed because it is too large Load Diff
+15 -14
View File
@@ -38,18 +38,18 @@
"@material/mwc-textfield": "^0.18.0",
"@polymer/paper-tooltip": "^3.0.1",
"@webcomponents/webcomponentsjs": "^2.4.4",
"canvas-confetti": "^1.2.0"
"canvas-confetti": "^1.3.0"
},
"devDependencies": {
"@types/canvas-confetti": "^1.0.0",
"@types/chrome": "^0.0.122",
"@types/chromecast-caf-receiver": "^5.0.11",
"@types/chrome": "^0.0.124",
"@types/chromecast-caf-sender": "^1.0.3",
"@types/chromecast-caf-receiver": "^5.0.11",
"app-manifest-loader": "^2.4.1",
"chromecast-device-emulator": "^1.2.7",
"clean-webpack-plugin": "^3.0.0",
"closure-webpack-plugin": "^2.3.0",
"compression-webpack-plugin": "^5.0.2",
"compression-webpack-plugin": "^6.0.2",
"css-hot-loader": "^1.4.4",
"css-loader": "^4.3.0",
"cssnano": "^4.1.10",
@@ -60,22 +60,23 @@
"extract-loader": "^5.1.0",
"fibers": "^5.0.0",
"file-loader": "^6.1.0",
"google-closure-compiler": "^20200830.0.0",
"html-loader": "^1.3.0",
"html-webpack-plugin": "^4.4.1",
"google-closure-compiler": "^20200920.0.0",
"html-loader": "^1.3.1",
"html-webpack-plugin": "^4.5.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^4.0.1",
"postcss-loader": "^4.0.2",
"postcss-preset-env": "^6.7.0",
"prettier": "2.1.1",
"prettier": "2.1.2",
"prettier-plugin-elm": "^0.7.0",
"resolve-url-loader": "^3.1.1",
"sass": "^1.26.10",
"sass": "^1.26.11",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^4.1.0",
"ts-loader": "^8.0.3",
"typescript": "^4.0.2",
"webpack": "^4.44.1",
"terser-webpack-plugin": "^4.2.2",
"ts-loader": "^8.0.4",
"tsickle-loader": "^0.5.0",
"typescript": "^4.0.3",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
}
+4 -4
View File
@@ -178,7 +178,7 @@ logo source =
{-| An editor for any supported external source.
-}
generalEditor : Shared -> List DeckOrError -> External -> (External -> msg) -> Maybe msg -> msg -> List (Html msg)
generalEditor : Shared -> List DeckOrError -> External -> (External -> msg) -> Maybe msg -> msg -> ( Html msg, Html msg )
generalEditor shared existing currentValue update submit noOp =
let
enabledSources =
@@ -195,17 +195,17 @@ generalEditor shared existing currentValue update submit noOp =
, meta = Nothing
}
in
[ Select.view shared
( Select.view shared
{ label = Strings.DeckSource
, idToString = generalToString
, idFromString = generalFromString
, selected = currentValue |> generalMatching |> Just
, wrap = Maybe.map (empty shared) >> Maybe.withDefault (default shared) >> update
}
[ HtmlA.id "source-selector" ]
[ HtmlA.id "source-selector", HtmlA.class "primary" ]
(enabledSources |> List.filterMap (Maybe.map toItem))
, editor shared existing currentValue update submit noOp
]
)
{-| An editor for the given source value.
+1 -1
View File
@@ -61,7 +61,7 @@ roleDescription toDescribe =
Strings.Czar
RPlayer ->
Strings.Player
Strings.noun Strings.Player 1
{-| The state of a player in regards to playing into a round.
+1 -1
View File
@@ -688,7 +688,7 @@ lobbyMenu wrap shared menuState r s audienceMode user player game =
Menu.button Icon.play Strings.ReturnViewToGame Strings.ReturnViewToGameDescription (Nothing |> ChangeSection |> wrap |> Maybe.justIf (game /= Nothing))
_ ->
Menu.button Icon.cog Strings.ViewConfgiuration Strings.ViewConfgiurationDescription (Configure |> Just |> ChangeSection |> wrap |> Just)
Menu.button Icon.cog Strings.ViewConfiguration Strings.ViewConfigurationDescription (Configure |> Just |> ChangeSection |> wrap |> Just)
]
privilegedLobbyMenuItems =
@@ -128,8 +128,8 @@ view wrap shared model remote canEdit =
, Html.thead []
[ Html.tr []
[ Html.th [ HtmlA.class "deck-name", HtmlA.scope "col" ] [ Strings.Deck |> Lang.html shared ]
, Html.th [ HtmlA.scope "col" ] [ Strings.Call |> Lang.html shared ]
, Html.th [ HtmlA.scope "col" ] [ Strings.Response |> Lang.html shared ]
, Html.th [ HtmlA.scope "col" ] [ Strings.nounUnknownQuantity Strings.Call |> Lang.html shared ]
, Html.th [ HtmlA.scope "col" ] [ Strings.nounUnknownQuantity Strings.Response |> Lang.html shared ]
]
]
, Html.tbody [] tableContent
@@ -191,20 +191,23 @@ addDeckWidget wrap shared existing deckToAdd =
let
submit =
deckToAdd |> submitDeckAction wrap existing
( sourcePicker, deckPicker ) =
Source.generalEditor shared existing deckToAdd (Update >> wrap) (submit |> Result.toMaybe) (NoOp |> wrap)
in
Form.section
shared
"add-deck"
(Html.div [ HtmlA.class "multipart" ]
(List.concat
[ Source.generalEditor shared existing deckToAdd (Update >> wrap) (submit |> Result.toMaybe) (NoOp |> wrap)
, [ IconButton.view shared
Strings.AddDeck
(NeList (Icon.plus |> Icon.present) [])
(submit |> Result.toMaybe)
]
(Html.div []
[ Html.div [ HtmlA.class "multipart" ] [ sourcePicker ]
, Html.div [ HtmlA.class "multipart" ]
[ deckPicker
, IconButton.view shared
Strings.AddDeck
(NeList (Icon.plus |> Icon.present) [])
(submit |> Result.toMaybe)
]
)
]
)
((deckToAdd |> Source.generalMatching |> Source.messages) ++ (submit |> Result.error |> Maybe.withDefault []))
@@ -102,7 +102,7 @@ viewSettings wrap changePage shared lobby =
(Icon.arrowLeft |> Icon.present |> NeList.just)
(Just backAction)
, IconButton.view shared
Strings.ViewConfgiurationDescription
Strings.ViewConfigurationDescription
(Icon.cog |> Icon.present |> NeList.just)
({ route | section = Just Lobby.Configure } |> Route.Lobby |> changePage |> Just)
, IconButton.view shared
+47 -14
View File
@@ -1,9 +1,50 @@
module MassiveDecks.Strings exposing (MdString(..))
module MassiveDecks.Strings exposing
( MdString(..)
, Noun(..)
, Quantity(..)
, noun
, nounMaybe
, nounUnknownQuantity
)
{-| This module deals with text that is shown to the user in the application - strings.
-}
{-| Nouns need plural translations as we talk about them as singular items but also as plurals.
-}
type Noun
= Call -- A call card (a black card).
| Response -- A response card (a white card).
| Point -- A point in the game, your score is how many of these you have, and having the most is how you win.
| Player -- A player in the game with no special role.
| Spectator -- A user who watches the game, but doesn't play in it.
{-| An amount of a noun. Either we know how many we are talking about or we are talking about some unknown number of
the thing. In English, for example, we use the singular for `Quantity 1` and plural for everything else. Different
languages have different rules.
-}
type Quantity
= Quantity Int
| Unknown
noun : Noun -> Int -> MdString
noun n quantity =
Noun { noun = n, quantity = Quantity quantity }
nounUnknownQuantity : Noun -> MdString
nounUnknownQuantity n =
Noun { noun = n, quantity = Unknown }
nounMaybe : Noun -> Maybe Int -> MdString
nounMaybe n quantity =
Noun { noun = n, quantity = quantity |> Maybe.map Quantity |> Maybe.withDefault Unknown }
{-| Each type represents a message that may be shown to the user. Some have arguments that are variable but should be
included in some form in the message.
-}
@@ -11,10 +52,7 @@ type MdString
= MassiveDecks -- The name of the game.
| Close -- Close a dialog window.
-- Special
{- Plural only makes sense for nouns, other results will be nonsense. If the amount is not given, it's an unknown
quantity. If the value is `1`, then it should be singular.
-}
| Plural { singular : MdString, amount : Maybe Int } -- The plural version of the given string.
| Noun { noun : Noun, quantity : Quantity } -- Given a noun and an quantity of that noun being talked about.
-- Start screen.
| Version { versionNumber : String } -- The version of the game being played.
| ShortGameDescription -- A one-line description of the game.
@@ -106,13 +144,8 @@ type MdString
-- Terms
| Czar -- The name for the "Card Czar" (the player that judges the round).
| CzarDescription -- A short description of what the czar does.
| Player -- A term for a player in the game with no special role.
| Spectator -- A term for a user who watches the game, but doesn't play in it.
| Call -- The name for a call card (a black card).
| CallDescription -- A short description of what a call is.
| Response -- The name for a response card (a white card).
| ResponseDescription -- A short description of what a response is.
| Point -- The name for a point in the game.
| PointDescription -- A short description of what a point is.
| GameCodeTerm -- The term for a unique code for a game that allows a user to find the game easily.
| GameCodeDescription -- A short description of what a game code is.
@@ -189,8 +222,8 @@ type MdString
| EndGameDescription -- A description of the action of ending the game early.
| ReturnViewToGame -- A short term for the action of viewing the in-progress game.
| ReturnViewToGameDescription -- A description of the action of viewing the in-progress game.
| ViewConfgiuration -- A short term for the action of viewing the configuration for the game.
| ViewConfgiurationDescription -- A description of the action of viewing the configuration for the game.
| ViewConfiguration -- A short term for the action of viewing the configuration for the game.
| ViewConfigurationDescription -- A description of the action of viewing the configuration for the game.
| KickUser -- A short term for the action of forcing a user to leave the game permanently.
| Promote -- A short term for the action of allowing a user to edit the game configuration.
| Demote -- A short term for the action of no longer allowing a user to edit the game configuration.
@@ -206,8 +239,8 @@ type MdString
| NoDecks -- A description of the situation where the user has no decks added to the game configuration.
| NoDecksHint -- A hint explaining that the user needs to add at least one deck, and offering the CaH deck.
| WaitForDecks -- A hint that the user has to wait for decks to load before starting the game.
| MissingCardType { cardType : MdString } -- An error explaining that the user needs a deck with the given type of card (call/response).
| NotEnoughCardsOfType { cardType : MdString, needed : Int, have : Int } -- An error explaining that the user needs to add more cards of the given type for the number of players.
| MissingCardType { cardType : Noun } -- An error explaining that the user needs a deck with the given type of card (call/response).
| NotEnoughCardsOfType { cardType : Noun, needed : Int, have : Int } -- An error explaining that the user needs to add more cards of the given type for the number of players.
| AddBlankCards { amount : Int } -- A description of the action of adding the given number of blank cards to the game.
| AddDeck -- A description of the action of adding a deck to the game configuration.
| RemoveDeck -- A description of the action of removing a deck from the game configuration.
@@ -5,7 +5,7 @@ module MassiveDecks.Strings.Languages.De exposing (pack)
import MassiveDecks.Card.Source.BuiltIn.Model as BuiltIn
import MassiveDecks.Card.Source.Model as Source
import MassiveDecks.Strings exposing (MdString(..))
import MassiveDecks.Strings exposing (MdString(..), Noun(..), Quantity(..), noun, nounMaybe, nounUnknownQuantity)
import MassiveDecks.Strings.Translation as Translation exposing (Result(..))
@@ -35,30 +35,41 @@ translate mdString =
[ Text "Schließen" ]
-- Special
Plural { singular, amount } ->
if amount == Just 1 then
[ Raw singular ]
Noun { noun, quantity } ->
case quantity of
Quantity 1 ->
case noun of
Call ->
[ Text "Schwarze Karte" ]
else
-- Same case as italian and other languages, german plurarization have some specific cases to handle
case singular of
Call ->
[ Text "schwarze Karten" ]
Response ->
[ Text "Weiße Karte" ]
Response ->
[ Text "weiße Karten" ]
Point ->
[ Text "großartiger Punkt" ]
Point ->
[ Text "großartige Punkte" ]
Player ->
[ Text "Spieler" ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
Spectator ->
[ Text "Zuschauer" ]
_ ->
case noun of
Call ->
[ Text "schwarze Karten" ]
_ ->
[ Raw singular, Text "_" ]
Response ->
[ Text "weiße Karten" ]
Point ->
[ Text "großartige Punkte" ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
-- Start screen.
Version { versionNumber } ->
@@ -108,7 +119,7 @@ translate mdString =
[ Text "Informieren Sie sich über ", Ref MassiveDecks, Text " und wie es entwickelt wurde." ]
MDLogoDescription ->
[ Text "Ein ", Ref Call, Text " und ein ", Ref Response, Text "mit einem M un einem D beschriftet." ]
[ Text "Ein ", Ref (noun Call 1), Text " und ein ", Ref (noun Response 1), Text "mit einem M un einem D beschriftet." ]
RereadLogoDescription ->
[ Text "Ein von einem Recycling-Pfeil umkreistes Buch." ]
@@ -157,7 +168,7 @@ translate mdString =
[ Text "Wie man spielt." ]
RulesHand ->
[ Text "Jeder Spieler hat ein Blatt ", Ref (Plural { singular = Response, amount = Nothing }), Text "." ]
[ Text "Jeder Spieler hat ein Blatt ", Ref (nounUnknownQuantity Response), Text "." ]
RulesCzar ->
[ Text "Der erste Spieler beginnt als "
@@ -165,13 +176,13 @@ translate mdString =
, Text ". Der "
, Ref Czar
, Text " liest die Frage oder den leeren Satz auf der "
, Ref Call
, Ref (noun Call 1)
, Text " laut vor."
]
RulesPlaying ->
[ Text "Alle anderen beantworten die Frage oder füllen den Lückentext aus, indem sie eine "
, Ref Response
, Ref (noun Response 1)
, Text " aus ihrer Hand auswählen."
]
@@ -181,11 +192,11 @@ translate mdString =
, Text " liest die Karten den anderen Spielern vor - für die volle Wirkung liest der "
, Ref Czar
, Text " die "
, Ref Call
, Ref (noun Call 1)
, Text " laut vor, bevor jede Antwort einzeln aufgedeckt wird. Der "
, Ref Czar
, Text " wählt dann die lustigste Antwort aus und der jeweilige Spieler erhält einen "
, Ref Point
, Ref (noun Point 1)
, Text "."
]
@@ -194,24 +205,24 @@ translate mdString =
RulesPick ->
[ Text "Einige Karten benötigen mehr als eine "
, Ref Response
, Ref (noun Response 1)
, Text " als Antwort. Spielen Sie die Karten in der Reihenfolge, wie der "
, Ref Czar
, Text " sie vorlesen soll - die Reihenfolge ist bei deisen Karten entscheidend."
]
ExamplePickDescription ->
[ Ref (Plural { singular = Call, amount = Nothing })
[ Ref (nounUnknownQuantity Call)
, Text " wie diese erfordern die Auswahl von mehreren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ", die Ihnen vorab zur Verfügung gestellt werden."
]
RulesDraw ->
[ Text "Einige "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " benötigen mehrere "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " diese sind mit "
, Ref (Draw { numberOfCards = 2 })
, Text " oder mehr beschriftet. Die Spieler erhalten entsprechend viele zusätzliche Karten für Ihre Hand."
@@ -234,7 +245,7 @@ translate mdString =
HouseRuleRebootDescription { cost } ->
[ Text "Die Spieler können jederzeit "
, Text (an cost)
, Ref (Plural { singular = Point, amount = cost })
, Ref (nounMaybe Point cost)
, Text " verwenden, um ihre Hand gegen eine neue Hand zu tauschen."
]
@@ -242,22 +253,22 @@ translate mdString =
[ Text "Investiere "
, Text (asWord cost)
, Text " "
, Ref (Plural { singular = Point, amount = Just cost })
, Ref (noun Point cost)
, Text ", um die Hand gegen eine neue Hand auszuwechseln."
]
HouseRuleRebootCost ->
[ Ref Point, Text " Punkte" ]
[ Ref (noun Point 1), Text " Punkte" ]
HouseRuleRebootCostDescription ->
[ Text "Wie viele ", Ref (Plural { singular = Point, amount = Nothing }), Text " es kostet, um neu ziehen zu können." ]
[ Text "Wie viele ", Ref (nounUnknownQuantity Point), Text " es kostet, um neu ziehen zu können." ]
HouseRulePackingHeat ->
[ Text "Schwere Bewaffnung" ]
HouseRulePackingHeatDescription ->
[ Text "Jede "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " mit "
, Ref (Pick { numberOfCards = 2 })
, Text " erhält zusätzlich "
@@ -270,25 +281,25 @@ translate mdString =
HouseRuleComedyWriterDescription ->
[ Text "Füge leere "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " hinzu, auf denen Spieler eigene Antworten schreiben können."
]
HouseRuleComedyWriterNumber ->
[ Text "Leere ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Leere ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterNumberDescription ->
[ Text "Die Anzahl der leeren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ", die im Spiel verfügbar sind."
]
HouseRuleComedyWriterExclusive ->
[ Text "Nur leere ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Nur leere ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterExclusiveDescription ->
[ Text "Wenn aktiviert, werden alle nicht leeren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " ignoriert und nur leere Karten werden im Spiel angezeigt."
]
@@ -297,7 +308,7 @@ translate mdString =
HouseRuleRandoCardrissianDescription ->
[ Text "In jeder Runde wird die erste "
, Ref Response
, Ref (noun Response 1)
, Text " im Stapel als Antwort gespielt. Dieses Spiel gehört einem KI-Spieler namens "
, Text "Rando Cardrissian und wenn er das Spiel gewinnt, gehen alle Spieler in einem Zustand ewiger Schande nach Hause."
]
@@ -402,27 +413,12 @@ translate mdString =
CzarDescription ->
[ Text "Der Spieler, der die Runde beurteilt." ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
Call ->
[ Text "Schwarze Karte" ]
CallDescription ->
[ Text "Eine schwarze Karte mit einer Frage oder einem Lückentext." ]
Response ->
[ Text "Weiße Karte" ]
ResponseDescription ->
[ Text "Eine weiße Karte mit einem Satz, der in Runden ausgespielt wird." ]
Point ->
[ Text "großartiger Punkt" ]
PointDescription ->
[ Text "Wer mehr Punkte hat, gewinnt." ]
@@ -502,7 +498,7 @@ translate mdString =
[ Text "Sie müssen "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " spielen."
]
@@ -510,7 +506,7 @@ translate mdString =
[ Text "Sie bekommen "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " zusätzlich vor dem Spiel."
]
@@ -565,13 +561,13 @@ translate mdString =
[ Text "Übertragung zu ", Text deviceName, Text "." ]
Players ->
[ Ref (Plural { singular = Player, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Player) ]
PlayersDescription ->
[ Text "Benutzer, die das Spiel spielen." ]
Spectators ->
[ Ref (Plural { singular = Spectator, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Spectator) ]
SpectatorsDescription ->
[ Text "Benutzer, die sich das Spiel ansehen, ohne zu spielen." ]
@@ -611,7 +607,7 @@ translate mdString =
ScoreDescription ->
[ Text "Die Anzahl der "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " die der Spieler hat."
]
@@ -679,10 +675,10 @@ translate mdString =
ReturnViewToGameDescription ->
[ Text "Zurück zur Hauptansicht." ]
ViewConfgiuration ->
ViewConfiguration ->
[ Text "Konfiguration" ]
ViewConfgiurationDescription ->
ViewConfigurationDescription ->
[ Text "Wechseln Sie zur Anzeige der Konfiguration des Spiels." ]
KickUser ->
@@ -731,7 +727,7 @@ translate mdString =
MissingCardType { cardType } ->
[ Text "Keiner Ihrer Kartensätze enthält irgendwelche "
, Ref (Plural { singular = cardType, amount = Nothing })
, Ref (nounUnknownQuantity cardType)
, Text ". Um das Spiel beginnen zu können, benötigen Sie ein entsprechenden Kartensatz."
]
@@ -739,7 +735,7 @@ translate mdString =
[ Text "Für die Anzahl der Spieler im Spiel benötigen Sie mindestens "
, Text (needed |> String.fromInt)
, Text " "
, Ref (Plural { singular = cardType, amount = Just needed })
, Ref (noun cardType needed)
, Text " aber Sie haben nur "
, Text (have |> String.fromInt)
, Text "."
@@ -749,7 +745,7 @@ translate mdString =
[ Text "Ergänze "
, amount |> String.fromInt |> Text
, Text " leere "
, Ref (Plural { singular = Response, amount = Just amount })
, Ref (noun Response amount)
]
AddDeck ->
@@ -810,12 +806,12 @@ translate mdString =
[ Text "Die Basisanzahl der Karten, die jeder Spieler während des Spiels auf der Hand hat." ]
ScoreLimit ->
[ Ref Point, Text " Begrenzung" ]
[ Ref (noun Point 1), Text " Begrenzung" ]
ScoreLimitDescription ->
[ Segment
[ Text "Die Anzahl der "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text ", die ein Spieler zum Gewinnen des Spiels benötigt."
]
, Text " "
@@ -1037,7 +1033,7 @@ translate mdString =
[ Text "Sie müssen "
, Text (asWord numberOfCards)
, Text " weitere "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " von Ihrer Hand abwerfen, bevor die Runde übermittelt werden kann."
]
@@ -1051,7 +1047,7 @@ translate mdString =
[ Text "Sie sind der "
, Ref Czar
, Text " für diese Runde - Sie reichen keine "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " ein. Stattdessen wählen Sie den Gewinner, sobald alle anderen ihre Beiträge eingereicht haben."
]
@@ -5,7 +5,7 @@ module MassiveDecks.Strings.Languages.DeXInformal exposing (pack)
import MassiveDecks.Card.Source.BuiltIn.Model as BuiltIn
import MassiveDecks.Card.Source.Model as Source
import MassiveDecks.Strings exposing (MdString(..))
import MassiveDecks.Strings exposing (MdString(..), Noun(..), Quantity(..), noun, nounMaybe, nounUnknownQuantity)
import MassiveDecks.Strings.Translation as Translation exposing (Result(..))
@@ -35,30 +35,41 @@ translate mdString =
[ Text "Schließen" ]
-- Special
Plural { singular, amount } ->
if amount == Just 1 then
[ Raw singular ]
Noun { noun, quantity } ->
case quantity of
Quantity 1 ->
case noun of
Call ->
[ Text "Schwarze Karte" ]
else
-- Same case as italian and other languages, german plurarization have some specific cases to handle
case singular of
Call ->
[ Text "schwarze Karten" ]
Response ->
[ Text "Weiße Karte" ]
Response ->
[ Text "weiße Karten" ]
Point ->
[ Text "großartiger Punkt" ]
Point ->
[ Text "großartige Punkte" ]
Player ->
[ Text "Spieler" ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
Spectator ->
[ Text "Zuschauer" ]
_ ->
case noun of
Call ->
[ Text "schwarze Karten" ]
_ ->
[ Raw singular, Text "_" ]
Response ->
[ Text "weiße Karten" ]
Point ->
[ Text "großartige Punkte" ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
-- Start screen.
Version { versionNumber } ->
@@ -108,7 +119,7 @@ translate mdString =
[ Text "Informiere Dich über ", Ref MassiveDecks, Text " und wie es entwickelt wurde." ]
MDLogoDescription ->
[ Text "Eine ", Ref Call, Text " und eine ", Ref Response, Text " mit einem M un einem D beschriftet." ]
[ Text "Eine ", Ref (noun Call 1), Text " und eine ", Ref (noun Response 1), Text " mit einem M un einem D beschriftet." ]
RereadLogoDescription ->
[ Text "Ein von einem Recycling-Pfeil umkreistes Buch." ]
@@ -157,7 +168,7 @@ translate mdString =
[ Text "Wie man spielt." ]
RulesHand ->
[ Text "Jeder Spieler hat ein Blatt ", Ref (Plural { singular = Response, amount = Nothing }), Text "." ]
[ Text "Jeder Spieler hat ein Blatt ", Ref (nounUnknownQuantity Response), Text "." ]
RulesCzar ->
[ Text "Der erste Spieler beginnt als "
@@ -165,13 +176,13 @@ translate mdString =
, Text ". Der "
, Ref Czar
, Text " liest die Frage oder den leeren Satz auf der "
, Ref Call
, Ref (noun Call 1)
, Text " laut vor."
]
RulesPlaying ->
[ Text "Alle anderen beantworten die Frage oder füllen den Lückentext aus, indem Du eine "
, Ref Response
, Ref (noun Response 1)
, Text " aus Deiner Hand auswählst."
]
@@ -181,11 +192,11 @@ translate mdString =
, Text " liest die Karten den anderen Spielern vor - für die volle Wirkung liest der "
, Ref Czar
, Text " die "
, Ref Call
, Ref (noun Call 1)
, Text " laut vor, bevor jede Antwort einzeln aufgedeckt wird. Der "
, Ref Czar
, Text " wählt dann die lustigste Antwort aus und der jeweilige Spieler erhält einen "
, Ref Point
, Ref (noun Point 1)
, Text "."
]
@@ -194,24 +205,24 @@ translate mdString =
RulesPick ->
[ Text "Einige Karten benötigen mehr als eine "
, Ref Response
, Ref (noun Response 1)
, Text " als Antwort. Spiele die Karten in der Reihenfolge, wie der "
, Ref Czar
, Text " sie vorlesen soll - die Reihenfolge ist bei diesen Karten entscheidend."
]
ExamplePickDescription ->
[ Ref (Plural { singular = Call, amount = Nothing })
[ Ref (nounUnknownQuantity Call)
, Text " wie diese erfordern die Auswahl von mehreren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ", die Dir ergänzend zur Verfügung gestellt werden."
]
RulesDraw ->
[ Text "Einige "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " benötigen mehrere "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " diese sind mit "
, Ref (Draw { numberOfCards = 2 })
, Text " oder mehr beschriftet. Die Spieler erhalten entsprechend viele zusätzliche Karten für ihre Hand."
@@ -234,7 +245,7 @@ translate mdString =
HouseRuleRebootDescription { cost } ->
[ Text "Die Spieler können jederzeit "
, Text (an cost)
, Ref (Plural { singular = Point, amount = cost })
, Ref (nounMaybe Point cost)
, Text " verwenden, um ihre Hand gegen eine neue Hand zu tauschen."
]
@@ -242,22 +253,22 @@ translate mdString =
[ Text "Investiere "
, Text (asWord cost)
, Text " "
, Ref (Plural { singular = Point, amount = Just cost })
, Ref (noun Point cost)
, Text ", um die Hand gegen eine neue auszuwechseln."
]
HouseRuleRebootCost ->
[ Ref Point, Text " Punkte" ]
[ Ref (noun Point 1), Text " Punkte" ]
HouseRuleRebootCostDescription ->
[ Text "Wie viele ", Ref (Plural { singular = Point, amount = Nothing }), Text " es kostet, um neu ziehen zu können." ]
[ Text "Wie viele ", Ref (nounUnknownQuantity Point), Text " es kostet, um neu ziehen zu können." ]
HouseRulePackingHeat ->
[ Text "Schwere Bewaffnung" ]
HouseRulePackingHeatDescription ->
[ Text "Jede "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " mit "
, Ref (Pick { numberOfCards = 2 })
, Text " erhält zusätzlich "
@@ -270,25 +281,25 @@ translate mdString =
HouseRuleComedyWriterDescription ->
[ Text "Füge leere "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " hinzu, auf denen Spieler eigene Antworten schreiben können."
]
HouseRuleComedyWriterNumber ->
[ Text "Leere ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Leere ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterNumberDescription ->
[ Text "Die Anzahl der leeren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text "die im Spiel verfügbar sind."
]
HouseRuleComedyWriterExclusive ->
[ Text "Nur leere ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Nur leere ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterExclusiveDescription ->
[ Text "Wenn aktiviert, werden alle nicht leeren "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " ignoriert und nur leere Karten werden im Spiel angezeigt."
]
@@ -297,7 +308,7 @@ translate mdString =
HouseRuleRandoCardrissianDescription ->
[ Text "In jeder Runde wird die erste "
, Ref Response
, Ref (noun Response 1)
, Text " im Stapel als Antwort gespielt. Dieses Spiel gehört einem KI-Spieler namens "
, Text "Rando Cardrissian und wenn er das Spiel gewinnt, gehen alle Spieler in einem Zustand ewiger Schande nach Hause."
]
@@ -401,27 +412,12 @@ translate mdString =
CzarDescription ->
[ Text "Der Spieler, der die Runde beurteilt." ]
Player ->
[ Text "Spieler" ]
Spectator ->
[ Text "Zuschauer" ]
Call ->
[ Text "Schwarze Karte" ]
CallDescription ->
[ Text "Eine schwarze Karte mit einer Frage oder einem Lückentext." ]
Response ->
[ Text "Weiße Karte" ]
ResponseDescription ->
[ Text "Eine weiße Karte mit einem Satz, der in Runden ausgespielt wird." ]
Point ->
[ Text "großartiger Punkt" ]
PointDescription ->
[ Text "Wer mehr Punkte hat, gewinnt." ]
@@ -501,7 +497,7 @@ translate mdString =
[ Text "Du musst "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " spielen."
]
@@ -509,7 +505,7 @@ translate mdString =
[ Text "Du bekommst "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " zusätzlich vor dem Spiel."
]
@@ -564,13 +560,13 @@ translate mdString =
[ Text "Übertragung zu ", Text deviceName, Text "." ]
Players ->
[ Ref (Plural { singular = Player, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Player) ]
PlayersDescription ->
[ Text "Benutzer, die das Spiel spielen." ]
Spectators ->
[ Ref (Plural { singular = Spectator, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Spectator) ]
SpectatorsDescription ->
[ Text "Benutzer, die sich das Spiel ansehen, ohne zu spielen." ]
@@ -610,7 +606,7 @@ translate mdString =
ScoreDescription ->
[ Text "Die Anzahl der "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " die der Spieler hat."
]
@@ -678,10 +674,10 @@ translate mdString =
ReturnViewToGameDescription ->
[ Text "Zurück zur Hauptansicht." ]
ViewConfgiuration ->
ViewConfiguration ->
[ Text "Konfiguration" ]
ViewConfgiurationDescription ->
ViewConfigurationDescription ->
[ Text "Wechsel zur Anzeige der Konfiguration des Spiels." ]
KickUser ->
@@ -730,7 +726,7 @@ translate mdString =
MissingCardType { cardType } ->
[ Text "Keiner Deiner Kartensätze enthält irgendwelche "
, Ref (Plural { singular = cardType, amount = Nothing })
, Ref (nounUnknownQuantity cardType)
, Text ". Um das Spiel beginnen zu können, benötigst Du ein entsprechenden Kartensatz."
]
@@ -738,7 +734,7 @@ translate mdString =
[ Text "Für die Anzahl der Spieler im Spiel benötigst Du mindestens "
, Text (needed |> String.fromInt)
, Text " "
, Ref (Plural { singular = cardType, amount = Just needed })
, Ref (noun cardType needed)
, Text " aber Du hast nur "
, Text (have |> String.fromInt)
, Text "."
@@ -748,7 +744,7 @@ translate mdString =
[ Text "Ergänze "
, amount |> String.fromInt |> Text
, Text " leere "
, Ref (Plural { singular = Response, amount = Just amount })
, Ref (noun Response amount)
]
AddDeck ->
@@ -809,12 +805,12 @@ translate mdString =
[ Text "Die Basisanzahl der Karten, die jeder Spieler während des Spiels auf der Hand hat." ]
ScoreLimit ->
[ Ref Point, Text " Begrenzung" ]
[ Ref (noun Point 1), Text " Begrenzung" ]
ScoreLimitDescription ->
[ Segment
[ Text "Die Anzahl der "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text ", die ein Spieler zum Gewinnen des Spiels benötigt."
]
, Text " "
@@ -1036,7 +1032,7 @@ translate mdString =
[ Text "Du musst "
, Text (asWord numberOfCards)
, Text " weitere "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " von ihrer Hand abwerfen, bevor die Runde übermittelt werden kann."
]
@@ -1050,7 +1046,7 @@ translate mdString =
[ Text "Du bist der "
, Ref Czar
, Text " für diese Runde - Du reichst keine "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " ein. Stattdessen wählst Du den Gewinner, sobald alle anderen ihre Beiträge eingereicht haben."
]
@@ -6,7 +6,7 @@ This is the primary language, strings here are the canonical representation, and
import MassiveDecks.Card.Source.BuiltIn.Model as BuiltIn
import MassiveDecks.Card.Source.Model as Source
import MassiveDecks.Strings exposing (MdString(..))
import MassiveDecks.Strings exposing (MdString(..), Noun(..), Quantity(..), noun, nounMaybe, nounUnknownQuantity)
import MassiveDecks.Strings.Translation as Translation exposing (Result(..))
@@ -35,13 +35,34 @@ translate mdString =
Close ->
[ Text "Close" ]
-- Special
Plural { singular, amount } ->
if amount == Just 1 then
[ Raw singular ]
Noun { noun, quantity } ->
let
singular =
case noun of
Call ->
[ Text "Black Card" ]
else
[ Raw singular, Text "s" ]
Response ->
[ Text "White Card" ]
Point ->
[ Text "Awesome Point" ]
Player ->
[ Text "Player" ]
Spectator ->
[ Text "Spectator" ]
plural =
case quantity of
Quantity 1 ->
[]
_ ->
[ Text "s" ]
in
List.concat [ singular, plural ]
-- Start screen.
Version { versionNumber } ->
@@ -91,7 +112,7 @@ translate mdString =
[ Text "Find out about ", Ref MassiveDecks, Text " and how it is developed." ]
MDLogoDescription ->
[ Text "A ", Ref Call, Text " and a ", Ref Response, Text " marked with an M and a D." ]
[ Text "A ", Ref (noun Call 1), Text " and a ", Ref (noun Response 1), Text " marked with an M and a D." ]
RereadLogoDescription ->
[ Text "A book circled by a recycling arrow." ]
@@ -140,7 +161,7 @@ translate mdString =
[ Text "How to play." ]
RulesHand ->
[ Text "Each player has a hand of ", Ref (Plural { singular = Response, amount = Nothing }), Text "." ]
[ Text "Each player has a hand of ", Ref (Noun { noun = Response, quantity = Unknown }), Text "." ]
RulesCzar ->
[ Text "The first player begins as the "
@@ -148,13 +169,13 @@ translate mdString =
, Text ". the "
, Ref Czar
, Text " reads the question or fill-in-the-blank phrase on the "
, Ref Call
, Ref (noun Call 1)
, Text " out loud."
]
RulesPlaying ->
[ Text "Everyone else answers the question or fills in the blank by choosing a "
, Ref Response
, Ref (noun Response 1)
, Text " from their hand to play for the round."
]
@@ -164,11 +185,11 @@ translate mdString =
, Text " reads them out to the other playersfor full effect, the "
, Ref Czar
, Text " should usually re-read the "
, Ref Call
, Ref (noun Call 1)
, Text " before presenting each answer. The "
, Ref Czar
, Text " then picks the funniest play, and whoever played it gets one "
, Ref Point
, Ref (noun Point 1)
, Text "."
]
@@ -177,24 +198,24 @@ translate mdString =
RulesPick ->
[ Text "Some cards will need more than one "
, Ref Response
, Ref (noun Response 1)
, Text " as an answer. Play the cards in the order the "
, Ref Czar
, Text " should read themthe order matters."
]
ExamplePickDescription ->
[ Ref (Plural { singular = Call, amount = Nothing })
[ Ref (nounUnknownQuantity Call)
, Text " like this will require picking more "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ", but give you more to pick from."
]
RulesDraw ->
[ Text "Some "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " will need even more "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text "these will say "
, Ref (Draw { numberOfCards = 2 })
, Text " or more, and youll get that many extra cards before you play."
@@ -217,7 +238,7 @@ translate mdString =
HouseRuleRebootDescription { cost } ->
[ Text "At any time, players may trade in "
, Text (an cost)
, Ref (Plural { singular = Point, amount = cost })
, Ref (nounMaybe Point cost)
, Text " to discard their hand and draw a new one."
]
@@ -225,22 +246,22 @@ translate mdString =
[ Text "Spend "
, Text (asWord cost)
, Text " "
, Ref (Plural { singular = Point, amount = Just cost })
, Ref (noun Point cost)
, Text " to discard your hand and draw a new one."
]
HouseRuleRebootCost ->
[ Ref Point, Text " Cost" ]
[ Ref (noun Point 1), Text " Cost" ]
HouseRuleRebootCostDescription ->
[ Text "How many ", Ref (Plural { singular = Point, amount = Nothing }), Text " it costs to redraw." ]
[ Text "How many ", Ref (nounUnknownQuantity Point), Text " it costs to redraw." ]
HouseRulePackingHeat ->
[ Text "Packing Heat" ]
HouseRulePackingHeatDescription ->
[ Text "Any "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " with "
, Ref (Pick { numberOfCards = 2 })
, Text " also get "
@@ -253,25 +274,25 @@ translate mdString =
HouseRuleComedyWriterDescription ->
[ Text "Add blank "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " where players can write custom responses."
]
HouseRuleComedyWriterNumber ->
[ Text "Blank ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Blank ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterNumberDescription ->
[ Text "The number of Blank "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text "that will be in the game."
]
HouseRuleComedyWriterExclusive ->
[ Text "Only Blank ", Ref (Plural { singular = Response, amount = Nothing }) ]
[ Text "Only Blank ", Ref (nounUnknownQuantity Response) ]
HouseRuleComedyWriterExclusiveDescription ->
[ Text "If enabled, all other "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " will be ignored, only blank ones will exist in-game."
]
@@ -280,7 +301,7 @@ translate mdString =
HouseRuleRandoCardrissianDescription ->
[ Text "Every round, the first "
, Ref Response
, Ref (noun Response 1)
, Text " in the deck will be played as an answer. This play belongs to an AI player named "
, Text "Rando Cardrissian, and if he wins the game, all players go home in a state of everlasting shame."
]
@@ -385,27 +406,12 @@ translate mdString =
CzarDescription ->
[ Text "The player judging the round." ]
Player ->
[ Text "Player" ]
Spectator ->
[ Text "Spectator" ]
Call ->
[ Text "Black Card" ]
CallDescription ->
[ Text "A black card with a question or fill-in-the-blank phrase." ]
Response ->
[ Text "White Card" ]
ResponseDescription ->
[ Text "A white card with a phrase played into rounds." ]
Point ->
[ Text "Awesome Point" ]
PointDescription ->
[ Text "A pointhaving more means winning." ]
@@ -485,7 +491,7 @@ translate mdString =
[ Text "You need to play "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text "."
]
@@ -493,7 +499,7 @@ translate mdString =
[ Text "You get "
, Text (asWord numberOfCards)
, Text " extra "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " before playing."
]
@@ -548,13 +554,13 @@ translate mdString =
[ Text "Casting to ", Text deviceName, Text "." ]
Players ->
[ Ref (Plural { singular = Player, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Player) ]
PlayersDescription ->
[ Text "Users playing the game." ]
Spectators ->
[ Ref (Plural { singular = Spectator, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Spectator) ]
SpectatorsDescription ->
[ Text "Users watching the game without playing." ]
@@ -594,7 +600,7 @@ translate mdString =
ScoreDescription ->
[ Text "The number of "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " this player has."
]
@@ -662,10 +668,10 @@ translate mdString =
ReturnViewToGameDescription ->
[ Text "Return to the main game view." ]
ViewConfgiuration ->
ViewConfiguration ->
[ Text "Configure" ]
ViewConfgiurationDescription ->
ViewConfigurationDescription ->
[ Text "Switch to view the game's configuration." ]
KickUser ->
@@ -714,7 +720,7 @@ translate mdString =
MissingCardType { cardType } ->
[ Text "None of your decks contain any "
, Ref (Plural { singular = cardType, amount = Nothing })
, Ref (nounUnknownQuantity cardType)
, Text ". You need a deck that does to start the game."
]
@@ -722,7 +728,7 @@ translate mdString =
[ Text "For the number of players in the game, you need at least "
, Text (needed |> String.fromInt)
, Text " "
, Ref (Plural { singular = cardType, amount = Just needed })
, Ref (noun cardType needed)
, Text " but you only have "
, Text (have |> String.fromInt)
, Text "."
@@ -732,7 +738,7 @@ translate mdString =
[ Text "Add "
, amount |> String.fromInt |> Text
, Text " blank "
, Ref (Plural { singular = Response, amount = Just amount })
, Ref (noun Response amount)
]
AddDeck ->
@@ -793,12 +799,12 @@ translate mdString =
[ Text "The base number of cards each player has in their hand during the game." ]
ScoreLimit ->
[ Ref Point, Text " Limit" ]
[ Ref (noun Point 1), Text " Limit" ]
ScoreLimitDescription ->
[ Segment
[ Text "The number of "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " a player needs to win the game."
]
, Text " "
@@ -1020,7 +1026,7 @@ translate mdString =
[ Text "You need to choose "
, Text (asWord numberOfCards)
, Text " more "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " from your hand into this round before you can submit your play."
]
@@ -1034,7 +1040,7 @@ translate mdString =
[ Text "You are the "
, Ref Czar
, Text " for the round - you don't submit any "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ". Instead you choose the winner once everyone else has submitted theirs."
]
@@ -5,7 +5,7 @@ module MassiveDecks.Strings.Languages.It exposing (pack)
import MassiveDecks.Card.Source.BuiltIn.Model as BuiltIn
import MassiveDecks.Card.Source.Model as Source
import MassiveDecks.Strings exposing (MdString(..))
import MassiveDecks.Strings exposing (MdString(..), Noun(..), Quantity(..), noun, nounMaybe, nounUnknownQuantity)
import MassiveDecks.Strings.Translation as Translation exposing (Result(..))
@@ -35,30 +35,41 @@ translate mdString =
[ Text "Chiudi" ]
-- Special
Plural { singular, amount } ->
if amount == Just 1 then
[ Raw singular ]
Noun { noun, quantity } ->
case quantity of
Quantity 1 ->
case noun of
Call ->
[ Text "Carta Nera" ]
else
-- Not ideal, but pluralization is not trivial in Italian, su we just handle the very few cases
case singular of
Call ->
[ Text "Carte Nere" ]
Response ->
[ Text "Carta Bianca" ]
Response ->
[ Text "Carte Bianche" ]
Point ->
[ Text "Punto" ]
Point ->
[ Text "Punti" ]
Player ->
[ Text "Giocatore" ]
Player ->
[ Text "Giocatori" ]
Spectator ->
[ Text "Spettatore" ]
Spectator ->
[ Text "Spettatori" ]
_ ->
case noun of
Call ->
[ Text "Carte Nere" ]
_ ->
[ Raw singular ]
Response ->
[ Text "Carte Bianche" ]
Point ->
[ Text "Punti" ]
Player ->
[ Text "Giocatori" ]
Spectator ->
[ Text "Spettatori" ]
-- Start screen.
Version { versionNumber } ->
@@ -110,7 +121,7 @@ translate mdString =
[ Text "Scopri di più su ", Ref MassiveDecks, Text " e come è sviluppato." ]
MDLogoDescription ->
[ Text "Una ", Ref Call, Text " e una ", Ref Response, Text " marcate con una M e una D." ]
[ Text "Una ", Ref (noun Call 1), Text " e una ", Ref (noun Response 1), Text " marcate con una M e una D." ]
RereadLogoDescription ->
[ Text "Un libro cerchiato con una freccia di riciclo." ]
@@ -161,7 +172,7 @@ translate mdString =
[ Text "Come giocare." ]
RulesHand ->
[ Text "Ogni giocatore ha una mano di ", Ref (Plural { singular = Response, amount = Nothing }), Text "." ]
[ Text "Ogni giocatore ha una mano di ", Ref (nounUnknownQuantity Response), Text "." ]
RulesCzar ->
[ Text "Il primo giocatore inizia come "
@@ -169,13 +180,13 @@ translate mdString =
, Text ". Il "
, Ref Czar
, Text " legge la domanda o frase da completare nella "
, Ref Call
, Ref (noun Call 1)
, Text " a voce alta."
]
RulesPlaying ->
[ Text "Tutti gli altri rispondono alla domanda o completano gli spazi scegliendo una "
, Ref Response
, Ref (noun Response 1)
, Text " dalla loro mano per giocare nel turno."
]
@@ -185,11 +196,11 @@ translate mdString =
, Text " le legge a voce alta agli altri giocatoriper il pieno effetto, il "
, Ref Czar
, Text " dovrebbe rileggere la "
, Ref Call
, Ref (noun Call 1)
, Text " prima di presentare ogni risposta. Il "
, Ref Czar
, Text " poi sceglie la giocata più divertente, e la persona che lha giocata prende un "
, Ref Point
, Ref (noun Point 1)
, Text "."
]
@@ -198,24 +209,24 @@ translate mdString =
RulesPick ->
[ Text "Alcune carte necessitano più di una "
, Ref Response
, Ref (noun Response 1)
, Text " come risposta. Gioca le carte nellordine in cui il "
, Ref Czar
, Text " le dovrebbe leggerelordine è importante."
]
ExamplePickDescription ->
[ Ref (Plural { singular = Call, amount = Nothing })
[ Ref (nounUnknownQuantity Call)
, Text " come questa richiederanno di scegliere multiple "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ", ma te ne danno di più da cui scegliere."
]
RulesDraw ->
[ Text "Alcune "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " richiederenno ancora più "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text "queste diranno "
, Ref (Draw { numberOfCards = 2 })
, Text " o più, e riceverai quel numero di carte aggiuntive prima della giocata."
@@ -238,7 +249,7 @@ translate mdString =
HouseRuleRebootDescription { cost } ->
[ Text "In qualunque momento, i giocatori possono cedere "
, Text (an cost)
, Ref (Plural { singular = Point, amount = cost })
, Ref (nounMaybe Point cost)
, Text " per scartare la loro mano e pescarne una nuova."
]
@@ -246,22 +257,22 @@ translate mdString =
[ Text "Spendi "
, Text (asWord cost)
, Text " "
, Ref (Plural { singular = Point, amount = Just cost })
, Ref (noun Point cost)
, Text " per scartare la mano e pescarne una nuova."
]
HouseRuleRebootCost ->
[ Text "Costo ", Ref Point ]
[ Text "Costo ", Ref (noun Point 1) ]
HouseRuleRebootCostDescription ->
[ Text "Quanti ", Ref (Plural { singular = Point, amount = Nothing }), Text " costa ripescare." ]
[ Text "Quanti ", Ref (nounUnknownQuantity Point), Text " costa ripescare." ]
HouseRulePackingHeat ->
[ Text "Porto darmi" ]
HouseRulePackingHeatDescription ->
[ Text "Qualunque "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " con "
, Ref (Pick { numberOfCards = 2 })
, Text " riceve anche "
@@ -274,25 +285,25 @@ translate mdString =
HouseRuleComedyWriterDescription ->
[ Text "Aggiungi "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " in bianco dove i giocatori possono scrivere una risposta personalizzata."
]
HouseRuleComedyWriterNumber ->
[ Ref (Plural { singular = Response, amount = Nothing }), Text " in bianco" ]
[ Ref (nounUnknownQuantity Response), Text " in bianco" ]
HouseRuleComedyWriterNumberDescription ->
[ Text "Il numero di "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " in bianco da utilizzare nel gioco."
]
HouseRuleComedyWriterExclusive ->
[ Text "Solo ", Ref (Plural { singular = Response, amount = Nothing }), Text " in bianco" ]
[ Text "Solo ", Ref (nounUnknownQuantity Response), Text " in bianco" ]
HouseRuleComedyWriterExclusiveDescription ->
[ Text "Se abilitato, tutte le altre "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " saranno ignorate, solo quelle in bianco esisteranno nel gioco."
]
@@ -301,7 +312,7 @@ translate mdString =
HouseRuleRandoCardrissianDescription ->
[ Text "Ogni turno, la prima "
, Ref Response
, Ref (noun Response 1)
, Text " nel mazzo sarà giocata come risposta. Questa mano appartiene al giocatore IA chiamato "
, Text "Rando Cardrissian e, se vince il gioco, tutti i giocatori vanno a casa in uno stato di vergogna perenne."
]
@@ -406,27 +417,12 @@ translate mdString =
CzarDescription ->
[ Text "Il giocatore che giudica un turno." ]
Player ->
[ Text "Giocatore" ]
Spectator ->
[ Text "Spettatore" ]
Call ->
[ Text "Carta Nera" ]
CallDescription ->
[ Text "Una carta nera con una domanda o frase da riempire." ]
Response ->
[ Text "Carta Bianca" ]
ResponseDescription ->
[ Text "Una carta bianca da giocare nei turni." ]
Point ->
[ Text "Punto" ]
PointDescription ->
[ Text "Un puntoaverne di più significa vincere." ]
@@ -510,7 +506,7 @@ translate mdString =
[ Text "Devi giocare "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text "."
]
@@ -518,7 +514,7 @@ translate mdString =
[ Text "Ottieni "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " in più prima di giocare."
]
@@ -575,13 +571,13 @@ translate mdString =
[ Text "Proiezione su ", Text deviceName, Text "." ]
Players ->
[ Ref (Plural { singular = Player, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Player) ]
PlayersDescription ->
[ Text "Utenti che partecipano al gioco." ]
Spectators ->
[ Ref (Plural { singular = Spectator, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Spectator) ]
SpectatorsDescription ->
[ Text "Utenti che guardano il gioco senza parteciparvi." ]
@@ -621,7 +617,7 @@ translate mdString =
ScoreDescription ->
[ Text "Il numero di "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " che questo giocatore ha."
]
@@ -689,10 +685,10 @@ translate mdString =
ReturnViewToGameDescription ->
[ Text "Torna alla vista principale del gioco." ]
ViewConfgiuration ->
ViewConfiguration ->
[ Text "Configura" ]
ViewConfgiurationDescription ->
ViewConfigurationDescription ->
[ Text "Passa a visualizzare la configurazione del gioco." ]
KickUser ->
@@ -741,7 +737,7 @@ translate mdString =
MissingCardType { cardType } ->
[ Text "Nessuno dei mazzi contiene "
, Ref (Plural { singular = cardType, amount = Nothing })
, Ref (nounUnknownQuantity cardType)
, Text ". Sono necessarie per poter iniziare il gioco."
]
@@ -749,7 +745,7 @@ translate mdString =
[ Text "Per il numero di giocatori nel gioco, ti servono almeno "
, Text (needed |> String.fromInt)
, Text " "
, Ref (Plural { singular = cardType, amount = Just needed })
, Ref (noun cardType needed)
, Text " ma ne hai solo "
, Text (have |> String.fromInt)
, Text "."
@@ -824,12 +820,12 @@ translate mdString =
[ Text "Il numero di carte di base che ogni giocatore ha durante il gioco." ]
ScoreLimit ->
[ Text "Limite ", Ref (Plural { singular = Point, amount = Nothing }) ]
[ Text "Limite ", Ref (nounUnknownQuantity Point) ]
ScoreLimitDescription ->
[ Segment
[ Text "Il numero di "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " che un giocatore deve avere per vincere il gioco."
]
, Text " "
@@ -1057,7 +1053,7 @@ translate mdString =
[ Text "Devi scegliere altre "
, Text (asWord numberOfCards)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " in questo turno prima di poter inviare la giocata."
]
@@ -1071,7 +1067,7 @@ translate mdString =
[ Text "Sei il "
, Ref Czar
, Text " per questo turno - non scegli nessuna "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ". Invece, scegli il vincitore quando tutti gli altri hanno fatto le loro giocate."
]
@@ -5,7 +5,7 @@ module MassiveDecks.Strings.Languages.PtBR exposing (pack)
import MassiveDecks.Card.Source.BuiltIn.Model as BuiltIn
import MassiveDecks.Card.Source.Model as Source
import MassiveDecks.Strings exposing (MdString(..))
import MassiveDecks.Strings exposing (MdString(..), Noun(..), Quantity(..), noun, nounMaybe, nounUnknownQuantity)
import MassiveDecks.Strings.Translation as Translation exposing (Result(..))
@@ -35,30 +35,41 @@ translate mdString =
[ Text "Fechar" ]
-- Special
Plural { singular, amount } ->
if amount == Just 1 then
[ Raw singular ]
Noun { noun, quantity } ->
case quantity of
Quantity 1 ->
case noun of
Call ->
[ Text "Carta Preta" ]
else
-- Same case as italian and other languages, portuguese plurarization have some specific cases to handle
case singular of
Call ->
[ Text "Cartas Pretas" ]
Response ->
[ Text "Carta Branca" ]
Response ->
[ Text "Cartas Brancas" ]
Point ->
[ Text "Ponto Incrível" ]
Point ->
[ Text "Pontos Incríveis" ]
Player ->
[ Text "Jogador" ]
Player ->
[ Text "Jogadores" ]
Spectator ->
[ Text "Espectador" ]
Spectator ->
[ Text "Espectadores" ]
_ ->
case noun of
Call ->
[ Text "Cartas Pretas" ]
_ ->
[ Raw singular, Text "s" ]
Response ->
[ Text "Cartas Brancas" ]
Point ->
[ Text "Pontos Incríveis" ]
Player ->
[ Text "Jogadores" ]
Spectator ->
[ Text "Espectadores" ]
-- Start screen.
Version { versionNumber } ->
@@ -108,7 +119,7 @@ translate mdString =
[ Text "Descubra mais sobre ", Ref MassiveDecks, Text " e como é desenvolvido." ]
MDLogoDescription ->
[ Text "Uma ", Ref Call, Text " e uma ", Ref Response, Text " marcados com um M e um D." ]
[ Text "Uma ", Ref (noun Call 1), Text " e uma ", Ref (noun Response 1), Text " marcados com um M e um D." ]
RereadLogoDescription ->
[ Text "Um livro rodeado por uma flecha de reciclagem." ]
@@ -157,7 +168,7 @@ translate mdString =
[ Text "Como jogar." ]
RulesHand ->
[ Text "Cada jogador terá uma mão de ", Ref (Plural { singular = Response, amount = Nothing }), Text "." ]
[ Text "Cada jogador terá uma mão de ", Ref (nounUnknownQuantity Response), Text "." ]
RulesCzar ->
[ Text "O primeiro jogador começa como "
@@ -165,13 +176,13 @@ translate mdString =
, Text ". O "
, Ref Czar
, Text " lê a pergunta ou frase para preencher na "
, Ref Call
, Ref (noun Call 1)
, Text " em voz alta."
]
RulesPlaying ->
[ Text "Todos os outros respondem a pergunta ou preenchem o espaço em branco escolhendo uma "
, Ref Response
, Ref (noun Response 1)
, Text " de suas mãos para jogar a partida."
]
@@ -181,11 +192,11 @@ translate mdString =
, Text " as lê para os outros jogadorespara melhor efeito, o "
, Ref Czar
, Text " deveria ler novamente a "
, Ref Call
, Ref (noun Call 1)
, Text " antes de apresentar cada resposta. O "
, Ref Czar
, Text " então escolhe a jogada mais engraçada, e quem a jogou recebe um "
, Ref Point
, Ref (noun Point 1)
, Text "."
]
@@ -194,24 +205,24 @@ translate mdString =
RulesPick ->
[ Text "Algumas cartas precisam de mais de uma "
, Ref Response
, Ref (noun Response 1)
, Text " como resposta. Escolha as cartas na ordem que o "
, Ref Czar
, Text " deveria lera ordem importa."
]
ExamplePickDescription ->
[ Ref (Plural { singular = Call, amount = Nothing })
[ Ref (nounUnknownQuantity Call)
, Text " como essa precisam de mais "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " como resposta, mas te dão mais opções para escolher."
]
RulesDraw ->
[ Text "Algumas "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " precisam de mais de uma "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " como respostaelas também vão dizer "
, Ref (Draw { numberOfCards = 2 })
, Text " ou mais, e você ganhará essa quantidade de cartas extras antes de jogar."
@@ -234,7 +245,7 @@ translate mdString =
HouseRuleRebootDescription { cost } ->
[ Text "Em qualquer momento, jogadores podem trocar "
, Text (an cost)
, Ref (Plural { singular = Point, amount = cost })
, Ref (nounMaybe Point cost)
, Text " para descartar sua mão e pegar uma nova."
]
@@ -242,22 +253,22 @@ translate mdString =
[ Text "Gastar "
, Text (asWord cost Male)
, Text " "
, Ref (Plural { singular = Point, amount = Just cost })
, Ref (noun Point cost)
, Text " para trocar sua mão por uma nova."
]
HouseRuleRebootCost ->
[ Text "Custo de ", Ref (Plural { singular = Point, amount = Nothing }) ]
[ Text "Custo de ", Ref (nounUnknownQuantity Point) ]
HouseRuleRebootCostDescription ->
[ Text "Quantos ", Ref (Plural { singular = Point, amount = Nothing }), Text " custam para trocar as cartas." ]
[ Text "Quantos ", Ref (nounUnknownQuantity Point), Text " custam para trocar as cartas." ]
HouseRulePackingHeat ->
[ Text "Calor da Embalagem" ]
HouseRulePackingHeatDescription ->
[ Text "Quaisquer "
, Ref (Plural { singular = Call, amount = Nothing })
, Ref (nounUnknownQuantity Call)
, Text " com "
, Ref (Pick { numberOfCards = 2 })
, Text " também vem com "
@@ -270,25 +281,25 @@ translate mdString =
HouseRuleComedyWriterDescription ->
[ Text "Adiciona "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " vazias onde os jogadores podem escrever respostas personalizadas."
]
HouseRuleComedyWriterNumber ->
[ Ref (Plural { singular = Response, amount = Nothing }), Text " vazias" ]
[ Ref (nounUnknownQuantity Response), Text " vazias" ]
HouseRuleComedyWriterNumberDescription ->
[ Text "O número de "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " vazias que estarão no jogo."
]
HouseRuleComedyWriterExclusive ->
[ Text "Apenas ", Ref (Plural { singular = Response, amount = Nothing }), Text " vazias" ]
[ Text "Apenas ", Ref (nounUnknownQuantity Response), Text " vazias" ]
HouseRuleComedyWriterExclusiveDescription ->
[ Text "Se ativado, todas as outras "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text " serão ignoradas, apenas as vazias existirão no jogo."
]
@@ -297,7 +308,7 @@ translate mdString =
HouseRuleRandoCardrissianDescription ->
[ Text "A cada partida, a primeira "
, Ref Response
, Ref (noun Response 1)
, Text " no deck será jogada como uma resposta. Esta jogada pertencerá a um jogador IA chamado "
, Text "Rando Cardrissian, e se ele vencer o jogo, todos os jogadores vão para casa em um estado de vergonha eterna."
]
@@ -401,27 +412,12 @@ translate mdString =
CzarDescription ->
[ Text "O jogador julgando a partida." ]
Player ->
[ Text "Jogador" ]
Spectator ->
[ Text "Espectador" ]
Call ->
[ Text "Carta Preta" ]
CallDescription ->
[ Text "Uma carta preta com uma pergunta ou frase para preencher." ]
Response ->
[ Text "Carta Branca" ]
ResponseDescription ->
[ Text "Uma carta com uma frase para ser jogada nas partidas." ]
Point ->
[ Text "Ponto Incrível" ]
PointDescription ->
[ Text "Um pontoter mais significa vencer." ]
@@ -501,7 +497,7 @@ translate mdString =
[ Text "Você precisa escolher "
, Text (asWord numberOfCards Female)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text "."
]
@@ -509,7 +505,7 @@ translate mdString =
[ Text "Você ganha mais "
, Text (asWord numberOfCards Female)
, Text " "
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " antes de jogar."
]
@@ -564,13 +560,13 @@ translate mdString =
[ Text "Transmitindo para ", Text deviceName, Text "." ]
Players ->
[ Ref (Plural { singular = Player, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Player) ]
PlayersDescription ->
[ Text "Usuários jogando o jogo." ]
Spectators ->
[ Ref (Plural { singular = Spectator, amount = Nothing }) ]
[ Ref (nounUnknownQuantity Spectator) ]
SpectatorsDescription ->
[ Text "Usuários assistindo o jogo sem jogar." ]
@@ -610,7 +606,7 @@ translate mdString =
ScoreDescription ->
[ Text "O número de "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " que este jogador possui."
]
@@ -678,10 +674,10 @@ translate mdString =
ReturnViewToGameDescription ->
[ Text "Retornar para a visualização principal do jogo." ]
ViewConfgiuration ->
ViewConfiguration ->
[ Text "Configurar" ]
ViewConfgiurationDescription ->
ViewConfigurationDescription ->
[ Text "Trocar para a visualização de configurações do jogo." ]
KickUser ->
@@ -730,7 +726,7 @@ translate mdString =
MissingCardType { cardType } ->
[ Text "Nenhum de seus decks possui "
, Ref (Plural { singular = cardType, amount = Nothing })
, Ref (nounUnknownQuantity cardType)
, Text ". Você precisa de um deck que as possoa para iniciar o jogo."
]
@@ -738,7 +734,7 @@ translate mdString =
[ Text "Para o número de jogadores no jogo, você precisa de pelo menos "
, Text (needed |> String.fromInt)
, Text " "
, Ref (Plural { singular = cardType, amount = Just needed })
, Ref (noun cardType needed)
, Text ", mas você possui somente "
, Text (have |> String.fromInt)
, Text "."
@@ -747,7 +743,7 @@ translate mdString =
AddBlankCards { amount } ->
[ Text "Adicionar "
, amount |> String.fromInt |> Text
, Ref (Plural { singular = Response, amount = Just amount })
, Ref (noun Response amount)
, Text " vazias."
]
@@ -811,12 +807,12 @@ translate mdString =
[ Text "O número base de cartas que cada jogador possui em suas mãos durante o jogo." ]
ScoreLimit ->
[ Text "Limite de ", Ref (Plural { singular = Point, amount = Nothing }) ]
[ Text "Limite de ", Ref (nounUnknownQuantity Point) ]
ScoreLimitDescription ->
[ Segment
[ Text "O número de "
, Ref (Plural { singular = Point, amount = Nothing })
, Ref (nounUnknownQuantity Point)
, Text " que um jogador precisa para vencer."
]
, Text " "
@@ -1037,7 +1033,7 @@ translate mdString =
PlayInstruction { numberOfCards } ->
[ Text "Você precisa escolher mais "
, Text (asWord numberOfCards Female)
, Ref (Plural { singular = Response, amount = Just numberOfCards })
, Ref (noun Response numberOfCards)
, Text " da sua mão nesta partida antes de enviar sua jogada."
]
@@ -1051,7 +1047,7 @@ translate mdString =
[ Text "Você é o "
, Ref Czar
, Text " da partida - você não envia nenhuma das "
, Ref (Plural { singular = Response, amount = Nothing })
, Ref (nounUnknownQuantity Response)
, Text ". Ao invés disso, você decide o vencedor da partida quando todos enviarem suas jogadas."
]
+13 -11
View File
@@ -132,21 +132,23 @@ resultToHtml context result =
enhanceHtml : Context -> MdString -> List (Html msg) -> List (Html msg)
enhanceHtml context mdString unenhanced =
case mdString of
Plural { singular } ->
enhanceHtml context singular unenhanced
Noun { noun } ->
case noun of
Call ->
term context CallDescription Icon.callCard unenhanced
Response ->
term context ResponseDescription Icon.responseCard unenhanced
Point ->
term context PointDescription Icon.star unenhanced
_ ->
unenhanced
Czar ->
term context CzarDescription Icon.gavel unenhanced
Call ->
term context CallDescription Icon.callCard unenhanced
Response ->
term context ResponseDescription Icon.responseCard unenhanced
Point ->
term context PointDescription Icon.star unenhanced
GameCodeTerm ->
term context GameCodeDescription Icon.qrcode unenhanced
+2 -2
View File
@@ -41,10 +41,10 @@ roleDescription : Role -> MdString
roleDescription toDescribe =
case toDescribe of
Player ->
Strings.Player
Strings.noun Strings.Player 1
Spectator ->
Strings.Spectator
Strings.noun Strings.Spectator 1
{-| If the user is actively a part of the lobby.
+1 -1
View File
@@ -35,7 +35,7 @@ $response-background: $call-color;
margin: 0;
}
.capitalize:first-child {
.capitalize > :first-child {
text-transform: capitalize;
}
+3 -8
View File
@@ -154,15 +154,10 @@
}
}
#add-deck .multipart {
.primary {
flex-shrink: 0;
}
}
#source-selector {
#add-deck .multipart .primary {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 12em;
width: 1em;
}
.house-rules {
+29 -13
View File
@@ -2,9 +2,9 @@ import {
CastStatus,
InboundPort,
OutboundPort,
RemoteControlCommand
RemoteControlCommand,
} from "../../elm/MassiveDecks";
import { channel } from "./shared";
import { channel, keepAliveChannel } from "./shared";
export const register = (
tryCast: InboundPort<RemoteControlCommand>,
@@ -17,11 +17,11 @@ declare const cast: any;
let whenAvailable: (() => void)[] | null = [];
window["__onGCastApiAvailable"] = function(isAvailable: Boolean) {
window["__onGCastApiAvailable"] = (isAvailable: Boolean) => {
if (isAvailable) {
cast.framework.CastContext.getInstance().setOptions({
receiverApplicationId: "A6799922",
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
});
if (whenAvailable != null) {
for (const callback of whenAvailable) {
@@ -63,13 +63,11 @@ class Client {
const context = cast.framework.CastContext.getInstance();
context.addEventListener(
cast.framework.CastContextEventType.CAST_STATE_CHANGED,
(event: cast.framework.CastStateEventData) =>
this.onCastStateChanged(event)
this.onCastStateChanged.bind(this)
);
context.addEventListener(
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
(event: cast.framework.SessionStateEventData) =>
this.onSessionStateChanged(event)
this.onSessionStateChanged.bind(this)
);
this.status.send(context.getCastState());
}
@@ -82,13 +80,13 @@ class Client {
this.commandQueue.push(command);
context
.requestSession()
.then(function(e: chrome.cast.ErrorCode) {
if (e) {
console.error(e);
.then(function (e: chrome.cast.ErrorCode) {
if (e !== undefined) {
console.error(`Error response requesting session: ${e}`);
}
})
.catch(function(e: Error) {
console.error(e);
.catch(function (e: Error) {
console.error(`Error while requesting session: ${e}`);
});
}
}
@@ -124,6 +122,24 @@ class Client {
.sendMessage(channel, JSON.stringify(command))
.catch((e: Error) => console.error(e));
}
event.session.addMessageListener(keepAliveChannel, (namespace, message) =>
this.onKeepAliveMessage(event.session, namespace, message)
);
}
if (event.sessionState == cast.framework.SESSION_START_FAILED) {
console.error(`Error ${event.errorCode}: Failed to start session.`);
}
}
onKeepAliveMessage(
session: cast.framework.CastSession,
namespace: string,
message: string
): void {
if (message === "ping") {
session
.sendMessage(keepAliveChannel, "pong")
.catch((error) => console.error(error));
}
}
}
+16 -1
View File
@@ -1,5 +1,5 @@
import { OutboundPort, RemoteControlCommand } from "../../elm/MassiveDecks";
import { channel } from "./shared";
import { channel, keepAliveChannel } from "./shared";
export const register = (remoteControl: OutboundPort<RemoteControlCommand>) => {
Server.start(remoteControl);
@@ -22,6 +22,21 @@ class Server {
remoteControl.send(customEvent.data)
);
context.addCustomMessageListener(keepAliveChannel, (customEvent: any) => {
// Do nothing on the pong.
});
context.addEventListener(EventType.SENDER_CONNECTED, (event: any) => {
const senderConnected = event as cast.framework.system.SenderConnectedEvent;
setInterval(() => {
context.sendCustomMessage(
keepAliveChannel,
senderConnected.senderId,
"ping"
);
}, 30 * 1000);
});
context.start();
}
}
+1
View File
@@ -1 +1,2 @@
export const channel = "urn:x-cast:com.rereadgames.massivedecks";
export const keepAliveChannel = `${channel}.keepalive`;
+1
View File
@@ -253,6 +253,7 @@ module.exports = (env, argv) => {
{
compilation_level: "SIMPLE_OPTIMIZATIONS",
externs: "src/js/extern.js",
languageOut: "ECMASCRIPT6_STRICT",
}
),
new TerserPlugin({
+30 -10
View File
@@ -32,16 +32,21 @@
decks: ["cah-base-en", "cah-base-ptbr"],
},
// Allows players to load decks from Cardcast via their API. https://www.cardcastgame.com/
cardcast: {
// How long to wait for a response from the Cardcast API service before giving up and telling the user there is a
// problem.
// Allows players to load decks from Many Decks.
manyDecks: {
baseUrl: "https://decks.rereadgames.com/",
// How long to wait for a response from Many Decks before giving up and telling the user there is a problem.
timeout: "PT10S",
// The number of connections the server can make to Cardcast at one time.
// Please remember this is a service provided by Cardcast, and you should make best efforts to ensure you don't
// hit them too hard, including not setting this too high.
simultaneousConnections: 1,
// The number of connections the server can make to Many Decks at one time.
simultaneousConnections: 2,
},
// Allows players to use decks from JSON Against Humanity
jsonAgainstHumanity: {
aboutUrl: "https://github.com/crhallberg/json-against-humanity",
url: "https://raw.githubusercontent.com/crhallberg/json-against-humanity/v2/compact.md.json",
},
},
@@ -56,6 +61,7 @@
// reboot: { cost: 1 },
// comedyWriter: { number: 300, exclusive: true },
// rando: { number: 1 },
// neverHaveIEver: {}
},
stages: {
timeLimitMode: "Soft",
@@ -77,9 +83,23 @@
audienceMode: false,
decks: [
// {
// // A built-in deck.
// source: "BuiltIn",
// // The id (filename without `.deck.json5`.
// id: "cah-base-en",
// },
// {
// // A deck from JSON Against Humanity
// source: "JAH",
// // The id can be found in the JSON as the key for the deck.
// id: "Base",
// },
// {
// // A deck from Many Decks
// source: "ManyDecks",
// // The deck code, as given on Many Decks.
// deckCode: "ABCDE",
// },
],
},
@@ -113,7 +133,7 @@
type: "PostgreSQL",
connection: {
host: "storage",
port: 5432 ,
port: 5432,
user: "massivedecks",
database: "massivedecks",
password: "CHANGE ME",
@@ -132,7 +152,7 @@
type: "PostgreSQL",
connection: {
host: "storage",
port: 5432 ,
port: 5432,
user: "massivedecks",
database: "massivedecks",
password: "CHANGE ME",
+19 -19
View File
@@ -1,21 +1,21 @@
{
"name": "massivedecks",
"description": "Pulls together both the server and client for Massive Decks, a comedy party game.",
"version": "2.0.0",
"author": "Reread Games <team@rereadgames.com>",
"license": "AGPL-3.0-or-later",
"private": true,
"repository": "github:Lattyware/massivedecks",
"engines": {
"node": "13.x.x"
},
"scripts": {
"build": "cp -r server/decks decks && npm run buildServer && npm run buildClient",
"buildServer": "npm explore @massivedecks/server -- npm run build",
"buildClient": "npm explore @massivedecks/client -- npm run build"
},
"dependencies": {
"@massivedecks/server": "file:./server",
"@massivedecks/client": "file:./client"
}
"name": "massivedecks",
"description": "Pulls together both the server and client for Massive Decks, a comedy party game.",
"version": "2.0.0",
"author": "Reread Games <team@rereadgames.com>",
"license": "AGPL-3.0-or-later",
"private": true,
"repository": "github:Lattyware/massivedecks",
"engines": {
"node": "14.x.x"
},
"scripts": {
"build": "cp -r server/decks decks && npm run buildServer && npm run buildClient",
"buildServer": "npm explore @massivedecks/server -- npm run build",
"buildClient": "npm explore @massivedecks/client -- npm run build"
},
"dependencies": {
"@massivedecks/server": "file:./server",
"@massivedecks/client": "file:./client"
}
}
+4 -4
View File
@@ -1,4 +1,4 @@
FROM node:13-alpine
FROM node:14-alpine AS build
WORKDIR /md
@@ -9,8 +9,7 @@ COPY ["./src", "./src"]
COPY ["./tsconfig.json", "./config.json5", "./"]
RUN ["npm", "run", "build"]
FROM node:13-alpine
LABEL maintainer="team@rereadgames.com"
FROM node:14-alpine
ARG BUILD_DATE
ARG VCS_REF
@@ -18,6 +17,7 @@ ARG VERSION=dev
ENV MD_VERSION $VERSION
LABEL maintainer="team@rereadgames.com"
LABEL org.label-schema.name="massivedecks/server"
LABEL org.label-schema.description="The web server for Massive Decks, a comedy party game."
LABEL org.label-schema.url="https://github.com/Lattyware/massivedecks"
@@ -35,7 +35,7 @@ RUN ["npm", "ci", "--only=production"]
COPY ["./config.json5", "./"]
COPY ["./decks", "./decks"]
COPY --from=0 ["/md/dist", "./"]
COPY --from=build ["/md/dist", "./"]
EXPOSE 8081
USER node
+98 -98
View File
@@ -59,12 +59,12 @@
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"ms": "2.1.2"
}
},
"ignore": {
@@ -178,9 +178,9 @@
}
},
"@types/express-serve-static-core": {
"version": "4.17.12",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.12.tgz",
"integrity": "sha512-EaEdY+Dty1jEU7U6J4CUWwxL+hyEGMkO5jan5gplfegUgCUsIUWqXxqw47uGjimeT4Qgkz/XUfwoau08+fgvKA==",
"version": "4.17.13",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz",
"integrity": "sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==",
"dev": true,
"requires": {
"@types/node": "*",
@@ -228,9 +228,9 @@
}
},
"@types/hashids": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@types/hashids/-/hashids-1.0.31.tgz",
"integrity": "sha512-/bFrcs+EEPYPCxFiijCIP+1UenNJ4i10Ktx67MLN1EQrVbME0W0zrXqdr/UinMJTuvGCkzApVLvY9mj6lXYFfQ==",
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/@types/hashids/-/hashids-1.0.32.tgz",
"integrity": "sha512-P32CY6d8OtisVqa92UalnCt/kMGbFE/u6mxyBY+ntv8jbFWrJ8EyG98ev3V/Efldn+SYLUJdQdlqWB1tWsCQLg==",
"dev": true
},
"@types/helmet": {
@@ -288,9 +288,9 @@
"dev": true
},
"@types/pg": {
"version": "7.14.4",
"resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.4.tgz",
"integrity": "sha512-yCKVMCcFPZSFHGg+8qjY368uf3ruyDBPjxvOU2ZcGa/vRFo5Ti5Y6z6vl+2hxtwm9VMWUGb6TWkIk3cIV8C0Cw==",
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.5.tgz",
"integrity": "sha512-wqTKZmqkqXd1YiVRBT2poRrMIojwEi2bKTAAjUX6nEbzr98jc3cfR/7o7ZtubhH5xT7YJ6LRdRr1GZOgs8OUjg==",
"dev": true,
"requires": {
"@types/node": "*",
@@ -304,9 +304,9 @@
"dev": true
},
"@types/qs": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.4.tgz",
"integrity": "sha512-+wYo+L6ZF6BMoEjtf8zB2esQsqdV6WsjRK/GP9WOgLPrq87PbNWgIxS76dS5uvl/QXtHGakZmwTznIfcPXcKlQ==",
"version": "6.9.5",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz",
"integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==",
"dev": true
},
"@types/range-parser": {
@@ -356,13 +356,13 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.0.tgz",
"integrity": "sha512-U+nRJx8XDUqJxYF0FCXbpmD9nWt/xHDDG0zsw1vrVYAmEAuD/r49iowfurjSL2uTA2JsgtpsyG7mjO7PHf2dYw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz",
"integrity": "sha512-zBNRkzvLSwo6y5TG0DVcmshZIYBHKtmzD4N+LYnfTFpzc4bc79o8jNRSb728WV7A4Cegbs+MV5IRAj8BKBgOVQ==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "4.1.0",
"@typescript-eslint/scope-manager": "4.1.0",
"@typescript-eslint/experimental-utils": "4.2.0",
"@typescript-eslint/scope-manager": "4.2.0",
"debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
@@ -371,12 +371,12 @@
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"ms": "2.1.2"
}
},
"ms": {
@@ -394,38 +394,38 @@
}
},
"@typescript-eslint/experimental-utils": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.0.tgz",
"integrity": "sha512-paEYLA37iqRIDPeQwAmoYSiZ3PiHsaAc3igFeBTeqRHgPnHjHLJ9OGdmP6nwAkF65p2QzEsEBtpjNUBWByNWzA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.2.0.tgz",
"integrity": "sha512-5BBj6BjgHEndBaQQpUVzRIPERz03LBc0MCQkHwUaH044FJFL08SwWv/sQftk7gf0ShZ2xZysz0LTwCwNt4Xu3w==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.1.0",
"@typescript-eslint/types": "4.1.0",
"@typescript-eslint/typescript-estree": "4.1.0",
"@typescript-eslint/scope-manager": "4.2.0",
"@typescript-eslint/types": "4.2.0",
"@typescript-eslint/typescript-estree": "4.2.0",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.1.0.tgz",
"integrity": "sha512-hM/WNCQTzDHgS0Ke3cR9zPndL3OTKr9OoN9CL3UqulsAjYDrglSwIIgswSmHBcSbOzLmgaMARwrQEbIumIglvQ==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.2.0.tgz",
"integrity": "sha512-54jJ6MwkOtowpE48C0QJF9iTz2/NZxfKVJzv1ha5imigzHbNSLN9yvbxFFH1KdlRPQrlR8qxqyOvLHHxd397VA==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "4.1.0",
"@typescript-eslint/types": "4.1.0",
"@typescript-eslint/typescript-estree": "4.1.0",
"@typescript-eslint/scope-manager": "4.2.0",
"@typescript-eslint/types": "4.2.0",
"@typescript-eslint/typescript-estree": "4.2.0",
"debug": "^4.1.1"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"ms": "2.1.2"
}
},
"ms": {
@@ -437,29 +437,29 @@
}
},
"@typescript-eslint/scope-manager": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.0.tgz",
"integrity": "sha512-HD1/u8vFNnxwiHqlWKC/Pigdn0Mvxi84Y6GzbZ5f5sbLrFKu0al02573Er+D63Sw67IffVUXR0uR8rpdfdk+vA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz",
"integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.1.0",
"@typescript-eslint/visitor-keys": "4.1.0"
"@typescript-eslint/types": "4.2.0",
"@typescript-eslint/visitor-keys": "4.2.0"
}
},
"@typescript-eslint/types": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.0.tgz",
"integrity": "sha512-rkBqWsO7m01XckP9R2YHVN8mySOKKY2cophGM8K5uDK89ArCgahItQYdbg/3n8xMxzu2elss+an1TphlUpDuJw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz",
"integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.0.tgz",
"integrity": "sha512-r6et57qqKAWU173nWyw31x7OfgmKfMEcjJl9vlJEzS+kf9uKNRr4AVTRXfTCwebr7bdiVEkfRY5xGnpPaNPe4Q==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.2.0.tgz",
"integrity": "sha512-iWDLCB7z4MGkLipduF6EOotdHNtgxuNKnYD54nMS/oitFnsk4S3S/TE/UYXQTra550lHtlv9eGmp+dvN9pUDtA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.1.0",
"@typescript-eslint/visitor-keys": "4.1.0",
"@typescript-eslint/types": "4.2.0",
"@typescript-eslint/visitor-keys": "4.2.0",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
@@ -469,12 +469,12 @@
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"ms": "2.1.2"
}
},
"ms": {
@@ -492,12 +492,12 @@
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.0.tgz",
"integrity": "sha512-+taO0IZGCtCEsuNTTF2Q/5o8+fHrlml8i9YsZt2AiDCdYEJzYlsmRY991l/6f3jNXFyAWepdQj7n8Na6URiDRQ==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz",
"integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.1.0",
"@typescript-eslint/types": "4.2.0",
"eslint-visitor-keys": "^2.0.0"
}
},
@@ -529,9 +529,9 @@
"dev": true
},
"ajv": {
"version": "6.12.4",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
"version": "6.12.5",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
"integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -1164,9 +1164,9 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"eslint": {
"version": "7.8.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz",
"integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==",
"version": "7.10.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz",
"integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -1177,7 +1177,7 @@
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"enquirer": "^2.3.5",
"eslint-scope": "^5.1.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^1.3.0",
"espree": "^7.3.0",
@@ -1244,12 +1244,12 @@
"dev": true
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"ms": "2.1.2"
}
},
"eslint-visitor-keys": {
@@ -1294,9 +1294,9 @@
}
},
"eslint-config-prettier": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz",
"integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==",
"version": "6.12.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.12.0.tgz",
"integrity": "sha512-9jWPlFlgNwRUYVoujvWTQ1aMO8o6648r+K7qU7K5Jmkbyqav1fuEZC0COYpGBxyiAJb65Ra9hrmFx19xRGwXWw==",
"dev": true,
"requires": {
"get-stdin": "^6.0.0"
@@ -1312,12 +1312,12 @@
}
},
"eslint-scope": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz",
"integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
"esrecurse": "^4.3.0",
"estraverse": "^4.1.1"
}
},
@@ -1759,9 +1759,9 @@
"integrity": "sha512-+hQeKWwpSDiWFeu/3jKUvwboE4Z035gR6FnpscbHPOEEjCbgv2px9/Mlb3O0nOTRyZOw4MMFRYfVL3zctOV6OQ=="
},
"helmet": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.1.0.tgz",
"integrity": "sha512-KWy75fYN8hOG2Rhl8e5B3WhOzb0by1boQum85TiddIE9iu6gV+TXbUjVC17wfej0o/ZUpqB9kxM0NFCZRMzf+Q=="
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.1.1.tgz",
"integrity": "sha512-Avg4XxSBrehD94mkRwEljnO+6RZx7AGfk8Wa6K1nxaU+hbXlFOhlOIMgPfFqOYQB/dBCsTpootTGuiOG+CHiQA=="
},
"http-cache-semantics": {
"version": "4.1.0",
@@ -1782,9 +1782,9 @@
}
},
"http-status-codes": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.1.2.tgz",
"integrity": "sha512-zpZ1nBcoR0j1FLQ7xbXXBy1z/yUfAi+0a5IZBoZnmOseYkaljdzQ17ZeVXFlK23IbLxMJn6aWI0uU92DQQrG0g=="
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.1.4.tgz",
"integrity": "sha512-MZVIsLKGVOVE1KEnldppe6Ij+vmemMuApDfjhVSLzyYP+td0bREEYyAoIw9yFePoBXManCuBqmiNP5FqJS5Xkg=="
},
"iconv-lite": {
"version": "0.4.24",
@@ -2263,9 +2263,9 @@
}
},
"moment": {
"version": "2.27.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
"version": "2.29.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.0.tgz",
"integrity": "sha512-z6IJ5HXYiuxvFTI6eiQ9dm77uE0gyy1yXNApVHqTcnIKfY9tIwEjlzsZ6u1LQXvVgKeTnv9Xm7NDvJ7lso3MtA=="
},
"ms": {
"version": "2.0.0",
@@ -2592,9 +2592,9 @@
"dev": true
},
"prettier": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
"integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz",
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==",
"dev": true
},
"prettier-linter-helpers": {
@@ -2783,9 +2783,9 @@
"dev": true
},
"rfc6902": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/rfc6902/-/rfc6902-4.0.0.tgz",
"integrity": "sha512-SnH68/mZmd3awiI2shqYsGi8qZ+0NOD/p/EmFzXHyJy40AqpG9aC4UC9Ybtiz5+rSN2Ze5RmNo47u4TyoBOlNA=="
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/rfc6902/-/rfc6902-4.0.1.tgz",
"integrity": "sha512-RZOewbzE7AGAAPxxoTg137y4rCzA9w+5F9O+j+JdwnXH9uNNIpDPf8eH4sIViqgjfvOak+nlBRiy17TPDn+PLA=="
},
"rimraf": {
"version": "2.6.3",
@@ -3168,9 +3168,9 @@
}
},
"typescript": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz",
"integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==",
"dev": true
},
"typescript-json-schema": {
+15 -15
View File
@@ -28,7 +28,7 @@
"config.json5"
],
"dependencies": {
"ajv": "^6.12.4",
"ajv": "^6.12.5",
"axios": "^0.20.0",
"body-parser": "^1.19.0",
"express": "^4.17.1",
@@ -38,13 +38,13 @@
"fast-json-patch": "^3.0.0-1",
"generic-pool": "^3.7.1",
"hashids": "^2.2.1",
"helmet": "^4.1.0",
"http-status-codes": "^2.1.2",
"helmet": "^4.1.1",
"http-status-codes": "^2.1.4",
"json5": "^2.1.3",
"jsonwebtoken": "^8.5.1",
"moment": "^2.27.0",
"moment": "^2.29.0",
"pg": "^8.3.3",
"rfc6902": "^4.0.0",
"rfc6902": "^4.0.1",
"source-map-support": "^0.5.19",
"uuid": "^8.3.0",
"winston": "^3.3.3",
@@ -52,27 +52,27 @@
},
"devDependencies": {
"@types/express": "^4.17.8",
"@types/express-serve-static-core": "^4.17.12",
"@types/express-serve-static-core": "^4.17.13",
"@types/express-winston": "^4.0.0",
"@types/express-ws": "^3.0.0",
"@types/generic-pool": "^3.1.9",
"@types/hashids": "^1.0.31",
"@types/hashids": "^1.0.32",
"@types/helmet": "^0.0.48",
"@types/json5": "0.0.30",
"@types/jsonwebtoken": "^8.5.0",
"@types/pg": "^7.14.4",
"@types/qs": "^6.9.4",
"@types/pg": "^7.14.5",
"@types/qs": "^6.9.5",
"@types/source-map-support": "^0.5.3",
"@types/uuid": "^8.3.0",
"@types/wu": "^2.1.42",
"@typescript-eslint/eslint-plugin": "^4.1.0",
"@typescript-eslint/parser": "^4.1.0",
"eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
"nodemon": "^2.0.4",
"prettier": "2.1.1",
"typescript": "^4.0.2",
"prettier": "2.1.2",
"typescript": "^4.0.3",
"typescript-json-validator": "^2.4.2"
}
}