chrome extension- manifest version 2 _locales issues

elianore picture elianore · Oct 20, 2012 · Viewed 13.8k times · Source

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
  }
}

Answer

RocketDonkey picture RocketDonkey · Oct 23, 2012

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).