Browse Source

Add localized issue template messages.

FelisCatus 11 years ago
parent
commit
c2cc042de4

+ 14 - 0
omega-i18n/en/messages.json

@@ -790,6 +790,20 @@
   "popup_errorLog": {
     "message": "Error log"
   },
+  "popup_issueTemplate": {
+    "message": "\n\n\n<!-- Please write your comment ABOVE this line. -->\nSwitchyOmega $projectVersion$\n$userAgent$",
+    "description": "This is used for prefilled content of the issue created by the report issue button.",
+    "placeholders": {
+      "projectVersion": {
+        "content": "$1",
+        "example": "2.2.11"
+      },
+      "userAgent": {
+        "content": "$2",
+        "example": "Mozilla/5.0 (OS info) ..."
+      }
+    }
+  },
   "browserAction_profileDetails_PacProfile": {
     "message": "(PAC script)"
   },

+ 14 - 0
omega-i18n/zh_CN/messages.json

@@ -790,6 +790,20 @@
   "popup_errorLog": {
     "message": "错误日志"
   },
+  "popup_issueTemplate": {
+    "message": "\n\n\n<!-- ↑请在此行上方填写问题/建议详情,可用中文↑ -->\nSwitchyOmega $projectVersion$\n$userAgent$",
+    "description": "这是通过反馈问题按钮新建 Issue 时,默认填写的文字内容。",
+    "placeholders": {
+      "projectVersion": {
+        "content": "$1",
+        "example": "2.2.11"
+      },
+      "userAgent": {
+        "content": "$2",
+        "example": "Mozilla/5.0 (OS info) ..."
+      }
+    }
+  },
   "browserAction_profileDetails_PacProfile": {
     "message": "(PAC 脚本)"
   },

+ 14 - 0
omega-i18n/zh_HK/messages.json

@@ -790,6 +790,20 @@
   "popup_errorLog": {
     "message": "錯誤日誌"
   },
+  "popup_issueTemplate": {
+    "message": "\n\n\n<!-- ↑請在此行上方填寫問題/建議詳情,可用中文↑ -->\nSwitchyOmega $projectVersion$\n$userAgent$",
+    "description": "這是通過反饋問題按鈕新建 Issue 時,預設填寫的文字內容。",
+    "placeholders": {
+      "projectVersion": {
+        "content": "$1",
+        "example": "2.2.11"
+      },
+      "userAgent": {
+        "content": "$2",
+        "example": "Mozilla/5.0 (OS info) ..."
+      }
+    }
+  },
   "browserAction_profileDetails_PacProfile": {
     "message": "(PAC 指令碼)"
   },

+ 14 - 0
omega-i18n/zh_TW/messages.json

@@ -790,6 +790,20 @@
   "popup_errorLog": {
     "message": "錯誤日誌"
   },
+  "popup_issueTemplate": {
+    "message": "\n\n\n<!-- ↑請在此行上方填寫問題/建議詳情,可用中文↑ -->\nSwitchyOmega $projectVersion$\n$userAgent$",
+    "description": "這是通過反饋問題按鈕新建 Issue 時,預設填寫的文字內容。",
+    "placeholders": {
+      "projectVersion": {
+        "content": "$1",
+        "example": "2.2.11"
+      },
+      "userAgent": {
+        "content": "$2",
+        "example": "Mozilla/5.0 (OS info) ..."
+      }
+    }
+  },
   "browserAction_profileDetails_PacProfile": {
     "message": "(PAC 指令碼)"
   },

+ 3 - 1
omega-web/src/coffee/popup_basics.coffee

@@ -8,7 +8,9 @@ document.querySelector('.error-log').addEventListener 'click', (->
 
 window.OmegaTargetWebBasics.getEnv (env) ->
   url = 'https://github.com/FelisCatus/SwitchyOmega/issues/new?title=&body='
-  body = window.OmegaTargetWebBasics.getMessage('popup_issueTemplate', env)
+  body = window.OmegaTargetWebBasics.getMessage('popup_issueTemplate', [
+    env.projectVersion, env.userAgent
+  ])
   body ||= """
     \n\n
     <!-- Please write your comment ABOVE this line. -->