PocketByte / LocoLaser

Localization tool to import localized strings from external source to your project.
Apache License 2.0
31 stars 1 forks source link

ERROR: Invalid Config! Source type is "json", but expected "googlesheet" #16

Closed KamiSempai closed 3 years ago

KamiSempai commented 3 years ago

Originally posted by @avently in https://github.com/PocketByte/LocoLaser/issues/11#issuecomment-853292109

Looks like I found something unexpected. I'm trying to make a json localized files in order to use them as a source for StringProvider for custom platform. The problem is that I can't specify JSON Object in config instead of "json". Take a look at example:

This one doesn't work with error: ERROR: Invalid Config! Source type is "json", but expected "googlesheet".

{
  "platform": [
  {
      "type" : "json",
      "res_dir": "./build/generated/locolaser/json/"
    }
  ],
"source" : {
"type": "googlesheet",
....
}
}

This one works ok, but files are placed in top-level directory which I would like to avoid:

{
  "platform": [
  "json"
  ],
"source" : {
"type": "googlesheet",
....
}
}

Did I do something wrong? It's not a big deal I can move files in gradle task but other option can be useful for someone too

KamiSempai commented 3 years ago

Has to be fixed in 2.2.0

KamiSempai commented 3 years ago

Done. The new version 2.2.0 is in the way. @avently, please confirm that the issue is gone for version 2.2.0.

avently commented 3 years ago

Hm, i thought i answered already but looks like there is no my comment.

I checked at the same day and yes, it worked however i saw all strings printed to console. Is it expected? Looks like you forgot to disable debug mode or something like that

avently commented 3 years ago

Yeah, this was the comment i talked about: https://github.com/PocketByte/LocoLaser/issues/11#issuecomment-855042991

:)