themekit: Theme Upload locales error

Hi There,

I am getting the following error when using Theme Upload.

Asset Perform Update to locales/zh_CN.json at host staging-ca-sengled-com.myshopify.com Status: 422 Unprocessable Entity Errors: Invalid locale name Key “Commands:” contains invalid characters Key “Options:” contains invalid characters Key “Examples:” contains invalid characters Key “default:” contains invalid characters Key “choices:” contains invalid characters Key “Not enough non-option arguments: got %s, need at least %s” contains invalid characters Key “Too many non-option arguments: got %s, maximum of %s” contains invalid characters Key “Missing argument value: %s” contains invalid characters Key “Missing required argument: %s” contains invalid characters Key “Unknown argument: %s” contains invalid characters Key “Invalid values:” contains invalid characters Key “Argument: %s, Given: %s, Choices: %s” contains invalid characters Key “Argument check failed: %s” contains invalid characters Key “Implications failed:” contains invalid characters Key “Not enough arguments following: %s” contains invalid characters Key “Invalid JSON config file: %s” contains invalid characters Key “Path to JSON config file” contains invalid characters Key “Show help” contains invalid characters

I don’t even have zn_CN.json in theme’s locales folder. Same error is also given for bunch of other locales files such as locales/be.json, locales/zh.json, locales/tr.json etc.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

oh! Good find! Right now default ignores are

\.git
\.hg
\.bzr
\.svn
_darcs
CVS
\.sublime-(project|workspace)
\.DS_Store
\.sass-cache
Thumbs\.db
desktop\.ini
config.yml

So I can add node_modules to this list as well. However I think that this has exposed that the path matching to make sure a file is in a correct project directory is not properly matching as well. I will have to look into that.

I re-cloned our repo and ran theme replace – it worked! no errors! But I noticed the file count was different. I realized the only different between the 2 folders was that I hadn’t run npm install on the new location. So there was no node_modules folder yet. I deleted the modules folder from my original project and ran theme replace again. No errors.

I reinstalled the node modules and added an ignore to my config.yml

ignore_files:
- /node_modules/

That did the trick. I found a directory called locales with a bunch of .json files in one of the node_mdules sub directories. Must have matched a pattern in themekit.

I should have thought of that first. Thanks for the patience here.
Maybe there should be some default ignores? I’d imagine ./.git/ is ignored already.