CleverRaven/Cataclysm-DDA — pull request #8310 by BevapDin (2014-07-23 09:55:05+00:00)
Title: Some assorted fixes, mostly translation related

- Adds a check for the default ammo, it should be a item type id.
- Suppress melee messages from npcs when the player can't see them.
- Move the translation before calling `str_to_illiterate_str`.
- Added missing translation marker at some places.

@HuXTUS about `str_to_illiterate_str`:

While that function is actually a very nice idea (and should be extended to the computer system), it prevents the string extraction for translation in its current form. Strings that should be translated are extracted from the source with the `xgettext` program (invoked in "lang/update_pot.sh"), it extracts all string literals from the source code that are used with certain functions - currently only string used by the `_`, `ngettext` and `pgettext` function are extracted. The program will not extract strings that are used for other functions like `str_to_illiterate_str`. That means `str_to_illiterate_str("Choose a gas pump.")` - the string is not extracted for translation and never given to the translators and never actually translated. I moved the translation before the call to `str_to_illiterate_str`.

Alternatively: I guess one could perhaps add a the extraction from `str_to_illiterate_str` to the invocation of `xgettext` in "lang/update_pot.sh".

Also, don't apply it to the *format* string used as first argument to string_format, that's dangerous as the resulting gibberish might invoke unexpected formatting (and refer to more arguments than there are given). I changed the function to never create or return '%', therefor no formatting is done. (There is also a format ('%n') that writes the data back into the arguments.)

Shall the two messages of the `mattack::brandish` be translated (currently not done) - it's used by Shia LaBeouf?