diff options
author | bunnei <[email protected]> | 2022-08-09 16:09:14 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-09 16:09:14 -0700 |
commit | 15df026d04fe093aed67b7f1a8114aea842e97bd (patch) | |
tree | f81d05ce614ea97b9930df9923dccbf49d4ad72e /dist | |
parent | ada667060ae81c49583ec8441d4330c31016b24c (diff) | |
parent | 7e0afc641c520d85780074ec685fac1d9fc3e215 (diff) | |
download | yuzu-mainline-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.gz yuzu-mainline-15df026d04fe093aed67b7f1a8114aea842e97bd.zip |
Merge pull request #8499 from Docteh/plurals
Translate english plurals
Diffstat (limited to 'dist')
-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> |