Add GTK+ pl translations

This commit is contained in:
Jake Smarter 2023-08-27 12:47:50 +02:00
parent 94fbbfe0dd
commit e2087adffb
9 changed files with 2589 additions and 409 deletions

View File

@ -1,9 +1,10 @@
Brandon Wright (bearoso@gmail.com)
Translators:
Tukuyomi (fr_FR)
Inukaze (es_VE)
jristz (es_ES)
Inukaze (es_VE)
Tukuyomi (fr_FR)
Jake Smarter (pl)
Tibério Vítor (pt_BR)
Sergey Basalaev (ru)
Milan Kostić (sr@latin)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.18)
project(snes9x-gtk VERSION 1.61)
project(snes9x-gtk VERSION 1.62.3)
option(USE_SLANG "Build support for Vulkan output and .slangp shaders" ON)
option(USE_XV "Build support for XVideo output" ON)
@ -25,7 +25,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)
string(APPEND DATADIR ${CMAKE_INSTALL_PREFIX} "/" ${CMAKE_INSTALL_DATAROOTDIR} "/snes9x")
string(APPEND LOCALEDIR ${CMAKE_INSTALL_PREFIX} "/" ${CMAKE_INSTALL_DATAROOTDIR} "/locale" )
string(APPEND LOCALEDIR ${CMAKE_INSTALL_PREFIX} "/" ${CMAKE_INSTALL_DATAROOTDIR} "/locale")
add_compile_definitions(HAVE_LIBPNG
ZLIB SNES9X_GTK
NETPLAY_SUPPORT
@ -35,7 +35,7 @@ add_compile_definitions(HAVE_LIBPNG
HAVE_STRINGS_H
HAVE_STDINT_H
RIGHTSHIFT_IS_SAR
"GETTEXT_PACKAGE=\"snes9x-gtk\""
"GETTEXT_PACKAGE=\"${CMAKE_PROJECT_NAME}\""
DATADIR=\"${DATADIR}\"
SNES9XLOCALEDIR=\"${LOCALEDIR}\")
set(INCLUDES ../apu/bapu ../ src)
@ -48,11 +48,12 @@ include(CheckIncludeFile)
include(FindGettext)
foreach(lang es fr_FR ja pt_BR ru sr@latin uk zh_CN)
# Add any new language to this foreach loop
foreach(lang es fr_FR ja pl pt_BR ru sr@latin uk zh_CN)
GETTEXT_PROCESS_PO_FILES(${lang} ALL PO_FILES po/${lang}.po)
install(FILES ${CMAKE_BINARY_DIR}/${lang}.gmo
DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES
RENAME snes9x-gtk.mo
RENAME ${CMAKE_PROJECT_NAME}.mo
COMPONENT translations)
endforeach()
@ -385,8 +386,8 @@ target_link_libraries(snes9x-gtk PRIVATE ${LIBS})
target_compile_definitions(snes9x-gtk PRIVATE ${DEFINES})
if(USE_SLANG)
add_executable(slang_test EXCLUDE_FROM_ALL
../vulkan/slang_helpers.cpp
add_executable(slang_test EXCLUDE_FROM_ALL
../vulkan/slang_helpers.cpp
../vulkan/slang_helpers.hpp
../vulkan/slang_shader.cpp
../vulkan/slang_shader.hpp
@ -406,7 +407,7 @@ if(USE_SLANG)
endif()
install(TARGETS snes9x-gtk)
install(FILES ../data/cheats.bml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/snes9x)
install(FILES ../data/cheats.bml DESTINATION ${DATADIR})
install(FILES data/snes9x-gtk.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES data/snes9x_16x16.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps RENAME snes9x.png)
install(FILES data/snes9x_24x24.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/24x24/apps RENAME snes9x.png)

View File

@ -1,6 +1,8 @@
[Desktop Entry]
Name=Snes9x
Comment=Super NES Emulator
Comment=A Super Nintendo emulator
Comment[de]=Ein Super NintendoEmulator
Comment[pl]=Emulator Super Nintendo
Type=Application
Categories=Game;Emulator;
MimeType=application/vnd.nintendo.snes.rom;application/x-snes-rom;

View File

@ -1,10 +0,0 @@
# please keep this list sorted alphabetically
#
es
fr_FR
ja
pt_BR
ru
sr@latin
uk
zh_CN

21
gtk/po/README.md Normal file
View File

@ -0,0 +1,21 @@
# Adding a New Language or Updating Existing Ones
1. Generate the template file. Run the shell script `updatepot.sh` or change to the `gtk` directory and run:
```sh
xgettext -f po/POTFILES.in --from-code=UTF-8 -o po/snes9x-gtk.pot -kmaybegettext -k_
```
This will update the [`snes9x-gtk.pot`](https://github.com/snes9xgit/snes9x/blob/master/gtk/po/snes9x-gtk.pot) file in this directory with the latest strings.
2. * Use the program “[poedit](https://poedit.net)” with this template or your favorite text editor with a spell checker to create a new translation or,
* merge the templates new strings into an existing `.po` file with [`msgmerge`](https://www.gnu.org/software/gettext/manual/html_node/msgmerge-Invocation.html "Invoking the msgmerge Program") first and then edit the new `.po` file.
3. In order to test your translations, you will have to build the message catalog and install Snes9x. Add the language code for your language to the list on the line in [`gtk/CMakeLists.txt`](https://github.com/snes9xgit/snes9x/blob/master/gtk/CMakeLists.txt) beginning with:
```cmake
# Add any new language to this foreach loop
foreach(lang es fr …
```
# How to Add Language Files and What to Translate
Please avoid suffixing your language code with a region code unless it is absolutely necessary. In other words, if you know of any region specific distinctions in your language then and only then add the affected messages exclusively in a `xx_XX.po` file. Do not duplicate all messages from the base `xx.po` language file in a `xx_XX.po` language file but only translate region specific messages.
# Source File Encoding
Make sure all source files are UTF-8 encoded.

View File

@ -1,10 +0,0 @@
To add a new language or update the existing ones:
Generate the template file:
Run the shell script "updatepot.sh" or change to the gtk directory and run 'xgettext -f po/POTFILES.in -o po/snes9x-gtk.pot -kmaybegettext'.
This will update the snes9x-gtk.pot file in this directory with the latest strings.
Use the program 'poedit' to use this template and create a new translation or merge the template's new strings into an existing .po file.
To automatically build the message catalog and install with the program, add the language code to the list on the line in gtk/CMakeLists.txt beginning with:
foreach(lang es fr ...

1935
gtk/po/pl.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
#!/bin/sh
cd $(dirname "${0}")/..
xgettext -f po/POTFILES.in -o po/snes9x-gtk.pot -kmaybegettext
xgettext -f po/POTFILES.in --from-code=UTF-8 -o po/snes9x-gtk.pot -kmaybegettext -k_
cd -