Lekavar / DrinkBeer

GNU Affero General Public License v3.0
8 stars 15 forks source link

Comments in lang files #49

Closed joker876 closed 2 years ago

joker876 commented 2 years ago

I suggest changing how the comments in the JSON files are used. Normally, you shouldn't use any comments in JSON, unless you do it like this:

{
  "_comment": "Creative Tab",
  "itemGroup.drinkbeer.beer": "Beer",

Another solution could be changing the file from JSON to JSONC (json with comments), where // style comments are supported, such as:

{
  // Creative Tab
  "itemGroup.drinkbeer.beer": "Beer",

This solution seems more... modern? But would likely need some code changes.

But why?

Unless you are editing the JSON file directly in a code editor (which is, trust me, PAIN), you would have to paste the comments into the translated file after it's downloaded from a localization tool. Most tools don't have any support for comments, but some do, and it would be nice to make it work properly.

Lekavar commented 2 years ago

OK