feat: Initialized Project
Build / test-and-build (scribblers-linux-x64, ubuntu-latest) (push) Has been cancelled
Build / test-and-build (scribblers-macos-x64, macos-latest) (push) Has been cancelled
Build / test-and-build (scribblers-x64.exe, windows-latest) (push) Has been cancelled

This commit is contained in:
2026-05-09 09:36:38 +03:30
commit ff300a5e84
121 changed files with 46171 additions and 0 deletions
+138
View File
@@ -0,0 +1,138 @@
package translations
func initArabicTranslation() *Translation {
translation := createTranslation()
translation.IsRtl = true
translation.put("requires-js", "يحتاج هذا الموقع لصلاحيات جافاسكريبت ليعمل.")
translation.put("start-the-game", "إستعدوا!")
translation.put("force-start", "البدء الإجباري")
translation.put("force-restart", "الإعادة الإجبارية")
translation.put("game-not-started-title", "لم تبدإ اللعبة بعد")
translation.put("waiting-for-host-to-start", "الرجاء إنتظار المنظم لبدإ اللعبة")
translation.put("now-spectating-title", "أنت الآن متفرج")
translation.put("now-spectating-text", "يمكنك الخروج من وضع المتفرج بالضغط على زر العين أعلاه")
translation.put("now-participating-title", "أنت الآن مشارك")
translation.put("now-participating-text", "يمكنك دخول وضع المتفرج بالضغط على زر العين أعلاه")
translation.put("spectation-requested-title", "تم طلب وضع المتفرج")
translation.put("spectation-requested-text", "ستكون متفرجا بعد هذه الجولة.")
translation.put("participation-requested-title", "تم طلب المشاركة")
translation.put("participation-requested-text", "ستكون مشاركا بعد هذه الجولة.")
translation.put("spectation-request-cancelled-title", "تم إلغاء طلب وضع المتفرج")
translation.put("spectation-request-cancelled-text", "تم إلغاء وضع المتفرج, ستبقى مشاركا.")
translation.put("participation-request-cancelled-title", "تم إلغاء طلب المشاركة")
translation.put("participation-request-cancelled-text", "تم إلغاء طلب المشاركة ستبقى متفرجا.")
translation.put("round", "الجولة")
translation.put("toggle-soundeffects", "تشغيل/إيقاف مؤثرات الصوتية")
translation.put("toggle-pen-pressure", "تشغيل/إيقاف ضغط القلم")
translation.put("change-your-name", "إسم الشهرة")
translation.put("randomize", "إختيار عشوائي")
translation.put("apply", "تطبيق")
translation.put("save", "حفظ")
translation.put("toggle-fullscreen", "وضع ملء الشاشة")
translation.put("toggle-spectate", "تشغيل/إيقاف وضع المتفرج")
translation.put("show-help", "عرض المساعدة")
translation.put("votekick-a-player", "تصويت لطرد اللاعب")
translation.put("last-turn", "(آخر دور %s)")
translation.put("drawer-kicked", "بما أن اللاعب المطرود كان يرسم, لن يأخذ أي منكم نقاط")
translation.put("self-kicked", "تم طردك")
translation.put("kick-vote", "(%s/%s) اللاعبين الذين صوتو لطرد %s.")
translation.put("player-kicked", "اللاعب تم طرده.")
translation.put("owner-change", "%s هو الآن مالك الردهة")
translation.put("change-lobby-settings-tooltip", "تغيير إعدادات الردهة")
translation.put("change-lobby-settings-title", "إعدادات الردهة")
translation.put("lobby-settings-changed", "تم تغيير إعدادات الردهة")
translation.put("advanced-settings", "إعدادات متقدمة")
translation.put("chill", "هادئة")
translation.put("competitive", "تنافسية")
translation.put("chill-alt", "مع أن السرعة تكافأ, إلا أنه لا بأس إن كنت أبطأ قليلا.\nالنقاط الأساسية مرتفعة نسبيا, ركز على الإستمتاع!")
translation.put("competitive-alt", "كلما كنت أسرع, حصلت على نقاط أكثر.\nالنقاط الأساسية أقل بكثير, و الإنخفاض أسرع.")
translation.put("score-calculation", "النقاط")
translation.put("word-language", "اللغة")
translation.put("drawing-time-setting", "وقت الرسم")
translation.put("rounds-setting", "الجولات")
translation.put("max-players-setting", "الحد الأقصى للاعبين")
translation.put("public-lobby-setting", "ردهة عامة")
translation.put("custom-words", "كلمات مخصصة")
translation.put("custom-words-info", "أضف كلماتك الخاصة, فرق بينها بالفاصلة")
translation.put("custom-words-per-turn-setting", "كلمات مخصصة لكل دور")
translation.put("players-per-ip-limit-setting", "حد اللاعبين في كل IP")
translation.put("save-settings", "Save settings")
translation.put("input-contains-invalid-data", "مدخلاتك تحتوي على معلومات خاطئة")
translation.put("please-fix-invalid-input", "صحح المدخل الخاطئ و أعد المحاولة")
translation.put("create-lobby", "إنشاء ردهة")
translation.put("create-public-lobby", "إنشاء ردهة عامة")
translation.put("create-private-lobby", "إنشاء ردهة خاصة")
translation.put("refresh", "إعادة تحميل")
translation.put("join-lobby", "دخول الردهة")
translation.put("message-input-placeholder", "أدخل تخميناتك و رسائلك هنا!")
translation.put("word-choice-warning", "كلمة إذا لم تختر في الوقت")
translation.put("choose-a-word", "إختر كلمة")
translation.put("waiting-for-word-selection", "في إنتظار إختيار كلمة")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "يختار كلمة.")
translation.put("close-guess", "'%s' قريب جدا")
translation.put("correct-guess", "لقد أصبت في تخمينك للكلمة.")
translation.put("correct-guess-other-player", "'%s' اصاب في تخمين الكلمة")
translation.put("round-over", "إنتهى دورك, لم يتم إختيار أي كلمة.")
translation.put("round-over-no-word", "إنتهى دورك, الكلمة كانت '%s'")
translation.put("game-over-win", "مبارك, لقد فزت!")
translation.put("game-over-tie", "إنه تعادل")
translation.put("game-over", "لقد وضعت %s. برصيد %s نقطة.")
translation.put("change-active-color", "غير لونك الحالي")
translation.put("use-pencil", "إستخدم القلم")
translation.put("use-eraser", "إستخدم الممحاة")
translation.put("use-fill-bucket", "إستعمل الملء بالدلو (يقوم بملء مساحة معينة باللون المعين)")
translation.put("change-pencil-size-to", "غير حجم القلم/الممحاة %s")
translation.put("clear-canvas", "مسح مساحة الرسم")
translation.put("undo", "التراجع عن آخر تغيير قمت به ( لا تعمل بعد \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "فقدت الإشارة")
translation.put("connection-lost-text", "محاولة الإتصال مجددا"+
" ...\n\nتأكد من إتصالك بالإنترنت\nإذا "+
"بقي المشكل على حاله, تواصل مع المالك")
translation.put("error-connecting", "خطأ في الإتصال بالخادم")
translation.put("error-connecting-text",
"Scribble.rs لا يمكنه الإتصال بالخادم\n\nبما أن إتصالك "+
"بالأنترنت يبدو أنه يعمل, فإن\nالخادم أو الجدار الناري لم "+
"يتم ضبطه بشكل صحيح\n\nلإعادة المحاولة, قم بإعادة تحميل الصفحة.")
translation.put("message-too-long", "رسالتك طويلة جدا!")
// Help dialog
translation.put("controls", "التحكم")
translation.put("pencil", "القلم")
translation.put("eraser", "الممحاة")
translation.put("fill-bucket", "الملء بالدلو")
translation.put("switch-tools-intro", "يمكنك التحويل بين الأدوات بواسطة الاختصارات")
translation.put("switch-pencil-sizes", "يمكنك التغيير بين احجام القلم من %s إلى %s.")
// Generic words
// "close" as in "closing the window"
translation.put("close", "إغلاق")
translation.put("no", "لا")
translation.put("yes", "نعم")
translation.put("system", "النظام")
translation.put("source-code", "مصدر الكود")
translation.put("help", "المساعدة")
translation.put("submit-feedback", "الآراء")
translation.put("stats", "الحالة")
RegisterTranslation("ar", translation)
return translation
}
+130
View File
@@ -0,0 +1,130 @@
package translations
func initGermanTranslation() {
translation := createTranslation()
translation.put("requires-js", "Diese Website benötigt JavaScript um korrekt zu funktionieren.")
translation.put("start-the-game", "Mach dich bereit!")
translation.put("force-start", "Start erzwingen")
translation.put("force-restart", "Neustart erzwingen")
translation.put("game-not-started-title", "Warte auf Spielstart")
translation.put("waiting-for-host-to-start", "Bitte warte bis der Lobby Besitzer das Spiel startet.")
translation.put("now-spectating-title", "Du schaust nun zu")
translation.put("now-spectating-text", "Du kannst den Zuschauermodus verlassen, indem du das Auge oben betätigst.")
translation.put("now-participating-title", "Du nimmst nun teil")
translation.put("now-participating-text", "Du kannst den Zuschauermodus betreten, indem du das Auge oben betätigst.")
translation.put("spectation-requested-title", "Zuschauermodus angefragt")
translation.put("spectation-requested-text", "Nach diesem Zug wirst du zum Zuschauer.")
translation.put("participation-requested-title", "Teilnahme angefragt")
translation.put("participation-requested-text", "Nach diesem Zug wirst du wieder teilnehmen.")
translation.put("spectation-request-cancelled-title", "Zuschauermodusanfrage zurückgezogen")
translation.put("spectation-request-cancelled-text", "Deine Zuschauermodusanfrage wurde zurückgezogen, du nimmst weiterhin teil.")
translation.put("participation-request-cancelled-title", "Teilnahmeanfrage zurückgezogen")
translation.put("participation-request-cancelled-text", "Deine Teilnahmeanfrage wurde zurückgezogen, du schaust weiterhin zu.")
translation.put("last-turn", "(Letzter Zug: %s)")
translation.put("round", "Runde")
translation.put("toggle-soundeffects", "Sound ein- / ausschalten")
translation.put("toggle-pen-pressure", "Tablet-Stiftdruck ein- / ausschalten")
translation.put("change-your-name", "Anzeigename")
translation.put("randomize", "Zufälliger Name")
translation.put("apply", "Anwenden")
translation.put("save", "Speichern")
translation.put("toggle-fullscreen", "Vollbild aktivieren / deaktivieren")
translation.put("toggle-spectate", "Zuschauermodus aktivieren / deaktivieren")
translation.put("show-help", "Hilfe anzeigen")
translation.put("votekick-a-player", "Stimme dafür ab, einen Spieler rauszuwerfen")
translation.put("change-lobby-settings-tooltip", "Lobby-Einstellungen ändern")
translation.put("change-lobby-settings-title", "Lobby-Einstellungen")
translation.put("lobby-settings-changed", "Lobby-Einstelungen verändert")
translation.put("advanced-settings", "Erweiterte Einstellungen")
translation.put("chill", "Gemütlich")
translation.put("competitive", "Wettkampf")
translation.put("chill-alt", "Zwar wird schnell sein belohnt, aber der Fokus liegt hier eher auf Spaß.")
translation.put("competitive-alt", "Je schneller du bist, desto mehr Punkte bekommst du. Schnell sein lohnt sich also!")
translation.put("score-calculation", "Punktsystem")
translation.put("word-language", "Sprache")
translation.put("drawing-time-setting", "Zeichenzeit")
translation.put("rounds-setting", "Runden")
translation.put("max-players-setting", "Maximale Spieler")
translation.put("public-lobby-setting", "Öffentliche Lobby")
translation.put("custom-words", "Extrawörter")
translation.put("custom-words-info", "Gib hier deine Extrawörter ein und trenne einzelne Wörter mit einem Komma")
translation.put("custom-words-per-turn-setting", "Extrawörter pro Zug")
translation.put("players-per-ip-limit-setting", "Maximale Spieler pro IP")
translation.put("save-settings", "Einstellungen Speichern")
translation.put("input-contains-invalid-data", "Deine Eingaben enthalten invalide Daten:")
translation.put("please-fix-invalid-input", "Bitte korrigiere deine Eingaben und versuche es erneut.")
translation.put("create-lobby", "Lobby erstellen")
translation.put("create-public-lobby", "Public Lobby erstellen")
translation.put("create-private-lobby", "Private Lobby erstellen")
translation.put("refresh", "Aktualisieren")
translation.put("join-lobby", "Lobby beitreten")
translation.put("message-input-placeholder", "Antworten und Nachrichten hier eingeben")
translation.put("word-choice-warning", "Wort, wenn du nicht zeitig wählst")
translation.put("choose-a-word", "Wähle ein Wort")
translation.put("waiting-for-word-selection", "Warte auf Wort-Auswahl")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "wählt gerade ein Wort.")
translation.put("close-guess", "'%s' ist nah dran.")
translation.put("correct-guess", "Du hast das Wort korrekt erraten.")
translation.put("correct-guess-other-player", "'%s' hat das Wort korrekt erraten.")
translation.put("round-over", "Zug vorbei, es wurde kein Wort gewählt.")
translation.put("round-over-no-word", "Zug vorbei, das gewählte Wort war '%s'.")
translation.put("game-over-win", "Glückwunsch, du hast gewonnen!")
translation.put("game-over-tie", "Unentschieden!")
translation.put("game-over", "Du bist %s. mit %s Punkten")
translation.put("change-active-color", "Ändere die aktive Farbe")
translation.put("use-pencil", "Stift bentuzen")
translation.put("use-eraser", "Radiergummi benutzen")
translation.put("use-fill-bucket", "Fülleimer benutzen (Füllt den Zielbereich mit der gewählten Farbe)")
translation.put("change-pencil-size-to", "Ändere die Stift / Radiergummi Größe auf %s")
translation.put("clear-canvas", "Leere die Zeichenfläche")
translation.put("undo", "Mache deine letzte Änderung ungeschehen (Funktioniert nicht nach \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "Verbindung verloren!")
translation.put("connection-lost-text", "Versuche Verbindung wiederherzustellen"+
" ...\n\nStelle sicher, dass deine Internetverbindung funktioniert.\nFalls das "+
"Problem weiterhin besteht, kontaktiere den Webmaster.")
translation.put("error-connecting", "Fehler beim Verbindungsaufbau")
translation.put("error-connecting-text",
"Scribble.rs war nicht in der Lage eine Socket-Verbindung aufzubauen.\n\nZwar scheint dein "+
"Internet zu funktionieren, aber entweder wurden der Server oder \ndeine Firewall falsch konfiguriert.\n\n"+
"Versuche die Seite neu zu laden.")
translation.put("message-too-long", "Deine Nachricht ist zu lang.")
// Help dialog
translation.put("controls", "Steuerung")
translation.put("pencil", "Stift")
translation.put("eraser", "Radiergummi")
translation.put("fill-bucket", "Fülleimer")
translation.put("switch-tools-intro", "Zwischen den Werkzeugen kannst du mit Tastaturkürzel wechseln")
translation.put("switch-pencil-sizes", "Die Stiftgröße kannst du mit den Tasten %s bis %s verändern.")
// Generic words
// "close" as in "closing the window"
translation.put("close", "Schließen")
translation.put("no", "Nein")
translation.put("yes", "Ja")
translation.put("system", "System")
// Footer
translation.put("source-code", "Source Code")
translation.put("help", "Hilfe")
translation.put("submit-feedback", "Feedback")
translation.put("stats", "Status")
RegisterTranslation("de", translation)
}
+15
View File
@@ -0,0 +1,15 @@
/*
Package translations introduces a simple localization layer that can be
used by a templating engine.
Upon retrieving a localization package, values can be retrieved in both Go
code and the .html files via Get(key string). If a given key hasn't been
translated, the default localization pack will be accessed.
If the templating engine accesses non existent values, the server will panic.
This makes sure that we can't oversee the use of non-existent values.
Values must be plain text and not contain any HTML or CSS.
If values are to be inserted dynamically, placeholders can be placed with "%s".
*/
package translations
+154
View File
@@ -0,0 +1,154 @@
package translations
func initEnglishTranslation() *Translation {
translation := createTranslation()
translation.put("requires-js", "This website requires JavaScript to run properly.")
translation.put("start-the-game", "Ready up!")
translation.put("force-start", "Force Start")
translation.put("force-restart", "Force Restart")
translation.put("game-not-started-title", "Game hasn't started")
translation.put("waiting-for-host-to-start", "Please wait for your lobby host to start the game.")
translation.put("click-to-homepage", "Click here to get back to the Homepage")
translation.put("now-spectating-title", "You are now spectating")
translation.put("now-spectating-text", "You can leave the spectator mode by pressing the eye button at the top.")
translation.put("now-participating-title", "You are now participating")
translation.put("now-participating-text", "You can enter the spectator mode by pressing the eye button at the top.")
translation.put("spectation-requested-title", "Spectator mode requested")
translation.put("spectation-requested-text", "You'll be a spectator after this turn.")
translation.put("participation-requested-title", "Participation requested")
translation.put("participation-requested-text", "You'll be participating after this turn.")
translation.put("spectation-request-cancelled-title", "Spectator mode requested cancelled")
translation.put("spectation-request-cancelled-text", "Your spectation request has been cancelled, you will keep participating.")
translation.put("participation-request-cancelled-title", "Participation requested cancelled")
translation.put("participation-request-cancelled-text", "Your partiticpation request has been cancelled, you will keep spectating.")
translation.put("round", "Round")
translation.put("toggle-soundeffects", "Toggle soundeffects")
translation.put("toggle-pen-pressure", "Toggle pen pressure")
translation.put("change-your-name", "Nickname")
translation.put("randomize", "Randomize")
translation.put("apply", "Apply")
translation.put("save", "Save")
translation.put("toggle-fullscreen", "Toggle fullscreen")
translation.put("toggle-spectate", "Toggle spectator mode")
translation.put("show-help", "Show help")
translation.put("votekick-a-player", "Vote to kick a player")
translation.put("last-turn", "(Last turn: %s)")
translation.put("drawer-kicked", "Since the kicked player has been drawing, none of you will get any points this round.")
translation.put("self-kicked", "You have been kicked")
translation.put("kick-vote", "(%s/%s) players voted to kick %s.")
translation.put("player-kicked", "Player has been kicked.")
translation.put("owner-change", "%s is the new lobby owner.")
translation.put("change-lobby-settings-tooltip", "Change the lobby settings")
translation.put("change-lobby-settings-title", "Lobby settings")
translation.put("lobby-settings-changed", "Lobby settings changed")
translation.put("advanced-settings", "Advanced settings")
translation.put("chill", "Chill")
translation.put("competitive", "Competitive")
translation.put("chill-alt", "While being fast is rewarded, it's not too bad if you are little slower.\nThe base score is rather high, focus on having fun!")
translation.put("competitive-alt", "The faster you are, the more points you will get.\nThe base score is a lot lower and the decline is faster.")
translation.put("score-calculation", "Scoring")
translation.put("word-language", "Language")
translation.put("drawing-time-setting", "Drawing Time")
translation.put("rounds-setting", "Rounds")
translation.put("max-players-setting", "Maximum Players")
translation.put("public-lobby-setting", "Public Lobby")
translation.put("custom-words", "Custom Words")
translation.put("custom-words-info", "Enter your additional words, separating them by commas")
translation.put("custom-words-placeholder", "Comma, separated, word, list, here")
translation.put("custom-words-per-turn-setting", "Custom Words Per Turn")
translation.put("players-per-ip-limit-setting", "Players per IP Limit")
translation.put("save-settings", "Save settings")
translation.put("input-contains-invalid-data", "Your input contains invalid data:")
translation.put("please-fix-invalid-input", "Correct the invalid input and try again.")
translation.put("create-lobby", "Create Lobby")
translation.put("create-public-lobby", "Create Public Lobby")
translation.put("create-private-lobby", "Create Private Lobby")
translation.put("no-lobbies-yet", "There are no lobbies yet.")
translation.put("lobby-full", "Sorry, but the lobby is full.")
translation.put("lobby-ip-limit-excceeded", "Sorry, but you have exceeded the maximum number of clients per IP.")
translation.put("lobby-open-tab-exists", "It appears you already have an open tab for this lobby.")
translation.put("lobby-doesnt-exist", "The requested lobby doesn't exist")
translation.put("refresh", "Refresh")
translation.put("join-lobby", "Join Lobby")
translation.put("message-input-placeholder", "Type your guesses and messages here")
translation.put("word-choice-warning", "Word if you don't choose in time")
translation.put("choose-a-word", "Choose a word")
translation.put("waiting-for-word-selection", "Waiting for word selection")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "is choosing a word.")
translation.put("close-guess", "'%s' is very close.")
translation.put("correct-guess", "You have correctly guessed the word.")
translation.put("correct-guess-other-player", "'%s' correctly guessed the word.")
translation.put("round-over", "Turn over, no word was chosen.")
translation.put("round-over-no-word", "Turn over, the word was '%s'.")
translation.put("game-over-win", "Congratulations, you've won!")
translation.put("game-over-tie", "It's a tie!")
translation.put("game-over", "You placed %s. with %s points")
translation.put("drawer-disconnected", "Turn ended early, drawer disconnected.")
translation.put("guessers-disconnected", "Turn ended early, guessers disconnected.")
translation.put("change-active-color", "Change your active color")
translation.put("use-pencil", "Use pencil")
translation.put("use-eraser", "Use eraser")
translation.put("use-fill-bucket", "Use fill bucket (Fills the target area with the selected color)")
translation.put("change-pencil-size-to", "Change the pencil / eraser size to %s")
translation.put("clear-canvas", "Clear the canvas")
translation.put("undo", "Revert the last change you made (Doesn't work after \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "Connection lost!")
translation.put("connection-lost-text", "Attempting to reconnect"+
" ...\n\nMake sure your internet connection works.\nIf the "+
"problem persists, contact the webmaster.")
translation.put("error-connecting", "Error connecting to server")
translation.put("error-connecting-text",
"Scribble.rs couldn't establish a socket connection.\n\nWhile your internet "+
"connection seems to be working, either the\nserver or your firewall hasn't "+
"been configured correctly.\n\nTo retry, reload the page.")
translation.put("message-too-long", "Your message is too long.")
translation.put("server-shutting-down-title", "Server shutting down")
translation.put("server-shutting-down-text", "Sorry, but the server is about to shut down. Please come back at a later time.")
// Help dialog
translation.put("controls", "Controls")
translation.put("pencil", "Pencil")
translation.put("eraser", "Eraser")
translation.put("fill-bucket", "Fill bucket")
translation.put("switch-tools-intro", "You can switch between tools using shortcuts")
translation.put("switch-pencil-sizes", "You can also switch between pencil sizes using keys %s to %s.")
// Generic words
// "close" as in "closing the window"
translation.put("close", "Close")
translation.put("no", "No")
translation.put("yes", "Yes")
translation.put("system", "System")
translation.put("confirm", "Okay")
translation.put("ready", "Ready")
translation.put("join", "Join")
translation.put("ongoing", "Ongoing")
translation.put("game-over-lobby", "Game Over")
translation.put("source-code", "Source Code")
translation.put("help", "Help")
translation.put("submit-feedback", "Feedback")
translation.put("stats", "Status")
translation.put("forbidden", "Forbidden")
RegisterTranslation("en", translation)
return translation
}
+135
View File
@@ -0,0 +1,135 @@
package translations
func initSpainTranslation() {
translation := createTranslation()
translation.put("requires-js", "Este sitio web requiere JavaScript para funcionar correctamente..")
translation.put("start-the-game", "Prepárate!")
translation.put("force-start", "Inicio forzado")
translation.put("force-restart", "Force RestartReinicio forzado")
translation.put("game-not-started-title", "El juego no ha comenzado")
translation.put("waiting-for-host-to-start", "Por favor, espere a que el anfitrión de su lobby inicie el juego..")
translation.put("now-spectating-title", "Ahora estás observando")
translation.put("now-spectating-text", "Puedes salir del modo espectador presionando el botón del ojo en la parte superior.")
translation.put("now-participating-title", "Ahora estás participando")
translation.put("now-participating-text", "Puedes ingresar al modo espectador presionando el botón del ojo en la parte superior.")
translation.put("spectation-requested-title", "Se solicita modo espectador")
translation.put("spectation-requested-text", "Serás espectador después de este turno.")
translation.put("participation-requested-title", "Se solicita participación")
translation.put("participation-requested-text", "Participarás después de este turno..")
translation.put("spectation-request-cancelled-title", "Se solicitó el modo espectador cancelado")
translation.put("spectation-request-cancelled-text", "Tu solicitud de espectación ha sido cancelada, seguirás participando..")
translation.put("participation-request-cancelled-title", "Participación solicitada cancelada")
translation.put("participation-request-cancelled-text", "Tu solicitud de participación ha sido cancelada, continuarás viendo..")
translation.put("round", "Redondo")
translation.put("toggle-soundeffects", "Activar o desactivar efectos de sonido")
translation.put("toggle-pen-pressure", "Alternar la presión del lápiz")
translation.put("change-your-name", "Apodo")
translation.put("randomize", "Aleatorizar")
translation.put("apply", "Aplicar")
translation.put("save", "Ahorrar")
translation.put("toggle-fullscreen", "Cambiar a pantalla completa")
translation.put("toggle-spectate", "Activar o desactivar el modo espectador")
translation.put("show-help", "Mostrar ayuda")
translation.put("votekick-a-player", "Votar para patear a un jugador")
translation.put("last-turn", "(Último turno: %s)")
translation.put("drawer-kicked", "Dado que el jugador expulsado ha estado robando, ninguno de ustedes obtendrá puntos en esta ronda.")
translation.put("self-kicked", "Te han pateado")
translation.put("kick-vote", "(%s/%s) Los jugadores votaron para patear %s.")
translation.put("player-kicked", "El jugador ha sido expulsado.")
translation.put("owner-change", "%s es el nuevo dueño del lobby.")
translation.put("change-lobby-settings-tooltip", "Cambiar la configuración del lobby")
translation.put("change-lobby-settings-title", "Configuración del lobby")
translation.put("lobby-settings-changed", "Se cambiaron las configuraciones del lobby")
translation.put("advanced-settings", "Configuración avanzada")
translation.put("chill", "Enfriar")
translation.put("competitive", "Competitivo")
translation.put("chill-alt", "Aunque ser rápido tiene recompensa, no es tan malo si eres un poco más lento..\nLa puntuación base es bastante alta, concéntrate en divertirte.!")
translation.put("competitive-alt", "Cuanto más rápido seas, más puntos obtendrás..\nLa puntuación base es mucho más baja y el descenso es más rápido..")
translation.put("score-calculation", "Tanteo")
translation.put("word-language", "Idioma")
translation.put("drawing-time-setting", "Tiempo de dibujo")
translation.put("rounds-setting", "Rondas")
translation.put("max-players-setting", "Máximo de jugadores")
translation.put("public-lobby-setting", "Vestíbulo público")
translation.put("custom-words", "Palabras personalizadas")
translation.put("custom-words-info", "Ingrese sus palabras adicionales, separándolas por comas")
translation.put("custom-words-per-turn-setting", "Palabras personalizadas por turno")
translation.put("players-per-ip-limit-setting", "Jugadores por límite de IP")
translation.put("save-settings", "Guardar configuración")
translation.put("input-contains-invalid-data", "Su entrada contiene datos no válidos:")
translation.put("please-fix-invalid-input", "Corrija la entrada no válida y vuelva a intentarlo.")
translation.put("create-lobby", "Crear lobby")
translation.put("create-public-lobby", "Crear un lobby público")
translation.put("create-private-lobby", "Crear un lobby privado")
translation.put("refresh", "Refrescar")
translation.put("join-lobby", "Únase al lobby")
translation.put("message-input-placeholder", "Escribe tus conjeturas y mensajes aquí")
translation.put("word-choice-warning", "Palabra si no eliges a tiempo")
translation.put("choose-a-word", "Elige una palabra")
translation.put("waiting-for-word-selection", "Esperando la selección de palabras")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "está eligiendo una palabra.")
translation.put("close-guess", "'%s' está muy cerca.")
translation.put("correct-guess", "Has adivinado correctamente la palabra..")
translation.put("correct-guess-other-player", "'%s' adivinó correctamente la palabra.")
translation.put("round-over", "Dé la vuelta, no se eligió ninguna palabra.")
translation.put("round-over-no-word", "Al dar la vuelta, la palabra era '%s'.")
translation.put("game-over-win", "¡Enhorabuena, has ganado!")
translation.put("game-over-tie", "Es un empate!")
translation.put("game-over", "Quedaste en %s lugar. Con %s puntos")
translation.put("change-active-color", "Cambia tu color activo")
translation.put("use-pencil", "Usa lápiz")
translation.put("use-eraser", "Usar borrador")
translation.put("use-fill-bucket", "UUtilice el cubo de llenado (Rellena el área objetivo con el color seleccionado)")
translation.put("change-pencil-size-to", "Cambia el lápiz / tamaño del borrador a %s")
translation.put("clear-canvas", "Limpiar el lienzo")
translation.put("undo", "Revertir el último cambio realizado (No funciona después \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "Conexión perdida!")
translation.put("connection-lost-text", "Intentando reconectarse"+
" ...\n\nAsegúrese de que su conexión a Internet funcione.\n"+
"Si el problema persiste, contacte con el webmaster..")
translation.put("error-connecting", "Error al conectar con el servidor")
translation.put("error-connecting-text",
"Scribble.rs no se pudo establecer una conexión de socket.\n\nAunque su conexión "+
"a Internet parece funcionar, es posible que el servidor\no su firewall no se hayan "+
"configurado correctamente.\n\nPara volver a intentarlo, recarga la página.")
translation.put("message-too-long", "Tu mensaje es demasiado largo.")
// Help dialog
translation.put("controls", "Controles")
translation.put("pencil", "Lápiz")
translation.put("eraser", "Borrador")
translation.put("fill-bucket", "Llenar el cubo")
translation.put("switch-tools-intro", "Puede cambiar entre herramientas mediante atajos")
translation.put("switch-pencil-sizes", "También puedes cambiar entre tamaños de lápiz usando teclas %s para %s.")
// Generic words
// "close" as in "closing the window"
translation.put("close", "Cerca")
translation.put("no", "No")
translation.put("yes", "Sí")
translation.put("system", "Sistema")
translation.put("source-code", "Código fuente")
translation.put("help", "Ayuda")
translation.put("submit-feedback", "Comentario")
translation.put("stats", "Estado")
RegisterTranslation("es", translation)
}
+151
View File
@@ -0,0 +1,151 @@
package translations
func initHebrewTranslation() {
translation := createTranslation()
translation.IsRtl = true
translation.put("requires-js", "אתר זה דורש JavaScript על מנת לעבוד בצורה תקינה")
translation.put("start-the-game", "התכונן!")
translation.put("force-start", "התחל בלי לחכות לכל השחקנים")
translation.put("force-restart", "התחל מחדש")
translation.put("game-not-started-title", "המשחק לא התחיל עדיין")
translation.put("waiting-for-host-to-start", "המתן להתחלת המשחק על-ידי המארח")
translation.put("click-to-homepage", "חזור לדף הבית")
translation.put("now-spectating-title", "הינך במצב צפייה")
translation.put("now-spectating-text", "ניתן לעזוב את מצב הצפייה על-ידי לחיצה על כפתור העין למעלה")
translation.put("now-participating-title", "הינך משתתף במשחק")
translation.put("now-participating-text", "ניתן לעבור למצב צפייה על-ידי לחיצה על כפתור העין למעלה")
translation.put("spectation-requested-title", "ביקשת לעבור למצב צפייה")
translation.put("spectation-requested-text", "תעבור למצב צפייה לאחר תור זה")
translation.put("participation-requested-title", "ביקשת להשתתף במשחק")
translation.put("participation-requested-text", "תצורף למשחק לאחר תור זה")
translation.put("spectation-request-cancelled-title", "בקשת מצב צפייה בוטלה")
translation.put("spectation-request-cancelled-text", "בקשתך לעבור למצב צפייה בוטלה, תמשיך להיות משתתף במשחק")
translation.put("participation-request-cancelled-title", "בקשת השתתפות במשחק בוטלה")
translation.put("participation-request-cancelled-text", "בקשתך להשתתף במשחק בוטלה, תמשיך להיות צופה במשחק")
translation.put("round", "סיבוב")
translation.put("toggle-soundeffects", "הפעלת/כיבוי סאונד")
translation.put("toggle-pen-pressure", "הפעלת/כיבוי שליטה בלחץ העט")
translation.put("change-your-name", "כינוי")
translation.put("randomize", "אקראי")
translation.put("apply", "החל")
translation.put("save", "שמור")
translation.put("toggle-fullscreen", "מסך מלא")
translation.put("toggle-spectate", "הפעלת/כיבוי מצב צפייה")
translation.put("show-help", "הצג עזרה")
translation.put("votekick-a-player", "הצבע להרחקת שחקן")
translation.put("last-turn", "(תור אחרון: %s)")
translation.put("drawer-kicked", "השחקן שהורחק צייר, לכן אף שחקן לא ייקבל ניקוד בסיבוב זה")
translation.put("self-kicked", "הורחקת מהמשחק")
translation.put("kick-vote", "שחקנים הצביעו להרחיק את %s (%s/%s)")
translation.put("player-kicked", "שחקן הורחק מהמשחק")
translation.put("owner-change", "הוא המנהל החדש של הלובי %s")
translation.put("change-lobby-settings-tooltip", "שינוי הגדרות לובי")
translation.put("change-lobby-settings-title", "הגדרות לובי")
translation.put("lobby-settings-changed", "הגדרות לובי שונו")
translation.put("advanced-settings", "הגדרות מתקדמות")
translation.put("chill", "רגוע")
translation.put("competitive", "תחרותי")
translation.put("chill-alt", "למרות שמהירות מתוגמלת בניקוד גבוה יותר, זה לא נורא אם אתם קצת יותר איטיים.\nהציון הבסיסי גבוה יחסית, אז התמקדו בליהנות!")
translation.put("competitive-alt", "ככל שתהיו מהירים יותר, כך תקבלו יותר נקודות.\nהציון הבסיסי נמוך")
translation.put("score-calculation", "שיטת ניקוד")
translation.put("word-language", "שפה")
translation.put("drawing-time-setting", "זמן ציור")
translation.put("rounds-setting", "סיבובים")
translation.put("max-players-setting", "מספר שחקנים מקסימלי")
translation.put("public-lobby-setting", "לובי ציבורי")
translation.put("custom-words", "מילים נוספות")
translation.put("custom-words-info", "מילים נוספות מופרדות בפסיק")
translation.put("custom-words-placeholder", "מילים, מופרדות, בפסיק, כאן")
translation.put("custom-words-per-turn-setting", "מילים נוספות בכל תור")
translation.put("players-per-ip-limit-setting", "הגבלת שחקנים לכתובת IP")
translation.put("save-settings", "שמור הגדרות")
translation.put("input-contains-invalid-data", "הזנת תוכן לא חוקי")
translation.put("please-fix-invalid-input", "תקן את התוכן ונסה שנית")
translation.put("create-lobby", "יצירת לובי")
translation.put("create-public-lobby", "לובי ציבורי")
translation.put("create-private-lobby", "לובי פרטי")
translation.put("no-lobbies-yet", "אין לובים")
translation.put("lobby-full", "הלובי מלא")
translation.put("lobby-ip-limit-excceeded", "עברת את מקבלת החיבורים עבור כתובת IP")
translation.put("lobby-open-tab-exists", "נראה שכבר פתחת את לובי זה בלשונית אחרת")
translation.put("lobby-doesnt-exist", "הלובי המבוקש אינו קיים")
translation.put("refresh", "רענון")
translation.put("join-lobby", "הצטרף ללובי")
translation.put("message-input-placeholder", "כתוב כאן את הניחוש שלך")
translation.put("word-choice-warning", "המילה אם לא תבחר בזמן")
translation.put("choose-a-word", "בחר מילה")
translation.put("waiting-for-word-selection", "המתן לבחירת מילה")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "בוחר מילה")
translation.put("close-guess", "הניחוש '%s' קרוב לתשובה!")
translation.put("correct-guess", "ניחשת נכון")
translation.put("correct-guess-other-player", "'%s' ניחש נכון")
translation.put("round-over", "התור נגמר, לא נבחרה מילה")
translation.put("round-over-no-word", "התור נגמר. המילה הייתה '%s'")
translation.put("game-over-win", "כל הכבוד, ניצחת!")
translation.put("game-over-tie", "תיקו!")
translation.put("game-over", "סיימת במקום ה %s עם %s נקודות")
translation.put("drawer-disconnected", "התור הסתיים, השחקן שצייר התנתק")
translation.put("guessers-disconnected", "התור הסתיים, כל השחקנים המנחשים התנתקו")
translation.put("change-active-color", "שינוי צבע")
translation.put("use-pencil", "עיפרון")
translation.put("use-eraser", "מחק")
translation.put("use-fill-bucket", "דלי")
translation.put("change-pencil-size-to", "שינוי גודל העיפרון/מחק ל %s")
translation.put("clear-canvas", "ניקוי קאנבס")
translation.put("undo", "ביטול שינוי אחרון (לא ניתן לבטל \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "החיבור עם השרת התנתק")
translation.put("connection-lost-text", "מנסה להתחבר מחדש"+
" ...\n\nוודא שהחיבור לאינטרנט תקין")
translation.put("error-connecting", "שגיאה בהתחברות לשרת")
translation.put("error-connecting-text",
"Scribble.rs לא הצליח ליצור חיבור Socket.\n\nלמרות שנראה שחיבור האינטרנט שלך עובד, או שה\nהשרת או חומת האש שלך לא הוגדרו כראוי.\n\nכדי לנסות שוב, טען מחדש את הדף.")
translation.put("message-too-long", "ההודעה ארוכה מידי")
translation.put("server-shutting-down-title", "השרת בתהליך כיבוי")
translation.put("server-shutting-down-text", "מתנצלים אך השרת בתהליך כיבוי. נסו שוב מאוחר יותר")
// Help dialog
translation.put("controls", "כלים")
translation.put("pencil", "עיפרון")
translation.put("eraser", "מחק")
translation.put("fill-bucket", "דלי")
translation.put("switch-tools-intro", "ניתן להחליך בין הכלים השונים על-ידי שימוש בקיצורים")
translation.put("switch-pencil-sizes", "ניתן לעבור בין גדלי העיפרון/מחק השונים על-ידי שימוש בכפתורים %s עד %s")
// Generic words
// "close" as in "closing the window"
translation.put("close", "סגור")
translation.put("no", "לא")
translation.put("yes", "כן")
translation.put("system", "מערכת")
translation.put("confirm", "אישור")
translation.put("ready", "מוכן")
translation.put("join", "הצטרף")
translation.put("ongoing", "פעיל")
translation.put("game-over-lobby", "נגמר")
translation.put("source-code", "קוד מקור")
translation.put("help", "עזרה")
translation.put("submit-feedback", "משוב")
translation.put("stats", "סטטוס")
translation.put("forbidden", "לא ניתן להציג דף זה")
RegisterTranslation("he", translation)
}
+128
View File
@@ -0,0 +1,128 @@
package translations
func initPolishTranslation() {
translation := createTranslation()
translation.put("requires-js", "Ta strona wymaga włączonej obsługi JavaScript aby działć poprawnie.")
translation.put("start-the-game", "Gotowi!")
translation.put("force-start", "Wymuś Start")
translation.put("force-restart", "Wymuś Restart")
translation.put("game-not-started-title", "Gra się nie zaczęła")
translation.put("waiting-for-host-to-start", "Poczekaj aż gospodarz rozpocznie grę.")
translation.put("now-spectating-title", "Jesteś teraz widzem")
translation.put("now-spectating-text", "Możesz wyjść z trybu widza naciskając przycisk oka u góry ekranu.")
translation.put("now-participating-title", "Jesteś teraz uczestnikiem")
translation.put("now-participating-text", "Możesz wejść w tryb widza naciskając przycisk oka u góry ekranu.")
translation.put("spectation-requested-title", "Zażądany tryb widza")
translation.put("spectation-requested-text", "Staniesz się widzem po tej turze.")
translation.put("participation-requested-title", "Zażądano uczestnictwa")
translation.put("participation-requested-text", "Staniesz się uczestnikiem po tej turze.")
translation.put("spectation-request-cancelled-title", "Anulowano żądanie trybu widza")
translation.put("spectation-request-cancelled-text", "Anulowano twoje żądanie trybu widza, będziesz dalej uczestnikiem.")
translation.put("participation-request-cancelled-title", "Anulowano żądanie uczestnictwa")
translation.put("participation-request-cancelled-text", "Anulowano twoje żądanie uczestnictwa, będziesz dalej widzem.")
translation.put("round", "Runda")
translation.put("toggle-soundeffects", "Przełącz dźwięki")
translation.put("change-your-name", "Ksywka")
translation.put("randomize", "Losowo")
translation.put("apply", "Zastosuj")
translation.put("save", "Zapisz")
translation.put("toggle-fullscreen", "Przełącz pełny ekran")
translation.put("toggle-spectate", "Przełącz tryb widza")
translation.put("show-help", "Pokaż pomoc")
translation.put("votekick-a-player", "Głosuj za wykopaniem gracza")
translation.put("last-turn", "(Ostatnia tura: %s)")
translation.put("drawer-kicked", "Ponieważ wykopany gracz rysował, nikt z was nie dostanie punktów w tej rundzie.")
translation.put("self-kicked", "Zostałeś wykopany")
translation.put("kick-vote", "(%s/%s) gracze zagłosowali za wykopaniem %s.")
translation.put("player-kicked", "Gracz został wykopany.")
translation.put("owner-change", "%s jest nowym gospodarzem.")
translation.put("change-lobby-settings-tooltip", "Zmień ustawienia lobby")
translation.put("change-lobby-settings-title", "Ustawienia lobby")
translation.put("lobby-settings-changed", "Ustawienia lobby zostały zmienione")
translation.put("advanced-settings", "Ustawienia zaawansowane")
translation.put("word-language", "Język")
translation.put("drawing-time-setting", "Czas rysowania")
translation.put("rounds-setting", "Rundy")
translation.put("max-players-setting", "Maksymalna ilośc graczy")
translation.put("public-lobby-setting", "Publiczne Lobby")
translation.put("custom-words", "Własne słowa")
translation.put("custom-words-info", "Wporowadź swoje dodatkowe słowa, rozdzielone przecinkami.")
translation.put("custom-words-per-turn-setting", "Własne słowa na turę")
translation.put("players-per-ip-limit-setting", "Limit graczy na adres IP")
translation.put("save-settings", "Zapisz ustawienia")
translation.put("input-contains-invalid-data", "Twoje wprowadzone dane są nieprawidłowe:")
translation.put("please-fix-invalid-input", "Popraw błędy i sprobuj ponownie.")
translation.put("create-lobby", "Stwórz Lobby")
translation.put("create-public-lobby", "Stwórz Publiczne Lobby")
translation.put("create-private-lobby", "Stwórz Prywatne Lobby")
translation.put("refresh", "Odśwież")
translation.put("join-lobby", "Wejdź do Lobby")
translation.put("message-input-placeholder", "Tutaj wpisz swoje odpowiedzi i wiadomości")
translation.put("choose-a-word", "Wybierz słowo")
translation.put("waiting-for-word-selection", "Czekamy na wybranie słowa")
// This one doesn't use %s, since we want to make one part bold.
translation.put("is-choosing-word", "wybiera słowo.")
translation.put("close-guess", "'%s' jest bardzo blisko.")
translation.put("correct-guess", "Poprawnie zgadłeś(-aś) słowo.")
translation.put("correct-guess-other-player", "'%s' poprawnie zgadł(a) słowo.")
translation.put("round-over", "Koniec tury, nie wybrano żadnego słowa.")
translation.put("round-over-no-word", "Koniec tury, słowo to '%s'.")
translation.put("game-over-win", "Gratulacje, wygrałeś(-aś)!")
translation.put("game-over-tie", "Remis!")
translation.put("game-over", "Zająłeś %s. miejsce z %s punktami")
translation.put("change-active-color", "Zmień swój aktywny kolor")
translation.put("use-pencil", "Użyj ołówka")
translation.put("use-eraser", "Użyj gumki")
translation.put("use-fill-bucket", "Użyj wiadra (wypełnia obszar zaznaczonym kolorem)")
translation.put("change-pencil-size-to", "Zmień rozmiar ołówka / gumki na %s")
translation.put("clear-canvas", "Wyczyść kanwę")
translation.put("undo", "Cofnij ostatnią zmianę (Nie działa po \""+translation.Get("clear-canvas")+"\")")
translation.put("connection-lost", "Utracono połączenie!")
translation.put("connection-lost-text", "Próbuję pnownie połączyć"+
" ...\n\nUpewnij się, że twoje połączenie internetowe działa.\nJeśli "+
"problem się utrzymuje, skontaktuj się z administratorem.")
translation.put("error-connecting", "Błąd połączenia z serwerem")
translation.put("error-connecting-text",
"Scribble.rs nie może połączyć się z socketem.\n\nTwoje połączenie z internetem "+
"wydaje się działać, ale \nserver lub twoja zapora sieciowa nie "+
"zostały poprawnie skonfigurowane.\n\nOdśwież stronę aby spróbować ponownie.")
translation.put("message-too-long", "Twoja wiadomość jest za długa.")
// Help dialog
translation.put("controls", "Sterowanie")
translation.put("pencil", "Ołówek")
translation.put("eraser", "Gumka")
translation.put("fill-bucket", "Wiadro")
translation.put("switch-tools-intro", "Możesz przełączać się pomiędzy narzędziami za pomocą skrótów")
translation.put("switch-pencil-sizes", "Możesz też zmieniać rozmiary ołówka używają klawiszy %s do %s.")
// Generic words
// "close" as in "closing the window"
translation.put("close", "Zamknij")
translation.put("no", "Nie")
translation.put("yes", "Tak")
translation.put("system", "System")
translation.put("source-code", "Kod Żródłowy")
translation.put("help", "Pomoc")
translation.put("submit-feedback", "Opinia")
translation.put("stats", "Stan")
RegisterTranslation("pl", translation)
}
+107
View File
@@ -0,0 +1,107 @@
package translations
import (
"fmt"
"strings"
"golang.org/x/text/language"
)
// init initializes all localization packs. Each new package has to be added
// to this function.
func init() {
// We are making sure to add english first, since it's the default.
DefaultTranslation = initEnglishTranslation()
initGermanTranslation()
initPolishTranslation()
initSpainTranslation()
initArabicTranslation()
initHebrewTranslation()
}
var translationRegistry = make(map[string]*Translation)
// DefaultTranslation is the fallback translation for cases where the users
// preferred language can't be found. This value is never returned by Get, but
// has to be retrieved manually if desired. Currently, this is en-US.
var DefaultTranslation *Translation
// Translation represents key - value pairs of translated user interface
// strings.
type Translation struct {
Dictionary map[string]string
IsRtl bool
}
// Get retrieves a translated string or the default string if none could
// be found.
func (translation Translation) Get(key string) string {
value, avail := translation.Dictionary[key]
if avail {
return value
}
fallbackValue, fallbackAvail := DefaultTranslation.Dictionary[key]
if fallbackAvail {
return fallbackValue
}
panic(fmt.Sprintf("no translation value available for key '%s'", key))
}
// put adds a new key to the translation. If the key already exists, the
// server panics. This happens on startup, therefore it's safe.
func (translation Translation) put(key, value string) {
_, avail := translation.Dictionary[key]
if avail {
panic(fmt.Sprintf("Duplicate key '%s'", key))
}
if len(strings.TrimSpace(key)) != len(key) {
panic(fmt.Sprintf("Language key '%s' contains leading or trailing whitespace", key))
}
if len(strings.TrimSpace(value)) != len(value) {
panic(fmt.Sprintf("Language key '%s' value contains leading or trailing whitespace", value))
}
translation.Dictionary[key] = value
}
// GetLanguage retrieves a translation pack or nil if the desired package
// couldn't be found.
func GetLanguage(locale string) *Translation {
return translationRegistry[locale]
}
// RegisterTranslation makes adds a language to the registry and makes
// it available via Get. If the language is already registered, the server
// panics. This happens on startup, therefore it's safe.
func RegisterTranslation(locale string, translation *Translation) {
// Make sure the locale is valid.
language.MustParse(locale)
localeLowercased := strings.ToLower(locale)
_, avail := translationRegistry[localeLowercased]
if avail {
panic(fmt.Sprintf("Language '%s' has been registered multiple times", locale))
}
if DefaultTranslation != nil {
for key := range translation.Dictionary {
_, fallbackValueAvail := DefaultTranslation.Dictionary[key]
if !fallbackValueAvail {
panic(fmt.Sprintf("Language key '%s' in language '%s' has no default translation value in 'en_US'", key, locale))
}
}
}
translationRegistry[localeLowercased] = translation
}
func createTranslation() *Translation {
return &Translation{
Dictionary: make(map[string]string),
}
}
@@ -0,0 +1,19 @@
package translations
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func Test_noObsoleteKeys(t *testing.T) {
for language, translationMap := range translationRegistry {
t.Run(fmt.Sprintf("obsolete_keys_check_%s", language), func(t *testing.T) {
for key := range translationMap.Dictionary {
_, englishContainsKey := DefaultTranslation.Dictionary[key]
assert.True(t, englishContainsKey, "key %s is obsolete", key)
}
})
}
}