mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 09:04:09 +01:00
Play back the black box of the simulator: map, cab, timeline, timetable and a summary
The simulator writes a black box of each run to physicslog/*.blackbox (blackbox_doc.md in the maszyna repository). Three new projects read and show it: - Eu07.BlackBox: the reader of the records, the recording as a whole (the user's vehicle and consist at a time, the timetable shown, the progress along it with arrival and departure delays, whether the train stood at the platform), the light patterns Pc 1, Pc 2, Pc 5 and Tb 1 with the ones the run asks for, and a summary of the driving. - Eu07.BlackBox.Views: the player window, with the scenery map (tracks, signals, W4 stop points with their heading and W32, the train, the cameras), the cab, the timeline of speed against the AI's reference, the events, the timetable and the summary. - Eu07.BlackBox.Viewer: the window on its own, with options for the time, following the train and screenshots. The tapes window of the starter lists the black boxes of each session beside the Hasler tapes and opens them in the player.
This commit is contained in:
435
Eu07.BlackBox.Views/BlackBoxStrings.cs
Normal file
435
Eu07.BlackBox.Views/BlackBoxStrings.cs
Normal file
@@ -0,0 +1,435 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Eu07.BlackBox.Views;
|
||||
|
||||
/// <summary>
|
||||
/// The texts of the window, by key. The starter gives its own translations; on its
|
||||
/// own the window speaks Polish or English, as the system does.
|
||||
/// </summary>
|
||||
public interface IBlackBoxStrings
|
||||
{
|
||||
string this[string key] { get; }
|
||||
}
|
||||
|
||||
public sealed class DefaultBlackBoxStrings : IBlackBoxStrings
|
||||
{
|
||||
private static readonly Dictionary<string, string> English = new()
|
||||
{
|
||||
["Title"] = "Black box",
|
||||
["TitleOf"] = "Black box – {0}",
|
||||
["Open"] = "Open…",
|
||||
["Reload"] = "Reload",
|
||||
["Live"] = "Follow the file",
|
||||
["LiveTip"] = "Reads what the simulator adds to the file every 2 seconds",
|
||||
["Play"] = "Play",
|
||||
["Pause"] = "Pause",
|
||||
["Follow"] = "Follow the train",
|
||||
["Fit"] = "Whole map",
|
||||
["NoFile"] = "Open a black box: physicslog/*.blackbox, written with the physics logs on.",
|
||||
["Unreadable"] = "Can't read {0}: {1}",
|
||||
["Reading"] = "Reading {0}…",
|
||||
["Summary"] = "{0} · {1:0.0} km · max {2:0} km/h · driven {3} · autopilot {4} · over the AI {5} ({6} by more than {7:0} km/h, at most +{8:0} km/h) · signals {9} · at danger {10} · commands {11}",
|
||||
["NotComplete"] = "still being written, or cut short",
|
||||
["Cursor"] = "{0} · {1:0} km/h · AI {2} · limit {3}",
|
||||
["CursorNoAi"] = "{0} · {1:0} km/h · no AI data",
|
||||
["CursorOut"] = "{0} · not in a vehicle",
|
||||
["None"] = "–",
|
||||
["LimitAt"] = "{0:0} km/h in {1:0} m",
|
||||
["EventCommand"] = "{0}",
|
||||
["EventAutopilotOn"] = "Autopilot on",
|
||||
["EventAutopilotOff"] = "Autopilot off",
|
||||
["EventPassed"] = "Signal {0}: {1}, {2:0} km/h",
|
||||
["EventDanger"] = "PASSED AT DANGER {0}, {1:0} km/h, {2:0} m beyond",
|
||||
["EventInVehicle"] = "In {0}",
|
||||
["EventOutside"] = "Out of the cab of {0}",
|
||||
["EventNoVehicle"] = "Not in any vehicle",
|
||||
["EventEnd"] = "End of the recording",
|
||||
["AspectStop"] = "stop",
|
||||
["AspectFree"] = "go",
|
||||
["AspectSpeed"] = "{0:0}/{1}",
|
||||
["LegendWithin"] = "within the AI's speed",
|
||||
["LegendSlightly"] = "up to {0:0} km/h over",
|
||||
["LegendOver"] = "more over",
|
||||
["LegendAutopilot"] = "autopilot",
|
||||
["LegendNoData"] = "no AI data",
|
||||
["TimelineSpeed"] = "speed",
|
||||
["TimelineTarget"] = "AI",
|
||||
["TimelineLimit"] = "next limit",
|
||||
["BandDriving"] = "driving",
|
||||
["BandBrakes"] = "brakes",
|
||||
["BandAlerter"] = "alerter",
|
||||
["BandController"] = "controller",
|
||||
["Cab"] = "Cab",
|
||||
["CabNoData"] = "The user was in no vehicle then.",
|
||||
["CabController"] = "Master controller",
|
||||
["CabShunt"] = "Field shunting",
|
||||
["CabReverser"] = "Reverser",
|
||||
["CabForward"] = "forward",
|
||||
["CabBackward"] = "backward",
|
||||
["CabNeutral"] = "0",
|
||||
["CabTrainBrake"] = "Driver's brake valve",
|
||||
["CabLocalBrake"] = "Local brake",
|
||||
["CabReservoir"] = "Main reservoir",
|
||||
["CabCylinder"] = "Brake cylinders",
|
||||
["CabPipe"] = "Brake pipe",
|
||||
["CabCurrent"] = "Current",
|
||||
["CabVoltage"] = "Voltage",
|
||||
["CabRpm"] = "Revolutions",
|
||||
["CabLights"] = "Lights",
|
||||
["CabLightsFront"] = "front",
|
||||
["CabLightsRear"] = "rear",
|
||||
["DevBattery"] = "Battery",
|
||||
["DevMainBreaker"] = "Main breaker",
|
||||
["DevPantographFront"] = "Front pantograph",
|
||||
["DevPantographRear"] = "Rear pantograph",
|
||||
["DevConverter"] = "Converter",
|
||||
["DevCompressor"] = "Compressor",
|
||||
["DevLineContactors"] = "Line contactors",
|
||||
["DevHeating"] = "Train heating",
|
||||
["DevRadio"] = "Radio",
|
||||
["DevShuntMode"] = "Shunting mode",
|
||||
["DevDoorsLeft"] = "Left doors",
|
||||
["DevDoorsRight"] = "Right doors",
|
||||
["DevSanding"] = "Sanding",
|
||||
["DevHorn"] = "Horn",
|
||||
["DevSpringBrake"] = "Spring brake",
|
||||
["DevAlerter"] = "Alerter",
|
||||
["DevWheelSlip"] = "Wheel slip",
|
||||
["DevOverloadRelay"] = "Overload relay",
|
||||
["DevRadioStop"] = "Radio-stop",
|
||||
["DevAlarmChain"] = "Emergency brake",
|
||||
["TabEvents"] = "Events",
|
||||
["TabTimetable"] = "Timetable",
|
||||
["TabSummary"] = "Summary",
|
||||
["PanelMap"] = "Map",
|
||||
["PanelTimeline"] = "Run",
|
||||
["Relation"] = "{0} → {1}",
|
||||
["StatDistance"] = "Distance",
|
||||
["StatMaxSpeed"] = "Top speed",
|
||||
["StatDriven"] = "Driven by the user",
|
||||
["StatAutopilotSub"] = "autopilot {0}",
|
||||
["StatOverAi"] = "Over the AI",
|
||||
["StatOverAiSub"] = "{0} by >{1:0} km/h · up to +{2:0}",
|
||||
["StatSignals"] = "Signals",
|
||||
["StatSignalsSub"] = "{0} at danger",
|
||||
["StatStops"] = "Stops",
|
||||
["StatStopsSub"] = "{0} missed",
|
||||
["StatDelay"] = "Largest delay",
|
||||
["StatDelaySub"] = "leaving a station: {0} at most",
|
||||
["StatPlatform"] = "Stops off the platform",
|
||||
["StatLights"] = "Head and tail signals",
|
||||
["StatLightsRight"] = "right",
|
||||
["StatLightsSub"] = "as required all the {0} on the move",
|
||||
["StatLightsHead"] = "head {0} instead of {1}",
|
||||
["StatLightsTail"] = "tail {0} instead of {1}",
|
||||
["StatPlatformAt"] = "{0} {1:0.0} m",
|
||||
["StatPlatformNone"] = "the whole train along the platform at every stop",
|
||||
["StatHorn"] = "Horn at W6",
|
||||
["StatHornSub"] = "{0} without the horn",
|
||||
["StatAcceleration"] = "Acceleration",
|
||||
["StatAccelerationSub"] = "lateral up to {0:0.00} m/s²",
|
||||
["StatSecurity"] = "CA/SHP braking",
|
||||
["StatRecording"] = "Recording",
|
||||
["StatComplete"] = "complete",
|
||||
["StatIncomplete"] = "being written or cut short",
|
||||
["Minutes"] = "{0:+0.0;−0.0;0} min",
|
||||
["OnTime"] = "on time",
|
||||
["DelayNow"] = "delay {0}",
|
||||
["DelayStanding"] = "{0} standing at {1}",
|
||||
["DelayAfter"] = "{0} after {1}",
|
||||
["TimetableNone"] = "The user's train had no timetable.",
|
||||
["TtArrived"] = "arr. {0}",
|
||||
["TtDeparted"] = "dep. {0}",
|
||||
["TtPassed"] = "passed {0}",
|
||||
["TtMissed"] = "stop missed",
|
||||
["TtLeftEarly"] = "left early",
|
||||
["TtStopShort"] = "{0:0.0} m short",
|
||||
["TtStopPast"] = "{0:0.0} m past",
|
||||
["TtStopExact"] = "on the spot",
|
||||
["TtOnPlatform"] = "along the platform",
|
||||
["TtOffPlatform"] = "the tail {0:0.0} m off the platform",
|
||||
["TtTechnical"] = "technical stop",
|
||||
["TtStanding"] = "standing",
|
||||
["EventStopped"] = "Stop at {0}, {1}",
|
||||
["EventStationPassed"] = "Passed {0}",
|
||||
["EventStationMissed"] = "STOP MISSED: {0}",
|
||||
["EventReady"] = "{0}: time to leave",
|
||||
["EventHornSounded"] = "W6: horn sounded",
|
||||
["EventHornMissed"] = "W6: NO HORN",
|
||||
["EventCab"] = "Cab {0} of {1}",
|
||||
["EventSecurityBraking"] = "BRAKING BY {0}",
|
||||
["EventTimetable"] = "Timetable {0}, {1}",
|
||||
["CabSpeed"] = "Speed",
|
||||
["CabAiTarget"] = "AI {0:0} km/h",
|
||||
["CabAcceleration"] = "Along",
|
||||
["CabLateral"] = "Lateral",
|
||||
["CabEndFront"] = "A",
|
||||
["CabEndRear"] = "B",
|
||||
["CabDriverUser"] = "user drives",
|
||||
["CabDriverAi"] = "autopilot",
|
||||
["CabOutside"] = "outside the cab",
|
||||
["CabLightsHead"] = "head",
|
||||
["CabLightsTail"] = "tail",
|
||||
["CabSectionBrakes"] = "Brakes",
|
||||
["CabSectionDrive"] = "Traction",
|
||||
["DevVigilance"] = "CA",
|
||||
["DevCabSignal"] = "SHP",
|
||||
["DevSecurityBraking"] = "CA/SHP braking",
|
||||
["LegendStopPoint"] = "W4 stop point",
|
||||
["LegendShortStop"] = "W32 stop for shorter trains",
|
||||
["ShortStopHover"] = "W32 {0}",
|
||||
["LegendHorn"] = "W6 horn point",
|
||||
["BandVigilance"] = "CA",
|
||||
["BandCabSignal"] = "SHP",
|
||||
["StopPointHover"] = "W4 {0}",
|
||||
["PlatformHover"] = "platform {0:0} m",
|
||||
["ShortTrainsHover"] = "for trains up to {0:0} m",
|
||||
["StopHeadHover"] = "the head to stop {0:0} m before it",
|
||||
["StopMiddleHover"] = "the middle of the train to stop {0:0} m before it",
|
||||
["HornHover"] = "W6 {0} · {1:0} s",
|
||||
["ZoomIn"] = "Zoom in",
|
||||
["ZoomOut"] = "Zoom out",
|
||||
["EventCamera"] = "Camera: {0}",
|
||||
["CameraCab"] = "in the cab",
|
||||
["CameraExternal"] = "outside view",
|
||||
["CameraFree"] = "free camera",
|
||||
["CameraDebug"] = "debug camera",
|
||||
["EventCoupled"] = "Coupled {0} to {1}",
|
||||
["EventUncoupled"] = "Uncoupled {0} from {1}",
|
||||
["EventCouplingChanged"] = "{0} – {1}: {2}",
|
||||
["CouplingCoupler"] = "coupler",
|
||||
["CouplingBrakePipe"] = "brake pipe",
|
||||
["CouplingControl"] = "control",
|
||||
["CouplingPower"] = "high voltage",
|
||||
["CouplingGangway"] = "gangway",
|
||||
["CouplingMainPipe"] = "main pipe",
|
||||
["CouplingHeating"] = "heating",
|
||||
["CouplingNothing"] = "nothing",
|
||||
["BandCamera"] = "camera",
|
||||
["LegendCamera"] = "camera",
|
||||
["Events"] = "Events",
|
||||
["OnlyUser"] = "only the user's",
|
||||
["FileFilter"] = "Black box"
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, string> Polish = new()
|
||||
{
|
||||
["Title"] = "Czarna skrzynka",
|
||||
["TitleOf"] = "Czarna skrzynka – {0}",
|
||||
["Open"] = "Otwórz…",
|
||||
["Reload"] = "Odśwież",
|
||||
["Live"] = "Śledź plik",
|
||||
["LiveTip"] = "Co 2 sekundy doczytuje to, co symulator dopisał do pliku",
|
||||
["Play"] = "Odtwarzaj",
|
||||
["Pause"] = "Pauza",
|
||||
["Follow"] = "Śledź pociąg",
|
||||
["Fit"] = "Cała mapa",
|
||||
["NoFile"] = "Otwórz czarną skrzynkę: physicslog/*.blackbox, zapisywaną razem z logami fizyki.",
|
||||
["Unreadable"] = "Nie można odczytać {0}: {1}",
|
||||
["Reading"] = "Czytanie {0}…",
|
||||
["Summary"] = "{0} · {1:0.0} km · maks. {2:0} km/h · jazda {3} · autopilot {4} · ponad AI {5} (w tym {6} o więcej niż {7:0} km/h, najwyżej +{8:0} km/h) · sygnalizatory {9} · minięte na „Stój” {10} · komendy {11}",
|
||||
["NotComplete"] = "wciąż zapisywana albo ucięta",
|
||||
["Cursor"] = "{0} · {1:0} km/h · AI {2} · ograniczenie {3}",
|
||||
["CursorNoAi"] = "{0} · {1:0} km/h · brak danych AI",
|
||||
["CursorOut"] = "{0} · poza pojazdem",
|
||||
["None"] = "–",
|
||||
["LimitAt"] = "{0:0} km/h za {1:0} m",
|
||||
["EventCommand"] = "{0}",
|
||||
["EventAutopilotOn"] = "Autopilot włączony",
|
||||
["EventAutopilotOff"] = "Autopilot wyłączony",
|
||||
["EventPassed"] = "Sygnalizator {0}: {1}, {2:0} km/h",
|
||||
["EventDanger"] = "MINIĘTY NA „STÓJ” {0}, {1:0} km/h, {2:0} m za nim",
|
||||
["EventInVehicle"] = "W {0}",
|
||||
["EventOutside"] = "Poza kabiną {0}",
|
||||
["EventNoVehicle"] = "Poza pojazdami",
|
||||
["EventEnd"] = "Koniec nagrania",
|
||||
["AspectStop"] = "stój",
|
||||
["AspectFree"] = "wolna droga",
|
||||
["AspectSpeed"] = "{0:0}/{1}",
|
||||
["LegendWithin"] = "w granicach prędkości AI",
|
||||
["LegendSlightly"] = "do {0:0} km/h ponad",
|
||||
["LegendOver"] = "więcej ponad",
|
||||
["LegendAutopilot"] = "autopilot",
|
||||
["LegendNoData"] = "brak danych AI",
|
||||
["TimelineSpeed"] = "prędkość",
|
||||
["TimelineTarget"] = "AI",
|
||||
["TimelineLimit"] = "następne ograniczenie",
|
||||
["BandDriving"] = "jazda",
|
||||
["BandBrakes"] = "hamulce",
|
||||
["BandAlerter"] = "czuwak",
|
||||
["BandController"] = "nastawnik",
|
||||
["Cab"] = "Kabina",
|
||||
["CabNoData"] = "Użytkownik nie był wtedy w żadnym pojeździe.",
|
||||
["CabController"] = "Nastawnik",
|
||||
["CabShunt"] = "Bocznik",
|
||||
["CabReverser"] = "Kierunek",
|
||||
["CabForward"] = "naprzód",
|
||||
["CabBackward"] = "wstecz",
|
||||
["CabNeutral"] = "0",
|
||||
["CabTrainBrake"] = "Hamulec zespolony",
|
||||
["CabLocalBrake"] = "Hamulec pomocniczy",
|
||||
["CabReservoir"] = "Zbiornik główny",
|
||||
["CabCylinder"] = "Cylindry",
|
||||
["CabPipe"] = "Przewód główny",
|
||||
["CabCurrent"] = "Prąd",
|
||||
["CabVoltage"] = "Napięcie",
|
||||
["CabRpm"] = "Obroty",
|
||||
["CabLights"] = "Światła",
|
||||
["CabLightsFront"] = "przód",
|
||||
["CabLightsRear"] = "tył",
|
||||
["DevBattery"] = "Baterie",
|
||||
["DevMainBreaker"] = "WS",
|
||||
["DevPantographFront"] = "Pantograf przedni",
|
||||
["DevPantographRear"] = "Pantograf tylny",
|
||||
["DevConverter"] = "Przetwornica",
|
||||
["DevCompressor"] = "Sprężarka",
|
||||
["DevLineContactors"] = "Styczniki liniowe",
|
||||
["DevHeating"] = "Ogrzewanie",
|
||||
["DevRadio"] = "Radiotelefon",
|
||||
["DevShuntMode"] = "Jazda manewrowa",
|
||||
["DevDoorsLeft"] = "Drzwi lewe",
|
||||
["DevDoorsRight"] = "Drzwi prawe",
|
||||
["DevSanding"] = "Piasecznica",
|
||||
["DevHorn"] = "Syrena",
|
||||
["DevSpringBrake"] = "Hamulec sprężynowy",
|
||||
["DevAlerter"] = "Czuwak",
|
||||
["DevWheelSlip"] = "Poślizg",
|
||||
["DevOverloadRelay"] = "Nadmiarowy",
|
||||
["DevRadioStop"] = "Radiostop",
|
||||
["DevAlarmChain"] = "Hamulec bezpieczeństwa",
|
||||
["TabEvents"] = "Zdarzenia",
|
||||
["TabTimetable"] = "Rozkład",
|
||||
["TabSummary"] = "Podsumowanie",
|
||||
["PanelMap"] = "Mapa",
|
||||
["PanelTimeline"] = "Przebieg jazdy",
|
||||
["Relation"] = "{0} → {1}",
|
||||
["StatDistance"] = "Dystans",
|
||||
["StatMaxSpeed"] = "Prędkość maks.",
|
||||
["StatDriven"] = "Jazda użytkownika",
|
||||
["StatAutopilotSub"] = "autopilot {0}",
|
||||
["StatOverAi"] = "Ponad AI",
|
||||
["StatOverAiSub"] = "{0} o >{1:0} km/h · do +{2:0}",
|
||||
["StatSignals"] = "Sygnalizatory",
|
||||
["StatSignalsSub"] = "{0} na „Stój”",
|
||||
["StatStops"] = "Postoje",
|
||||
["StatStopsSub"] = "{0} pominięte",
|
||||
["StatDelay"] = "Największe opóźnienie",
|
||||
["StatDelaySub"] = "przy odjeździe: najwyżej {0}",
|
||||
["StatPlatform"] = "Postoje poza peronem",
|
||||
["StatLights"] = "Sygnały czoła i końca",
|
||||
["StatLightsRight"] = "zgodne",
|
||||
["StatLightsSub"] = "jak trzeba przez całe {0} jazdy",
|
||||
["StatLightsHead"] = "czoło {0} zamiast {1}",
|
||||
["StatLightsTail"] = "koniec {0} zamiast {1}",
|
||||
["StatPlatformAt"] = "{0} {1:0.0} m",
|
||||
["StatPlatformNone"] = "na każdym postoju cały skład przy peronie",
|
||||
["StatHorn"] = "Trąbienie na W6",
|
||||
["StatHornSub"] = "{0} bez trąbienia",
|
||||
["StatAcceleration"] = "Przyspieszenie",
|
||||
["StatAccelerationSub"] = "boczne do {0:0.00} m/s²",
|
||||
["StatSecurity"] = "Hamowania CA/SHP",
|
||||
["StatRecording"] = "Nagranie",
|
||||
["StatComplete"] = "pełne",
|
||||
["StatIncomplete"] = "w trakcie zapisu lub ucięte",
|
||||
["Minutes"] = "{0:+0.0;−0.0;0} min",
|
||||
["OnTime"] = "planowo",
|
||||
["DelayNow"] = "opóźnienie {0}",
|
||||
["DelayStanding"] = "{0} stoi w: {1}",
|
||||
["DelayAfter"] = "{0} za: {1}",
|
||||
["TimetableNone"] = "Pociąg użytkownika nie miał rozkładu.",
|
||||
["TtArrived"] = "przyj. {0}",
|
||||
["TtDeparted"] = "odj. {0}",
|
||||
["TtPassed"] = "przejazd {0}",
|
||||
["TtMissed"] = "pominięty postój",
|
||||
["TtLeftEarly"] = "odjazd przed czasem",
|
||||
["TtStopShort"] = "{0:0.0} m przed miejscem",
|
||||
["TtStopPast"] = "{0:0.0} m za miejscem",
|
||||
["TtStopExact"] = "w punkt",
|
||||
["TtOnPlatform"] = "cały przy peronie",
|
||||
["TtOffPlatform"] = "koniec składu {0:0.0} m poza peronem",
|
||||
["TtTechnical"] = "postój techniczny",
|
||||
["TtStanding"] = "stoi",
|
||||
["EventStopped"] = "Postój: {0}, {1}",
|
||||
["EventStationPassed"] = "Przejazd: {0}",
|
||||
["EventStationMissed"] = "POMINIĘTY POSTÓJ: {0}",
|
||||
["EventReady"] = "{0}: czas odjazdu",
|
||||
["EventHornSounded"] = "W6: zatrąbił",
|
||||
["EventHornMissed"] = "W6: BEZ TRĄBIENIA",
|
||||
["EventCab"] = "Kabina {0} w {1}",
|
||||
["EventSecurityBraking"] = "HAMOWANIE PRZEZ {0}",
|
||||
["EventTimetable"] = "Rozkład {0}, {1}",
|
||||
["CabSpeed"] = "Prędkość",
|
||||
["CabAiTarget"] = "AI {0:0} km/h",
|
||||
["CabAcceleration"] = "Wzdłużne",
|
||||
["CabLateral"] = "Boczne",
|
||||
["CabEndFront"] = "A",
|
||||
["CabEndRear"] = "B",
|
||||
["CabDriverUser"] = "prowadzi użytkownik",
|
||||
["CabDriverAi"] = "autopilot",
|
||||
["CabOutside"] = "poza kabiną",
|
||||
["CabLightsHead"] = "czoło",
|
||||
["CabLightsTail"] = "koniec",
|
||||
["CabSectionBrakes"] = "Hamulce",
|
||||
["CabSectionDrive"] = "Napęd",
|
||||
["DevVigilance"] = "CA",
|
||||
["DevCabSignal"] = "SHP",
|
||||
["DevSecurityBraking"] = "Hamowanie CA/SHP",
|
||||
["LegendStopPoint"] = "W4 – wskaźnik zatrzymania",
|
||||
["LegendShortStop"] = "W32 – zatrzymanie krótszych pociągów",
|
||||
["ShortStopHover"] = "W32 {0}",
|
||||
["LegendHorn"] = "W6 – „trąbić”",
|
||||
["BandVigilance"] = "CA",
|
||||
["BandCabSignal"] = "SHP",
|
||||
["StopPointHover"] = "W4 {0}",
|
||||
["PlatformHover"] = "peron {0:0} m",
|
||||
["ShortTrainsHover"] = "dla pociągów do {0:0} m",
|
||||
["StopHeadHover"] = "czoło ma stanąć {0:0} m przed W4",
|
||||
["StopMiddleHover"] = "środek składu ma stanąć {0:0} m przed W4",
|
||||
["HornHover"] = "W6 {0} · {1:0} s",
|
||||
["ZoomIn"] = "Przybliż",
|
||||
["ZoomOut"] = "Oddal",
|
||||
["EventCamera"] = "Kamera: {0}",
|
||||
["CameraCab"] = "w kabinie",
|
||||
["CameraExternal"] = "widok zewnętrzny",
|
||||
["CameraFree"] = "wolna kamera",
|
||||
["CameraDebug"] = "kamera debugowania",
|
||||
["EventCoupled"] = "Sprzęgnięto {0} z {1}",
|
||||
["EventUncoupled"] = "Rozprzęgnięto {0} od {1}",
|
||||
["EventCouplingChanged"] = "{0} – {1}: {2}",
|
||||
["CouplingCoupler"] = "sprzęg",
|
||||
["CouplingBrakePipe"] = "przewód hamulcowy",
|
||||
["CouplingControl"] = "sterowanie",
|
||||
["CouplingPower"] = "WN",
|
||||
["CouplingGangway"] = "mostek",
|
||||
["CouplingMainPipe"] = "przewód zasilający",
|
||||
["CouplingHeating"] = "ogrzewanie",
|
||||
["CouplingNothing"] = "nic",
|
||||
["BandCamera"] = "kamera",
|
||||
["LegendCamera"] = "kamera",
|
||||
["Events"] = "Zdarzenia",
|
||||
["OnlyUser"] = "tylko użytkownika",
|
||||
["FileFilter"] = "Czarna skrzynka"
|
||||
};
|
||||
|
||||
private readonly Dictionary<string, string> _texts;
|
||||
|
||||
public DefaultBlackBoxStrings() : this(CultureInfo.CurrentUICulture)
|
||||
{
|
||||
}
|
||||
|
||||
public DefaultBlackBoxStrings(CultureInfo culture) : this(culture.TwoLetterISOLanguageName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Polish for "pl", English for any other language.</summary>
|
||||
public DefaultBlackBoxStrings(string languageCode)
|
||||
{
|
||||
_texts = languageCode == "pl" ? Polish : English;
|
||||
}
|
||||
|
||||
/// <summary>The keys there are texts for, for a translation to give them all.</summary>
|
||||
public static IEnumerable<string> Keys => English.Keys;
|
||||
|
||||
public string this[string key] => _texts.TryGetValue(key, out var text) ? text : English.GetValueOrDefault(key, key);
|
||||
}
|
||||
Reference in New Issue
Block a user