Reputation: 319
i'm trying to update my manifest version for my extension but it gave me this problem:
default locale was specified, but _locales subtree is missing.
this is my manifest.json file, can anyone tell me where is the problem and what can i do?
{
"name": "Selected Text",
"version": "0.1",
"manifest_version": 2,
"description": "Selected Text and some changes",
"default_locale":"en",
"browser_action": {
"default_title": "S. Text",
"default_icon": "online.png",
"default_popup": "popup.html"
},
"permissions": [
"tabs",
"chrome://favicon/",
"http://*/*",
"https://*/*"
],
{
"matches": ["http://*/*"],
"js": ["selection.js"],
"run_at": "document_start",
"all_frames": true
}
}
Upvotes: 22
Views: 19740
Reputation: 37259
It sounds like you are missing the required _locales
directory in your extension root. Since you are specifying a default_locale
, you need to provide a _locales
directory, inside of which lie your internationalization options. In your case, you would need to at least have a folder titled _locales/en
, inside of which you have a messages.json
file, inside of which you would set your specific parameters (see here for more information).
Upvotes: 48
Reputation: 7998
Please check the file hierarchy. It should be something like below,
- manifest.json
- 📂 _locales 👈
- 📂 en
- messages.json
- 📂 es
- messages.json
- 📂 ...
- messages.json
Upvotes: 1
Reputation: 1
I got the same issue.
Its "default_locate": "en",
.
But then there is still an error. So just leave it out.
Upvotes: 0
Reputation: 1
"default_locale":"en",
look at this code and think. you will get solution .
Upvotes: -5