WebExtension JSON

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

備註

While this format is called JSON, its specification allows including "//"-style comments. Weblate does strip these comments while parsing the files and discards them when saving.

範例檔案:

{
  "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"
  }
}
支援的功能

副檔名

.json

語言能力

單語言

支援複數

Yes

支援描述

Yes

支援解釋

No

Supports context

No

Supports location

No

Supports flags

No

API 識別碼

webextension

支援唯讀字串

No

Weblate 配置

典型的 Weblate 組件配置

檔案遮罩

_locales/*/messages.json

單語言基底語言檔案

_locales/en/messages.json

新翻譯的範本

空白

檔案格式

WebExtension JSON 檔案