From b4d05034990d327c0d1dc260b9e7b1025e716991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Sat, 24 Apr 2021 16:43:24 +0200 Subject: [PATCH] add optional cmake target that compiles a Swedish translation of the main menu sync Swedish translation with source code and add missing translations --- CMakeLists.txt | 8 +++++++ Translations/sv.po | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Translations/sv.po diff --git a/CMakeLists.txt b/CMakeLists.txt index afec3c045..152427cad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ option(NIGHTLY_BUILD "Enable options for nightly build" OFF) option(USE_SDL1 "Use SDL1.2 instead of SDL2" OFF) option(NONET "Disable network" OFF) option(RUN_TESTS "Build and run tests" OFF) +option(USE_GETTEXT "Build translation files using gettext" OFF) option(DISABLE_STREAMING_MUSIC "Disable streaming music (to work around broken platform implementations)" OFF) mark_as_advanced(DISABLE_STREAMING_MUSIC) @@ -464,6 +465,13 @@ if(GPERF) find_package(Gperftools REQUIRED) endif() +if(USE_GETTEXT) + find_package(Gettext) + foreach(lang sv) + GETTEXT_PROCESS_PO_FILES(${lang} ALL PO_FILES ${CMAKE_CURRENT_LIST_DIR}/Translations/${lang}.po) + endforeach(lang) +endif() + target_include_directories(${BIN_TARGET} PRIVATE Source 3rdParty/PKWare diff --git a/Translations/sv.po b/Translations/sv.po new file mode 100644 index 000000000..a6ebb278a --- /dev/null +++ b/Translations/sv.po @@ -0,0 +1,56 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2021-04-24 16:35+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CP1252\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: _;_F\n" +"X-Poedit-Basepath: ..\n" +"X-Generator: Poedit 2.3\n" +"X-Poedit-SearchPath-0: Source\n" + +#: Source/DiabloUI/mainmenu.cpp:36 +msgid "Single Player" +msgstr "Enskild Spelare" + +#: Source/DiabloUI/mainmenu.cpp:37 +msgid "Multi Player" +msgstr "Flera Spelare" + +#: Source/DiabloUI/mainmenu.cpp:38 +msgid "Replay Intro" +msgstr "Kör om Intro" + +#: Source/DiabloUI/mainmenu.cpp:39 +msgid "Support" +msgstr "Support" + +#: Source/DiabloUI/mainmenu.cpp:41 +msgid "Credits" +msgstr "Spelskapare" + +#: Source/DiabloUI/mainmenu.cpp:42 +msgid "Exit Hellfire" +msgstr "Avsluta Hellfire" + +#: Source/DiabloUI/mainmenu.cpp:44 +msgid "Show Credits" +msgstr "Visa Spelskapare" + +#: Source/DiabloUI/mainmenu.cpp:45 +msgid "Exit Diablo" +msgstr "Avsluta Diablo" + +#: Source/DiabloUI/mainmenu.cpp:110 +msgid "" +"The Diablo introduction cinematic is only available in the full retail " +"version of Diablo. Visit https://www.gog.com/game/diablo to purchase." +msgstr "" +"Introduktionsvideon finns endast tillgänglig i den kompletta versionen " +"av Diablo. Besök https://www.gog.com/game/diablo för att köpa."