diff options
author | Kyle Kienapfel <Docteh@users.noreply.github.com> | 2022-06-25 06:16:34 +0200 |
---|---|---|
committer | Kyle K <190571+Docteh@users.noreply.github.com> | 2022-07-30 10:40:33 +0200 |
commit | 7e0afc641c520d85780074ec685fac1d9fc3e215 (patch) | |
tree | 8727502b96d1ef046b6dc689a64b0c8e350f424d /dist | |
parent | Update bug-report-feature-request.md (diff) | |
download | yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar.gz yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar.bz2 yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar.lz yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar.xz yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.tar.zst yuzu-7e0afc641c520d85780074ec685fac1d9fc3e215.zip |
Diffstat (limited to '')
-rw-r--r-- | dist/english_plurals/README.md | 19 | ||||
-rw-r--r-- | dist/english_plurals/en.ts | 67 |
2 files changed, 86 insertions, 0 deletions
diff --git a/dist/english_plurals/README.md b/dist/english_plurals/README.md new file mode 100644 index 000000000..a4954f6a6 --- /dev/null +++ b/dist/english_plurals/README.md @@ -0,0 +1,19 @@ +# English Plurals + +Qt has "Translation Rules for Plurals", small example + + // Take a source line like + tr("Building: %n shader(s)", "", i) + + // i = 1: + Building: 1 shader + // i = 2: + Building: 2 shaders + +For yuzu the source language used is English, for all other languages handling of plurals is handled by Qt and the translation collaboration site. Handling plurals in the source language (English) requires special consideration. + +With CMake flag GENERATE_QT_TRANSLATION a generated_en.ts file is created from the source. It ignored by git (`.gitignore` in the project root). It is placed in this directory so that the relative refrences with the source code is correct. + +Having the plurals look nice isn't critical, and automation to use translation collaboration sites may require specifing the project language as "Pirate English", so this has been done manually. + +The en.ts in this directory is taken from a build, edited in Qt Linguist and then committed. As the code is in XML, using the tool is not strictly required. diff --git a/dist/english_plurals/en.ts b/dist/english_plurals/en.ts new file mode 100644 index 000000000..172cd4bba --- /dev/null +++ b/dist/english_plurals/en.ts @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_US" sourcelanguage="en_US"> +<context> + <name>GMainWindow</name> + <message numerus="yes"> + <location filename="../../src/yuzu/main.cpp" line="2322"/> + <source>%n file(s) remaining</source> + <translation> + <numerusform>%n file remaining</numerusform> + <numerusform>%n files remaining</numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="../../src/yuzu/main.cpp" line="2377"/> + <source>%n file(s) were newly installed +</source> + <translation> + <numerusform>%n file was newly installed +</numerusform> + <numerusform>%n files were newly installed +</numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="../../src/yuzu/main.cpp" line="2380"/> + <source>%n file(s) were overwritten +</source> + <translation> + <numerusform>%n file was overwritten +</numerusform> + <numerusform>%n were overwritten +</numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="../../src/yuzu/main.cpp" line="2382"/> + <source>%n file(s) failed to install +</source> + <translation> + <numerusform>%n file failed to install +</numerusform> + <numerusform>%n files failed to install +</numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="../../src/yuzu/main.cpp" line="3264"/> + <source>Building: %n shader(s)</source> + <translation> + <numerusform>Building: %n shader</numerusform> + <numerusform>Building: %n shaders</numerusform> + </translation> + </message> +</context> +<context> + <name>GameListSearchField</name> + <message numerus="yes"> + <location filename="../../src/yuzu/game_list.cpp" line="87"/> + <source>%1 of %n result(s)</source> + <translation> + <numerusform>%1 of %n result</numerusform> + <numerusform>%1 of %n results</numerusform> + </translation> + </message> +</context> +</TS> |