Restructure index.js, simplify translation process

No big change
This commit is contained in:
KOWX712
2024-12-24 22:25:41 +08:00
parent 5347ac29bf
commit de43439200
22 changed files with 896 additions and 867 deletions

View File

@@ -1,4 +1,5 @@
{
"language": "English",
"header": {
"title": "Tricky Addon - Update Target List"
},

View File

@@ -15,17 +15,4 @@
2. Make a copy of `/module/webroot/locales/A-template.json`
3. Rename it to `language_code-COUNTRY_CODE.json`, e.g., `en-US.json`.
4. Translate the string value inside.
5. Add `langauge-option` into `/module/webroot/index.html`.
Format:
```xml
<button class="language-option" data-lang="language_code-COUNTRY_CODE">languageName</button>
```
Example:
```xml
<div class="language-menu">
<button class="language-option" data-lang="en-US">English</button>
</div>
```
Finally, Create a Pull Request.
6. Create a Pull Request.

View File

@@ -1,4 +1,5 @@
{
"language": "English",
"header": {
"title": "Tricky Addon - Update Target List"
},

View File

@@ -1,4 +1,5 @@
{
"language": "Español",
"header": {
"title": "Tricky Addon - Update Target List"
},

View File

@@ -1,4 +1,5 @@
{
"language": "日本語",
"header": {
"title": "Tricky Addon - Update Target List"
},

View File

@@ -1,4 +1,5 @@
{
"language": "Русский",
"header": {
"title": "Tricky Addon - Обновить список целей"
},

View File

@@ -1,4 +1,5 @@
{
"language": "Tagalog",
"header": {
"title": "Tricky Addon - I-update ang Target List"
},

View File

@@ -1,4 +1,5 @@
{
"language": "中文(简体)",
"header": {
"title": "TS插件 - 更新目标列表"
},

View File

@@ -1,4 +1,5 @@
{
"language": "中文(繁体)",
"header": {
"title": "TS插件 - 更新目標列表"
},