Lime3DS/src/citra_qt
Lioncash 03908116ae game_list: Handle plurals within setFilterResult() better
Qt provides an overload of tr() that operates on quantities in relation
to pluralization. This also allows the translation to adapt based on the
target language rules better.

For example, the previous code would result in an incorrect translation
for the French language (which doesn't use the pluralized version of
"result" in the case of a total of zero. While in English it's
correct to use the pluralized version of "result", that is, "results"

---

For example:

English: "0 results"

French: "0 résultat" (uses the singular form)

In French, the noun being counted is singular if the quantity is 0 or 1.
In English, on the other hand, if the noun being counted has a quantity
of 0 or N > 1, then the noun is pluralized.

---

For another example in a language that has different counting methods
than the above, consider English and Irish. Irish has a special form of
of a grammatical number called a dual. Which alters how a word is
written when N of something is 2. This won't appear in this case with a
direct number "2", but it would change if we ever used "Two" to refer to
two of something. For example:

English: "Zero results"

Irish: "Toradh ar bith"

English: "One result"

Irish: "Toradh amháin"

English: "Two results"

Irish: "Dhá thorthaí" <- Dual case

Which is an important distinction to make between singular and plural,
because in other situations, "two" on its own would be written as "dó"
in Irish. There's also a few other cases where the order the words are
placed *and* whether or not the plural or singular variant of the word
is used *and* whether or not the word is placed after or between a set
of numbers can vary. Counting in Irish also differs depending on whether or not
you're counting things (like above) or counting people, in which case an
entirely different set of numbers are used.

It's not important for this case, but it's provided as an example as to why one
should never assume the placement of values in text will be like that of
English or other languages. Some languages have very different ways to
represent counting, and breaking up the translated string like this
isn't advisable because it makes it extremely difficult to get right
depending on what language a translator is translating text into due to
the ambiguity of the strings being presented for translation.

In this case a translator would see three fragmented strings on
Transifex (and not necessarily grouped beside one another, but even
then, it would still be annoying to decipher):

- "of"
- "result"
- "results"

There is no way a translator is going to know what those sets of words
are actually used for unless they look at the code to see what is being
done with them (which they shouldn't have to do).
2018-09-21 17:45:14 -05:00
..
applets citra_qt: Add length validation 2018-07-10 13:05:13 +08:00
camera Fix compile errors 2018-07-26 13:23:25 +02:00
configuration citra_qt: add Camera tab to "System" category 2018-09-15 14:19:45 +08:00
debugger Prefix all size_t with std:: 2018-09-06 16:03:28 -04:00
multiplayer Merge pull request #4010 from zhaowenlan1779/statusbar-retheme 2018-07-30 10:35:42 -06:00
updater reformat all files with clang-format 2018-06-29 16:56:12 +03:00
util Antialias game list compatibility pixmaps 2018-09-17 19:00:28 +05:30
aboutdialog.cpp Port #942 from yuzu: "qt: Minor cleanup-related changes" 2018-08-24 17:14:09 +02:00
aboutdialog.h Clean up aboutdialog.h 2018-08-25 14:45:50 +02:00
aboutdialog.ui citra-qt: Add build date in about dialog 2018-06-18 21:21:00 +08:00
bootmanager.cpp Merge pull request #3959 from zhaowenlan1779/semi-reset 2018-09-19 21:02:59 -06:00
bootmanager.h Port #942 from yuzu: "qt: Minor cleanup-related changes" 2018-08-24 17:14:09 +02:00
citra-qt.rc Fix icon for citra qt 2017-09-03 11:26:10 -06:00
CMakeLists.txt Backport some review fixes of Lioncash 2018-09-01 15:41:46 +02:00
compatdb.cpp log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
compatdb.h enum class 2018-01-20 09:56:02 -06:00
compatdb.ui add compatibility reporting to qt frontend 2018-01-01 19:25:38 -06:00
discord_impl.cpp Add Discord Rich Presence Support (#3883) 2018-08-20 11:20:33 +02:00
discord_impl.h Add Discord Rich Presence Support (#3883) 2018-08-20 11:20:33 +02:00
discord.h Add Discord Rich Presence Support (#3883) 2018-08-20 11:20:33 +02:00
game_list_p.h Backport some review fixes of Lioncash 2018-09-01 15:41:46 +02:00
game_list.cpp game_list: Handle plurals within setFilterResult() better 2018-09-21 17:45:14 -05:00
game_list.h citra_qt, movie: allow recording/playback before emulation starts 2018-08-20 11:34:27 +02:00
hotkeys.cpp qt/hotkey: Get rid of global hotkey map instance 2018-08-25 13:43:11 +02:00
hotkeys.h qt/hotkey: Get rid of global hotkey map instance 2018-08-25 13:43:11 +02:00
hotkeys.ui Add Configure widget 2016-03-21 20:03:18 +01:00
Info.plist CMake: Fix Info.plist template for citra_qt/OSX 2016-07-21 21:33:54 +01:00
main.cpp service/apt: Implement soft reset & CloseApplication 2018-09-08 11:05:23 +08:00
main.h Prefix all size_t with std:: 2018-09-06 16:03:28 -04:00
main.ui citra_qt, movie: allow recording/playback before emulation starts 2018-08-20 11:34:27 +02:00
ui_settings.cpp Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
ui_settings.h citra_qt: record movie record/playback path 2018-08-20 11:36:00 +02:00