WebExtension JSON#

File format used when translating extensions for Mozilla Firefox or Google Chromium.

Note

While this format is called JSON, its specification allows to include comments, which are not part of JSON specification. Weblate currently does not support file with comments.

Example file:

{
  "hello": {
    "message": "Ahoj světe!\n",
    "description": "Description",
    "placeholders": {
      "url": {
        "content": "$1",
        "example": "https://developer.mozilla.org"
      }
    }
  },
  "orangutan": {
    "message": "Orangutan has $coUnT$ bananas",
    "description": "Description",
    "placeholders": {
      "count": {
        "content": "$1",
        "example": "5"
      }
    }
  },
  "try": {
    "message": "",
    "description": "Description"
  },
  "thanks": {
    "message": "",
    "description": "Description"
  }
}

Weblate configuration#

Typical Weblate Component configuration

File mask

_locales/*/messages.json

Monolingual base language file

_locales/en/messages.json

Template for new translations

Empty

File format

WebExtension JSON file