CleverRaven/Cataclysm-DDA — pull request #7167 by Wuzzy2 (2014-04-10 23:15:49+00:00)
Title: Grammatical number support for item names [WIP]

Okay, this PR plans to add proper grammatical number support for item names. This is a continuation of #7141.
It has gotten pretty far already, but is still WIP. If you use the English version, you can already try it.
If this gets finished and merged, #4649 can be closed.
#5883 is already fixed by this.

Item types as well as JSON entries get an extra entry, called “name_plural”. This is for the English (!) plural form of the string, whereas “name” is only intended for the singular form now. This has been done already.
For English, there is now a default behaviour: If name_plural is missing, the game assumed the same text as name + the letter “s”. Example: “plastic bottle” → “plastic bottles”. This behaviour only applies to English and is really just for convenience reasons.

Affected areas (grammatical number is used there successfully):
* crafting menu
* ingame messages (eg. “You drop your X”)
* construction menu
* inventory UI

To all the items in JSON (not in mods) a plural form of the name has been added.

The general “writing style” (eg. as in the inventory UI) has been changed from “5 x knife” to “5 knives” (the “x” has been removed).

TODO:
* rewrite string extraction scripts for the translations. This is important, without that the translations WILL break. I could also use some help with that.
* add plurals for items from mods, maybe
* ??? (tell me if I forgot an area where item names are printed)

Status: WIP, do not merge (yet). This touches many files and needs careful testing.