HabitRPG/habitrpg-shared — pull request #168 by paglias (2014-03-04 16:10:30+00:00)
Title: Translate content and api messages

I've finally started working on adding translations for content (items, quests...) and api messages.

The idea is to move all the strings from plain js strings to functions that returns strings, for example:

```
0: text: "No Weapon", notes:'No Weapon.', value:0
```

would become:

```
0:
text:
-> lang.noWeaponText,
notes:
-> lang.noWeaponNotes, value:0
```

It's the only idea that come to my mind considering that keeping plain strings the lang object would have to be avalaible at compilation time and could not be changed, so it couldn't be used on the server.

The lang object could be a first level property of the habitrpg-shared module and we might allow it to be passed as a parameter to the function that return the translated string so that it wouldn't be necessary to change `habitrpg-shared.lang` every time, for example on the server where multiple requests requiring different languages might be executed at the same moment.

Also, I've checked that when we require a module in a part of the server and then requires it in another file it should share the same object.

Anyway the biggest point is the transformation from strings to functions, are you ok with that?

@lefnire @colegleason @deilann @SabreCat