summaryrefslogtreecommitdiffstats
path: root/dist/english_plurals
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-08-10 01:09:14 +0200
committerGitHub <noreply@github.com>2022-08-10 01:09:14 +0200
commit15df026d04fe093aed67b7f1a8114aea842e97bd (patch)
treef81d05ce614ea97b9930df9923dccbf49d4ad72e /dist/english_plurals
parentMerge pull request #8715 from Docteh/suzhou (diff)
parentTranslate english plurals (diff)
downloadyuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.gz
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.bz2
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.lz
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.xz
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.tar.zst
yuzu-15df026d04fe093aed67b7f1a8114aea842e97bd.zip
Diffstat (limited to 'dist/english_plurals')
-rw-r--r--dist/english_plurals/README.md19
-rw-r--r--dist/english_plurals/en.ts67
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>