update config

main
cuongnm2 2024-04-22 15:32:16 +07:00
parent 136092a623
commit afe83085da
116 changed files with 2032 additions and 605159 deletions

View File

@ -2,7 +2,6 @@ import { _decorator, Component, Node } from 'cc';
import { NodeBase } from '../scripts/base/NodeBase'; import { NodeBase } from '../scripts/base/NodeBase';
import { Vec3, EventTouch } from 'cc'; import { Vec3, EventTouch } from 'cc';
import { UmUtil } from '../../cc-common/cc-util/UmUtil'; import { UmUtil } from '../../cc-common/cc-util/UmUtil';
import { HeroMove } from '../scripts/game_play/hero/HeroMove';
import { GameGlobalData } from '../scripts/global/GameGlobalData'; import { GameGlobalData } from '../scripts/global/GameGlobalData';
import { UmLog } from '../../cc-common/cc-util/UmLog'; import { UmLog } from '../../cc-common/cc-util/UmLog';
import { UmClientEvent } from '../../cc-common/cc-util/UmOneToMultiListener'; import { UmClientEvent } from '../../cc-common/cc-util/UmOneToMultiListener';
@ -11,14 +10,15 @@ const { ccclass, property } = _decorator;
@ccclass('JoyStick') @ccclass('JoyStick')
export class JoyStick extends NodeBase { export class JoyStick extends NodeBase {
@property(HeroMove) objectMove: HeroMove = null!;
@property(Node) handle: Node = null!; @property(Node) handle: Node = null!;
originPoint: Vec3 = Vec3.ZERO; originPoint: Vec3 = Vec3.ZERO;
joyStickSpeed: Number = 5; joyStickSpeed: Number = 5;
handleMaxDistance: number; handleMaxDistance: number;
public static IS_TOUCH_ENABLE: boolean = false;
public static DIRECTION: Vec3 = new Vec3();
start() { start() {
this.enableTouch(); this.enableTouch();
this.handleMaxDistance = (this.node.getNodeTransform().width - this.handle.getNodeTransform().width) / 2; this.handleMaxDistance = (this.node.getNodeTransform().width - this.handle.getNodeTransform().width) / 2;
@ -37,21 +37,20 @@ export class JoyStick extends NodeBase {
protected onTouchEnd(event: EventTouch) { protected onTouchEnd(event: EventTouch) {
if (!GameGlobalData.Instance.isStatePlay()) return; if (!GameGlobalData.Instance.isStatePlay()) return;
this.objectMove.isTouchEnable = false; JoyStick.IS_TOUCH_ENABLE = false;
JoyStick.DIRECTION = Vec3.ZERO;
this.handle.position = Vec3.ZERO; this.handle.position = Vec3.ZERO;
this.objectMove.directionVec3 = Vec3.ZERO;
if (GameGlobalData.Instance.isStatePlay()) UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
} }
protected onTouchCancel(event: EventTouch) { protected onTouchCancel(event: EventTouch) {
if (!GameGlobalData.Instance.isStatePlay()) return; if (!GameGlobalData.Instance.isStatePlay()) return;
this.objectMove.isTouchEnable = false; JoyStick.IS_TOUCH_ENABLE = false;
JoyStick.DIRECTION = Vec3.ZERO;
this.handle.position = Vec3.ZERO; this.handle.position = Vec3.ZERO;
this.objectMove.directionVec3 = Vec3.ZERO;
if (GameGlobalData.Instance.isStatePlay()) UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
UmClientEvent.dispatchEvent(GameDefine.EVENT_END_JOYSTICK);
} }
protected onTouchMove(event: EventTouch) { protected onTouchMove(event: EventTouch) {
@ -60,8 +59,8 @@ export class JoyStick extends NodeBase {
let direction = UmUtil.subtractTwoVector3(newPoint, this.originPoint); let direction = UmUtil.subtractTwoVector3(newPoint, this.originPoint);
direction.normalize(); direction.normalize();
direction = UmUtil.scaleVector3(direction, 5); direction = UmUtil.scaleVector3(direction, 5);
this.objectMove.isTouchEnable = true; JoyStick.IS_TOUCH_ENABLE = true;
this.objectMove.directionVec3 = direction; JoyStick.DIRECTION = direction;
GameGlobalData.Instance.lastHeroMoveDirection = direction; GameGlobalData.Instance.lastHeroMoveDirection = direction;
// UmLog.log(newPoint.toString()); // UmLog.log(newPoint.toString());
// this.currentPoint = new Vec3(newPoint); // this.currentPoint = new Vec3(newPoint);

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "1b12216c-643b-414f-9bd7-37db87404279",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,602 @@
[
{
"no": 1,
"skillid": "AS1|1",
"skillname": "AS1",
"levelskill": 1,
"visualname": "Flash",
"dmg": 150,
"mana": 10,
"range": 5
},
{
"no": 2,
"skillid": "AS1|2",
"skillname": "AS1",
"levelskill": 2,
"visualname": "Flash",
"dmg": 155,
"mana": 10,
"range": 5
},
{
"no": 3,
"skillid": "AS1|3",
"skillname": "AS1",
"levelskill": 3,
"visualname": "Flash",
"dmg": 160,
"mana": 10,
"range": 5
},
{
"no": 4,
"skillid": "AS1|4",
"skillname": "AS1",
"levelskill": 4,
"visualname": "Flash",
"dmg": 165,
"mana": 10,
"range": 5
},
{
"no": 5,
"skillid": "AS1|5",
"skillname": "AS1",
"levelskill": 5,
"visualname": "Flash",
"dmg": 170,
"mana": 10,
"range": 5
},
{
"no": 6,
"skillid": "AS1|6",
"skillname": "AS1",
"levelskill": 6,
"visualname": "Flash",
"dmg": 175,
"mana": 15,
"range": 6
},
{
"no": 7,
"skillid": "AS1|7",
"skillname": "AS1",
"levelskill": 7,
"visualname": "Flash",
"dmg": 180,
"mana": 15,
"range": 6
},
{
"no": 8,
"skillid": "AS1|8",
"skillname": "AS1",
"levelskill": 8,
"visualname": "Flash",
"dmg": 185,
"mana": 15,
"range": 6
},
{
"no": 9,
"skillid": "AS1|9",
"skillname": "AS1",
"levelskill": 9,
"visualname": "Flash",
"dmg": 190,
"mana": 15,
"range": 6
},
{
"no": 10,
"skillid": "AS1|10",
"skillname": "AS1",
"levelskill": 10,
"visualname": "Flash",
"dmg": 195,
"mana": 15,
"range": 6
},
{
"no": 11,
"skillid": "AS1|11",
"skillname": "AS1",
"levelskill": 11,
"visualname": "Flash",
"dmg": 200,
"mana": 20,
"range": 7
},
{
"no": 12,
"skillid": "AS1|12",
"skillname": "AS1",
"levelskill": 12,
"visualname": "Flash",
"dmg": 205,
"mana": 20,
"range": 7
},
{
"no": 13,
"skillid": "AS1|13",
"skillname": "AS1",
"levelskill": 13,
"visualname": "Flash",
"dmg": 210,
"mana": 20,
"range": 7
},
{
"no": 14,
"skillid": "AS1|14",
"skillname": "AS1",
"levelskill": 14,
"visualname": "Flash",
"dmg": 215,
"mana": 20,
"range": 7
},
{
"no": 15,
"skillid": "AS1|15",
"skillname": "AS1",
"levelskill": 15,
"visualname": "Flash",
"dmg": 220,
"mana": 20,
"range": 7
},
{
"no": 16,
"skillid": "AS1|16",
"skillname": "AS1",
"levelskill": 16,
"visualname": "Flash",
"dmg": 225,
"mana": 25,
"range": 8
},
{
"no": 17,
"skillid": "AS1|17",
"skillname": "AS1",
"levelskill": 17,
"visualname": "Flash",
"dmg": 230,
"mana": 25,
"range": 8
},
{
"no": 18,
"skillid": "AS1|18",
"skillname": "AS1",
"levelskill": 18,
"visualname": "Flash",
"dmg": 235,
"mana": 25,
"range": 8
},
{
"no": 19,
"skillid": "AS1|19",
"skillname": "AS1",
"levelskill": 19,
"visualname": "Flash",
"dmg": 240,
"mana": 25,
"range": 8
},
{
"no": 20,
"skillid": "AS1|20",
"skillname": "AS1",
"levelskill": 20,
"visualname": "Flash",
"dmg": 245,
"mana": 25,
"range": 8
},
{
"no": 21,
"skillid": "AS2|1",
"skillname": "AS2",
"levelskill": 1,
"visualname": "Wheel Blood",
"dmg": 50,
"mana": 15,
"range": 5
},
{
"no": 22,
"skillid": "AS2|2",
"skillname": "AS2",
"levelskill": 2,
"visualname": "Wheel Blood",
"dmg": 55,
"mana": 15,
"range": 5
},
{
"no": 23,
"skillid": "AS2|3",
"skillname": "AS2",
"levelskill": 3,
"visualname": "Wheel Blood",
"dmg": 60,
"mana": 15,
"range": 5
},
{
"no": 24,
"skillid": "AS2|4",
"skillname": "AS2",
"levelskill": 4,
"visualname": "Wheel Blood",
"dmg": 65,
"mana": 15,
"range": 5
},
{
"no": 25,
"skillid": "AS2|5",
"skillname": "AS2",
"levelskill": 5,
"visualname": "Wheel Blood",
"dmg": 70,
"mana": 15,
"range": 5
},
{
"no": 26,
"skillid": "AS2|6",
"skillname": "AS2",
"levelskill": 6,
"visualname": "Wheel Blood",
"dmg": 75,
"mana": 20,
"range": 6
},
{
"no": 27,
"skillid": "AS2|7",
"skillname": "AS2",
"levelskill": 7,
"visualname": "Wheel Blood",
"dmg": 80,
"mana": 20,
"range": 6
},
{
"no": 28,
"skillid": "AS2|8",
"skillname": "AS2",
"levelskill": 8,
"visualname": "Wheel Blood",
"dmg": 85,
"mana": 20,
"range": 6
},
{
"no": 29,
"skillid": "AS2|9",
"skillname": "AS2",
"levelskill": 9,
"visualname": "Wheel Blood",
"dmg": 90,
"mana": 20,
"range": 6
},
{
"no": 30,
"skillid": "AS2|10",
"skillname": "AS2",
"levelskill": 10,
"visualname": "Wheel Blood",
"dmg": 95,
"mana": 20,
"range": 6
},
{
"no": 31,
"skillid": "AS2|11",
"skillname": "AS2",
"levelskill": 11,
"visualname": "Wheel Blood",
"dmg": 100,
"mana": 25,
"range": 7
},
{
"no": 32,
"skillid": "AS2|12",
"skillname": "AS2",
"levelskill": 12,
"visualname": "Wheel Blood",
"dmg": 105,
"mana": 25,
"range": 7
},
{
"no": 33,
"skillid": "AS2|13",
"skillname": "AS2",
"levelskill": 13,
"visualname": "Wheel Blood",
"dmg": 110,
"mana": 25,
"range": 7
},
{
"no": 34,
"skillid": "AS2|14",
"skillname": "AS2",
"levelskill": 14,
"visualname": "Wheel Blood",
"dmg": 115,
"mana": 25,
"range": 7
},
{
"no": 35,
"skillid": "AS2|15",
"skillname": "AS2",
"levelskill": 15,
"visualname": "Wheel Blood",
"dmg": 120,
"mana": 25,
"range": 7
},
{
"no": 36,
"skillid": "AS2|16",
"skillname": "AS2",
"levelskill": 16,
"visualname": "Wheel Blood",
"dmg": 125,
"mana": 30,
"range": 8
},
{
"no": 37,
"skillid": "AS2|17",
"skillname": "AS2",
"levelskill": 17,
"visualname": "Wheel Blood",
"dmg": 130,
"mana": 30,
"range": 8
},
{
"no": 38,
"skillid": "AS2|18",
"skillname": "AS2",
"levelskill": 18,
"visualname": "Wheel Blood",
"dmg": 135,
"mana": 30,
"range": 8
},
{
"no": 39,
"skillid": "AS2|19",
"skillname": "AS2",
"levelskill": 19,
"visualname": "Wheel Blood",
"dmg": 140,
"mana": 30,
"range": 8
},
{
"no": 40,
"skillid": "AS2|20",
"skillname": "AS2",
"levelskill": 20,
"visualname": "Wheel Blood",
"dmg": 145,
"mana": 30,
"range": 8
},
{
"no": 41,
"skillid": "AS3|1",
"skillname": "AS3",
"levelskill": 1,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 5
},
{
"no": 42,
"skillid": "AS3|2",
"skillname": "AS3",
"levelskill": 2,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 5
},
{
"no": 43,
"skillid": "AS3|3",
"skillname": "AS3",
"levelskill": 3,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 5
},
{
"no": 44,
"skillid": "AS3|4",
"skillname": "AS3",
"levelskill": 4,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 5
},
{
"no": 45,
"skillid": "AS3|5",
"skillname": "AS3",
"levelskill": 5,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 5
},
{
"no": 46,
"skillid": "AS3|6",
"skillname": "AS3",
"levelskill": 6,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 30,
"range": 6
},
{
"no": 47,
"skillid": "AS3|7",
"skillname": "AS3",
"levelskill": 7,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 35,
"range": 6
},
{
"no": 48,
"skillid": "AS3|8",
"skillname": "AS3",
"levelskill": 8,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 35,
"range": 6
},
{
"no": 49,
"skillid": "AS3|9",
"skillname": "AS3",
"levelskill": 9,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 35,
"range": 6
},
{
"no": 50,
"skillid": "AS3|10",
"skillname": "AS3",
"levelskill": 10,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 35,
"range": 6
},
{
"no": 51,
"skillid": "AS3|11",
"skillname": "AS3",
"levelskill": 11,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 35,
"range": 7
},
{
"no": 52,
"skillid": "AS3|12",
"skillname": "AS3",
"levelskill": 12,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 40,
"range": 7
},
{
"no": 53,
"skillid": "AS3|13",
"skillname": "AS3",
"levelskill": 13,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 40,
"range": 7
},
{
"no": 54,
"skillid": "AS3|14",
"skillname": "AS3",
"levelskill": 14,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 40,
"range": 7
},
{
"no": 55,
"skillid": "AS3|15",
"skillname": "AS3",
"levelskill": 15,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 40,
"range": 7
},
{
"no": 56,
"skillid": "AS3|16",
"skillname": "AS3",
"levelskill": 16,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 40,
"range": 8
},
{
"no": 57,
"skillid": "AS3|17",
"skillname": "AS3",
"levelskill": 17,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 45,
"range": 8
},
{
"no": 58,
"skillid": "AS3|18",
"skillname": "AS3",
"levelskill": 18,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 45,
"range": 8
},
{
"no": 59,
"skillid": "AS3|19",
"skillname": "AS3",
"levelskill": 19,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 45,
"range": 8
},
{
"no": 60,
"skillid": "AS3|20",
"skillname": "AS3",
"levelskill": 20,
"visualname": "Iron Shield",
"dmg": 100,
"mana": 45,
"range": 8
}
]

View File

@ -2,7 +2,7 @@
"ver": "2.0.1", "ver": "2.0.1",
"importer": "json", "importer": "json",
"imported": true, "imported": true,
"uuid": "fa0fa81e-eaf8-4eb4-8a48-181676ceff01", "uuid": "1f79ea20-7780-4538-a226-42c3a3580221",
"files": [ "files": [
".json" ".json"
], ],

View File

@ -0,0 +1,100 @@
[
{
"no": 1,
"nameid": "B1",
"group": "Melee",
"atk": 30,
"hp": 300,
"atkspeed": 60,
"exp": 100,
"movespeed": 1,
"atkrange": 1,
"atkcooldown": 1,
"visualrange": 6,
"skilleffect": "Critdmg"
},
{
"no": 2,
"nameid": "B2",
"group": "Range",
"atk": 50,
"hp": 500,
"atkspeed": 50,
"exp": 200,
"movespeed": 1,
"atkrange": 6,
"atkcooldown": 1,
"visualrange": 6,
"skilleffect": "Range"
},
{
"no": 3,
"nameid": "B3",
"group": "Slow",
"atk": 100,
"hp": 1000,
"atkspeed": 30,
"exp": 300,
"movespeed": 1,
"atkrange": 6,
"atkcooldown": 1,
"visualrange": 6,
"skilleffect": "Slow"
},
{
"no": 4,
"nameid": "B4",
"group": "Spawn",
"atk": 10,
"hp": 100,
"atkspeed": 40,
"exp": 400,
"movespeed": 1,
"atkrange": 6,
"atkcooldown": 1,
"visualrange": 10,
"skilleffect": "Spawn"
},
{
"no": 5,
"nameid": "B5",
"group": "Splits",
"atk": 30,
"hp": 300,
"atkspeed": 40,
"exp": 500,
"movespeed": 1,
"atkrange": 1,
"atkcooldown": 1,
"visualrange": 10,
"skilleffect": "Splits"
},
{
"no": 6,
"nameid": "B6",
"group": "Immortal",
"atk": 80,
"hp": 800,
"atkspeed": 30,
"exp": 600,
"movespeed": 1,
"atkrange": 6,
"atkcooldown": 1,
"visualrange": 10,
"skilleffect": "Immortal"
},
{
"no": 7,
"nameid": "B7",
"group": "Heal",
"atk": 20,
"hp": 600,
"atkspeed": 30,
"exp": 700,
"movespeed": 1,
"atkrange": 6,
"atkcooldown": 1,
"visualrange": 10,
"skilleffect": "Heal"
}
]

View File

@ -2,7 +2,7 @@
"ver": "2.0.1", "ver": "2.0.1",
"importer": "json", "importer": "json",
"imported": true, "imported": true,
"uuid": "d2f18e87-d231-4e20-9e54-06a7aa2bd5c1", "uuid": "2c2109b4-c115-4d72-a456-ab1f68924a9a",
"files": [ "files": [
".json" ".json"
], ],

View File

@ -0,0 +1,92 @@
[
{
"no": 1,
"nameid": "E1",
"group": "Melee",
"atk": 1,
"hp": 10,
"exp": 1,
"atkspeed": 60,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 1,
"visualrange": 5,
"aoedmg": 0,
"aoerange": 0
},
{
"no": 2,
"nameid": "E2",
"group": "Melee",
"atk": 2,
"hp": 30,
"exp": 2,
"atkspeed": 50,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 1,
"visualrange": 5,
"aoedmg": 0,
"aoerange": 0
},
{
"no": 3,
"nameid": "E3",
"group": "Melee",
"atk": 5,
"hp": 50,
"exp": 3,
"atkspeed": 30,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 1,
"visualrange": 5,
"aoedmg": 0,
"aoerange": 0
},
{
"no": 4,
"nameid": "E4",
"group": "Range",
"atk": 1,
"hp": 10,
"exp": 4,
"atkspeed": 40,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 5,
"visualrange": 8,
"aoedmg": 0,
"aoerange": 0
},
{
"no": 5,
"nameid": "E5",
"group": "Range",
"atk": 20,
"hp": 20,
"exp": 5,
"atkspeed": 40,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 5,
"visualrange": 8,
"aoedmg": 0,
"aoerange": 0
},
{
"no": 6,
"nameid": "E6",
"group": "Range",
"atk": 40,
"hp": 40,
"exp": 10,
"atkspeed": 30,
"atkcooldown": 1,
"movespeed": 1,
"atkrange": 5,
"visualrange": 8,
"aoedmg": 0,
"aoerange": 0
}
]

View File

@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "bfc2472c-6feb-46d0-aadb-c4608480e99d",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,702 @@
[
{
"level": 1,
"atk": 10,
"hp": 100,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 30,
"managenerate": 1,
"hpheal": 2,
"exp": 10,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 2,
"atk": 15,
"hp": 110,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 30,
"managenerate": 1,
"hpheal": 2,
"exp": 20,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 3,
"atk": 20,
"hp": 120,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 30,
"managenerate": 1,
"hpheal": 2,
"exp": 30,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 4,
"atk": 25,
"hp": 130,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 30,
"managenerate": 1,
"hpheal": 2,
"exp": 50,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 5,
"atk": 30,
"hp": 140,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 30,
"managenerate": 1,
"hpheal": 2,
"exp": 80,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 6,
"atk": 35,
"hp": 150,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 35,
"managenerate": 1.25,
"hpheal": 3,
"exp": 130,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 7,
"atk": 40,
"hp": 160,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 35,
"managenerate": 1.25,
"hpheal": 3,
"exp": 210,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 8,
"atk": 45,
"hp": 170,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 35,
"managenerate": 1.25,
"hpheal": 3,
"exp": 340,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 9,
"atk": 50,
"hp": 180,
"atkrange": 5,
"atkspeed": 30,
"atkcooldown": 1,
"manamax": 35,
"managenerate": 1.25,
"hpheal": 3,
"exp": 550,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 10,
"atk": 55,
"hp": 190,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 35,
"managenerate": 1.25,
"hpheal": 3,
"exp": 890,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 11,
"atk": 60,
"hp": 200,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 40,
"managenerate": 1.5,
"hpheal": 4,
"exp": 1440,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 12,
"atk": 65,
"hp": 210,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 40,
"managenerate": 1.5,
"hpheal": 4,
"exp": 2000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 13,
"atk": 70,
"hp": 220,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 40,
"managenerate": 1.5,
"hpheal": 4,
"exp": 3000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 14,
"atk": 75,
"hp": 230,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 40,
"managenerate": 1.5,
"hpheal": 4,
"exp": 4000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 15,
"atk": 80,
"hp": 240,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 40,
"managenerate": 1.5,
"hpheal": 4,
"exp": 5000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 16,
"atk": 85,
"hp": 250,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 45,
"managenerate": 1.75,
"hpheal": 5,
"exp": 6000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 17,
"atk": 90,
"hp": 260,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 45,
"managenerate": 1.75,
"hpheal": 5,
"exp": 7000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 18,
"atk": 95,
"hp": 270,
"atkrange": 6,
"atkspeed": 35,
"atkcooldown": 1,
"manamax": 45,
"managenerate": 1.75,
"hpheal": 5,
"exp": 8000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 19,
"atk": 100,
"hp": 280,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 45,
"managenerate": 1.75,
"hpheal": 5,
"exp": 9000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 20,
"atk": 105,
"hp": 290,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 45,
"managenerate": 1.75,
"hpheal": 5,
"exp": 10000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 21,
"atk": 110,
"hp": 300,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 50,
"managenerate": 2,
"hpheal": 6,
"exp": 11000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 22,
"atk": 115,
"hp": 310,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 50,
"managenerate": 2,
"hpheal": 6,
"exp": 12000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 23,
"atk": 120,
"hp": 320,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 50,
"managenerate": 2,
"hpheal": 6,
"exp": 13000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 24,
"atk": 125,
"hp": 330,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 50,
"managenerate": 2,
"hpheal": 6,
"exp": 14000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 25,
"atk": 130,
"hp": 340,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 50,
"managenerate": 2,
"hpheal": 6,
"exp": 15000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 26,
"atk": 135,
"hp": 350,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 55,
"managenerate": 2.25,
"hpheal": 7,
"exp": 16000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 27,
"atk": 140,
"hp": 360,
"atkrange": 7,
"atkspeed": 40,
"atkcooldown": 1,
"manamax": 55,
"managenerate": 2.25,
"hpheal": 7,
"exp": 17000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 28,
"atk": 145,
"hp": 370,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 55,
"managenerate": 2.25,
"hpheal": 7,
"exp": 18000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 29,
"atk": 150,
"hp": 380,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 55,
"managenerate": 2.25,
"hpheal": 7,
"exp": 19000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 30,
"atk": 155,
"hp": 390,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 55,
"managenerate": 2.25,
"hpheal": 7,
"exp": 20000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 31,
"atk": 160,
"hp": 400,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 60,
"managenerate": 2.5,
"hpheal": 8,
"exp": 21000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 32,
"atk": 165,
"hp": 410,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 60,
"managenerate": 2.5,
"hpheal": 8,
"exp": 22000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 33,
"atk": 170,
"hp": 420,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 60,
"managenerate": 2.5,
"hpheal": 8,
"exp": 23000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 34,
"atk": 175,
"hp": 430,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 60,
"managenerate": 2.5,
"hpheal": 8,
"exp": 24000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 35,
"atk": 180,
"hp": 440,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 60,
"managenerate": 2.5,
"hpheal": 8,
"exp": 25000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 36,
"atk": 185,
"hp": 450,
"atkrange": 8,
"atkspeed": 45,
"atkcooldown": 1,
"manamax": 65,
"managenerate": 2.75,
"hpheal": 9,
"exp": 26000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 37,
"atk": 190,
"hp": 460,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 65,
"managenerate": 2.75,
"hpheal": 9,
"exp": 27000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 38,
"atk": 195,
"hp": 470,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 65,
"managenerate": 2.75,
"hpheal": 9,
"exp": 28000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 39,
"atk": 200,
"hp": 480,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 65,
"managenerate": 2.75,
"hpheal": 9,
"exp": 29000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 40,
"atk": 205,
"hp": 490,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 65,
"managenerate": 2.75,
"hpheal": 9,
"exp": 30000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 41,
"atk": 210,
"hp": 500,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 70,
"managenerate": 3,
"hpheal": 10,
"exp": 31000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 42,
"atk": 215,
"hp": 510,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 70,
"managenerate": 3,
"hpheal": 10,
"exp": 32000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 43,
"atk": 220,
"hp": 520,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 70,
"managenerate": 3,
"hpheal": 10,
"exp": 33000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 44,
"atk": 225,
"hp": 530,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 70,
"managenerate": 3,
"hpheal": 10,
"exp": 34000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 45,
"atk": 230,
"hp": 540,
"atkrange": 9,
"atkspeed": 50,
"atkcooldown": 1,
"manamax": 70,
"managenerate": 3,
"hpheal": 10,
"exp": 35000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 46,
"atk": 235,
"hp": 550,
"atkrange": 10,
"atkspeed": 55,
"atkcooldown": 1,
"manamax": 75,
"managenerate": 3.25,
"hpheal": 11,
"exp": 36000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 47,
"atk": 240,
"hp": 560,
"atkrange": 10,
"atkspeed": 55,
"atkcooldown": 1,
"manamax": 75,
"managenerate": 3.25,
"hpheal": 11,
"exp": 37000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 48,
"atk": 245,
"hp": 570,
"atkrange": 10,
"atkspeed": 55,
"atkcooldown": 1,
"manamax": 75,
"managenerate": 3.25,
"hpheal": 11,
"exp": 38000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 49,
"atk": 250,
"hp": 580,
"atkrange": 10,
"atkspeed": 55,
"atkcooldown": 1,
"manamax": 75,
"managenerate": 3.25,
"hpheal": 11,
"exp": 39000,
"aoedmg": 0,
"aoerange": 0
},
{
"level": 50,
"atk": 255,
"hp": 590,
"atkrange": 10,
"atkspeed": 55,
"atkcooldown": 1,
"manamax": 75,
"managenerate": 3.25,
"hpheal": 11,
"exp": 40000,
"aoedmg": 0,
"aoerange": 0
}
]

View File

@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "447ef86f-5b0d-4ae0-b495-b09d87b76fbf",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -714,6 +714,9 @@
}, },
"enemyType": 1, "enemyType": 1,
"attackType": 1, "attackType": 1,
"txtName": {
"__id__": 25
},
"_id": "" "_id": ""
}, },
{ {

View File

@ -1027,6 +1027,9 @@
}, },
"enemyType": 0, "enemyType": 0,
"attackType": 0, "attackType": 0,
"txtName": {
"__id__": 39
},
"hpBar": { "hpBar": {
"__id__": 13 "__id__": 13
}, },

View File

@ -308,6 +308,22 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"heroAsset": {
"__uuid__": "447ef86f-5b0d-4ae0-b495-b09d87b76fbf",
"__expectedType__": "cc.JsonAsset"
},
"enemyAsset": {
"__uuid__": "bfc2472c-6feb-46d0-aadb-c4608480e99d",
"__expectedType__": "cc.JsonAsset"
},
"bossAsset": {
"__uuid__": "2c2109b4-c115-4d72-a456-ab1f68924a9a",
"__expectedType__": "cc.JsonAsset"
},
"activeSkillAsset": {
"__uuid__": "1f79ea20-7780-4538-a226-42c3a3580221",
"__expectedType__": "cc.JsonAsset"
},
"_id": "efUPh4ToxFSahkyqnNPLgu" "_id": "efUPh4ToxFSahkyqnNPLgu"
}, },
{ {
@ -4345,7 +4361,7 @@
"__id__": 136 "__id__": 136
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 139 "__id__": 139
@ -6813,7 +6829,6 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"objectMove": null,
"handle": { "handle": {
"__id__": 190 "__id__": 190
}, },

View File

@ -59,6 +59,8 @@ export enum ENEMY_TYPE {
export enum EATTACK_TYPE { export enum EATTACK_TYPE {
MELEE = 0, MELEE = 0,
RANGE = 1, RANGE = 1,
AOE = 2,
SPAWN = 3,
} }
@ccclass('GameDefine') @ccclass('GameDefine')
@ -82,9 +84,9 @@ export class GameDefine {
public static HERO = "HERO"; public static HERO = "HERO";
//UNIT //UNIT
public static SPEED_TIME_UNIT = 1 / 250.0; // second ~ pixcel public static SPEED_TIME_UNIT = 1 / 20.0; // second ~ pixcel
public static SPEED_UNIT = 5; //pixcel public static SPEED_UNIT = 5; //pixcel
public static SQUARE_UNIT = 50; //1 square distance ~pixcel public static SQUARE_UNIT = 100; //1 square distance ~pixcel
public static DISTANCE_UNIT = GameDefine.SQUARE_UNIT;// 1 distance ~ pixcel public static DISTANCE_UNIT = GameDefine.SQUARE_UNIT;// 1 distance ~ pixcel
public static MANA_UNIT = 3;// mana ~ second public static MANA_UNIT = 3;// mana ~ second
public static readonly TIME_DELAY_DESTROY = 0.0001; public static readonly TIME_DELAY_DESTROY = 0.0001;
@ -105,5 +107,56 @@ export class GameDefine {
"3": { skillId: 3, skillName: "Skill 3", skillTime: 10 }, "3": { skillId: 3, skillName: "Skill 3", skillTime: 10 },
"4": { skillId: 4, skillName: "Skill 4", skillTime: 10 } "4": { skillId: 4, skillName: "Skill 4", skillTime: 10 }
} }
public static getEnemyType(group: string)
{
switch (group)
{
case "Melee":
return ENEMY_TYPE.MELEE;
case "Range":
return ENEMY_TYPE.RANGE;
case "Slow":
return ENEMY_TYPE.SLOW;
case "Spawn":
return ENEMY_TYPE.SPAWN;
case "Splits":
return ENEMY_TYPE.SPLIT;
case "Immortal":
return ENEMY_TYPE.IMPORTAL;
case "Heal":
return ENEMY_TYPE.HEAL;
default:
return null;
}
}
public static getAttackType(enemeType: number)
{
switch (enemeType) {
case ENEMY_TYPE.MELEE:
case ENEMY_TYPE.SPLIT:
return EATTACK_TYPE.MELEE;
case ENEMY_TYPE.RANGE:
case ENEMY_TYPE.SLOW:
case ENEMY_TYPE.IMPORTAL:
case ENEMY_TYPE.HEAL:
return EATTACK_TYPE.RANGE;
case ENEMY_TYPE.SPAWN:
return EATTACK_TYPE.SPAWN;
default:
return null;
}
}
} }

View File

@ -17,6 +17,8 @@ export class DebugFPS extends Component {
this.spfBtn?.node.on(Button.EventType.CLICK, this.setFPS, this); this.spfBtn?.node.on(Button.EventType.CLICK, this.setFPS, this);
this.physicBtn?.node.on(Button.EventType.CLICK, this.setPhysicDebug, this); this.physicBtn?.node.on(Button.EventType.CLICK, this.setPhysicDebug, this);
this.setDebugFPSActive(this.getStatus()); this.setDebugFPSActive(this.getStatus());
// PhysicsSystem2D.instance.debugDrawFlags = true ? EPhysics2DDrawFlags.Shape : EPhysics2DDrawFlags.None;
} }
private setFPS() private setFPS()

View File

@ -23,10 +23,10 @@ export class LayoutDataConfig extends Component {
GameGlobalData.Instance.changeState(EGAME_STATE.WAIT); GameGlobalData.Instance.changeState(EGAME_STATE.WAIT);
var currentHeroData = GameGlobalData.Instance.heroData.getHeroData(); var currentHeroData = GameGlobalData.Instance.heroData.getHeroData();
this.listItems[0].setData(currentHeroData.shooting.shootRange); this.listItems[0].setData(currentHeroData.shooting.AtkRange);
this.listItems[1].setData(currentHeroData.shooting.shootPending); this.listItems[1].setData(currentHeroData.shooting.AtkCoolDown);
this.listItems[2].setData(currentHeroData.shooting.shootSpeed); this.listItems[2].setData(currentHeroData.shooting.AtkSpeed);
this.listItems[3].setData(currentHeroData.shooting.damage); this.listItems[3].setData(currentHeroData.shooting.Damage);
this.listItems[4].setData(currentHeroData.hp); this.listItems[4].setData(currentHeroData.hp);
this.listItems[5].setData(currentHeroData.manaRecoveryTime); this.listItems[5].setData(currentHeroData.manaRecoveryTime);
} }
@ -43,12 +43,12 @@ export class LayoutDataConfig extends Component {
onOk() onOk()
{ {
var heroData = GameGlobalData.Instance.heroData.getHeroData(); var heroData = GameGlobalData.Instance.heroData.getHeroData();
heroData.shooting.shootRange = this.listItems[0].getData(); heroData.shooting.AtkRange = this.listItems[0].getData();
heroData.shooting.shootRange = this.listItems[0].getData(); heroData.shooting.AtkRange = this.listItems[0].getData();
heroData.shooting.shootPending = this.listItems[1].getData(); heroData.shooting.AtkCoolDown = this.listItems[1].getData();
heroData.shooting.shootSpeed = this.listItems[2].getData(); heroData.shooting.AtkSpeed = this.listItems[2].getData();
heroData.shooting.damage = this.listItems[3].getData(); heroData.shooting.Damage = this.listItems[3].getData();
heroData.hp = this.listItems[4].getData(); heroData.hp = this.listItems[4].getData();
heroData.manaRecoveryTime = this.listItems[5].getData(); heroData.manaRecoveryTime = this.listItems[5].getData();

View File

@ -33,7 +33,7 @@ export class EnemyData extends Component {
} }
defaultData(): EnemyDataInfo { defaultData(): EnemyDataInfo {
return { hp: 120, weapon: 1, shooting: { shootRange: 200, shootPending: 1000, shootSpeed: 4, damage: 8, damageRange: 1 } }; return { hp: 120, weapon: 1, shooting: { AtkRange: 200, AtkCoolDown: 1000, AtkSpeed: 4, Damage: 8, AoERange: 1 } };
} }
private getDataFromStorage(): string { private getDataFromStorage(): string {

View File

@ -1,79 +1,96 @@
import { JsonAsset } from 'cc';
import { TextAsset } from 'cc';
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import { UmLog } from '../../../cc-common/cc-util/UmLog';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('GameDataConfig') @ccclass('GameDataConfig')
export class GameDataConfig extends Component { export class GameDataConfig extends Component {
activeSkillDatas = [ @property(JsonAsset) heroAsset: JsonAsset = null!;
{ No: 1, Skill_ID: "AS1|1", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 }, @property(JsonAsset) enemyAsset: JsonAsset = null!;
{ No: 2, Skill_ID: "AS1|2", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 }, @property(JsonAsset) bossAsset: JsonAsset = null!;
{ No: 3, Skill_ID: "AS1|3", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 }, @property(JsonAsset) activeSkillAsset: JsonAsset = null!;
{ No: 4, Skill_ID: "AS1|4", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 5, Skill_ID: "AS1|5", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 6, Skill_ID: "AS1|6", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 7, Skill_ID: "AS1|7", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 8, Skill_ID: "AS1|8", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 9, Skill_ID: "AS1|9", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 10, Skill_ID: "AS1|10", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 11, Skill_ID: "AS1|11", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 12, Skill_ID: "AS1|12", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 13, Skill_ID: "AS1|13", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 14, Skill_ID: "AS1|14", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 15, Skill_ID: "AS1|15", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 16, Skill_ID: "AS1|16", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 17, Skill_ID: "AS1|17", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 18, Skill_ID: "AS1|18", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 19, Skill_ID: "AS1|19", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 20, Skill_ID: "AS1|20", Skill_Name: "AS1", LevelSkill: 1, Visual_Name: "Flash", DMG: 150, Mana: 10, Range: 5 },
{ No: 21, Skill_ID: "AS2|1", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 22, Skill_ID: "AS2|2", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 23, Skill_ID: "AS2|3", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 24, Skill_ID: "AS2|4", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 25, Skill_ID: "AS2|5", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 26, Skill_ID: "AS2|6", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 27, Skill_ID: "AS2|7", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 28, Skill_ID: "AS2|8", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 29, Skill_ID: "AS2|9", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 30, Skill_ID: "AS2|10", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 31, Skill_ID: "AS2|11", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 32, Skill_ID: "AS2|12", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 33, Skill_ID: "AS2|13", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 34, Skill_ID: "AS2|14", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 35, Skill_ID: "AS2|15", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 36, Skill_ID: "AS2|16", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 37, Skill_ID: "AS2|17", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 38, Skill_ID: "AS2|18", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 39, Skill_ID: "AS2|19", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 40, Skill_ID: "AS2|10", Skill_Name: "AS2", LevelSkill: 1, Visual_Name: "Wheel Blood", DMG: 50, Mana: 15, Range: 5 },
{ No: 41, Skill_ID: "AS3|1", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 42, Skill_ID: "AS3|2", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 43, Skill_ID: "AS3|3", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 44, Skill_ID: "AS3|4", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 45, Skill_ID: "AS3|5", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 46, Skill_ID: "AS3|6", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 47, Skill_ID: "AS3|7", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 48, Skill_ID: "AS3|8", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 49, Skill_ID: "AS3|9", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 50, Skill_ID: "AS3|10", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 51, Skill_ID: "AS3|11", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 52, Skill_ID: "AS3|12", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 53, Skill_ID: "AS3|13", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 54, Skill_ID: "AS3|14", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 55, Skill_ID: "AS3|15", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 56, Skill_ID: "AS3|16", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 57, Skill_ID: "AS3|17", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 58, Skill_ID: "AS3|18", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 59, Skill_ID: "AS3|19", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
{ No: 60, Skill_ID: "AS3|20", Skill_Name: "AS3", LevelSkill: 1, Visual_Name: "Iron Shield", DMG: 50, Mana: 30, Range: 5 },
];
activeSkillDataConfigMap = {};
enemyDataConfigMap = {};
bossDataConfigMap = {};
activeSkillDataMap = {};
protected onLoad(): void { protected onLoad(): void {
for (var i = 0; i < this.activeSkillDatas.length; i++) { this.convertActiveSkillDataConfig();
var data = this.activeSkillDatas[i]; this.convertEnemyDataConfig();
this.activeSkillDataMap[data.Skill_ID] = data; this.convertBossDataConfig();
}
convertActiveSkillDataConfig()
{
for (var i = 0; i < this.activeSkillAsset.json.length; i++) {
var data = this.activeSkillAsset.json[i];
var converData = {
No: data["no"],
Skill_ID: data["skillid"],
Skill_Name: data["skillname"],
LevelSkill: data["levelskill"],
Visual_Name: data["visualname"],
DMG: data["dmg"],
Mana: data["mana"],
Range: data["range"],
};
this.activeSkillDataConfigMap[converData.Skill_ID] = converData;
} }
// this.activeSkillAsset?.destroy();
}
convertEnemyDataConfig() {
for (var i = 0; i < this.enemyAsset.json.length; i++) {
var data = this.enemyAsset.json[i];
var converData = {
No: data["no"],
Name_Id: data["nameid"],
Group: data["group"],
Visual_Name: data["visualname"],
Atk: data["atk"],
Hp: data["hp"],
Exp: data["exp"],
AtkSpeed: data["atkspeed"],
AtkCoolDown: data["atkcooldown"],
MoveSpeed: data["movespeed"],
AtkRange: data["atkrange"],
VisualRange: data["visualrange"],
AoEDmg: data["aoedmg"],
AoERange: data["aoerange"],
};
this.enemyDataConfigMap[converData.Name_Id] = converData;
}
// this.enemyAsset.destroy();
}
convertBossDataConfig() {
for (var i = 0; i < this.bossAsset.json.length; i++) {
var data = this.bossAsset.json[i];
var converData = {
No: data["no"],
Name_Id: data["nameid"],
Group: data["group"],
Visual_Name: data["visualname"],
Atk: data["atk"],
Hp: data["hp"],
AtkSpeed: data["atkspeed"],
Exp: data["exp"],
MoveSpeed: data["movespeed"],
AtkRange: data["atkrange"],
AtkCoolDown: data["atkcooldown"],
VisualRange: data["visualrange"],
SkillDmg: data["Skilldmg"],
SkillEffect: data["skilleffect"],
};
this.bossDataConfigMap[converData.Name_Id] = converData;
}
// this.bossAsset.destroy();
} }
public ACTIVE_SKILL_USE_INFO = [ public ACTIVE_SKILL_USE_INFO = [
@ -83,7 +100,7 @@ export class GameDataConfig extends Component {
]; ];
getActiveSkill(level: number = 1): ActiveSkillData[] { getActiveSkill(level: number = 1): ActiveSkillData[] {
return [this.activeSkillDataMap[`AS1|${level}`], this.activeSkillDataMap[`AS2|${level}`], this.activeSkillDataMap[`AS3|${level}`]]; return [this.activeSkillDataConfigMap[`AS1|${level}`], this.activeSkillDataConfigMap[`AS2|${level}`], this.activeSkillDataConfigMap[`AS3|${level}`]];
} }
public HERO_CONTROL_CONFIG = { public HERO_CONTROL_CONFIG = {
@ -93,6 +110,40 @@ export class GameDataConfig extends Component {
public stageInfo = { public stageInfo = {
creep: 3, boss: 1 creep: 3, boss: 1
} }
protected start(): void {
UmLog.log("hero json => ", this.getHeroDataByLevel(1));
}
public getHeroDataByLevel(level: number): any
{
var data = this.heroAsset.json[level - 1];
var result = {
Level: data["level"],
Atk: data["atk"],
Hp: data["hp"],
AtkRange: data["atkrange"],
AtkSpeed: data["atkspeed"],
AtkCoolDown: data["atkcooldown"],
ManaMax: data["manamax"],
ManaGenerate: data["managenerate"],
HpHeal: data["hpheal"],
Exp: data["exp"],
AoEDmg: data["aoedmg"],
AoERange: data["aoerange"],
};
return result;
}
public getEnemyDataConfigById(enemyId: string)
{
return this.enemyDataConfigMap[enemyId];
}
public getBossDataConfigById(bossId: string) {
return this.bossDataConfigMap[bossId];
}
} }

View File

@ -60,7 +60,7 @@ export class HeroData extends Component {
defaultData(): HeroDataInfo defaultData(): HeroDataInfo
{ {
return { hp: 100, weapon: 1, shooting: { shootRange: 5, shootPending: 500, shootSpeed: 3, damage: 4, damageRange: 1 }, manaRecoveryTime: 10, skillSpecial: [1, 2] }; return { hp: 100, weapon: 1, shooting: { AtkRange: 5, AtkCoolDown: 500, AtkSpeed: 3, Damage: 4, AoERange: 1 }, manaRecoveryTime: 10, skillSpecial: [1, 2] };
} }
private getDataFromStorage(): string private getDataFromStorage(): string

View File

@ -66,13 +66,13 @@ export class BulletBase extends Component {
var direction = UmUtil.subtractTwoVector3(targetWorldPoint, origin); var direction = UmUtil.subtractTwoVector3(targetWorldPoint, origin);
//Actual shooting distance according to shooting range //Actual shooting distance according to shooting range
var distanceShoot = GameDefine.DISTANCE_UNIT * shootingDataInfo.shootRange; var distanceShoot = GameDefine.DISTANCE_UNIT * shootingDataInfo.AtkRange;
// UmLog.log("distanceShoot => ", distanceShoot, shootingDataInfo.shootRange); // UmLog.log("distanceShoot => ", distanceShoot, shootingDataInfo.shootRange);
var actualTarget = UmUtil.scaleVector3(direction.normalize(), distanceShoot); var actualTarget = UmUtil.scaleVector3(direction.normalize(), distanceShoot);
actualTarget = UmUtil.plusTwoVector3(origin, actualTarget); actualTarget = UmUtil.plusTwoVector3(origin, actualTarget);
var duration = this.getTimeMove(shootingDataInfo.shootSpeed, distanceShoot); var duration = this.getTimeMove(shootingDataInfo.AtkSpeed, distanceShoot);
UmUtil.worldMoveTo(this.node, actualTarget, duration, 0, () => { UmUtil.worldMoveTo(this.node, actualTarget, duration, 0, () => {
if (this.node?.active) if (this.node?.active)
this.destroyNode(); this.destroyNode();

View File

@ -27,15 +27,20 @@ export class ShootingBase extends Component {
public shooting(start, target, shootingDataInfo, specialSkillId = -1, parent: Node = null) { public shooting(start, target, shootingDataInfo, specialSkillId = -1, parent: Node = null) {
if (!GameGlobalData.Instance.isStatePlay()) return; if (!GameGlobalData.Instance.isStatePlay()) return;
// UmLog.log("shooting => ", JSON.stringify(shootingDataInfo));
var shootingTarget = target as Node; var shootingTarget = target as Node;
var startPoint = start.worldPosition; var startPoint = start.worldPosition;
var targetPoint = shootingTarget?.active ? target.worldPosition : target; var targetPoint = shootingTarget?.active ? target.worldPosition : target;
this.speedScale = shootingDataInfo.shootSpeed; this.speedScale = shootingDataInfo.AtkSpeed;
var pending_time = shootingDataInfo.shootPending; var cooldown_time = shootingDataInfo.AtkCoolDown;
//conver cooldown time to mili seconds
if (cooldown_time < 100)
cooldown_time *= 1000;
var timeNow = UmUtil.getTime(); var timeNow = UmUtil.getTime();
if (timeNow < (this.lastShootingTime + pending_time)) if (timeNow < (this.lastShootingTime + cooldown_time))
return; return;
// UmLog.log("shooting => ", timeNow); // UmLog.log("shooting => ", timeNow);
@ -63,7 +68,7 @@ export class ShootingBase extends Component {
switch (specialSkillId) { switch (specialSkillId) {
case Number(ESPECIAL_SKILL_TYPE.SKILL_1): case Number(ESPECIAL_SKILL_TYPE.SKILL_1):
{ {
shootingDataInfo.damage *= 5; shootingDataInfo.Damage *= 5;
this.addBullet(startPoint, targetPoint, shootingDataInfo, parent, specialSkillId); this.addBullet(startPoint, targetPoint, shootingDataInfo, parent, specialSkillId);
} }
break; break;
@ -103,7 +108,7 @@ export class ShootingBase extends Component {
parent.addChild(bullet.node); parent.addChild(bullet.node);
bullet.node.worldPosition = startPoint; bullet.node.worldPosition = startPoint;
bullet.node.setNodeActive(true); bullet.node.setNodeActive(true);
bullet.setDamage(shootingDataInfo.damage); bullet.setDamage(shootingDataInfo.Damage);
bullet.setSpecialSkill(specialSkillId); bullet.setSpecialSkill(specialSkillId);
bullet.shooting(targetPoint, shootingDataInfo); bullet.shooting(targetPoint, shootingDataInfo);
} }

View File

@ -132,7 +132,7 @@ export class CreepBase extends EnemyBase {
var targetShoot = this.findShootTargetNode(); var targetShoot = this.findShootTargetNode();
if (!targetShoot) return; if (!targetShoot) return;
this.shooting.shooting(this.node, targetShoot, this.enemyData.shooting); this.shooting.shooting(this.node, targetShoot, this.ShootingDataConfig);
} }
} }

View File

@ -20,17 +20,19 @@ export class CreepMove extends Component {
enemyType: number = ENEMY_TYPE.MELEE; enemyType: number = ENEMY_TYPE.MELEE;
attackType: number = EATTACK_TYPE.MELEE; attackType: number = EATTACK_TYPE.MELEE;
dmg = 5; dmg = 5;
moveSpeed = 50; moveSpeed = 1;
speedScale = 15;
range = 5; range = 5;
setMoveData(data, enemyType, attackType) { setMoveData(data, enemyType, attackType) {
this.enemyType = enemyType; this.enemyType = enemyType;
this.attackType = attackType; this.attackType = attackType;
this.enemyType = data?.enemyType || this.enemyType; this.dmg = data?.Atk || this.dmg;
this.dmg = data?.dmg || this.dmg; this.range = data?.AtkRange || this.range;
this.moveSpeed = data?.moveSpeed || this.moveSpeed; this.moveSpeed = data?.MoveSpeed || this.moveSpeed;
this.range = data?.range || this.range; this.moveSpeed *= this.speedScale;
this.speed = this.moveSpeed;
} }
protected start(): void { protected start(): void {

View File

@ -10,11 +10,13 @@ import { Sprite } from 'cc';
import { Color } from 'cc'; import { Color } from 'cc';
import { ShootingBase } from '../bullet/ShootingBase'; import { ShootingBase } from '../bullet/ShootingBase';
import { GameGlobalData } from '../../global/GameGlobalData'; import { GameGlobalData } from '../../global/GameGlobalData';
import { EnemyDataInfo } from '../../global/GameInterface'; import { EnemyDataInfo, ShootingDataInfo } from '../../global/GameInterface';
import { ActiveSkillBase } from '../hero/ActiveSkillBase'; import { ActiveSkillBase } from '../hero/ActiveSkillBase';
import { Enum } from 'cc'; import { Enum } from 'cc';
import { UmClientEvent } from '../../../../cc-common/cc-util/UmOneToMultiListener'; import { UmClientEvent } from '../../../../cc-common/cc-util/UmOneToMultiListener';
import { RigidBody2D } from 'cc'; import { RigidBody2D } from 'cc';
import { Label } from 'cc';
import { CircleCollider2D } from 'cc';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('EnemyBase') @ccclass('EnemyBase')
@ -27,7 +29,7 @@ export class EnemyBase extends Component {
@property(ShootingBase) shooting: ShootingBase = null!; @property(ShootingBase) shooting: ShootingBase = null!;
@property({ type: Enum(ENEMY_TYPE) }) public enemyType: ENEMY_TYPE = ENEMY_TYPE.MELEE; @property({ type: Enum(ENEMY_TYPE) }) public enemyType: ENEMY_TYPE = ENEMY_TYPE.MELEE;
@property({ type: Enum(EATTACK_TYPE) }) public attackType: EATTACK_TYPE = EATTACK_TYPE.MELEE @property({ type: Enum(EATTACK_TYPE) }) public attackType: EATTACK_TYPE = EATTACK_TYPE.MELEE
@property(Label) txtName: Label = null!;
isShootEnable = false; isShootEnable = false;
isDestroying = false; isDestroying = false;
@ -41,17 +43,49 @@ export class EnemyBase extends Component {
moveSpeed = 50; moveSpeed = 50;
range = 5; range = 5;
hp = 1000; hp = 1000;
dataConfig: any = null;
atkCooldown: number = 1;
visualRange: number = 5;
TWEEN_TAG = 1001; TWEEN_TAG = 1001;
setEnemyData(data) { setEnemyData(data) {
this.enemyType = data?.enemyType || this.enemyType; // No: data["no"],
this.attackType = data?.attackType || this.attackType; // Name_Id: data["nameid"],
// Group: data["group"],
// Visual_Name: data["visualname"],
// Atk: data["atk"],
// Hp: data["hp"],
// AtkSpeed: data["atkspeed"],
// Exp: data["exp"],
// MoveSpeed: data["movespeed"],
// AtkRange: data["atkrange"],
// AtkCoolDown: data["atkcooldown"],
// VisualRange: data["visualrange"],
// SkillDmg: data["Skilldmg"],
// SkillEffect: data["skilleffect"],
this.dataConfig = data;
this.dmg = data?.dmg || this.dmg; this.enemyType = GameDefine.getEnemyType(data?.Group) || this.enemyType;
this.moveSpeed = data?.moveSpeed || this.moveSpeed; this.attackType = GameDefine.getAttackType(this.enemyType) || this.attackType;
this.range = data?.range || this.range;
this.hp = data?.hp || this.hp; this.dmg = data?.Atk || this.dmg;
this.moveSpeed = data?.MoveSpeed || this.moveSpeed;
this.range = data?.AtkRange || this.range;
this.hp = data?.Hp || this.hp;
this.atkCooldown = data?.AtkCoolDown || this.atkCooldown;
this.visualRange = data?.VisualRange || this.visualRange;
this.txtName.string = data?.Name_Id + "|" + this.dmg.toString();
this.updateSensorRange();
UmLog.log(JSON.stringify(data));
}
updateSensorRange()
{
this.sensor.collider.getComponent(CircleCollider2D).radius = GameDefine.SQUARE_UNIT * this.visualRange;
} }
protected onLoad(): void { protected onLoad(): void {
@ -64,7 +98,6 @@ export class EnemyBase extends Component {
this.registerColliderContact(); this.registerColliderContact();
this.registerSensor(); this.registerSensor();
// this.loadDataAndDisplay(); // this.loadDataAndDisplay();
UmLog.warn("check boss error");
this.isShootEnable = true; this.isShootEnable = true;
this.currentColor = new Color(this.theme.color); this.currentColor = new Color(this.theme.color);
} }
@ -195,13 +228,27 @@ export class EnemyBase extends Component {
}, this.TWEEN_TAG); }, this.TWEEN_TAG);
} }
// shooting => { "AtkRange": 5, "AtkCoolDown": 1, "AtkSpeed": 30, "Damage": 10, "AoERange": 0, "AoEDmg": 0 }
get ShootingDataConfig(): ShootingDataInfo {
var shootingData: ShootingDataInfo = {
AtkRange: this.dataConfig.AtkRange,
AtkCoolDown: this.dataConfig.AtkCoolDown,
AtkSpeed: this.dataConfig.AtkSpeed,
Damage: this.dataConfig.Atk,
AoERange: this.dataConfig.AoERange,
AoEDmg: this.dataConfig.AoEDmg,
};
return shootingData;
}
protected update(dt: number): void { protected update(dt: number): void {
if (!GameGlobalData.Instance.isStatePlay()) return; if (!GameGlobalData.Instance.isStatePlay()) return;
if (!this.isShootEnable) return; if (!this.isShootEnable) return;
var targetShoot = this.findShootTargetPoint(); var targetShoot = this.findShootTargetPoint();
if (!targetShoot) return; if (!targetShoot) return;
this.shooting.shooting(this.node, targetShoot, this.enemyData.shooting); this.shooting.shooting(this.node, targetShoot, this.ShootingDataConfig);
} }
findShootTargetNode(): Node findShootTargetNode(): Node

View File

@ -21,6 +21,8 @@ export class ActiveSkill2 extends ActiveSkillBase {
protected update(dt: number): void { protected update(dt: number): void {
if (!GameGlobalData.Instance.isStatePlay() || this.isDestroying) return; if (!GameGlobalData.Instance.isStatePlay() || this.isDestroying) return;
this.node.position = Vec3.ZERO;
if (this.euler.z <= -360.0) { if (this.euler.z <= -360.0) {
this.destroyNode(); this.destroyNode();
return; return;

View File

@ -8,7 +8,7 @@ import { Collider2D } from 'cc';
import { ShootingBase } from '../bullet/ShootingBase'; import { ShootingBase } from '../bullet/ShootingBase';
import { EACTIVE_SKILL_TYPE, EPHYSIC_GROUP, GameDefine } from '../../config/GameDefine'; import { EACTIVE_SKILL_TYPE, EPHYSIC_GROUP, GameDefine } from '../../config/GameDefine';
import { LayoutManager } from '../LayoutManager'; import { LayoutManager } from '../LayoutManager';
import { HeroDataInfo } from '../../global/GameInterface'; import { HeroDataInfo, ShootingDataInfo } from '../../global/GameInterface';
import { BulletBase } from '../bullet/BulletBase'; import { BulletBase } from '../bullet/BulletBase';
import { Color } from 'cc'; import { Color } from 'cc';
import { UmUtil } from '../../../../cc-common/cc-util/UmUtil'; import { UmUtil } from '../../../../cc-common/cc-util/UmUtil';
@ -28,6 +28,7 @@ export class HeroBase extends NodeBase {
@property(ShootingBase) shooting: ShootingBase = null!; @property(ShootingBase) shooting: ShootingBase = null!;
@property(Sprite) theme: Sprite = null!; @property(Sprite) theme: Sprite = null!;
@property(Label) skillLabel: Label = null!; @property(Label) skillLabel: Label = null!;
heroDataConfig: any = null;
originPoint = new Vec3(); originPoint = new Vec3();
isShootEnable = false; isShootEnable = false;
@ -63,7 +64,6 @@ export class HeroBase extends NodeBase {
this.loadDataAndDisplay(); this.loadDataAndDisplay();
this.currentColor = new Color(this.theme.color); this.currentColor = new Color(this.theme.color);
this.skillLabel.string = ""; this.skillLabel.string = "";
} }
protected onDestroy(): void { protected onDestroy(): void {
@ -74,7 +74,6 @@ export class HeroBase extends NodeBase {
UmClientEvent.off(GameDefine.EVENT_END_USE_ACTIVE_SKILL, this.onEndUseActiveSkill.bind(this)); UmClientEvent.off(GameDefine.EVENT_END_USE_ACTIVE_SKILL, this.onEndUseActiveSkill.bind(this));
} }
onStartUseSpecialSkill(skillId: number) onStartUseSpecialSkill(skillId: number)
{ {
UmLog.log("onStartUseSpecialSkill => ", skillId); UmLog.log("onStartUseSpecialSkill => ", skillId);
@ -88,13 +87,14 @@ export class HeroBase extends NodeBase {
this.skillLabel.string = ""; this.skillLabel.string = "";
} }
get heroData(): HeroDataInfo loadDataAndDisplay() {
{ this.loadDataConfig();
return GameGlobalData.Instance.heroData.getHeroData(); UmLog.warn("loadDataAndDisplay => ", JSON.stringify(this.heroDataConfig));
LayoutManager.instance.GameUI.getHeroHPBar().setMaxHPBar(this.heroDataConfig.Hp);
} }
loadDataAndDisplay() { loadDataConfig() {
LayoutManager.instance.GameUI.getHeroHPBar().setMaxHPBar(this.heroData.hp); this.heroDataConfig = GameGlobalData.Instance.heroDataConfig;
} }
protected registerColliderContact() { protected registerColliderContact() {
@ -176,10 +176,24 @@ export class HeroBase extends NodeBase {
} }
get ShootingDataConfig(): ShootingDataInfo
{
var shootingData: ShootingDataInfo = {
AtkRange: this.heroDataConfig.AtkRange,
AtkCoolDown: this.heroDataConfig.AtkCoolDown,
AtkSpeed: this.heroDataConfig.AtkSpeed,
Damage: this.heroDataConfig.Atk,
AoERange: this.heroDataConfig.AoERange,
AoEDmg: this.heroDataConfig.AoEDmg,
};
return shootingData;
}
shoot(targetNode) shoot(targetNode)
{ {
if (!targetNode) return; if (!targetNode) return;
this.shooting.shooting(this.node, targetNode, this.heroData.shooting, this.specialSkill); this.shooting.shooting(this.node, targetNode, this.ShootingDataConfig, this.specialSkill);
} }
addEnemyTarget(enemy: Node) { addEnemyTarget(enemy: Node) {
@ -238,6 +252,8 @@ export class HeroBase extends NodeBase {
var bulletComp = bullet.parent.getComponent(BulletBase); var bulletComp = bullet.parent.getComponent(BulletBase);
var damage = bulletComp?.damage | 0; var damage = bulletComp?.damage | 0;
UmLog.warn("onBulletContact => ", damage);
bulletComp?.destroyNode(); bulletComp?.destroyNode();
this.effectColor = bulletComp.getColor(); this.effectColor = bulletComp.getColor();

View File

@ -2,16 +2,16 @@ import { Vec3 } from 'cc';
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import { UmUtil } from '../../../../cc-common/cc-util/UmUtil'; import { UmUtil } from '../../../../cc-common/cc-util/UmUtil';
import { GameGlobalData } from '../../global/GameGlobalData'; import { GameGlobalData } from '../../global/GameGlobalData';
import { JoyStick } from '../../../Test/JoyStick';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('HeroMove') @ccclass('HeroMove')
export class HeroMove extends Component { export class HeroMove extends Component {
directionVec3: Vec3 = Vec3.ZERO;
isTouchEnable = false; isTouchEnable = false;
update(deltaTime: number) { update(deltaTime: number) {
if (!this.isTouchEnable || this.directionVec3 === Vec3.ZERO || !GameGlobalData.Instance.isStatePlay()) return; if (!JoyStick.IS_TOUCH_ENABLE || JoyStick.DIRECTION === Vec3.ZERO || !GameGlobalData.Instance.isStatePlay()) return;
this.node.position = UmUtil.plusTwoVector3(this.node.position, this.directionVec3); this.node.position = UmUtil.plusTwoVector3(this.node.position, JoyStick.DIRECTION);
} }
} }

View File

@ -79,7 +79,8 @@ export class MapManager extends Component {
private initBoss() { private initBoss() {
var boss = instantiate(GameAssets.instance.bossPrefab); var boss = instantiate(GameAssets.instance.bossPrefab);
boss.parent = this.gameplaySpaceLayout; boss.parent = this.gameplaySpaceLayout;
var data = { enemyType: 0, attackType: 1, hp: 1000, dmg: 25 };
var data = GameGlobalData.Instance.gameDataConfig.getBossDataConfigById("B2");
boss.getComponent(EnemyBase)?.setEnemyData(data); boss.getComponent(EnemyBase)?.setEnemyData(data);
} }
@ -96,33 +97,36 @@ export class MapManager extends Component {
// this.dmg = data?.dmg || this.dmg; // this.dmg = data?.dmg || this.dmg;
// this.moveSpeed = data?.moveSpeed || this.moveSpeed; // this.moveSpeed = data?.moveSpeed || this.moveSpeed;
// this.range = data?.range || this.range; // this.range = data?.range || this.range;
var count = 1;
{ {
var creep = instantiate(GameAssets.instance.creepPrefab); var creep = instantiate(GameAssets.instance.creepPrefab);
creep.parent = this.gameplaySpaceLayout; creep.parent = this.gameplaySpaceLayout;
var data = { enemyType: 0, attackType: 0, hp: 75, dmg: 20 }; // var data = { enemyType: 0, attackType: 0, hp: 75, dmg: 20 };
var data = GameGlobalData.Instance.gameDataConfig.getEnemyDataConfigById(`E${UmUtil.getRandomInt(1,3)}`);
creep.getComponent(CreepBase)?.setEnemyData(data); creep.getComponent(CreepBase)?.setEnemyData(data);
creep.name = "creep1"; creep.name = data.Name_Id + "_" + (count++).toString();
creep.position = new Vec3(-233, 104, 0); creep.position = new Vec3(-233, 104, 0);
} }
{ {
var creep = instantiate(GameAssets.instance.creepPrefab); var creep = instantiate(GameAssets.instance.creepPrefab);
creep.parent = this.gameplaySpaceLayout; creep.parent = this.gameplaySpaceLayout;
var data = { enemyType: 1, attackType: 1, hp: 50, dmg: 5 }; // var data = { enemyType: 1, attackType: 1, hp: 50, dmg: 5 };
var data = GameGlobalData.Instance.gameDataConfig.getEnemyDataConfigById(`E${UmUtil.getRandomInt(4, 6)}`);
creep.getComponent(CreepBase)?.setEnemyData(data); creep.getComponent(CreepBase)?.setEnemyData(data);
creep.position = new Vec3(290, 310, 0); creep.position = new Vec3(290, 310, 0);
creep.name = "creep2"; creep.name = data.Name_Id + "_" + (count++).toString();
} }
{ {
var creep = instantiate(GameAssets.instance.creepPrefab); var creep = instantiate(GameAssets.instance.creepPrefab);
creep.parent = this.gameplaySpaceLayout; creep.parent = this.gameplaySpaceLayout;
var data = { enemyType: 0, attackType: 0, hp: 75, dmg: 20 }; // var data = { enemyType: 0, attackType: 0, hp: 75, dmg: 20 };
var data = GameGlobalData.Instance.gameDataConfig.getEnemyDataConfigById(`E${UmUtil.getRandomInt(1, 3)}`);
creep.getComponent(CreepBase)?.setEnemyData(data); creep.getComponent(CreepBase)?.setEnemyData(data);
creep.position = new Vec3(-211, 480, 0); creep.position = new Vec3(-211, 480, 0);
creep.name = "creep3"; creep.name = data.Name_Id + "_" + (count++).toString();
} }
} }

View File

@ -21,6 +21,7 @@ export class GameGlobalData extends Component {
public isHeroManaReady: boolean = false; public isHeroManaReady: boolean = false;
public currentActiveSkill: number = 0; public currentActiveSkill: number = 0;
public lastHeroMoveDirection: Vec3 = new Vec3(0, 1, 0); public lastHeroMoveDirection: Vec3 = new Vec3(0, 1, 0);
public level = 1;
public killedData = {creep: 0, boss: 0}; public killedData = {creep: 0, boss: 0};
@ -84,6 +85,11 @@ export class GameGlobalData extends Component {
return this.gameDataConfig.HERO_CONTROL_CONFIG; return this.gameDataConfig.HERO_CONTROL_CONFIG;
} }
get heroDataConfig(): any
{
return this.gameDataConfig.getHeroDataByLevel(this.level);
}
} }

View File

@ -14,11 +14,12 @@ export interface EnemyDataInfo {
} }
export interface ShootingDataInfo { export interface ShootingDataInfo {
shootRange: number; AtkRange: number;
shootPending: number; AtkCoolDown: number;
shootSpeed: number; AtkSpeed: number;
damage: number; Damage: number;
damageRange: number; AoERange: number;
AoEDmg: number;
} }
export interface StageInfo { export interface StageInfo {

View File

@ -1,14 +0,0 @@
# automation-framework
Cocos automated testing framework.
## Development Environment
Node.js
## Install
```bash
# Install dependent modules
npm install
```

View File

@ -1,14 +0,0 @@
# automation-framework
Cocos 自动化测试框架。
## 开发环境
Node.js
## 安装
```bash
# 安装依赖模块
npm install
```

View File

@ -1,12 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "d7fb5f83-1177-4c22-8857-efd8506bb084",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "javascript",
"imported": true,
"uuid": "1593c4b5-da0e-4fd6-939b-036a8247cb38",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1 +0,0 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.configs={"*":{hooks:"./hooks",options:{AutoTest:{default:!1}}}},exports.load=function(){console.debug("custom-build-example load")},exports.unload=function(){console.debug("custom-build-example unload")};

View File

@ -1 +0,0 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="automation-framework";function o(...o){return console.log(`[${e}] `,...o)}exports.load=async function(){},exports.onAfterBuild=async function(e,o){},exports.onAfterCompressSettings=async function(e,o){console.log("onAfterCompressSettings")},exports.onAfterInit=async function(e,o){},exports.onBeforeBuild=async function(t,s){o(`${e}`,"onBeforeBuild")},exports.onBeforeBuildAssets=async function(t,s,n){if(!t.packages[e].AutoTest){const t=await Editor.Message.request("asset-db","query-asset-info","db://automation-framework/runtime/test-framework.mjs"),r=await Editor.Message.request("asset-db","query-asset-info","db://automation-framework/runtime/main.ts");for(const i of s.bundles){void 0!==t?.uuid&&(o(`automation-framework/runtime/test-framework.mjs---${t?.uuid} has been removed`),i.removeAsset(t?.uuid)),void 0!==r?.uuid&&(o(`automation-framework/runtime/main.ts---${r?.uuid} has been removed`),i.removeAsset(r?.uuid));for(const e of i.scripts){const t=n.getAssetInfo(e);(t.url.startsWith("db://assets/auto-test-case")||-1!==t.name.indexOf(".test.ts"))&&(o(`${t.name}---${e} has been removed`),i.removeAsset(e))}o(`${e}`,"onBeforeBuildAssets")}}},exports.onBeforeCompressSettings=async function(e,o){console.debug("get settings test",o.settings)},exports.onBeforeInit=async function(e,o){},exports.throwError=!0,exports.unload=async function(){console.log(`[${e}] Unload cocos plugin example in builder.`)};

View File

@ -1 +0,0 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./removeTestScripts.js");require("fs-extra");exports.load=async function(){await e.startTest(process,"automation-framework")},exports.methods={},exports.unload=function(){};

View File

@ -1 +0,0 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs-extra");function t(e){let t=!0,o=0;const s=["--project","--testConfig","--platformIndex","--build","configPath"];if(e.argv.length>=9){for(const t of s)for(const s of e.argv)s.includes(t)&&(o+=1);t=o===s.length}else t=!1;return t}function o(e){let t="";const o=process.argv.indexOf(e);return-1!==o&&(t=process.argv[o+1]),t}function s(e,t,o){const s=Object.keys(o)[0];return e.hasOwnProperty(t)?JSON.stringify(e[t][s])!=JSON.stringify(o[s])?e[t]=Object.assign(e[t],o):console.log("无需修改"):console.log(`字段${t}不存在`),e}exports.getArgv=o,exports.processJudge=t,exports.startTest=async function(n,r){const a={"automation-framework":{AutoTest:"",__version__:"1.0.0"}};if(t(n)){o("--testConfig"),Number(o("--platformIndex"));const t=n.argv.length;if(n.argv[t-1].includes("configPath")){const o=n.argv[t-1].split("=")[1],c=e.readJsonSync(o);s(c,"packages",a),c.packages[r].AutoTest=!0,e.writeJsonSync(o,c)}}else{await Editor.Panel.has(r)||console.log("developer open panel");const t=n.argv.length;if(n.argv[t-1].includes("configPath")){const o=n.argv[t-1].split("=")[1],c=e.readJsonSync(o);s(c,"packages",a),c.packages[r].AutoTest=!1,e.writeJsonSync(o,c)}}},exports.updataJsonObject=s;

View File

@ -1 +0,0 @@
"use strict";module.exports={description:"A blank extension"};

View File

@ -1 +0,0 @@
"use strict";module.exports={description:"一份空白的扩展"};

View File

@ -1,44 +0,0 @@
{
"package_version": 2,
"version": "0.4.6",
"name": "automation-framework",
"description": "i18n:automation-framework.description",
"main": "./dist/main.js",
"scripts": {
"build:dev": "cross-env NODE_ENV=development rollup -c ./rollup.config.js -w",
"build:prod": "cross-env NODE_ENV=production rollup -c ./rollup.config.js --zip",
"watch": "tsc -w"
},
"dependencies": {
"fs-extra": "^10.1.0",
"pako": "^2.0.4"
},
"devDependencies": {
"@editor/library-type": "^3.5.0-80918",
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-json": "^5.0.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@types/adm-zip": "^0.5.0",
"@types/fs-extra": "^9.0.13",
"adm-zip": "^0.5.9",
"@types/node": "^16.0.1",
"cross-env": "^7.0.3",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-filesize": "^9.1.2",
"rollup-plugin-sizes": "^1.0.4",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.34.1",
"typescript": "^4.3.4"
},
"author": "Cocos Creator",
"editor": ">=3.6.0",
"contributions": {
"builder": "./dist/builder.js",
"asset-db": {
"mount": {
"path": "./assets",
"readonly": false
}
}
}
}

View File

@ -1,352 +0,0 @@
# Localization Editor Api
## Quick Start
### [Core Features `l10n`](#l10n)
l10n provides the core translation function and icu function, as well as the function to switch languages.
We will store the switched target language in `localStorage` and also automatically restart the project runtime and read the `localStorage` configuration at the next start to complete the whole language switching process.
> ***So we want users to make sure to handle data persistence before switching languages***
### Import the [`l10n`](#l10n) module
All api's provided by localization-editor will be imported by name from db://localization-editor/l10n
```typescript
import { l10n } from 'db://localization-editor/l10n'
```
### Use the translation api
```typescript
// in the code of any component component
// l10n is the core functionality of localization
import { l10n } from 'db://localization-editor/l10n'
import { _decorator, Label, Component } from 'cc';
@ccclass('SomeComponent')
class SomeComponent extends Component {
// ......
someMethod() {
// will return the text corresponding to this_is_an_apple
const text = l10n.t("this_is_an_apple")
}
// ......
}
```
### API details
- Class:[`L10nManager`](#l10nmanager)
---
- Interface:[`ResourceList`](#resourcelist)
- Interface:[`ResourceBundle`](#resourcebundle)
- Interface:[`ResourceData`](#resourcedata)
- Interface:[`ResourceItem`](#resourceitem)
- Interface:[`FallbackLanguageObjectList`](#fallbacklanguageobjectlist)
- Interface:[`L10nOptions`](#l10noptions)
- Interface:[`StandardOption`](#standardoption)
---
- Enumerations:[`L10nListenEvent`](#l10nlistenevent)
---
- Alias:[`L10nKey`](#alternate name)
- Alias:[`L10nValue`](#alternate)
- Alias:[`TextInfoDirection`](# alias)
- Alias:[`FallbackLanguage`](# alias)
---
# `L10nManager`
Import example.
```ts
import { L10nManager } from 'db://localization-editor/l10n'
```
Description.
Normally we do not recommend that you use or construct this type yourself.
Instead, we provide [``l10n``](#l10n) as a global singleton to use the translation functionality.
---
## Index
### Constructor
- `L10nManager` **private**
---
### Global variables
#### `l10n`
Definition: `const l10n: L10nManager`
---
### Static properties
#### `LOCAL_STORAGE_LANGUAGE_KEY`
Definition: `static LOCAL_STORAGE_LANGUAGE_KEY: string`
Description: When calling [`changeLanguage`](#changelanguage) to switch the game language, `localStorage` is used to
and use [`LOCAL_STORAGE_LANGUAGE_KEY`](#localstoragelanguagekey) as the key of `localStorage`.
Remarks.
| default | localization-editor/language |
|-----|------------------------------|
---
### Instance methods
#### `config`
Definition: `config(options: L10nOptions): void`
Description: Used to configure certain settings of l10n, see [`L10nOptions`](#l10noptions) for more options.
Use case:
```ts
l10n.config({
// Used to display the default language with this value if no translation is found
fallbackLanguage: 'zh-Hans-CN',
// If you don't like the default value of LOCAL_STORAGE_LANGUAGE_KEY, you can change it here, but make sure it's before changeLanguage
localStorageLanguageKey: 'localization-editor/langauge'
})
```
---
#### `changeLanguage`
Definition: `changeLanguage(language: Intl.BCP47LanguageTag): void`
Description: Used to dynamically switch languages, see [``BCP47 Language Tag``](https://www.techonthenet.com/js/language_tags.php) for more information
Use case:
```ts
l10n.changeLanguage('zh-Hans-CN')
```
> ***Note: After calling this method, the game will be restarted automatically, please make sure to do the data persistence work***
---
#### `t`
Definition: `t(key: L10nKey, options?: StandardOption): L10nValue`
Description: Returns the L10nValue corresponding to the current language data according to the incoming L10nKey, see [`StandardOption`](#standardoption) for more options.
Use case:
```ts
console.log(l10n.t('this_is_apple'))
// This is an apple
```
> ***Note: The language data needs to be generated after compilation with the Localization Editor plugin.***
>
> ***Cannot use l10n.t in static initialization, e.g. `static name = l10n.t('xxx_name')`***
>
> ***Unable to scan when variable is used as parameter, e.g. `let name = 'this_is_apple'; l10n.t(name)`***
---
#### `exists`
Definition: `exists(key: L10nKey): boolean`
Description: Returns whether the key exists or not
Use case:
```ts
console.log(l10n.exists('test_key'))
```
---
#### `currentLanguage`
Definition: `get currentLanguage(): Intl.BCP47LanguageTag`
Description: Returns the [``BCP47 Language Tag``](https://www.techonthenet.com/js/language_tags.php) for the current language.
Use case:
```ts
console.log(l10n.currentLanguage)
// 'zh-Hans-CN'
```
---
#### `languages`
Definition: `get languages(): readonly Intl.BCP47LanguageTag[]`
Description: Returns an array of [``BCP47 Language Tag``](https://www.techonthenet.com/js/language_tags.php) for the currently available languages, which can be used as a data source for switching language dropdown boxes
Use case:
```ts
console.log(l10n.languages)
// ['zh-Hans-CN', 'en-US']
```
---
#### `direction`
Definition: `direction(language?: Intl. BCP47LanguageTag): TextInfoDirection`
Description: Most languages respect the left-to-right reading convention, but some languages are exceptions such as Arabic, this method learns the [TextInfoDirection](#textinfodirection) of the incoming language.
Use case:
```ts
console.log(l10n.direction('ar'))
// 'rtl'
```
---
#### `on`
Definition: `on(event: L10nListenEvent, callback: (. .args: any[]) => void)`
Description: Used to register [L10nListenEvent](#l10n) event callbacks for [l10n](#l10nlistenevent), such as `languageChanged`.
use case:
```ts
l10n.on(L10nListenEvent.languageChanged, (. .args: any[]) => {
// some actions after switching language, some data can be persisted here and the whole game scene will be restarted afterwards
})
```
--
#### `off`
Definition: `off(event: L10nListenEvent, callback: (.. .args: any[]) => void)`
Description: Callback for the [L10nListenEvent](#L10n) event used to counter-register [l10n](#L10nListenEvent)
> ***Make sure to make on and off appear in pairs to ensure proper destruction of useless data***
---
# Alias
| alias | original type |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `L10nKey` | `string` |
| `L10nValue` | `string` |
| `TextInfoDirection` | `'ltr' / 'rtl'` |
| `FallbackLanguage` | `string / readonly string[] / FallbackLanguageObjectList / ((language: Intl.BCP47LanguageTag) => string / readonly string[] / FallbackLanguageObjectList` |
---
# Interface
## `L10nOptions`
| function/variable name | type | optional |
|---------------------------|-------------------------------------|-----|
| `fallbackLanguage` | `false` / [`FallbackLanguage`](# alias) | yes |
| `localStorageLanguageKey` | `string` | yes |
| `beforeTranslate` | `(key: L10nKey) => L10nValue` | yes |
| `afterTranslate` | `(key: L10nKey) => L10nValue` | yes |
| `returnNull` | `boolean` | yes |
| `returnEmptyString` | `boolean` | yes |
---
## `ResourceList`
| function/variable name | type | optional |
|--------------------|---------------------------|-----|
| `defaultLanguage` | `Intl.BCP47LanguageTag` | yes |
| `fallbackLanguage` | `Intl.BCP47LanguageTag` | yes |
| `languages` | `Intl.BCP47LanguageTag[]` | no |
## `ResourceBundle`
| function/variable name | type | optional |
|-------------------------------------|---------------------------------|-----|
| `[language: Intl.BCP47LanguageTag]` | [`ResourceData`](#resourcedata) | no |
---
## `ResourceData`
| function/variable name | type | optional |
|-----------------------|---------------------------------|-----|
| `[namespace: string]` | [`ResourceItem`](#resourceitem) | no |
---
## `ResourceItem`
| function/variable name | type | optional |
|-----------------|-------|-----|
| `[key: string]` | `any` | no |
---
## `FallbackLanguageObjectList`
| function/variable name | type | optional |
|----------------------|---------------------|-----|
| `[language: string]` | `readonly string[]` | no |
---
## `StandardOption`
| function/variable name | type | optional |
|--------------------|---------------------------|-----|
| `count` | `number` | yes |
| `defaultValue` | `L10nValue` | yes |
| `language` | `Intl.BCP47LanguageTag` | yes |
| `fallbackLanguage` | [`FallbackLanguage`](# alias) | yes |
---
# Enumerations
## `L10nListenEvent`
| function/variable name | type |
|-------------------|-------------------|
| `languageChanged` | `languageChanged` |
| `onMissingKey` | `missingKey` |

View File

@ -1,351 +0,0 @@
# Localization Editor Api
## 快速开始
### [核心功能 `l10n`](#l10n)
l10n提供了核心翻译功能以及icu功能同时也提供的切换语言的功能。
我们会将切换后的目标语言存储于`localStorage`中,同时也会自动重启项目运行时,并在下次启动时读取`localStorage`配置以完成整个语言切换流程。
> ***因此我们希望用户在切换语言之前务必处理好数据持久化工作***
### 导入[`l10n`](#l10n)模块
localization-editor所提供的所有api都将从db://localization-editor/l10n进行具名导入
```typescript
import { l10n } from 'db://localization-editor/l10n'
```
### 使用翻译api
```typescript
// 任意component组件代码中
// l10n是localization的核心功能
import { l10n } from 'db://localization-editor/l10n'
import { _decorator, Label, Component } from 'cc';
@ccclass('SomeComponent')
class SomeComponent extends Component {
// ......
someMethod() {
// 将返回this_is_an_apple所对应文案
const text = l10n.t("this_is_an_apple")
}
// ......
}
```
### API详细说明
- 类:[`L10nManager`](#l10nmanager)
---
- 接口:[`ResourceList`](#resourcelist)
- 接口:[`ResourceBundle`](#resourcebundle)
- 接口:[`ResourceData`](#resourcedata)
- 接口:[`ResourceItem`](#resourceitem)
- 接口:[`FallbackLanguageObjectList`](#fallbacklanguageobjectlist)
- 接口:[`L10nOptions`](#l10noptions)
- 接口:[`StandardOption`](#standardoption)
---
- 枚举:[`L10nListenEvent`](#l10nlistenevent)
---
- 别名:[`L10nKey`](#别名)
- 别名:[`L10nValue`](#别名)
- 别名:[`TextInfoDirection`](#别名)
- 别名:[`FallbackLanguage`](#别名)
---
# `L10nManager`
导入示例:
```ts
import { L10nManager } from 'db://localization-editor/l10n'
```
描述:
通常我们不建议您自行使用或构造该类型。
而我们提供了[`l10n`](#l10n)作为全局单例以使用翻译功能。
---
## 索引
### 构造函数
- `L10nManager` **private**
---
### 全局变量
#### `l10n`
定义: `const l10n: L10nManager`
---
### 静态属性
#### `LOCAL_STORAGE_LANGUAGE_KEY`
定义: `static LOCAL_STORAGE_LANGUAGE_KEY: string`
描述: 当调用[`changeLanguage`](#changelanguage)切换游戏语言时,将使用`localStorage`
存储所切换的目标语言标记,并且使用[`LOCAL_STORAGE_LANGUAGE_KEY`](#localstoragelanguagekey)作为`localStorage`的key
备注:
| 默认值 | localization-editor/language |
|-----|------------------------------|
---
### 实例方法
#### `config`
定义: `config(options: L10nOptions): void`
描述: 用于配置l10n的某些设置探索更多选项可以查看[`L10nOptions`](#l10noptions)
用例:
```ts
l10n.config({
// 用于在默认语言没有找到相应翻译时,以该值进行补充显示
fallbackLanguage: 'zh-Hans-CN',
// 如果不喜欢LOCAL_STORAGE_LANGUAGE_KEY的默认值可以在此修改但是需要确保在changeLanguage之前
localStorageLanguageKey: 'localization-editor/langauge'
})
```
---
#### `changeLanguage`
定义: `changeLanguage(language: Intl.BCP47LanguageTag): void`
描述: 用于动态切换语言,请查看[`BCP47 Language Tag`](https://www.techonthenet.com/js/language_tags.php)以获得更多信息
用例:
```ts
l10n.changeLanguage('zh-Hans-CN')
```
> ***注意: 在调用此方法后,会自动重启游戏,请务必做好数据持久化工作***
---
#### `t`
定义: `t(key: L10nKey, options?: StandardOption): L10nValue`
描述: 根据传入的L10nKey返回当前语言数据中所对应的L10nValue探索更多选项可以查看[`StandardOption`](#standardoption)
用例:
```ts
console.log(l10n.t('this_is_apple'))
// 这是一个苹果
```
> ***注意: 语言数据需要配合Localization Editor插件在编译后生成。***
>
> ***无法在静态初始化中使用l10n.t 比如`static name = l10n.t('xxx_name')`***
>
> ***变量作为参数时无法扫描,比如`let name = 'this_is_apple'; l10n.t(name)`***
---
#### `exists`
定义: `exists(key: L10nKey): boolean`
描述: 返回是否存在key
用例:
```ts
console.log(l10n.exists('test_key'))
```
---
#### `currentLanguage`
定义: `get currentLanguage(): Intl.BCP47LanguageTag`
描述: 返回当前语言的[`BCP47 Language Tag`](https://www.techonthenet.com/js/language_tags.php)
用例:
```ts
console.log(l10n.currentLanguage)
// 'zh-Hans-CN'
```
---
#### `languages`
定义: `get languages(): readonly Intl.BCP47LanguageTag[]`
描述: 返回当前可用语言的[`BCP47 Language Tag`](https://www.techonthenet.com/js/language_tags.php)数组,可利用该方法作为切换语言下拉框的数据源
用例:
```ts
console.log(l10n.languages)
// ['zh-Hans-CN', 'en-US']
```
---
#### `direction`
定义: `direction(language?: Intl.BCP47LanguageTag): TextInfoDirection`
描述: 绝大多数语言都尊崇从左到右的阅读习惯,但某些语言却例外比如阿拉伯语,此方法可以得知所传入语言的[TextInfoDirection](#textinfodirection)
用例:
```ts
console.log(l10n.direction('ar'))
// 'rtl'
```
---
#### `on`
定义: `on(event: L10nListenEvent, callback: (...args: any[]) => void)`
描述: 用于注册[l10n](#l10n)的[L10nListenEvent](#l10nlistenevent)事件回调,比如`languageChanged`
用例:
```ts
l10n.on(L10nListenEvent.languageChanged, (...args: any[]) => {
//在切换语言后的一些操作,某些数据可以放在这里持久化,之后便会重启整个游戏场景
})
```
---
#### `off`
定义: `off(event: L10nListenEvent, callback: (...args: any[]) => void)`
描述: 用于反注册[l10n](#l10n)的[L10nListenEvent](#L10nListenEvent)事件回调
> ***请务必使on与off成对出现确保正确的销毁无用数据***
---
# 别名
| 别名 | 原类型 |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `L10nKey` | `string` |
| `L10nValue` | `string` |
| `TextInfoDirection` | `'ltr' / 'rtl'` |
| `FallbackLanguage` | `string / readonly string[] / FallbackLanguageObjectList / ((language: Intl.BCP47LanguageTag) => string / readonly string[] / FallbackLanguageObjectList` |
---
# 接口
## `L10nOptions`
| 函数/变量名 | 类型 | 可选 |
|---------------------------|-------------------------------------|-----|
| `fallbackLanguage` | `false` / [`FallbackLanguage`](#别名) | 是 |
| `localStorageLanguageKey` | `string` | 是 |
| `beforeTranslate` | `(key: L10nKey) => L10nValue` | 是 |
| `afterTranslate` | `(key: L10nKey) => L10nValue` | 是 |
| `returnNull` | `boolean` | 是 |
| `returnEmptyString` | `boolean` | 是 |
---
## `ResourceList`
| 函数/变量名 | 类型 | 可选 |
|--------------------|---------------------------|-----|
| `defaultLanguage` | `Intl.BCP47LanguageTag` | 是 |
| `fallbackLanguage` | `Intl.BCP47LanguageTag` | 是 |
| `languages` | `Intl.BCP47LanguageTag[]` | 否 |
## `ResourceBundle`
| 函数/变量名 | 类型 | 可选 |
|-------------------------------------|---------------------------------|-----|
| `[language: Intl.BCP47LanguageTag]` | [`ResourceData`](#resourcedata) | 否 |
---
## `ResourceData`
| 函数/变量名 | 类型 | 可选 |
|-----------------------|---------------------------------|-----|
| `[namespace: string]` | [`ResourceItem`](#resourceitem) | 否 |
---
## `ResourceItem`
| 函数/变量名 | 类型 | 可选 |
|-----------------|-------|-----|
| `[key: string]` | `any` | 否 |
---
## `FallbackLanguageObjectList`
| 函数/变量名 | 类型 | 可选 |
|----------------------|---------------------|-----|
| `[language: string]` | `readonly string[]` | 否 |
---
## `StandardOption`
| 函数/变量名 | 类型 | 可选 |
|--------------------|---------------------------|-----|
| `count` | `number` | 是 |
| `defaultValue` | `L10nValue` | 是 |
| `language` | `Intl.BCP47LanguageTag` | 是 |
| `fallbackLanguage` | [`FallbackLanguage`](#别名) | 是 |
---
# 枚举
## `L10nListenEvent`
| 函数/变量名 | 类型 |
|-------------------|-------------------|
| `languageChanged` | `languageChanged` |
| `onMissingKey` | `missingKey` |

View File

@ -1,927 +0,0 @@
'use strict';
module.exports = {
open_panel: 'Translate',
'localization-editor': 'Localization Editor',
description: 'Localize editor',
service_provider: 'Translation service provider',
collection: 'Collect and count',
language_compilation: 'Compile language',
select_placeholder: 'Please select',
unselect_service_tip: 'If no translation service provider is selected, the automatic translation feature will not be supported',
local_language: 'Local development language:',
collected_from_resource_files: 'Collect from resource files',
required: '*required',
file_no_exist: 'File not exist',
cannot_empty: 'Cannot be empty',
common_languages: 'common languages',
cancel: 'Cancel',
confirm: 'Confirm',
localization_editor_project_config: 'Localization Editor Config For Project',
localization_editor_editor_config: 'Localization Editor Config For Editor',
localization_editor_provider_config: 'Localization Editor Translate Provider Configs',
YOUDAO: {
'zh-CHS': 'Chinese Simplified',
'zh-CHT': 'Traditional respectively',
},
label_inspector: {
no_origin: 'No original',
key: 'Key',
'key:': 'Key:',
save: 'Save',
cannot_empty: 'Cannot be empty',
error_tooltip: 'Contains letters, numbers, underscores, hyphens, @, /, +, | \N cannot be any other character',
exist_media_tooltip: 'This key is the key of media',
},
build: {
compress_warning: 'Building failed because the picture with uuid "${a}" and the picture with uuid "${b}" have different settings for Compress Texture. Please keep Compress Texture settings for these pictures consistent.',
packable_warning: 'Translation failed for the picture with uuid "${uuid}", because it has option Dynamic Atlas turned on.',
use_polyfill: ' Polyfill script used',
use_language: 'Language used',
select_all: 'Select all',
default_language: 'Default language',
fallback_language: 'Alternate language',
},
home: {
po_name: 'GNU gettext PO File',
csv_name: 'Comma-Separated Values',
xlsx_name: 'Excel File',
service_provider: 'Service provider',
collection: 'Collection',
language_compilation: 'Compile language',
select_placeholder: 'Select',
unselect_service_tip: 'If no translation service provider is selected, the automatic translation function will not be supported',
'local_language:': 'Local development language:',
collected_from_resource_files: 'Collect from resource files',
required: '*Required',
delete: 'Delete',
preview: 'Preview',
combine: 'Combine',
translate: 'Translate',
complement: 'Complement',
not_recorded: 'notRecorded',
collect_and_count: 'Collect and count',
add_new_language: 'Add new language',
add: 'Add',
select: 'Select',
language: 'Language',
'language:': 'Language:',
extname: 'Extension name',
exclude_path: 'Exclude path',
language_for_service_provider: 'Language recognized by the service provider',
dir: 'Directory',
search_dir: 'Search directory',
translate_process: 'Translation progress',
combine_process: 'Compilation progress',
operation: 'Operation',
local_language: 'Local development language',
combine_tooltip: ' Text is calculated by the actual number of words, and resources are calculated by unit of 1',
translate_tooltip: 'Any entry is calculated in unit 1',
count: 'Count:',
collecting: 'Counting',
unselect: 'No development language selected',
save: 'Save',
complete: 'Complete',
collect_group: 'Collection Group',
turn_on_tip: 'Please enable Localization Editor tool',
turn_on: 'Enable Localization Editor',
turn_off_warning: 'Are you sure you want to exit Localization Editor? The translated data will be lost if you exit now.',
turn_off: 'Turn Off L10N',
delete_data: 'Unload data',
delete_data_warning: 'Are you sure you want to unload data? Translated data will be lost after uninstallation.',
export: 'Export',
export_all: 'Export All',
},
translate: {
new_value: 'New Value',
old_value: 'Origin Value',
import_po: 'Import PO File',
export_po: 'Export PO File',
save: 'Save',
unfilled: 'Unfilled',
untranslated: 'Untranslated',
filled: 'Filled',
count: 'Count:',
translate: 'Translate',
translated: 'Translated',
key: 'Key',
'key:': 'Key:',
jump: 'skip',
origin: 'Original',
target: 'Translation',
import_all: 'Intelligent matching',
import: 'Import',
import_file: 'Import File',
'position:': 'Position:',
reference_uuid: 'Reference node\'s uuid:',
variant: 'Variant',
after_variant: 'After variant applied',
standard: 'Standard',
delete_variant: 'Delete variant',
cancel: 'Cancel',
confirm: 'Confirm',
cover: 'Cover',
conflict_dialog_title: '注意:',
conflict_dialog_content: 'The following data already exists in [translated], and the original data will disappear after overwriting. Are you sure you want to overwrite?',
unsaved_warning: 'Current work has not been saved, are you sure to continue?',
delete_warning: ' are you sure to delete?',
auto_import_warning: 'About to perform intelligent matching on {length} unbound entries in untranslated, that is, {localLocale} (source language) replaces {targetLocale} (target language). Would you like to turn on intelligent matching',
quit_warning: 'There are unsaved contents, are you sure to exit?',
import_tab_title: 'Imported Files',
import_file_conflicts_with_file_warning: 'Unable to import {num} data entries due to key conflicts, how would you like to resolve?',
},
language_code: {
'af': 'Afrikaans',
'af-ZA': 'Afrikaans (South Africa)',
'af-NA': 'Afrikaans (Namibia)',
'agq': 'Aghem',
'agq-CM': 'Aghem (Cameroon)',
'ak': 'Akan',
'ak-GH': 'Akan (Ghana)',
'am': 'Amharic',
'am-ET': 'Amharic (Ethiopia)',
'ar': 'Arabic',
'ar-YE': 'Arabic (Yemen)',
'ar-TN': 'Arabic (Tunisia)',
'ar-TD': 'Arabic (Chad)',
'ar-SY': 'Arabic (Syria)',
'ar-SS': 'Arabic (South Sudan)',
'ar-SO': 'Arabic (Somalia)',
'ar-SD': 'Arabic (Sudan)',
'ar-SA': 'Arabic (Saudi Arabia)',
'ar-QA': 'Arabic (Qatar)',
'ar-PS': 'Arabic (Palestinian Territories)',
'ar-OM': 'Arabic (Oman)',
'ar-MR': 'Arabic (Mauritania)',
'ar-MA': 'Arabic (Morocco)',
'ar-LY': 'Arabic (Libya)',
'ar-LB': 'Arabic (Lebanon)',
'ar-KW': 'Arabic (Kuwait)',
'ar-KM': 'Arabic (Comoros)',
'ar-JO': 'Arabic (Jordan)',
'ar-IQ': 'Arabic (Iraq)',
'ar-IL': 'Arabic (Israel)',
'ar-ER': 'Arabic (Eritrea)',
'ar-EH': 'Arabic (Western Sahara)',
'ar-EG': 'Arabic (Egypt)',
'ar-DZ': 'Arabic (Algeria)',
'ar-DJ': 'Arabic (Djibouti)',
'ar-BH': 'Arabic (Bahrain)',
'ar-AE': 'Arabic (United Arab Emirates)',
'ar-001': 'Modern Standard Arabic',
'as': 'Assamese',
'as-IN': 'Assamese (India)',
'asa': 'Asu',
'asa-TZ': 'Asu (Tanzania)',
'ast': 'Asturian',
'ast-ES': 'Asturian (Spain)',
'az': 'Azerbaijani',
'az-Latn-AZ': 'Azerbaijani (Latin, Azerbaijan)',
'az-Latn': 'Azerbaijani (Latin)',
'az-Cyrl-AZ': 'Azerbaijani (Cyrillic, Azerbaijan)',
'az-Cyrl': 'Azerbaijani (Cyrillic)',
'bas': 'Basaa',
'bas-CM': 'Basaa (Cameroon)',
'be': 'Belarusian',
'be-TARASK': 'Belarusian (Taraskievica orthography)',
'be-BY': 'Belarusian (Belarus)',
'bem': 'Bemba',
'bem-ZM': 'Bemba (Zambia)',
'bez': 'Bena',
'bez-TZ': 'Bena (Tanzania)',
'bg': 'Bulgarian',
'bg-BG': 'Bulgarian (Bulgaria)',
'bm': 'Bambara',
'bm-ML': 'Bambara (Mali)',
'bn': 'Bangla',
'bn-IN': 'Bangla (India)',
'bn-BD': 'Bangla (Bangladesh)',
'br': 'Breton',
'br-FR': 'Breton (France)',
'brx': 'Bodo',
'brx-IN': 'Bodo (India)',
'bs': 'Bosnian',
'bs-Latn-BA': 'Bosnian (Latin, Bosnia & Herzegovina)',
'bs-Latn': 'Bosnian (Latin)',
'bs-Cyrl-BA': 'Bosnian (Cyrillic, Bosnia & Herzegovina)',
'bs-Cyrl': 'Bosnian (Cyrillic)',
'ca': 'Catalan',
'ca-IT': 'Catalan (Italy)',
'ca-FR': 'Catalan (France)',
'ca-ES-VALENCIA': 'Catalan (Spain, Valencian)',
'ca-ES': 'Catalan (Spain)',
'ca-AD': 'Catalan (Andorra)',
'ccp': 'Chakma',
'ccp-IN': 'Chakma (India)',
'ccp-BD': 'Chakma (Bangladesh)',
'ce': 'Chechen',
'ce-RU': 'Chechen (Russia)',
'ceb': 'Cebuano',
'ceb-PH': 'Cebuano (Philippines)',
'cgg': 'Chiga',
'cgg-UG': 'Chiga (Uganda)',
'chr': 'Cherokee',
'chr-US': 'Cherokee (United States)',
'ckb': 'Central Kurdish',
'ckb-IR': 'Central Kurdish (Iran)',
'ckb-IQ': 'Central Kurdish (Iraq)',
'cs': 'Czech',
'cs-CZ': 'Czech (Czechia)',
'cy': 'Welsh',
'cy-GB': 'Welsh (United Kingdom)',
'da': 'Danish',
'da-GL': 'Danish (Greenland)',
'da-DK': 'Danish (Denmark)',
'dav': 'Taita',
'dav-KE': 'Taita (Kenya)',
'de': 'German',
'de-LU': 'German (Luxembourg)',
'de-LI': 'German (Liechtenstein)',
'de-IT': 'German (Italy)',
'de-DE': 'German (Germany)',
'de-CH': 'Swiss High German',
'de-BE': 'German (Belgium)',
'de-AT': 'Austrian German',
'dje': 'Zarma',
'dje-NE': 'Zarma (Niger)',
'doi': 'Dogri',
'doi-IN': 'Dogri (India)',
'dsb': 'Lower Sorbian',
'dsb-DE': 'Lower Sorbian (Germany)',
'dua': 'Duala',
'dua-CM': 'Duala (Cameroon)',
'dyo': 'Jola-Fonyi',
'dyo-SN': 'Jola-Fonyi (Senegal)',
'dz': 'Dzongkha',
'dz-BT': 'Dzongkha (Bhutan)',
'ebu': 'Embu',
'ebu-KE': 'Embu (Kenya)',
'ee': 'Ewe',
'ee-TG': 'Ewe (Togo)',
'ee-GH': 'Ewe (Ghana)',
'el': 'Greek',
'el-GR': 'Greek (Greece)',
'el-CY': 'Greek (Cyprus)',
'en': 'English',
'en-ZW': 'English (Zimbabwe)',
'en-ZM': 'English (Zambia)',
'en-ZA': 'English (South Africa)',
'en-WS': 'English (Samoa)',
'en-VU': 'English (Vanuatu)',
'en-VI': 'English (U.S. Virgin Islands)',
'en-VG': 'English (British Virgin Islands)',
'en-VC': 'English (St. Vincent & Grenadines)',
'en-US-POSIX': 'American English (Computer)',
'en-US': 'American English',
'en-UM': 'English (U.S. Outlying Islands)',
'en-UG': 'English (Uganda)',
'en-TZ': 'English (Tanzania)',
'en-TV': 'English (Tuvalu)',
'en-TT': 'English (Trinidad & Tobago)',
'en-TO': 'English (Tonga)',
'en-TK': 'English (Tokelau)',
'en-TC': 'English (Turks & Caicos Islands)',
'en-SZ': 'English (Eswatini)',
'en-SX': 'English (Sint Maarten)',
'en-SS': 'English (South Sudan)',
'en-SL': 'English (Sierra Leone)',
'en-SI': 'English (Slovenia)',
'en-SH': 'English (St. Helena)',
'en-SG': 'English (Singapore)',
'en-SE': 'English (Sweden)',
'en-SD': 'English (Sudan)',
'en-SC': 'English (Seychelles)',
'en-SB': 'English (Solomon Islands)',
'en-RW': 'English (Rwanda)',
'en-PW': 'English (Palau)',
'en-PR': 'English (Puerto Rico)',
'en-PN': 'English (Pitcairn Islands)',
'en-PK': 'English (Pakistan)',
'en-PH': 'English (Philippines)',
'en-PG': 'English (Papua New Guinea)',
'en-NZ': 'English (New Zealand)',
'en-NU': 'English (Niue)',
'en-NR': 'English (Nauru)',
'en-NL': 'English (Netherlands)',
'en-NG': 'English (Nigeria)',
'en-NF': 'English (Norfolk Island)',
'en-NA': 'English (Namibia)',
'en-MY': 'English (Malaysia)',
'en-MW': 'English (Malawi)',
'en-MV': 'English (Maldives)',
'en-MU': 'English (Mauritius)',
'en-MT': 'English (Malta)',
'en-MS': 'English (Montserrat)',
'en-MP': 'English (Northern Mariana Islands)',
'en-MO': 'English (Macao SAR China)',
'en-MH': 'English (Marshall Islands)',
'en-MG': 'English (Madagascar)',
'en-LS': 'English (Lesotho)',
'en-LR': 'English (Liberia)',
'en-LC': 'English (St. Lucia)',
'en-KY': 'English (Cayman Islands)',
'en-KN': 'English (St. Kitts & Nevis)',
'en-KI': 'English (Kiribati)',
'en-KE': 'English (Kenya)',
'en-JM': 'English (Jamaica)',
'en-JE': 'English (Jersey)',
'en-IO': 'English (British Indian Ocean Territory)',
'en-IN': 'English (India)',
'en-IM': 'English (Isle of Man)',
'en-IL': 'English (Israel)',
'en-IE': 'English (Ireland)',
'en-HK': 'English (Hong Kong SAR China)',
'en-GY': 'English (Guyana)',
'en-GU': 'English (Guam)',
'en-GM': 'English (Gambia)',
'en-GI': 'English (Gibraltar)',
'en-GH': 'English (Ghana)',
'en-GG': 'English (Guernsey)',
'en-GD': 'English (Grenada)',
'en-GB': 'British English',
'en-FM': 'English (Micronesia)',
'en-FK': 'English (Falkland Islands)',
'en-FJ': 'English (Fiji)',
'en-FI': 'English (Finland)',
'en-ER': 'English (Eritrea)',
'en-DM': 'English (Dominica)',
'en-DK': 'English (Denmark)',
'en-DG': 'English (Diego Garcia)',
'en-DE': 'English (Germany)',
'en-CY': 'English (Cyprus)',
'en-CX': 'English (Christmas Island)',
'en-CM': 'English (Cameroon)',
'en-CK': 'English (Cook Islands)',
'en-CH': 'English (Switzerland)',
'en-CC': 'English (Cocos [Keeling] Islands)',
'en-CA': 'Canadian English',
'en-BZ': 'English (Belize)',
'en-BW': 'English (Botswana)',
'en-BS': 'English (Bahamas)',
'en-BM': 'English (Bermuda)',
'en-BI': 'English (Burundi)',
'en-BE': 'English (Belgium)',
'en-BB': 'English (Barbados)',
'en-AU': 'Australian English',
'en-AT': 'English (Austria)',
'en-AS': 'English (American Samoa)',
'en-AI': 'English (Anguilla)',
'en-AG': 'English (Antigua & Barbuda)',
'en-AE': 'English (United Arab Emirates)',
'en-150': 'English (Europe)',
'en-001': 'English (world)',
'eo': 'Esperanto',
'eo-001': 'Esperanto (world)',
'es': 'Spanish',
'es-VE': 'Spanish (Venezuela)',
'es-UY': 'Spanish (Uruguay)',
'es-US': 'Spanish (United States)',
'es-SV': 'Spanish (El Salvador)',
'es-PY': 'Spanish (Paraguay)',
'es-PR': 'Spanish (Puerto Rico)',
'es-PH': 'Spanish (Philippines)',
'es-PE': 'Spanish (Peru)',
'es-PA': 'Spanish (Panama)',
'es-NI': 'Spanish (Nicaragua)',
'es-MX': 'Mexican Spanish',
'es-IC': 'Spanish (Canary Islands)',
'es-HN': 'Spanish (Honduras)',
'es-GT': 'Spanish (Guatemala)',
'es-GQ': 'Spanish (Equatorial Guinea)',
'es-ES': 'European Spanish',
'es-EC': 'Spanish (Ecuador)',
'es-EA': 'Spanish (Ceuta & Melilla)',
'es-DO': 'Spanish (Dominican Republic)',
'es-CU': 'Spanish (Cuba)',
'es-CR': 'Spanish (Costa Rica)',
'es-CO': 'Spanish (Colombia)',
'es-CL': 'Spanish (Chile)',
'es-BZ': 'Spanish (Belize)',
'es-BR': 'Spanish (Brazil)',
'es-BO': 'Spanish (Bolivia)',
'es-AR': 'Spanish (Argentina)',
'es-419': 'Latin American Spanish',
'et': 'Estonian',
'et-EE': 'Estonian (Estonia)',
'eu': 'Basque',
'eu-ES': 'Basque (Spain)',
'ewo': 'Ewondo',
'ewo-CM': 'Ewondo (Cameroon)',
'fa': 'Persian',
'fa-IR': 'Persian (Iran)',
'fa-AF': 'Dari',
'ff': 'Fulah',
'ff-Latn-SN': 'Fulah (Latin, Senegal)',
'ff-Latn-SL': 'Fulah (Latin, Sierra Leone)',
'ff-Latn-NG': 'Fulah (Latin, Nigeria)',
'ff-Latn-NE': 'Fulah (Latin, Niger)',
'ff-Latn-MR': 'Fulah (Latin, Mauritania)',
'ff-Latn-LR': 'Fulah (Latin, Liberia)',
'ff-Latn-GW': 'Fulah (Latin, Guinea-Bissau)',
'ff-Latn-GN': 'Fulah (Latin, Guinea)',
'ff-Latn-GM': 'Fulah (Latin, Gambia)',
'ff-Latn-GH': 'Fulah (Latin, Ghana)',
'ff-Latn-CM': 'Fulah (Latin, Cameroon)',
'ff-Latn-BF': 'Fulah (Latin, Burkina Faso)',
'ff-Latn': 'Fulah (Latin)',
'ff-Adlm-SN': 'Fulah (Adlam, Senegal)',
'ff-Adlm-SL': 'Fulah (Adlam, Sierra Leone)',
'ff-Adlm-NG': 'Fulah (Adlam, Nigeria)',
'ff-Adlm-NE': 'Fulah (Adlam, Niger)',
'ff-Adlm-MR': 'Fulah (Adlam, Mauritania)',
'ff-Adlm-LR': 'Fulah (Adlam, Liberia)',
'ff-Adlm-GW': 'Fulah (Adlam, Guinea-Bissau)',
'ff-Adlm-GN': 'Fulah (Adlam, Guinea)',
'ff-Adlm-GM': 'Fulah (Adlam, Gambia)',
'ff-Adlm-GH': 'Fulah (Adlam, Ghana)',
'ff-Adlm-CM': 'Fulah (Adlam, Cameroon)',
'ff-Adlm-BF': 'Fulah (Adlam, Burkina Faso)',
'ff-Adlm': 'Fulah (Adlam)',
'fi': 'Finnish',
'fi-FI': 'Finnish (Finland)',
'fil': 'Filipino',
'fil-PH': 'Filipino (Philippines)',
'fo': 'Faroese',
'fo-FO': 'Faroese (Faroe Islands)',
'fo-DK': 'Faroese (Denmark)',
'fr': 'French',
'fr-YT': 'French (Mayotte)',
'fr-WF': 'French (Wallis & Futuna)',
'fr-VU': 'French (Vanuatu)',
'fr-TN': 'French (Tunisia)',
'fr-TG': 'French (Togo)',
'fr-TD': 'French (Chad)',
'fr-SY': 'French (Syria)',
'fr-SN': 'French (Senegal)',
'fr-SC': 'French (Seychelles)',
'fr-RW': 'French (Rwanda)',
'fr-RE': 'French (Réunion)',
'fr-PM': 'French (St. Pierre & Miquelon)',
'fr-PF': 'French (French Polynesia)',
'fr-NE': 'French (Niger)',
'fr-NC': 'French (New Caledonia)',
'fr-MU': 'French (Mauritius)',
'fr-MR': 'French (Mauritania)',
'fr-MQ': 'French (Martinique)',
'fr-ML': 'French (Mali)',
'fr-MG': 'French (Madagascar)',
'fr-MF': 'French (St. Martin)',
'fr-MC': 'French (Monaco)',
'fr-MA': 'French (Morocco)',
'fr-LU': 'French (Luxembourg)',
'fr-KM': 'French (Comoros)',
'fr-HT': 'French (Haiti)',
'fr-GQ': 'French (Equatorial Guinea)',
'fr-GP': 'French (Guadeloupe)',
'fr-GN': 'French (Guinea)',
'fr-GF': 'French (French Guiana)',
'fr-GA': 'French (Gabon)',
'fr-FR': 'French (France)',
'fr-DZ': 'French (Algeria)',
'fr-DJ': 'French (Djibouti)',
'fr-CM': 'French (Cameroon)',
'fr-CI': 'French (Côte dIvoire)',
'fr-CH': 'Swiss French',
'fr-CG': 'French (Congo - Brazzaville)',
'fr-CF': 'French (Central African Republic)',
'fr-CD': 'French (Congo - Kinshasa)',
'fr-CA': 'Canadian French',
'fr-BL': 'French (St. Barthélemy)',
'fr-BJ': 'French (Benin)',
'fr-BI': 'French (Burundi)',
'fr-BF': 'French (Burkina Faso)',
'fr-BE': 'French (Belgium)',
'fur': 'Friulian',
'fur-IT': 'Friulian (Italy)',
'fy': 'Western Frisian',
'fy-NL': 'Western Frisian (Netherlands)',
'ga': 'Irish',
'ga-IE': 'Irish (Ireland)',
'ga-GB': 'Irish (United Kingdom)',
'gd': 'Scottish Gaelic',
'gd-GB': 'Scottish Gaelic (United Kingdom)',
'gl': 'Galician',
'gl-ES': 'Galician (Spain)',
'gsw': 'Swiss German',
'gsw-LI': 'Swiss German (Liechtenstein)',
'gsw-FR': 'Swiss German (France)',
'gsw-CH': 'Swiss German (Switzerland)',
'gu': 'Gujarati',
'gu-IN': 'Gujarati (India)',
'guz': 'Gusii',
'guz-KE': 'Gusii (Kenya)',
'gv': 'Manx',
'gv-IM': 'Manx (Isle of Man)',
'ha': 'Hausa',
'ha-NG': 'Hausa (Nigeria)',
'ha-NE': 'Hausa (Niger)',
'ha-GH': 'Hausa (Ghana)',
'haw': 'Hawaiian',
'haw-US': 'Hawaiian (United States)',
'he': 'Hebrew',
'he-IL': 'Hebrew (Israel)',
'hi': 'Hindi',
'hi-Latn-IN': 'Hindi (Latin, India)',
'hi-Latn': 'Hindi (Latin)',
'hi-IN': 'Hindi (India)',
'hr': 'Croatian',
'hr-HR': 'Croatian (Croatia)',
'hr-BA': 'Croatian (Bosnia & Herzegovina)',
'hsb': 'Upper Sorbian',
'hsb-DE': 'Upper Sorbian (Germany)',
'hu': 'Hungarian',
'hu-HU': 'Hungarian (Hungary)',
'hy': 'Armenian',
'hy-AM': 'Armenian (Armenia)',
'ia': 'Interlingua',
'ia-001': 'Interlingua (world)',
'id': 'Indonesian',
'id-ID': 'Indonesian (Indonesia)',
'ig': 'Igbo',
'ig-NG': 'Igbo (Nigeria)',
'is': 'Icelandic',
'is-IS': 'Icelandic (Iceland)',
'it': 'Italian',
'it-VA': 'Italian (Vatican City)',
'it-SM': 'Italian (San Marino)',
'it-IT': 'Italian (Italy)',
'it-CH': 'Italian (Switzerland)',
'ja': 'Japanese',
'ja-JP': 'Japanese (Japan)',
'jgo': 'Ngomba',
'jgo-CM': 'Ngomba (Cameroon)',
'jmc': 'Machame',
'jmc-TZ': 'Machame (Tanzania)',
'jv': 'Javanese',
'jv-ID': 'Javanese (Indonesia)',
'ka': 'Georgian',
'ka-GE': 'Georgian (Georgia)',
'kab': 'Kabyle',
'kab-DZ': 'Kabyle (Algeria)',
'kam': 'Kamba',
'kam-KE': 'Kamba (Kenya)',
'kde': 'Makonde',
'kde-TZ': 'Makonde (Tanzania)',
'kea': 'Kabuverdianu',
'kea-CV': 'Kabuverdianu (Cape Verde)',
'kgp': 'Kaingang',
'kgp-BR': 'Kaingang (Brazil)',
'khq': 'Koyra Chiini',
'khq-ML': 'Koyra Chiini (Mali)',
'ki': 'Kikuyu',
'ki-KE': 'Kikuyu (Kenya)',
'kk': 'Kazakh',
'kk-KZ': 'Kazakh (Kazakhstan)',
'kkj': 'Kako',
'kkj-CM': 'Kako (Cameroon)',
'kl': 'Kalaallisut',
'kl-GL': 'Kalaallisut (Greenland)',
'kln': 'Kalenjin',
'kln-KE': 'Kalenjin (Kenya)',
'km': 'Khmer',
'km-KH': 'Khmer (Cambodia)',
'kn': 'Kannada',
'kn-IN': 'Kannada (India)',
'ko': 'Korean',
'ko-KR': 'Korean (South Korea)',
'ko-KP': 'Korean (North Korea)',
'kok': 'Konkani',
'kok-IN': 'Konkani (India)',
'ks': 'Kashmiri',
'ks-Deva-IN': 'Kashmiri (Devanagari, India)',
'ks-Deva': 'Kashmiri (Devanagari)',
'ks-Arab-IN': 'Kashmiri (Arabic, India)',
'ks-Arab': 'Kashmiri (Arabic)',
'ksb': 'Shambala',
'ksb-TZ': 'Shambala (Tanzania)',
'ksf': 'Bafia',
'ksf-CM': 'Bafia (Cameroon)',
'ksh': 'Colognian',
'ksh-DE': 'Colognian (Germany)',
'ku': 'Kurdish',
'ku-TR': 'Kurdish (Turkey)',
'kw': 'Cornish',
'kw-GB': 'Cornish (United Kingdom)',
'ky': 'Kyrgyz',
'ky-KG': 'Kyrgyz (Kyrgyzstan)',
'lag': 'Langi',
'lag-TZ': 'Langi (Tanzania)',
'lb': 'Luxembourgish',
'lb-LU': 'Luxembourgish (Luxembourg)',
'lg': 'Ganda',
'lg-UG': 'Ganda (Uganda)',
'lkt': 'Lakota',
'lkt-US': 'Lakota (United States)',
'ln': 'Lingala',
'ln-CG': 'Lingala (Congo - Brazzaville)',
'ln-CF': 'Lingala (Central African Republic)',
'ln-CD': 'Lingala (Congo - Kinshasa)',
'ln-AO': 'Lingala (Angola)',
'lo': 'Lao',
'lo-LA': 'Lao (Laos)',
'lrc': 'Northern Luri',
'lrc-IR': 'Northern Luri (Iran)',
'lrc-IQ': 'Northern Luri (Iraq)',
'lt': 'Lithuanian',
'lt-LT': 'Lithuanian (Lithuania)',
'lu': 'Luba-Katanga',
'lu-CD': 'Luba-Katanga (Congo - Kinshasa)',
'luo': 'Luo',
'luo-KE': 'Luo (Kenya)',
'luy': 'Luyia',
'luy-KE': 'Luyia (Kenya)',
'lv': 'Latvian',
'lv-LV': 'Latvian (Latvia)',
'mai': 'Maithili',
'mai-IN': 'Maithili (India)',
'mas': 'Masai',
'mas-TZ': 'Masai (Tanzania)',
'mas-KE': 'Masai (Kenya)',
'mer': 'Meru',
'mer-KE': 'Meru (Kenya)',
'mfe': 'Morisyen',
'mfe-MU': 'Morisyen (Mauritius)',
'mg': 'Malagasy',
'mg-MG': 'Malagasy (Madagascar)',
'mgh': 'Makhuwa-Meetto',
'mgh-MZ': 'Makhuwa-Meetto (Mozambique)',
'mgo': 'Metaʼ',
'mgo-CM': 'Metaʼ (Cameroon)',
'mi': 'Māori',
'mi-NZ': 'Māori (New Zealand)',
'mk': 'Macedonian',
'mk-MK': 'Macedonian (North Macedonia)',
'ml': 'Malayalam',
'ml-IN': 'Malayalam (India)',
'mn': 'Mongolian',
'mn-MN': 'Mongolian (Mongolia)',
'mni': 'Manipuri',
'mni-Beng-IN': 'Manipuri (Bangla, India)',
'mni-Beng': 'Manipuri (Bangla)',
'mr': 'Marathi',
'mr-IN': 'Marathi (India)',
'ms': 'Malay',
'ms-SG': 'Malay (Singapore)',
'ms-MY': 'Malay (Malaysia)',
'ms-ID': 'Malay (Indonesia)',
'ms-BN': 'Malay (Brunei)',
'mt': 'Maltese',
'mt-MT': 'Maltese (Malta)',
'mua': 'Mundang',
'mua-CM': 'Mundang (Cameroon)',
'my': 'Burmese',
'my-MM': 'Burmese (Myanmar [Burma])',
'mzn': 'Mazanderani',
'mzn-IR': 'Mazanderani (Iran)',
'naq': 'Nama',
'naq-NA': 'Nama (Namibia)',
'nb': 'Norwegian Bokmål',
'nb-SJ': 'Norwegian Bokmål (Svalbard & Jan Mayen)',
'nb-NO': 'Norwegian Bokmål (Norway)',
'nd': 'North Ndebele',
'nd-ZW': 'North Ndebele (Zimbabwe)',
'nds': 'Low German',
'nds-NL': 'Low Saxon',
'nds-DE': 'Low German (Germany)',
'ne': 'Nepali',
'ne-NP': 'Nepali (Nepal)',
'ne-IN': 'Nepali (India)',
'nl': 'Dutch',
'nl-SX': 'Dutch (Sint Maarten)',
'nl-SR': 'Dutch (Suriname)',
'nl-NL': 'Dutch (Netherlands)',
'nl-CW': 'Dutch (Curaçao)',
'nl-BQ': 'Dutch (Caribbean Netherlands)',
'nl-BE': 'Flemish',
'nl-AW': 'Dutch (Aruba)',
'nmg': 'Kwasio',
'nmg-CM': 'Kwasio (Cameroon)',
'nn': 'Norwegian Nynorsk',
'nn-NO': 'Norwegian Nynorsk (Norway)',
'nnh': 'Ngiemboon',
'nnh-CM': 'Ngiemboon (Cameroon)',
'no': 'Norwegian',
'nus': 'Nuer',
'nus-SS': 'Nuer (South Sudan)',
'nyn': 'Nyankole',
'nyn-UG': 'Nyankole (Uganda)',
'om': 'Oromo',
'om-KE': 'Oromo (Kenya)',
'om-ET': 'Oromo (Ethiopia)',
'or': 'Odia',
'or-IN': 'Odia (India)',
'os': 'Ossetic',
'os-RU': 'Ossetic (Russia)',
'os-GE': 'Ossetic (Georgia)',
'pa': 'Punjabi',
'pa-Guru-IN': 'Punjabi (Gurmukhi, India)',
'pa-Guru': 'Punjabi (Gurmukhi)',
'pa-Arab-PK': 'Punjabi (Arabic, Pakistan)',
'pa-Arab': 'Punjabi (Arabic)',
'pcm': 'Nigerian Pidgin',
'pcm-NG': 'Nigerian Pidgin (Nigeria)',
'pl': 'Polish',
'pl-PL': 'Polish (Poland)',
'ps': 'Pashto',
'ps-PK': 'Pashto (Pakistan)',
'ps-AF': 'Pashto (Afghanistan)',
'pt': 'Portuguese',
'pt-TL': 'Portuguese (Timor-Leste)',
'pt-ST': 'Portuguese (São Tomé & Príncipe)',
'pt-PT': 'European Portuguese',
'pt-MZ': 'Portuguese (Mozambique)',
'pt-MO': 'Portuguese (Macao SAR China)',
'pt-LU': 'Portuguese (Luxembourg)',
'pt-GW': 'Portuguese (Guinea-Bissau)',
'pt-GQ': 'Portuguese (Equatorial Guinea)',
'pt-CV': 'Portuguese (Cape Verde)',
'pt-CH': 'Portuguese (Switzerland)',
'pt-BR': 'Brazilian Portuguese',
'pt-AO': 'Portuguese (Angola)',
'qu': 'Quechua',
'qu-PE': 'Quechua (Peru)',
'qu-EC': 'Quechua (Ecuador)',
'qu-BO': 'Quechua (Bolivia)',
'rm': 'Romansh',
'rm-CH': 'Romansh (Switzerland)',
'rn': 'Rundi',
'rn-BI': 'Rundi (Burundi)',
'ro': 'Romanian',
'ro-RO': 'Romanian (Romania)',
'ro-MD': 'Moldavian',
'rof': 'Rombo',
'rof-TZ': 'Rombo (Tanzania)',
'ru': 'Russian',
'ru-UA': 'Russian (Ukraine)',
'ru-RU': 'Russian (Russia)',
'ru-MD': 'Russian (Moldova)',
'ru-KZ': 'Russian (Kazakhstan)',
'ru-KG': 'Russian (Kyrgyzstan)',
'ru-BY': 'Russian (Belarus)',
'rw': 'Kinyarwanda',
'rw-RW': 'Kinyarwanda (Rwanda)',
'rwk': 'Rwa',
'rwk-TZ': 'Rwa (Tanzania)',
'sa': 'Sanskrit',
'sa-IN': 'Sanskrit (India)',
'sah': 'Sakha',
'sah-RU': 'Sakha (Russia)',
'saq': 'Samburu',
'saq-KE': 'Samburu (Kenya)',
'sat': 'Santali',
'sat-Olck-IN': 'Santali (Ol Chiki, India)',
'sat-Olck': 'Santali (Ol Chiki)',
'sbp': 'Sangu',
'sbp-TZ': 'Sangu (Tanzania)',
'sc': 'Sardinian',
'sc-IT': 'Sardinian (Italy)',
'sd': 'Sindhi',
'sd-Deva-IN': 'Sindhi (Devanagari, India)',
'sd-Deva': 'Sindhi (Devanagari)',
'sd-Arab-PK': 'Sindhi (Arabic, Pakistan)',
'sd-Arab': 'Sindhi (Arabic)',
'se': 'Northern Sami',
'se-SE': 'Northern Sami (Sweden)',
'se-NO': 'Northern Sami (Norway)',
'se-FI': 'Northern Sami (Finland)',
'seh': 'Sena',
'seh-MZ': 'Sena (Mozambique)',
'ses': 'Koyraboro Senni',
'ses-ML': 'Koyraboro Senni (Mali)',
'sg': 'Sango',
'sg-CF': 'Sango (Central African Republic)',
'shi': 'Tachelhit',
'shi-Tfng-MA': 'Tachelhit (Tifinagh, Morocco)',
'shi-Tfng': 'Tachelhit (Tifinagh)',
'shi-Latn-MA': 'Tachelhit (Latin, Morocco)',
'shi-Latn': 'Tachelhit (Latin)',
'si': 'Sinhala',
'si-LK': 'Sinhala (Sri Lanka)',
'sk': 'Slovak',
'sk-SK': 'Slovak (Slovakia)',
'sl': 'Slovenian',
'sl-SI': 'Slovenian (Slovenia)',
'smn': 'Inari Sami',
'smn-FI': 'Inari Sami (Finland)',
'sn': 'Shona',
'sn-ZW': 'Shona (Zimbabwe)',
'so': 'Somali',
'so-SO': 'Somali (Somalia)',
'so-KE': 'Somali (Kenya)',
'so-ET': 'Somali (Ethiopia)',
'so-DJ': 'Somali (Djibouti)',
'sq': 'Albanian',
'sq-XK': 'Albanian (Kosovo)',
'sq-MK': 'Albanian (North Macedonia)',
'sq-AL': 'Albanian (Albania)',
'sr': 'Serbian',
'sr-Latn-XK': 'Serbian (Latin, Kosovo)',
'sr-Latn-RS': 'Serbian (Latin, Serbia)',
'sr-Latn-ME': 'Montenegrin (Latin)',
'sr-Latn-BA': 'Serbian (Latin, Bosnia & Herzegovina)',
'sr-Latn': 'Serbian (Latin)',
'sr-Cyrl-XK': 'Serbian (Cyrillic, Kosovo)',
'sr-Cyrl-RS': 'Serbian (Cyrillic, Serbia)',
'sr-Cyrl-ME': 'Montenegrin (Cyrillic)',
'sr-Cyrl-BA': 'Serbian (Cyrillic, Bosnia & Herzegovina)',
'sr-Cyrl': 'Serbian (Cyrillic)',
'su': 'Sundanese',
'su-Latn-ID': 'Sundanese (Latin, Indonesia)',
'su-Latn': 'Sundanese (Latin)',
'sv': 'Swedish',
'sv-SE': 'Swedish (Sweden)',
'sv-FI': 'Swedish (Finland)',
'sv-AX': 'Swedish (Åland Islands)',
'sw': 'Swahili',
'sw-UG': 'Swahili (Uganda)',
'sw-TZ': 'Swahili (Tanzania)',
'sw-KE': 'Swahili (Kenya)',
'sw-CD': 'Congo Swahili',
'ta': 'Tamil',
'ta-SG': 'Tamil (Singapore)',
'ta-MY': 'Tamil (Malaysia)',
'ta-LK': 'Tamil (Sri Lanka)',
'ta-IN': 'Tamil (India)',
'te': 'Telugu',
'te-IN': 'Telugu (India)',
'teo': 'Teso',
'teo-UG': 'Teso (Uganda)',
'teo-KE': 'Teso (Kenya)',
'tg': 'Tajik',
'tg-TJ': 'Tajik (Tajikistan)',
'th': 'Thai',
'th-TH': 'Thai (Thailand)',
'ti': 'Tigrinya',
'ti-ET': 'Tigrinya (Ethiopia)',
'ti-ER': 'Tigrinya (Eritrea)',
'tk': 'Turkmen',
'tk-TM': 'Turkmen (Turkmenistan)',
'to': 'Tongan',
'to-TO': 'Tongan (Tonga)',
'tr': 'Turkish',
'tr-TR': 'Turkish (Turkey)',
'tr-CY': 'Turkish (Cyprus)',
'tt': 'Tatar',
'tt-RU': 'Tatar (Russia)',
'twq': 'Tasawaq',
'twq-NE': 'Tasawaq (Niger)',
'tzm': 'Central Atlas Tamazight',
'tzm-MA': 'Central Atlas Tamazight (Morocco)',
'ug': 'Uyghur',
'ug-CN': 'Uyghur (China)',
'uk': 'Ukrainian',
'uk-UA': 'Ukrainian (Ukraine)',
'ur': 'Urdu',
'ur-PK': 'Urdu (Pakistan)',
'ur-IN': 'Urdu (India)',
'uz': 'Uzbek',
'uz-Latn-UZ': 'Uzbek (Latin, Uzbekistan)',
'uz-Latn': 'Uzbek (Latin)',
'uz-Cyrl-UZ': 'Uzbek (Cyrillic, Uzbekistan)',
'uz-Cyrl': 'Uzbek (Cyrillic)',
'uz-Arab-AF': 'Uzbek (Arabic, Afghanistan)',
'uz-Arab': 'Uzbek (Arabic)',
'vai': 'Vai',
'vai-Vaii-LR': 'Vai (Vai, Liberia)',
'vai-Vaii': 'Vai (Vai)',
'vai-Latn-LR': 'Vai (Latin, Liberia)',
'vai-Latn': 'Vai (Latin)',
'vi': 'Vietnamese',
'vi-VN': 'Vietnamese (Vietnam)',
'vun': 'Vunjo',
'vun-TZ': 'Vunjo (Tanzania)',
'wae': 'Walser',
'wae-CH': 'Walser (Switzerland)',
'wo': 'Wolof',
'wo-SN': 'Wolof (Senegal)',
'xh': 'Xhosa',
'xh-ZA': 'Xhosa (South Africa)',
'xog': 'Soga',
'xog-UG': 'Soga (Uganda)',
'yav': 'Yangben',
'yav-CM': 'Yangben (Cameroon)',
'yi': 'Yiddish',
'yi-001': 'Yiddish (world)',
'yo': 'Yoruba',
'yo-NG': 'Yoruba (Nigeria)',
'yo-BJ': 'Yoruba (Benin)',
'yrl': 'Nheengatu',
'yrl-VE': 'Nheengatu (Venezuela)',
'yrl-CO': 'Nheengatu (Colombia)',
'yrl-BR': 'Nheengatu (Brazil)',
'zgh': 'Standard Moroccan Tamazight',
'zgh-MA': 'Standard Moroccan Tamazight (Morocco)',
'zh': 'Chinese',
'zh-Hans-CN': 'Simplified Chinese (China)',
'zh-Hans-HK': 'Simplified Chinese (Hong Kong SAR China)',
'zh-Hans-MO': 'Simplified Chinese (Macao SAR China)',
'zh-Hans-SG': 'Simplified Chinese (Singapore)',
'zh-Hans': 'Simplified Chinese',
'zh-Hant-TW': 'Traditional Chinese (Taiwan)',
'zh-Hant-MO': 'Traditional Chinese (Macao SAR China)',
'zh-Hant-HK': 'Traditional Chinese (Hong Kong SAR China)',
'zh-Hant': 'Traditional Chinese',
'zu': 'Zulu',
'zu-ZA': 'Zulu (South Africa)',
},
};

View File

@ -1,927 +0,0 @@
'use strict';
module.exports = {
open_panel: '翻译',
'localization-editor': '本地化编辑器',
description: '本地化编辑器',
service_provider: '译文服务商',
collection: '收集并统计',
language_compilation: '语言编译',
select_placeholder: '请选择',
unselect_service_tip: '未选择译文服务商,将不支持自动翻译功能',
local_language: '本地开发语言:',
collected_from_resource_files: '从资源文件中收集',
required: '*必选',
file_no_exist: '文件不存在',
cannot_empty: '不能为空',
common_languages: '常用的语言',
cancel: '取消',
confirm: '确认',
localization_editor_project_config: '本地化项目配置',
localization_editor_editor_config: '本地化编辑器配置',
localization_editor_provider_config: '本地化翻译服务商配置',
YOUDAO: {
'zh-CHS': '简体中文',
'zh-CHT': '繁体中文',
},
label_inspector: {
no_origin: '无原文',
key: '唯一标识符',
'key:': '唯一标识符:',
save: '保存',
cannot_empty: '不能为空',
error_tooltip: '包含字母、数字、下划线、连字符、@、/、+、| 、.\n不能为其他字符',
exist_media_tooltip: '该 key 为资源的 key',
},
build: {
compress_warning: '因 uuid 为 "${a}" 的图片与 uuid 为 "${b}" 的图片的压缩纹理选项不一致,导致构建失败,请设置为一致',
packable_warning: 'uuid 为 \'${uuid}\' 的图片由于开启了合图功能,该图片的翻译失效',
use_polyfill: '使用的 polyfill 脚本',
use_language: '使用的语言',
select_all: '全选',
default_language: '默认语言',
fallback_language: '备用语言',
},
home: {
po_name: 'PO 文件',
csv_name: 'CSV',
xlsx_name: 'Excel 工作簿 ',
service_provider: '译文服务商',
collection: '收集',
language_compilation: '语言编译',
select_placeholder: '请选择',
unselect_service_tip: '未选择译文服务商,将不支持自动翻译功能',
'local_language:': '本地开发语言:',
collected_from_resource_files: '从资源文件中收集',
required: '*必选',
delete: '删除',
preview: '预览',
combine: '编译',
translate: '翻译',
complement: '补全',
not_recorded: '未统计',
collect_and_count: '收集并统计',
add_new_language: '添加新语言',
add: '添加',
select: '请选择',
language: '语言',
'language:': '语言:',
extname: '扩展名',
exclude_path: '排除路径',
language_for_service_provider: '服务商识别的语言',
dir: '目录',
search_dir: '搜索目录',
translate_process: ' 翻译进度',
combine_process: '编译进度',
operation: '操作',
local_language: '本地开发语言',
combine_tooltip: '文本按实际字数计算, 资源按单位1计算',
translate_tooltip: '任意条目以单位1计算',
count: '字数:',
collecting: '正在统计中',
unselect: '未选择开发语言',
save: '保存',
complete: '完成',
collect_group: '收集组',
turn_on_tip: '请先启用 Localization Editor 工具 ',
turn_on: '启用 Localization Editor',
turn_off_warning: '确定要关闭 Localization Editor 工具吗?关闭后已经翻译的数据将会丢失',
turn_off: '关闭 L10N',
delete_data: '卸载数据',
delete_data_warning: '确定要卸载数据吗?卸载后已经翻译的数据将会丢失',
export: '导出',
export_all: '导出全部',
},
translate: {
new_value: '新值',
old_value: '原值',
import_po: '导入 PO 文件',
export_po: '导出 PO 文件',
save: '保存',
unfilled: '未填充',
untranslated: '未翻译',
filled: '已填充',
count: '字数:',
translate: '翻译',
translated: '已翻译',
key: '唯一标识符',
'key:': '唯一标识符:',
origin: '原文',
target: '译文',
import_all: '智能匹配',
import_file: '导入文件',
import: '导入',
jump: '跳过',
'position:': '位置:',
reference_uuid: '引用的节点的 uuid:',
variant: '变体',
after_variant: '变体后',
standard: '标准',
delete_variant: '删除变体',
cancel: '取消',
confirm: '确认',
cover: '覆盖',
conflict_dialog_title: '注意:',
conflict_dialog_content: '【已翻译】里已存在以下数据,覆盖后原数据将会消失。确定要覆盖吗',
unsaved_warning: '当前尚未保存, 确定要吗?',
delete_warning: '确定删除吗?',
auto_import_warning: '即将把未翻译中{length}个尚未绑定的条目进行智能匹配, 即将{localLocale} (源语言)替换 {targetLocale} (目标语言),请问是否开启智能匹配',
quit_warning: '尚有未保存的内容, 确定退出吗?',
import_tab_title: '导入的文件',
import_file_conflicts_with_file_warning: '{num}个数据因为key相同导致其无法导入请问如何处理',
},
language_code: {
'af': '南非荷兰语',
'af-ZA': '南非荷兰语(南非)',
'af-NA': '南非荷兰语(纳米比亚)',
'agq': '亚罕语',
'agq-CM': '亚罕语(喀麦隆)',
'ak': '阿肯语',
'ak-GH': '阿肯语(加纳)',
'am': '阿姆哈拉语',
'am-ET': '阿姆哈拉语(埃塞俄比亚)',
'ar': '阿拉伯语',
'ar-YE': '阿拉伯语(也门)',
'ar-TN': '阿拉伯语(突尼斯)',
'ar-TD': '阿拉伯语(乍得)',
'ar-SY': '阿拉伯语(叙利亚)',
'ar-SS': '阿拉伯语(南苏丹)',
'ar-SO': '阿拉伯语(索马里)',
'ar-SD': '阿拉伯语(苏丹)',
'ar-SA': '阿拉伯语(沙特阿拉伯)',
'ar-QA': '阿拉伯语(卡塔尔)',
'ar-PS': '阿拉伯语(巴勒斯坦领土)',
'ar-OM': '阿拉伯语(阿曼)',
'ar-MR': '阿拉伯语(毛里塔尼亚)',
'ar-MA': '阿拉伯语(摩洛哥)',
'ar-LY': '阿拉伯语(利比亚)',
'ar-LB': '阿拉伯语(黎巴嫩)',
'ar-KW': '阿拉伯语(科威特)',
'ar-KM': '阿拉伯语(科摩罗)',
'ar-JO': '阿拉伯语(约旦)',
'ar-IQ': '阿拉伯语(伊拉克)',
'ar-IL': '阿拉伯语(以色列)',
'ar-ER': '阿拉伯语(厄立特里亚)',
'ar-EH': '阿拉伯语(西撒哈拉)',
'ar-EG': '阿拉伯语(埃及)',
'ar-DZ': '阿拉伯语(阿尔及利亚)',
'ar-DJ': '阿拉伯语(吉布提)',
'ar-BH': '阿拉伯语(巴林)',
'ar-AE': '阿拉伯语(阿拉伯联合酋长国)',
'ar-001': '现代标准阿拉伯语',
'as': '阿萨姆语',
'as-IN': '阿萨姆语(印度)',
'asa': '帕雷语',
'asa-TZ': '帕雷语(坦桑尼亚)',
'ast': '阿斯图里亚斯语',
'ast-ES': '阿斯图里亚斯语(西班牙)',
'az': '阿塞拜疆语',
'az-Latn-AZ': '阿塞拜疆语(拉丁文,阿塞拜疆)',
'az-Latn': '阿塞拜疆语(拉丁文)',
'az-Cyrl-AZ': '阿塞拜疆语(西里尔文,阿塞拜疆)',
'az-Cyrl': '阿塞拜疆语(西里尔文)',
'bas': '巴萨语',
'bas-CM': '巴萨语(喀麦隆)',
'be': '白俄罗斯语',
'be-TARASK': '白俄罗斯语Taraskievica 拼字)',
'be-BY': '白俄罗斯语(白俄罗斯)',
'bem': '本巴语',
'bem-ZM': '本巴语(赞比亚)',
'bez': '贝纳语',
'bez-TZ': '贝纳语(坦桑尼亚)',
'bg': '保加利亚语',
'bg-BG': '保加利亚语(保加利亚)',
'bm': '班巴拉语',
'bm-ML': '班巴拉语(马里)',
'bn': '孟加拉语',
'bn-IN': '孟加拉语(印度)',
'bn-BD': '孟加拉语(孟加拉国)',
'br': '布列塔尼语',
'br-FR': '布列塔尼语(法国)',
'brx': '博多语',
'brx-IN': '博多语(印度)',
'bs': '波斯尼亚语',
'bs-Latn-BA': '波斯尼亚语(拉丁文,波斯尼亚和黑塞哥维那)',
'bs-Latn': '波斯尼亚语(拉丁文)',
'bs-Cyrl-BA': '波斯尼亚语(西里尔文,波斯尼亚和黑塞哥维那)',
'bs-Cyrl': '波斯尼亚语(西里尔文)',
'ca': '加泰罗尼亚语',
'ca-IT': '加泰罗尼亚语(意大利)',
'ca-FR': '加泰罗尼亚语(法国)',
'ca-ES-VALENCIA': '加泰罗尼亚语(西班牙,瓦伦西亚文)',
'ca-ES': '加泰罗尼亚语(西班牙)',
'ca-AD': '加泰罗尼亚语(安道尔)',
'ccp': '查克玛语',
'ccp-IN': '查克玛语(印度)',
'ccp-BD': '查克玛语(孟加拉国)',
'ce': '车臣语',
'ce-RU': '车臣语(俄罗斯)',
'ceb': '宿务语',
'ceb-PH': '宿务语(菲律宾)',
'cgg': '奇加语',
'cgg-UG': '奇加语(乌干达)',
'chr': '切罗基语',
'chr-US': '切罗基语(美国)',
'ckb': '中库尔德语',
'ckb-IR': '中库尔德语(伊朗)',
'ckb-IQ': '中库尔德语(伊拉克)',
'cs': '捷克语',
'cs-CZ': '捷克语(捷克)',
'cy': '威尔士语',
'cy-GB': '威尔士语(英国)',
'da': '丹麦语',
'da-GL': '丹麦语(格陵兰)',
'da-DK': '丹麦语(丹麦)',
'dav': '台塔语',
'dav-KE': '台塔语(肯尼亚)',
'de': '德语',
'de-LU': '德语(卢森堡)',
'de-LI': '德语(列支敦士登)',
'de-IT': '德语(意大利)',
'de-DE': '德语(德国)',
'de-CH': '瑞士高地德语',
'de-BE': '德语(比利时)',
'de-AT': '奥地利德语',
'dje': '哲尔马语',
'dje-NE': '哲尔马语(尼日尔)',
'doi': '多格拉语',
'doi-IN': '多格拉语(印度)',
'dsb': '下索布语',
'dsb-DE': '下索布语(德国)',
'dua': '杜阿拉语',
'dua-CM': '杜阿拉语(喀麦隆)',
'dyo': '朱拉语',
'dyo-SN': '朱拉语(塞内加尔)',
'dz': '宗卡语',
'dz-BT': '宗卡语(不丹)',
'ebu': '恩布语',
'ebu-KE': '恩布语(肯尼亚)',
'ee': '埃维语',
'ee-TG': '埃维语(多哥)',
'ee-GH': '埃维语(加纳)',
'el': '希腊语',
'el-GR': '希腊语(希腊)',
'el-CY': '希腊语(塞浦路斯)',
'en': '英语',
'en-ZW': '英语(津巴布韦)',
'en-ZM': '英语(赞比亚)',
'en-ZA': '英语(南非)',
'en-WS': '英语(萨摩亚)',
'en-VU': '英语(瓦努阿图)',
'en-VI': '英语(美属维尔京群岛)',
'en-VG': '英语(英属维尔京群岛)',
'en-VC': '英语(圣文森特和格林纳丁斯)',
'en-US-POSIX': '美国英语(电脑)',
'en-US': '美国英语',
'en-UM': '英语(美国本土外小岛屿)',
'en-UG': '英语(乌干达)',
'en-TZ': '英语(坦桑尼亚)',
'en-TV': '英语(图瓦卢)',
'en-TT': '英语(特立尼达和多巴哥)',
'en-TO': '英语(汤加)',
'en-TK': '英语(托克劳)',
'en-TC': '英语(特克斯和凯科斯群岛)',
'en-SZ': '英语(斯威士兰)',
'en-SX': '英语(荷属圣马丁)',
'en-SS': '英语(南苏丹)',
'en-SL': '英语(塞拉利昂)',
'en-SI': '英语(斯洛文尼亚)',
'en-SH': '英语(圣赫勒拿)',
'en-SG': '英语(新加坡)',
'en-SE': '英语(瑞典)',
'en-SD': '英语(苏丹)',
'en-SC': '英语(塞舌尔)',
'en-SB': '英语(所罗门群岛)',
'en-RW': '英语(卢旺达)',
'en-PW': '英语(帕劳)',
'en-PR': '英语(波多黎各)',
'en-PN': '英语(皮特凯恩群岛)',
'en-PK': '英语(巴基斯坦)',
'en-PH': '英语(菲律宾)',
'en-PG': '英语(巴布亚新几内亚)',
'en-NZ': '英语(新西兰)',
'en-NU': '英语(纽埃)',
'en-NR': '英语(瑙鲁)',
'en-NL': '英语(荷兰)',
'en-NG': '英语(尼日利亚)',
'en-NF': '英语(诺福克岛)',
'en-NA': '英语(纳米比亚)',
'en-MY': '英语(马来西亚)',
'en-MW': '英语(马拉维)',
'en-MV': '英语(马尔代夫)',
'en-MU': '英语(毛里求斯)',
'en-MT': '英语(马耳他)',
'en-MS': '英语(蒙特塞拉特)',
'en-MP': '英语(北马里亚纳群岛)',
'en-MO': '英语(中国澳门特别行政区)',
'en-MH': '英语(马绍尔群岛)',
'en-MG': '英语(马达加斯加)',
'en-LS': '英语(莱索托)',
'en-LR': '英语(利比里亚)',
'en-LC': '英语(圣卢西亚)',
'en-KY': '英语(开曼群岛)',
'en-KN': '英语(圣基茨和尼维斯)',
'en-KI': '英语(基里巴斯)',
'en-KE': '英语(肯尼亚)',
'en-JM': '英语(牙买加)',
'en-JE': '英语(泽西岛)',
'en-IO': '英语(英属印度洋领地)',
'en-IN': '英语(印度)',
'en-IM': '英语(马恩岛)',
'en-IL': '英语(以色列)',
'en-IE': '英语(爱尔兰)',
'en-HK': '英语(中国香港特别行政区)',
'en-GY': '英语(圭亚那)',
'en-GU': '英语(关岛)',
'en-GM': '英语(冈比亚)',
'en-GI': '英语(直布罗陀)',
'en-GH': '英语(加纳)',
'en-GG': '英语(根西岛)',
'en-GD': '英语(格林纳达)',
'en-GB': '英国英语',
'en-FM': '英语(密克罗尼西亚)',
'en-FK': '英语(福克兰群岛)',
'en-FJ': '英语(斐济)',
'en-FI': '英语(芬兰)',
'en-ER': '英语(厄立特里亚)',
'en-DM': '英语(多米尼克)',
'en-DK': '英语(丹麦)',
'en-DG': '英语(迪戈加西亚岛)',
'en-DE': '英语(德国)',
'en-CY': '英语(塞浦路斯)',
'en-CX': '英语(圣诞岛)',
'en-CM': '英语(喀麦隆)',
'en-CK': '英语(库克群岛)',
'en-CH': '英语(瑞士)',
'en-CC': '英语(科科斯[基林]群岛)',
'en-CA': '加拿大英语',
'en-BZ': '英语(伯利兹)',
'en-BW': '英语(博茨瓦纳)',
'en-BS': '英语(巴哈马)',
'en-BM': '英语(百慕大)',
'en-BI': '英语(布隆迪)',
'en-BE': '英语(比利时)',
'en-BB': '英语(巴巴多斯)',
'en-AU': '澳大利亚英语',
'en-AT': '英语(奥地利)',
'en-AS': '英语(美属萨摩亚)',
'en-AI': '英语(安圭拉)',
'en-AG': '英语(安提瓜和巴布达)',
'en-AE': '英语(阿拉伯联合酋长国)',
'en-150': '英语(欧洲)',
'en-001': '英语(世界)',
'eo': '世界语',
'eo-001': '世界语(世界)',
'es': '西班牙语',
'es-VE': '西班牙语(委内瑞拉)',
'es-UY': '西班牙语(乌拉圭)',
'es-US': '西班牙语(美国)',
'es-SV': '西班牙语(萨尔瓦多)',
'es-PY': '西班牙语(巴拉圭)',
'es-PR': '西班牙语(波多黎各)',
'es-PH': '西班牙语(菲律宾)',
'es-PE': '西班牙语(秘鲁)',
'es-PA': '西班牙语(巴拿马)',
'es-NI': '西班牙语(尼加拉瓜)',
'es-MX': '墨西哥西班牙语',
'es-IC': '西班牙语(加纳利群岛)',
'es-HN': '西班牙语(洪都拉斯)',
'es-GT': '西班牙语(危地马拉)',
'es-GQ': '西班牙语(赤道几内亚)',
'es-ES': '欧洲西班牙语',
'es-EC': '西班牙语(厄瓜多尔)',
'es-EA': '西班牙语(休达及梅利利亚)',
'es-DO': '西班牙语(多米尼加共和国)',
'es-CU': '西班牙语(古巴)',
'es-CR': '西班牙语(哥斯达黎加)',
'es-CO': '西班牙语(哥伦比亚)',
'es-CL': '西班牙语(智利)',
'es-BZ': '西班牙语(伯利兹)',
'es-BR': '西班牙语(巴西)',
'es-BO': '西班牙语(玻利维亚)',
'es-AR': '西班牙语(阿根廷)',
'es-419': '拉丁美洲西班牙语',
'et': '爱沙尼亚语',
'et-EE': '爱沙尼亚语(爱沙尼亚)',
'eu': '巴斯克语',
'eu-ES': '巴斯克语(西班牙)',
'ewo': '埃翁多语',
'ewo-CM': '埃翁多语(喀麦隆)',
'fa': '波斯语',
'fa-IR': '波斯语(伊朗)',
'fa-AF': '达里语',
'ff': '富拉语',
'ff-Latn-SN': '富拉语(拉丁文,塞内加尔)',
'ff-Latn-SL': '富拉语(拉丁文,塞拉利昂)',
'ff-Latn-NG': '富拉语(拉丁文,尼日利亚)',
'ff-Latn-NE': '富拉语(拉丁文,尼日尔)',
'ff-Latn-MR': '富拉语(拉丁文,毛里塔尼亚)',
'ff-Latn-LR': '富拉语(拉丁文,利比里亚)',
'ff-Latn-GW': '富拉语(拉丁文,几内亚比绍)',
'ff-Latn-GN': '富拉语(拉丁文,几内亚)',
'ff-Latn-GM': '富拉语(拉丁文,冈比亚)',
'ff-Latn-GH': '富拉语(拉丁文,加纳)',
'ff-Latn-CM': '富拉语(拉丁文,喀麦隆)',
'ff-Latn-BF': '富拉语(拉丁文,布基纳法索)',
'ff-Latn': '富拉语(拉丁文)',
'ff-Adlm-SN': '富拉语(阿德拉姆文,塞内加尔)',
'ff-Adlm-SL': '富拉语(阿德拉姆文,塞拉利昂)',
'ff-Adlm-NG': '富拉语(阿德拉姆文,尼日利亚)',
'ff-Adlm-NE': '富拉语(阿德拉姆文,尼日尔)',
'ff-Adlm-MR': '富拉语(阿德拉姆文,毛里塔尼亚)',
'ff-Adlm-LR': '富拉语(阿德拉姆文,利比里亚)',
'ff-Adlm-GW': '富拉语(阿德拉姆文,几内亚比绍)',
'ff-Adlm-GN': '富拉语(阿德拉姆文,几内亚)',
'ff-Adlm-GM': '富拉语(阿德拉姆文,冈比亚)',
'ff-Adlm-GH': '富拉语(阿德拉姆文,加纳)',
'ff-Adlm-CM': '富拉语(阿德拉姆文,喀麦隆)',
'ff-Adlm-BF': '富拉语(阿德拉姆文,布基纳法索)',
'ff-Adlm': '富拉语(阿德拉姆文)',
'fi': '芬兰语',
'fi-FI': '芬兰语(芬兰)',
'fil': '菲律宾语',
'fil-PH': '菲律宾语(菲律宾)',
'fo': '法罗语',
'fo-FO': '法罗语(法罗群岛)',
'fo-DK': '法罗语(丹麦)',
'fr': '法语',
'fr-YT': '法语(马约特)',
'fr-WF': '法语(瓦利斯和富图纳)',
'fr-VU': '法语(瓦努阿图)',
'fr-TN': '法语(突尼斯)',
'fr-TG': '法语(多哥)',
'fr-TD': '法语(乍得)',
'fr-SY': '法语(叙利亚)',
'fr-SN': '法语(塞内加尔)',
'fr-SC': '法语(塞舌尔)',
'fr-RW': '法语(卢旺达)',
'fr-RE': '法语(留尼汪)',
'fr-PM': '法语(圣皮埃尔和密克隆群岛)',
'fr-PF': '法语(法属波利尼西亚)',
'fr-NE': '法语(尼日尔)',
'fr-NC': '法语(新喀里多尼亚)',
'fr-MU': '法语(毛里求斯)',
'fr-MR': '法语(毛里塔尼亚)',
'fr-MQ': '法语(马提尼克)',
'fr-ML': '法语(马里)',
'fr-MG': '法语(马达加斯加)',
'fr-MF': '法语(法属圣马丁)',
'fr-MC': '法语(摩纳哥)',
'fr-MA': '法语(摩洛哥)',
'fr-LU': '法语(卢森堡)',
'fr-KM': '法语(科摩罗)',
'fr-HT': '法语(海地)',
'fr-GQ': '法语(赤道几内亚)',
'fr-GP': '法语(瓜德罗普)',
'fr-GN': '法语(几内亚)',
'fr-GF': '法语(法属圭亚那)',
'fr-GA': '法语(加蓬)',
'fr-FR': '法语(法国)',
'fr-DZ': '法语(阿尔及利亚)',
'fr-DJ': '法语(吉布提)',
'fr-CM': '法语(喀麦隆)',
'fr-CI': '法语(科特迪瓦)',
'fr-CH': '瑞士法语',
'fr-CG': '法语(刚果[布])',
'fr-CF': '法语(中非共和国)',
'fr-CD': '法语(刚果[金])',
'fr-CA': '加拿大法语',
'fr-BL': '法语(圣巴泰勒米)',
'fr-BJ': '法语(贝宁)',
'fr-BI': '法语(布隆迪)',
'fr-BF': '法语(布基纳法索)',
'fr-BE': '法语(比利时)',
'fur': '弗留利语',
'fur-IT': '弗留利语(意大利)',
'fy': '西弗里西亚语',
'fy-NL': '西弗里西亚语(荷兰)',
'ga': '爱尔兰语',
'ga-IE': '爱尔兰语(爱尔兰)',
'ga-GB': '爱尔兰语(英国)',
'gd': '苏格兰盖尔语',
'gd-GB': '苏格兰盖尔语(英国)',
'gl': '加利西亚语',
'gl-ES': '加利西亚语(西班牙)',
'gsw': '瑞士德语',
'gsw-LI': '瑞士德语(列支敦士登)',
'gsw-FR': '瑞士德语(法国)',
'gsw-CH': '瑞士德语(瑞士)',
'gu': '古吉拉特语',
'gu-IN': '古吉拉特语(印度)',
'guz': '古西语',
'guz-KE': '古西语(肯尼亚)',
'gv': '马恩语',
'gv-IM': '马恩语(马恩岛)',
'ha': '豪萨语',
'ha-NG': '豪萨语(尼日利亚)',
'ha-NE': '豪萨语(尼日尔)',
'ha-GH': '豪萨语(加纳)',
'haw': '夏威夷语',
'haw-US': '夏威夷语(美国)',
'he': '希伯来语',
'he-IL': '希伯来语(以色列)',
'hi': '印地语',
'hi-Latn-IN': '印地语(拉丁文,印度)',
'hi-Latn': '印地语(拉丁文)',
'hi-IN': '印地语(印度)',
'hr': '克罗地亚语',
'hr-HR': '克罗地亚语(克罗地亚)',
'hr-BA': '克罗地亚语(波斯尼亚和黑塞哥维那)',
'hsb': '上索布语',
'hsb-DE': '上索布语(德国)',
'hu': '匈牙利语',
'hu-HU': '匈牙利语(匈牙利)',
'hy': '亚美尼亚语',
'hy-AM': '亚美尼亚语(亚美尼亚)',
'ia': '国际语',
'ia-001': '国际语(世界)',
'id': '印度尼西亚语',
'id-ID': '印度尼西亚语(印度尼西亚)',
'ig': '伊博语',
'ig-NG': '伊博语(尼日利亚)',
'is': '冰岛语',
'is-IS': '冰岛语(冰岛)',
'it': '意大利语',
'it-VA': '意大利语(梵蒂冈)',
'it-SM': '意大利语(圣马力诺)',
'it-IT': '意大利语(意大利)',
'it-CH': '意大利语(瑞士)',
'ja': '日语',
'ja-JP': '日语(日本)',
'jgo': '恩艮巴语',
'jgo-CM': '恩艮巴语(喀麦隆)',
'jmc': '马切姆语',
'jmc-TZ': '马切姆语(坦桑尼亚)',
'jv': '爪哇语',
'jv-ID': '爪哇语(印度尼西亚)',
'ka': '格鲁吉亚语',
'ka-GE': '格鲁吉亚语(格鲁吉亚)',
'kab': '卡拜尔语',
'kab-DZ': '卡拜尔语(阿尔及利亚)',
'kam': '卡姆巴语',
'kam-KE': '卡姆巴语(肯尼亚)',
'kde': '马孔德语',
'kde-TZ': '马孔德语(坦桑尼亚)',
'kea': '卡布佛得鲁语',
'kea-CV': '卡布佛得鲁语(佛得角)',
'kgp': 'kgp',
'kgp-BR': 'kgp巴西',
'khq': '西桑海语',
'khq-ML': '西桑海语(马里)',
'ki': '吉库尤语',
'ki-KE': '吉库尤语(肯尼亚)',
'kk': '哈萨克语',
'kk-KZ': '哈萨克语(哈萨克斯坦)',
'kkj': '卡库语',
'kkj-CM': '卡库语(喀麦隆)',
'kl': '格陵兰语',
'kl-GL': '格陵兰语(格陵兰)',
'kln': '卡伦金语',
'kln-KE': '卡伦金语(肯尼亚)',
'km': '高棉语',
'km-KH': '高棉语(柬埔寨)',
'kn': '卡纳达语',
'kn-IN': '卡纳达语(印度)',
'ko': '韩语',
'ko-KR': '韩语(韩国)',
'ko-KP': '韩语(朝鲜)',
'kok': '孔卡尼语',
'kok-IN': '孔卡尼语(印度)',
'ks': '克什米尔语',
'ks-Deva-IN': '克什米尔语(天城文,印度)',
'ks-Deva': '克什米尔语(天城文)',
'ks-Arab-IN': '克什米尔语(阿拉伯文,印度)',
'ks-Arab': '克什米尔语(阿拉伯文)',
'ksb': '香巴拉语',
'ksb-TZ': '香巴拉语(坦桑尼亚)',
'ksf': '巴菲亚语',
'ksf-CM': '巴菲亚语(喀麦隆)',
'ksh': '科隆语',
'ksh-DE': '科隆语(德国)',
'ku': '库尔德语',
'ku-TR': '库尔德语(土耳其)',
'kw': '康沃尔语',
'kw-GB': '康沃尔语(英国)',
'ky': '柯尔克孜语',
'ky-KG': '柯尔克孜语(吉尔吉斯斯坦)',
'lag': '朗吉语',
'lag-TZ': '朗吉语(坦桑尼亚)',
'lb': '卢森堡语',
'lb-LU': '卢森堡语(卢森堡)',
'lg': '卢干达语',
'lg-UG': '卢干达语(乌干达)',
'lkt': '拉科塔语',
'lkt-US': '拉科塔语(美国)',
'ln': '林加拉语',
'ln-CG': '林加拉语(刚果[布])',
'ln-CF': '林加拉语(中非共和国)',
'ln-CD': '林加拉语(刚果[金])',
'ln-AO': '林加拉语(安哥拉)',
'lo': '老挝语',
'lo-LA': '老挝语(老挝)',
'lrc': '北卢尔语',
'lrc-IR': '北卢尔语(伊朗)',
'lrc-IQ': '北卢尔语(伊拉克)',
'lt': '立陶宛语',
'lt-LT': '立陶宛语(立陶宛)',
'lu': '鲁巴加丹加语',
'lu-CD': '鲁巴加丹加语(刚果[金])',
'luo': '卢奥语',
'luo-KE': '卢奥语(肯尼亚)',
'luy': '卢雅语',
'luy-KE': '卢雅语(肯尼亚)',
'lv': '拉脱维亚语',
'lv-LV': '拉脱维亚语(拉脱维亚)',
'mai': '迈蒂利语',
'mai-IN': '迈蒂利语(印度)',
'mas': '马赛语',
'mas-TZ': '马赛语(坦桑尼亚)',
'mas-KE': '马赛语(肯尼亚)',
'mer': '梅鲁语',
'mer-KE': '梅鲁语(肯尼亚)',
'mfe': '毛里求斯克里奥尔语',
'mfe-MU': '毛里求斯克里奥尔语(毛里求斯)',
'mg': '马拉加斯语',
'mg-MG': '马拉加斯语(马达加斯加)',
'mgh': '马库阿语',
'mgh-MZ': '马库阿语(莫桑比克)',
'mgo': '梅塔语',
'mgo-CM': '梅塔语(喀麦隆)',
'mi': '毛利语',
'mi-NZ': '毛利语(新西兰)',
'mk': '马其顿语',
'mk-MK': '马其顿语(北马其顿)',
'ml': '马拉雅拉姆语',
'ml-IN': '马拉雅拉姆语(印度)',
'mn': '蒙古语',
'mn-MN': '蒙古语(蒙古)',
'mni': '曼尼普尔语',
'mni-Beng-IN': '曼尼普尔语(孟加拉文,印度)',
'mni-Beng': '曼尼普尔语(孟加拉文)',
'mr': '马拉地语',
'mr-IN': '马拉地语(印度)',
'ms': '马来语',
'ms-SG': '马来语(新加坡)',
'ms-MY': '马来语(马来西亚)',
'ms-ID': '马来语(印度尼西亚)',
'ms-BN': '马来语(文莱)',
'mt': '马耳他语',
'mt-MT': '马耳他语(马耳他)',
'mua': '蒙当语',
'mua-CM': '蒙当语(喀麦隆)',
'my': '缅甸语',
'my-MM': '缅甸语(缅甸)',
'mzn': '马赞德兰语',
'mzn-IR': '马赞德兰语(伊朗)',
'naq': '纳马语',
'naq-NA': '纳马语(纳米比亚)',
'nb': '书面挪威语',
'nb-SJ': '书面挪威语(斯瓦尔巴和扬马延)',
'nb-NO': '书面挪威语(挪威)',
'nd': '北恩德贝勒语',
'nd-ZW': '北恩德贝勒语(津巴布韦)',
'nds': '低地德语',
'nds-NL': '低萨克森语',
'nds-DE': '低地德语(德国)',
'ne': '尼泊尔语',
'ne-NP': '尼泊尔语(尼泊尔)',
'ne-IN': '尼泊尔语(印度)',
'nl': '荷兰语',
'nl-SX': '荷兰语(荷属圣马丁)',
'nl-SR': '荷兰语(苏里南)',
'nl-NL': '荷兰语(荷兰)',
'nl-CW': '荷兰语(库拉索)',
'nl-BQ': '荷兰语(荷属加勒比区)',
'nl-BE': '弗拉芒语',
'nl-AW': '荷兰语(阿鲁巴)',
'nmg': '夸西奥语',
'nmg-CM': '夸西奥语(喀麦隆)',
'nn': '挪威尼诺斯克语',
'nn-NO': '挪威尼诺斯克语(挪威)',
'nnh': '恩甘澎语',
'nnh-CM': '恩甘澎语(喀麦隆)',
'no': '挪威语',
'nus': '努埃尔语',
'nus-SS': '努埃尔语(南苏丹)',
'nyn': '尼昂科勒语',
'nyn-UG': '尼昂科勒语(乌干达)',
'om': '奥罗莫语',
'om-KE': '奥罗莫语(肯尼亚)',
'om-ET': '奥罗莫语(埃塞俄比亚)',
'or': '奥里亚语',
'or-IN': '奥里亚语(印度)',
'os': '奥塞梯语',
'os-RU': '奥塞梯语(俄罗斯)',
'os-GE': '奥塞梯语(格鲁吉亚)',
'pa': '旁遮普语',
'pa-Guru-IN': '旁遮普语(果鲁穆奇文,印度)',
'pa-Guru': '旁遮普语(果鲁穆奇文)',
'pa-Arab-PK': '旁遮普语(阿拉伯文,巴基斯坦)',
'pa-Arab': '旁遮普语(阿拉伯文)',
'pcm': '尼日利亚皮钦语',
'pcm-NG': '尼日利亚皮钦语(尼日利亚)',
'pl': '波兰语',
'pl-PL': '波兰语(波兰)',
'ps': '普什图语',
'ps-PK': '普什图语(巴基斯坦)',
'ps-AF': '普什图语(阿富汗)',
'pt': '葡萄牙语',
'pt-TL': '葡萄牙语(东帝汶)',
'pt-ST': '葡萄牙语(圣多美和普林西比)',
'pt-PT': '欧洲葡萄牙语',
'pt-MZ': '葡萄牙语(莫桑比克)',
'pt-MO': '葡萄牙语(中国澳门特别行政区)',
'pt-LU': '葡萄牙语(卢森堡)',
'pt-GW': '葡萄牙语(几内亚比绍)',
'pt-GQ': '葡萄牙语(赤道几内亚)',
'pt-CV': '葡萄牙语(佛得角)',
'pt-CH': '葡萄牙语(瑞士)',
'pt-BR': '巴西葡萄牙语',
'pt-AO': '葡萄牙语(安哥拉)',
'qu': '克丘亚语',
'qu-PE': '克丘亚语(秘鲁)',
'qu-EC': '克丘亚语(厄瓜多尔)',
'qu-BO': '克丘亚语(玻利维亚)',
'rm': '罗曼什语',
'rm-CH': '罗曼什语(瑞士)',
'rn': '隆迪语',
'rn-BI': '隆迪语(布隆迪)',
'ro': '罗马尼亚语',
'ro-RO': '罗马尼亚语(罗马尼亚)',
'ro-MD': '摩尔多瓦语',
'rof': '兰博语',
'rof-TZ': '兰博语(坦桑尼亚)',
'ru': '俄语',
'ru-UA': '俄语(乌克兰)',
'ru-RU': '俄语(俄罗斯)',
'ru-MD': '俄语(摩尔多瓦)',
'ru-KZ': '俄语(哈萨克斯坦)',
'ru-KG': '俄语(吉尔吉斯斯坦)',
'ru-BY': '俄语(白俄罗斯)',
'rw': '卢旺达语',
'rw-RW': '卢旺达语(卢旺达)',
'rwk': '罗瓦语',
'rwk-TZ': '罗瓦语(坦桑尼亚)',
'sa': '梵语',
'sa-IN': '梵语(印度)',
'sah': '萨哈语',
'sah-RU': '萨哈语(俄罗斯)',
'saq': '桑布鲁语',
'saq-KE': '桑布鲁语(肯尼亚)',
'sat': '桑塔利语',
'sat-Olck-IN': '桑塔利语(桑塔利文,印度)',
'sat-Olck': '桑塔利语(桑塔利文)',
'sbp': '桑古语',
'sbp-TZ': '桑古语(坦桑尼亚)',
'sc': '萨丁语',
'sc-IT': '萨丁语(意大利)',
'sd': '信德语',
'sd-Deva-IN': '信德语(天城文,印度)',
'sd-Deva': '信德语(天城文)',
'sd-Arab-PK': '信德语(阿拉伯文,巴基斯坦)',
'sd-Arab': '信德语(阿拉伯文)',
'se': '北方萨米语',
'se-SE': '北方萨米语(瑞典)',
'se-NO': '北方萨米语(挪威)',
'se-FI': '北方萨米语(芬兰)',
'seh': '塞纳语',
'seh-MZ': '塞纳语(莫桑比克)',
'ses': '东桑海语',
'ses-ML': '东桑海语(马里)',
'sg': '桑戈语',
'sg-CF': '桑戈语(中非共和国)',
'shi': '希尔哈语',
'shi-Tfng-MA': '希尔哈语(提非纳文,摩洛哥)',
'shi-Tfng': '希尔哈语(提非纳文)',
'shi-Latn-MA': '希尔哈语(拉丁文,摩洛哥)',
'shi-Latn': '希尔哈语(拉丁文)',
'si': '僧伽罗语',
'si-LK': '僧伽罗语(斯里兰卡)',
'sk': '斯洛伐克语',
'sk-SK': '斯洛伐克语(斯洛伐克)',
'sl': '斯洛文尼亚语',
'sl-SI': '斯洛文尼亚语(斯洛文尼亚)',
'smn': '伊纳里萨米语',
'smn-FI': '伊纳里萨米语(芬兰)',
'sn': '绍纳语',
'sn-ZW': '绍纳语(津巴布韦)',
'so': '索马里语',
'so-SO': '索马里语(索马里)',
'so-KE': '索马里语(肯尼亚)',
'so-ET': '索马里语(埃塞俄比亚)',
'so-DJ': '索马里语(吉布提)',
'sq': '阿尔巴尼亚语',
'sq-XK': '阿尔巴尼亚语(科索沃)',
'sq-MK': '阿尔巴尼亚语(北马其顿)',
'sq-AL': '阿尔巴尼亚语(阿尔巴尼亚)',
'sr': '塞尔维亚语',
'sr-Latn-XK': '塞尔维亚语(拉丁文,科索沃)',
'sr-Latn-RS': '塞尔维亚语(拉丁文,塞尔维亚)',
'sr-Latn-ME': '塞尔维亚语(拉丁文,黑山)',
'sr-Latn-BA': '塞尔维亚语(拉丁文,波斯尼亚和黑塞哥维那)',
'sr-Latn': '塞尔维亚语(拉丁文)',
'sr-Cyrl-XK': '塞尔维亚语(西里尔文,科索沃)',
'sr-Cyrl-RS': '塞尔维亚语(西里尔文,塞尔维亚)',
'sr-Cyrl-ME': '塞尔维亚语(西里尔文,黑山)',
'sr-Cyrl-BA': '塞尔维亚语(西里尔文,波斯尼亚和黑塞哥维那)',
'sr-Cyrl': '塞尔维亚语(西里尔文)',
'su': '巽他语',
'su-Latn-ID': '巽他语(拉丁文,印度尼西亚)',
'su-Latn': '巽他语(拉丁文)',
'sv': '瑞典语',
'sv-SE': '瑞典语(瑞典)',
'sv-FI': '瑞典语(芬兰)',
'sv-AX': '瑞典语(奥兰群岛)',
'sw': '斯瓦希里语',
'sw-UG': '斯瓦希里语(乌干达)',
'sw-TZ': '斯瓦希里语(坦桑尼亚)',
'sw-KE': '斯瓦希里语(肯尼亚)',
'sw-CD': '刚果斯瓦希里语',
'ta': '泰米尔语',
'ta-SG': '泰米尔语(新加坡)',
'ta-MY': '泰米尔语(马来西亚)',
'ta-LK': '泰米尔语(斯里兰卡)',
'ta-IN': '泰米尔语(印度)',
'te': '泰卢固语',
'te-IN': '泰卢固语(印度)',
'teo': '特索语',
'teo-UG': '特索语(乌干达)',
'teo-KE': '特索语(肯尼亚)',
'tg': '塔吉克语',
'tg-TJ': '塔吉克语(塔吉克斯坦)',
'th': '泰语',
'th-TH': '泰语(泰国)',
'ti': '提格利尼亚语',
'ti-ET': '提格利尼亚语(埃塞俄比亚)',
'ti-ER': '提格利尼亚语(厄立特里亚)',
'tk': '土库曼语',
'tk-TM': '土库曼语(土库曼斯坦)',
'to': '汤加语',
'to-TO': '汤加语(汤加)',
'tr': '土耳其语',
'tr-TR': '土耳其语(土耳其)',
'tr-CY': '土耳其语(塞浦路斯)',
'tt': '鞑靼语',
'tt-RU': '鞑靼语(俄罗斯)',
'twq': '北桑海语',
'twq-NE': '北桑海语(尼日尔)',
'tzm': '塔马齐格特语',
'tzm-MA': '塔马齐格特语(摩洛哥)',
'ug': '维吾尔语',
'ug-CN': '维吾尔语(中国)',
'uk': '乌克兰语',
'uk-UA': '乌克兰语(乌克兰)',
'ur': '乌尔都语',
'ur-PK': '乌尔都语(巴基斯坦)',
'ur-IN': '乌尔都语(印度)',
'uz': '乌兹别克语',
'uz-Latn-UZ': '乌兹别克语(拉丁文,乌兹别克斯坦)',
'uz-Latn': '乌兹别克语(拉丁文)',
'uz-Cyrl-UZ': '乌兹别克语(西里尔文,乌兹别克斯坦)',
'uz-Cyrl': '乌兹别克语(西里尔文)',
'uz-Arab-AF': '乌兹别克语(阿拉伯文,阿富汗)',
'uz-Arab': '乌兹别克语(阿拉伯文)',
'vai': '瓦伊语',
'vai-Vaii-LR': '瓦伊语(瓦依文,利比里亚)',
'vai-Vaii': '瓦伊语(瓦依文)',
'vai-Latn-LR': '瓦伊语(拉丁文,利比里亚)',
'vai-Latn': '瓦伊语(拉丁文)',
'vi': '越南语',
'vi-VN': '越南语(越南)',
'vun': '温旧语',
'vun-TZ': '温旧语(坦桑尼亚)',
'wae': '瓦尔瑟语',
'wae-CH': '瓦尔瑟语(瑞士)',
'wo': '沃洛夫语',
'wo-SN': '沃洛夫语(塞内加尔)',
'xh': '科萨语',
'xh-ZA': '科萨语(南非)',
'xog': '索加语',
'xog-UG': '索加语(乌干达)',
'yav': '洋卞语',
'yav-CM': '洋卞语(喀麦隆)',
'yi': '意第绪语',
'yi-001': '意第绪语(世界)',
'yo': '约鲁巴语',
'yo-NG': '约鲁巴语(尼日利亚)',
'yo-BJ': '约鲁巴语(贝宁)',
'yrl': 'yrl',
'yrl-VE': 'yrl委内瑞拉',
'yrl-CO': 'yrl哥伦比亚',
'yrl-BR': 'yrl巴西',
'zgh': '标准摩洛哥塔马塞特语',
'zgh-MA': '标准摩洛哥塔马塞特语(摩洛哥)',
'zh': '中文',
'zh-Hans-CN': '简体中文(中国)',
'zh-Hans-HK': '简体中文(中国香港特别行政区)',
'zh-Hans-MO': '简体中文(中国澳门特别行政区)',
'zh-Hans-SG': '简体中文(新加坡)',
'zh-Hans': '简体中文',
'zh-Hant-TW': '繁体中文(台湾)',
'zh-Hant-MO': '繁体中文(中国澳门特别行政区)',
'zh-Hant-HK': '繁体中文(中国香港特别行政区)',
'zh-Hant': '繁体中文',
'zu': '祖鲁语',
'zu-ZA': '祖鲁语(南非)',
},
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

View File

@ -1,338 +0,0 @@
{
"package_version": 2,
"version": "1.0.1",
"name": "localization-editor",
"description": "i18n:localization-editor.description",
"main": "./webpack-dist/electron-main/main.js",
"author": "Cocos Creator",
"editor": ">=3.6.0",
"scripts": {
"build": "npx webpack --node-env production",
"build:dev": "npx webpack --node-env development",
"build:prod": "npx webpack --node-env production",
"dev": "npx webpack -w",
"pack": "npx ts-node ./bin/pack.ts",
"test": "npx jest",
"generate-icu-option": "npx ts-node ./bin/generate-icu-option.ts",
"generate-main-ipc": "npx ts-node ./bin/generate-main-ipc.ts"
},
"dependencies": {
"i18next": "^21.6.16",
"intl-pluralrules": "^1.3.1"
},
"devDependencies": {
"@editor/library-type": "^3.6.0-07221420",
"@electron/remote": "^1.2.2",
"@jest/types": "^28.1.3",
"@swc/core": "^1.2.223",
"@swc/jest": "^0.2.22",
"@types/crypto-js": "^4.1.1",
"@types/express": "^4.17.13",
"@types/fs-extra": "^9.0.5",
"@types/glob": "7.2.0",
"@types/jest": "^28.1.3",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.182",
"@types/webpack-node-externals": "^2.5.3",
"axios": "^0.27.2",
"crypto-js": "^4.1.1",
"csv": "^6.2.0",
"express": "^4.18.1",
"form-data": "^4.0.0",
"fs-extra": "^10.1.0",
"gettext-extractor": "^3.5.4",
"gettext-parser": "^5.1.2",
"glob": "7.2.0",
"jest": "^28.1.3",
"js-yaml": "^4.1.0",
"less": "^4.1.2",
"less-loader": "^11.0.0",
"raw-loader": "^4.0.2",
"reflect-metadata": "^0.1.13",
"regenerator-runtime": "^0.13.9",
"swc-loader": "^0.2.3",
"ts-jest": "^28.0.5",
"ts-morph": "^15.1.0",
"ts-node": "^10.7.0",
"tsyringe": "^4.6.0",
"typescript": "^4.6.2",
"vue": "^3.2.25",
"vue-loader": "^17.0.0",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dashboard": "^3.3.7",
"webpack-merge": "^5.8.0",
"webpack-node-externals": "^3.0.0",
"xlsx": "^0.18.5",
"yaml": "^2.1.3"
},
"panels": {
"default": {
"title": "Localization Editor",
"type": "dockable",
"main": "webpack-dist/electron-renderer/default.js",
"icon": "./static/icon-2x.png",
"size": {
"min-width": 253,
"min-height": 750,
"width": 1280,
"height": 1200
}
}
},
"contributions": {
"inspector": {
"section": {
"node": {
"L10nLabel": "webpack-dist/electron-renderer/l10n-label-inspector.js"
}
}
},
"menu": [
{
"path": "i18n:menu.panel",
"label": "i18n:localization-editor.localization-editor",
"icon": "./static/icon.png",
"message": "open-panel"
}
],
"messages": {
"execute-panel-method": {
"methods": [
"default.executePanelMethod"
]
},
"scene:ready": {
"methods": [
"onSceneReady"
]
},
"builder:task-changed": {
"methods": [
"onBuilderTaskChanged"
]
},
"toggle": {
"methods": [
"toggle"
]
},
"enable-changed": {
"methods": [
"enableChanged"
]
},
"get-enable": {
"methods": [
"getEnable"
]
},
"open-panel": {
"methods": [
"openPanel"
]
},
"preview-by": {
"methods": [
"previewBy"
]
},
"scan": {
"methods": [
"scan"
]
},
"uninstall": {
"methods": [
"uninstall"
]
},
"read-config": {
"methods": [
"readConfig"
]
},
"get-index-data": {
"methods": [
"getIndexData"
]
},
"get-local-language": {
"methods": [
"getLocalLanguage"
]
},
"get-translate-data": {
"methods": [
"getTranslateData"
]
},
"get-translate-data-object": {
"methods": [
"getTranslateDataObject"
]
},
"save-translate-data": {
"methods": [
"saveTranslateData"
]
},
"clear-translate-data": {
"methods": [
"clearTranslateData"
]
},
"set-local-language-locale": {
"methods": [
"setLocalLanguageLocale"
]
},
"set-language-config": {
"methods": [
"setLanguageConfig"
]
},
"get-language-config": {
"methods": [
"getLanguageConfig"
]
},
"get-all-language-configs": {
"methods": [
"getAllLanguageConfigs"
]
},
"add-target-language": {
"methods": [
"addTargetLanguage"
]
},
"remove-target-language": {
"methods": [
"removeTargetLanguage"
]
},
"get-translate-providers": {
"methods": [
"getTranslateProviders"
]
},
"get-translate-provider-supported-languages": {
"methods": [
"getTranslateProviderSupportedLanguages"
]
},
"get-current-translate-provider": {
"methods": [
"getCurrentTranslateProvider"
]
},
"get-translate-provider": {
"methods": [
"getTranslateProvider"
]
},
"set-current-translate-provider": {
"methods": [
"setCurrentTranslateProvider"
]
},
"clear-translate-provider": {
"methods": [
"clearTranslateProvider"
]
},
"change-value": {
"methods": [
"changeValue"
]
},
"get-scan-options": {
"methods": [
"getScanOptions"
]
},
"auto-translate": {
"methods": [
"autoTranslate"
]
},
"import-media-files": {
"methods": [
"importMediaFiles"
]
},
"compile": {
"methods": [
"compile"
]
},
"add-association": {
"methods": [
"addAssociation"
]
},
"remove-association": {
"methods": [
"removeAssociation"
]
},
"get-resource-list": {
"methods": [
"getResourceList"
]
},
"get-resource-bundle": {
"methods": [
"getResourceBundle"
]
},
"import-translate-file": {
"methods": [
"importTranslateFile"
]
},
"export-translate-file": {
"methods": [
"exportTranslateFile"
]
}
},
"asset-db": {
"mount": {
"path": "./static/assets",
"readonly": true,
"visible": true,
"enable": "L10nEnable"
}
},
"scene": {
"script": "./webpack-dist/electron-main/scene.js"
},
"profile": {
"project": {
"ProjectConfig": {
"default": {},
"label": "i18n:localization_editor_project_config"
},
"L10nEnable": {
"default": false,
"label": "i18n:localization_editor_project_config",
"message": "enable-changed"
}
},
"editor": {
"EditorConfig": {
"default": {},
"label": "i18n:localization_editor_editor_config"
},
"TranslateProviderConfigMap": {
"default": {},
"label": "i18n:localization_editor_provider_config"
}
}
},
"builder": "webpack-dist/electron-main/builder.js",
"server": "webpack-dist/electron-main/server.js"
}
}

View File

@ -1,12 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "e20945fc-1f04-4216-a044-2652e1ebdf78",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -1,516 +0,0 @@
import { _decorator, CCBoolean, CCInteger, CCString, Enum, Label } from 'cc';
// @ts-ignore
import { EDITOR } from 'cc/env';
// import ICUType from '../core/ICUType';
// import I18nComponent from './I18nComponent';
// import { DateTimeFormatOptions, NumberFormatOptions, RelativeTimeFormatOptions, RelativeTimeFormatUnit } from '../core/ICUOptions';
// import intl from '../core/IntlManager';
const {
ccclass,
property,
requireComponent,
executeInEditMode,
} = _decorator;
enum VirtualEnum {}
// @ccclass('ICUComponent')
// @executeInEditMode(true)
// @requireComponent(Label)
// export default class ICUComponent extends I18nComponent {
// @property({ visible: false })
// _icuValue = '';
//
// @property
// set icuValue(value: string) {
// this._icuValue = value;
// this.render();
// }
//
// get icuValue(): string {
// return this._icuValue;
// }
//
// @property({ visible: false })
// _type: ICUType = ICUType.DateTime;
//
// @property({ visible: true, type: Enum(ICUType) })
// set type(value: ICUType) {
// this._type = value;
// }
//
// get type(): ICUType {
// return this._type;
// }
//
// protected onLoad() {
// super.onLoad();
// if (this.label && !this._icuValue) {
// this._icuValue = this.label.string;
// }
// }
//
// protected start() {
// this.render();
// }
//
// public render() {
// super.render();
// if (this._icuValue.length === 0) return;
// let translatedString!: string;
// try {
// switch (this.type) {
// case ICUType.Number:
// translatedString = intl.tn(parseFloat(this.icuValue), this.numberFormatOptions);
// break;
// case ICUType.DateTime:
// translatedString = intl.td(new Date(this.icuValue), this.dateTimeFormatOptions);
// break;
// case ICUType.RelativeTime:
// translatedString = intl.tt(
// parseFloat(this.icuValue),
// this.relativeTimeUnit,
// this.relativeTimeFormatOptions,
// );
// break;
// case ICUType.List: {
// const icuList = this.icuValue.split(',');
// translatedString = intl.tl(icuList);
// break;
// }
// default:
// break;
// }
// } catch (e) {
// translatedString = this._icuValue;
// }
// if (EDITOR) {
// this.preview(translatedString);
// } else {
// this.label!.string = translatedString;
// }
// }
//
// // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ auto generate by script don't edit ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
// /************************** NumberFormatOptions **************************/
// @property({ visible: false })
// numberFormatOptions: NumberFormatOptions = { useGrouping: false };
// @property({
// type: Enum(VirtualEnum),
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set numberStyle(value: string) {
// this.numberFormatOptions.style = value;
// this.render();
// }
// get numberStyle(): string {
// return this.numberFormatOptions.style as string;
// }
//
// @property({
// type: CCString,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set currency(value: string) {
// this.numberFormatOptions.currency = value;
// this.render();
// }
// get currency(): string {
// return this.numberFormatOptions.currency as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set currencySign(value: string) {
// this.numberFormatOptions.currencySign = value;
// this.render();
// }
// get currencySign(): string {
// return this.numberFormatOptions.currencySign as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set currencyDisplay(value: string) {
// this.numberFormatOptions.currencyDisplay = value;
// this.render();
// }
// get currencyDisplay(): string {
// return this.numberFormatOptions.currencyDisplay as string;
// }
//
// @property({
// type: CCBoolean,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set useGrouping(value: boolean) {
// this.numberFormatOptions.useGrouping = value;
// this.render();
// }
// get useGrouping(): boolean {
// return this.numberFormatOptions.useGrouping as boolean;
// }
//
// @property({
// type: CCInteger,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set minimumIntegerDigits(value: number) {
// this.numberFormatOptions.minimumIntegerDigits = value;
// this.render();
// }
// get minimumIntegerDigits(): number {
// return this.numberFormatOptions.minimumIntegerDigits as number;
// }
//
// @property({
// type: CCInteger,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set minimumFractionDigits(value: number) {
// this.numberFormatOptions.minimumFractionDigits = value;
// this.render();
// }
// get minimumFractionDigits(): number {
// return this.numberFormatOptions.minimumFractionDigits as number;
// }
//
// @property({
// type: CCInteger,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set maximumFractionDigits(value: number) {
// this.numberFormatOptions.maximumFractionDigits = value;
// this.render();
// }
// get maximumFractionDigits(): number {
// return this.numberFormatOptions.maximumFractionDigits as number;
// }
//
// @property({
// type: CCInteger,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set minimumSignificantDigits(value: number) {
// this.numberFormatOptions.minimumSignificantDigits = value;
// this.render();
// }
// get minimumSignificantDigits(): number {
// return this.numberFormatOptions.minimumSignificantDigits as number;
// }
//
// @property({
// type: CCInteger,
// group: 'Number',
// visible(this: ICUComponent) {
// return this.type === ICUType.Number;
// },
// })
// set maximumSignificantDigits(value: number) {
// this.numberFormatOptions.maximumSignificantDigits = value;
// this.render();
// }
// get maximumSignificantDigits(): number {
// return this.numberFormatOptions.maximumSignificantDigits as number;
// }
//
// /************************** DateTimeFormatOptions **************************/
// @property({ visible: false })
// dateTimeFormatOptions: DateTimeFormatOptions = {};
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set dateTimeLocaleMatcher(value: string) {
// this.dateTimeFormatOptions.localeMatcher = value;
// this.render();
// }
// get dateTimeLocaleMatcher(): string {
// return this.dateTimeFormatOptions.localeMatcher as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set weekday(value: string) {
// this.dateTimeFormatOptions.weekday = value;
// this.render();
// }
// get weekday(): string {
// return this.dateTimeFormatOptions.weekday as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set era(value: string) {
// this.dateTimeFormatOptions.era = value;
// this.render();
// }
// get era(): string {
// return this.dateTimeFormatOptions.era as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set year(value: string) {
// this.dateTimeFormatOptions.year = value;
// this.render();
// }
// get year(): string {
// return this.dateTimeFormatOptions.year as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set month(value: string) {
// this.dateTimeFormatOptions.month = value;
// this.render();
// }
// get month(): string {
// return this.dateTimeFormatOptions.month as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set day(value: string) {
// this.dateTimeFormatOptions.day = value;
// this.render();
// }
// get day(): string {
// return this.dateTimeFormatOptions.day as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set hour(value: string) {
// this.dateTimeFormatOptions.hour = value;
// this.render();
// }
// get hour(): string {
// return this.dateTimeFormatOptions.hour as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set minute(value: string) {
// this.dateTimeFormatOptions.minute = value;
// this.render();
// }
// get minute(): string {
// return this.dateTimeFormatOptions.minute as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set second(value: string) {
// this.dateTimeFormatOptions.second = value;
// this.render();
// }
// get second(): string {
// return this.dateTimeFormatOptions.second as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set timeZoneName(value: string) {
// this.dateTimeFormatOptions.timeZoneName = value;
// this.render();
// }
// get timeZoneName(): string {
// return this.dateTimeFormatOptions.timeZoneName as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set formatMatcher(value: string) {
// this.dateTimeFormatOptions.formatMatcher = value;
// this.render();
// }
// get formatMatcher(): string {
// return this.dateTimeFormatOptions.formatMatcher as string;
// }
//
// @property({
// type: CCBoolean,
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set hour12(value: boolean) {
// this.dateTimeFormatOptions.hour12 = value;
// this.render();
// }
// get hour12(): boolean {
// return this.dateTimeFormatOptions.hour12 as boolean;
// }
//
// @property({
// type: CCString,
// group: 'DateTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.DateTime;
// },
// })
// set timeZone(value: string) {
// this.dateTimeFormatOptions.timeZone = value;
// this.render();
// }
// get timeZone(): string {
// return this.dateTimeFormatOptions.timeZone as string;
// }
//
// /************************** RelativeTimeOptions **************************/
// @property({ visible: false })
// relativeTimeFormatOptions: RelativeTimeFormatOptions = {};
//
// @property({
// type: Enum(VirtualEnum),
// group: 'RelativeTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.RelativeTime;
// },
// })
// set relativeTimeLocaleMatcher(value: string) {
// this.relativeTimeFormatOptions.localeMatcher = value;
// this.render();
// }
// get relativeTimeLocaleMatcher(): string {
// return this.relativeTimeFormatOptions.localeMatcher as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'RelativeTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.RelativeTime;
// },
// })
// set numeric(value: string) {
// this.relativeTimeFormatOptions.numeric = value;
// this.render();
// }
// get numeric(): string {
// return this.relativeTimeFormatOptions.numeric as string;
// }
//
// @property({
// type: Enum(VirtualEnum),
// group: 'RelativeTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.RelativeTime;
// },
// })
// set relativeTimeStyle(value: string) {
// this.relativeTimeFormatOptions.style = value;
// this.render();
// }
// get relativeTimeStyle(): string {
// return this.relativeTimeFormatOptions.style as string;
// }
//
// @property({ visible: false })
// _relativeTimeUnit: RelativeTimeFormatUnit = 'second';
//
// @property({
// type: Enum(VirtualEnum),
// group: 'RelativeTime',
// visible(this: ICUComponent) {
// return this.type === ICUType.RelativeTime;
// },
// })
// set relativeTimeUnit(value: string) {
// this._relativeTimeUnit = value;
// this.render();
// }
// get relativeTimeUnit(): string {
// return this._relativeTimeUnit;
// }
//
// // ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ auto generate by script don't edit ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
// }

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7a970d99-7d42-4b01-895c-a1fd06c411b5",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,53 +0,0 @@
import { _decorator, Component, Label, Node } from 'cc';
// @ts-ignore
import { EDITOR } from 'cc/env';
const {
ccclass,
property,
disallowMultiple,
requireComponent,
menu,
} = _decorator;
@ccclass('L10nComponent')
@requireComponent(Label)
@disallowMultiple()
@menu('hidden:LocalizationEditor/L10nComponent')
export default abstract class L10nComponent extends Component {
protected constructor() {
super();
}
@property({ readonly: true })
get string() {
return this.label?.string || '';
}
label?: Label | null = undefined;
protected onLoad() {
this.label = this.node.getComponent(Label);
}
protected start() {
this.render();
}
public render() {}
public preview(value: string) {
if (this.label && EDITOR) {
const originalString = this.label.string;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.label._string = value;
this.label.updateRenderData(true);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
cce.Engine.repaintInEditMode();
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.label._string = originalString;
}
}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "64a567b7-70a8-4921-894e-b2b550a6ba6f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,62 +0,0 @@
import { _decorator, CCInteger, Label } from 'cc';
// @ts-ignore
import { EDITOR } from 'cc/env';
import l10n from '../core/l10n-manager';
import L10nComponent from './l10n-component';
const {
ccclass,
property,
executeInEditMode,
menu,
} = _decorator;
@ccclass('L10nLabel')
@executeInEditMode(true)
@menu('LocalizationEditor/L10nLabel')
export default class L10nLabel extends L10nComponent {
@property({ visible: false })
_key = '';
@property({ visible: true })
set key(value: string) {
this._key = value;
this.render();
}
get key(): string {
return this._key;
}
@property({ visible: false })
_count = 0;
@property({
type: CCInteger,
visible: true,
})
set count(value: number) {
this._count = value;
this.render();
}
get count(): number {
return this._count;
}
onLoad() {
if (typeof super.onLoad === 'function') {
super.onLoad();
}
}
render() {
const translatedString = l10n.t(this._key, { count: this._count });
if (typeof this.label === 'undefined' || typeof translatedString === 'undefined') {
return;
}
if (EDITOR) {
this.preview(translatedString);
} else {
this.label!.string = translatedString;
}
}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "30d83ab3-45f6-472d-8305-9f8280f4f1b8",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,13 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "ef8d37e0-634c-4106-a3ee-13df564c46a3",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {},
"bundleName": "1"
}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "8726de39-9138-4457-8098-f4b669c27882",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,14 +0,0 @@
import l10n from './l10n-manager';
import { game, cclegacy } from 'cc';
// @ts-expect-error
import { EDITOR } from 'cc/env';
if (cclegacy.GAME_VIEW || EDITOR) { // for Editor
// @ts-expect-error we need top level await in Editor
await l10n.createIntl({});
} else { // for Runtime or Preview
game.onPostProjectInitDelegate.add(
() => l10n.createIntl({}),
);
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "2f21bc78-8001-4d8f-a75c-b7da831c91c7",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,65 +0,0 @@
import { FallbackLanguage, L10nValue } from './l10n-options';
export type FormattedValue = string;
export type TextInfoDirection = 'ltr' | 'rtl';
export interface StandardOption {
count?: number;
// 暂不开放
// context?: string
defaultValue?: L10nValue;
// returnObjects?: boolean;
language?: Intl.BCP47LanguageTag;
fallbackLanguage?: FallbackLanguage;
// 暂不开放
// joinArrays?: string
}
export interface Template {
[key: string]:
| string
| {
[key: string]: StandardOption;
};
}
export interface NumberFormatOptions extends Intl.NumberFormatOptions {
style?: 'decimal' | 'percent' | 'currency' | string;
/**
* ISO 4217
* @see ISO4217Tag
*/
currency?: string;
currencySign?: 'standard' | 'accounting' | string;
currencyDisplay?: 'symbol' | 'code' | 'name' | string;
useGrouping?: boolean;
minimumIntegerDigits?: number;
minimumFractionDigits?: number;
maximumFractionDigits?: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
}
export interface DateTimeFormatOptions {
localeMatcher?: 'best fit' | 'lookup' | undefined | string;
weekday?: 'long' | 'short' | 'narrow' | undefined | string;
era?: 'long' | 'short' | 'narrow' | undefined | string;
year?: 'numeric' | '2-digit' | undefined | string;
month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow' | undefined | string;
day?: 'numeric' | '2-digit' | undefined | string;
hour?: 'numeric' | '2-digit' | undefined | string;
minute?: 'numeric' | '2-digit' | undefined | string;
second?: 'numeric' | '2-digit' | undefined | string;
timeZoneName?: 'long' | 'short' | undefined | string;
formatMatcher?: 'best fit' | 'basic' | undefined | string;
hour12?: boolean | undefined;
timeZone?: string | undefined;
}
export type RelativeTimeFormatUnit = 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | string;
export interface RelativeTimeFormatOptions {
localeMatcher?: 'lookup' | 'best fit' | string;
style?: 'narrow' | 'short' | 'long' | string;
numeric?: 'auto' | 'always' | string;
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "dc153188-b6f7-4234-8025-20163cbd0f8c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,11 +0,0 @@
/**
* Intl formatting
*/
enum ICUType {
DateTime,
Number,
List,
RelativeTime,
}
export default ICUType;

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e5dc4963-9221-45a4-8f4b-a8af210423e5",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,12 +0,0 @@
enum L10nListenEvent {
languageChanged = 'languageChanged',
onMissingKey = 'missingKey',
/**
* store events
*/
// onAdded = 'added',
// onRemoved = 'removed',
}
export default L10nListenEvent;

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3415306a-cc9f-4b47-8961-2437afa40e1f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,256 +0,0 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { createInstance, i18n, InitOptions as I18NextInitOptions } from 'i18next';
// @ts-ignore
import { EDITOR, BUILD, PREVIEW } from 'cc/env';
import { game, assetManager } from 'cc';
import type { L10nOptions, ResourceData, L10nKey, L10nValue, ResourceItem } from './l10n-options';
import {
DateTimeFormatOptions,
FormattedValue,
NumberFormatOptions,
RelativeTimeFormatOptions,
RelativeTimeFormatUnit,
StandardOption,
Template,
TextInfoDirection,
} from './icu-options';
import L10nListenEvent from './l10n-listen-event';
import ResourceDataManager from './resource-data-manager';
import { mainName, pluginName } from './localization-global';
import { ResourceBundle, ResourceList } from './l10n-options';
export class L10nManager {
static LOCAL_STORAGE_LANGUAGE_KEY = `${mainName}/language`;
static readonly DEFAULT_NAMESPACE = 'translation' as const;
static readonly ASSET_NAMESPACE = 'asset' as const;
static readonly ALLOW_NAMESPACE = [L10nManager.DEFAULT_NAMESPACE, L10nManager.ASSET_NAMESPACE] as const;
static l10n: L10nManager = new L10nManager();
/**
* @zh
* i18n
* @en
* i18next instance
*/
private _intl?: i18n = undefined;
private _options: L10nOptions = {};
private resourceList?: ResourceList;
private resourceBundle: ResourceBundle = {};
public resourceDataManager: ResourceDataManager;
private constructor() {
this.resourceDataManager = new ResourceDataManager();
}
public isInitialized(): boolean {
return this._intl?.isInitialized ?? false;
}
public async createIntl(options: L10nOptions) {
const reloadResult = await this.reloadResourceData();
if (!reloadResult) {
return;
}
this._options = options;
this._intl = createInstance();
let localStorageLanguage: string | undefined = undefined;
if (BUILD && !PREVIEW) {
localStorageLanguage = localStorage.getItem(
l10n['_options'].localStorageLanguageKey ?? L10nManager.LOCAL_STORAGE_LANGUAGE_KEY,
);
localStorageLanguage = this.checkLanguage(localStorageLanguage);
}
const defaultLanguage = localStorageLanguage ?? options.language ?? this.resourceList.defaultLanguage;
const fallbackLanguage = options.fallbackLanguage ?? this.resourceList.fallbackLanguage;
const resources = options.resources ?? this.resourceBundle;
const i18nextOptions: I18NextInitOptions = {
lng: defaultLanguage,
fallbackLng: fallbackLanguage,
resources: { ...resources },
ns: L10nManager.ALLOW_NAMESPACE,
defaultNS: L10nManager.DEFAULT_NAMESPACE,
initImmediate: false,
load: 'currentOnly',
};
await this._intl.init(i18nextOptions);
this.setAssetOverrideMap(resources[defaultLanguage][L10nManager.ASSET_NAMESPACE]);
}
public checkLanguage(language: string): string | undefined {
if (!language || language.length === 0 || language === 'null' || language === null || language === 'undefined' || language === undefined) {
return undefined;
}
if (this.resourceList && this.resourceList.languages.length > 0 && this.resourceList.languages.find(it => it === language)) {
return language;
}
return undefined;
}
public cloneIntl(options: L10nOptions) {
if (!this._intl) {
throw new Error('i18next not init, please use \'l10n.createIntl\'');
}
this._intl = this._intl.cloneInstance(options);
}
async reloadResourceData(): Promise<boolean> {
this.resourceList = await this.resourceDataManager.readResourceList();
if (!this.resourceList) {
console.log(`[${pluginName}] not found translate language list, skip init l10n`);
return false;
}
this.resourceBundle = await this.resourceDataManager.readResourceBundle(this.resourceList?.languages ?? []);
if (!this.resourceList?.defaultLanguage) {
console.log(`[${pluginName}] not found translate language data, skip init l10n`);
return false;
}
return true;
}
/** 初始化 i18next */
public config(options: L10nOptions) {
this.cloneIntl(options);
}
public async changeLanguage(language: Intl.BCP47LanguageTag) {
if (!language) {
console.warn(`[${pluginName}] invalid language tag`);
return;
}
console.log(`[${pluginName}] will change language to`, language);
if (this._intl) {
if (this.currentLanguage) {
this.releaseOverrideMap(this.resourceBundle[this.currentLanguage][L10nManager.ASSET_NAMESPACE]);
}
await this._intl.changeLanguage(language);
this.setAssetOverrideMap(this.resourceBundle[language][L10nManager.ASSET_NAMESPACE]);
if (!EDITOR) {
localStorage.setItem(L10nManager.LOCAL_STORAGE_LANGUAGE_KEY, language);
console.log(`[${pluginName}] game will restart`);
game.restart();
}
} else {
console.log(`[${pluginName}] language data not load, please confirm whether the language data is included in the build`);
}
}
public t(key: L10nKey, options?: StandardOption | Template): L10nValue {
if (!(this._intl?.isInitialized ?? false)) return key;
return this._intl!.t(key, options);
}
/**
*
* ICU
*/
private tn(value: number, options?: NumberFormatOptions): FormattedValue {
if (!(this._intl?.isInitialized ?? false)) return value.toString();
const cloneOptions: NumberFormatOptions = {};
Object.assign(cloneOptions, options);
type NumberFormatOptionsKey = keyof NumberFormatOptions;
for (const key of Object.keys(cloneOptions) as NumberFormatOptionsKey[]) {
if (typeof cloneOptions[key] === 'string' && (cloneOptions[key] as string)!.length === 0) {
delete cloneOptions[key];
} else if (typeof cloneOptions[key] === 'number' && cloneOptions[key] === 0) {
delete cloneOptions[key];
}
}
return new Intl.NumberFormat(this._intl?.language, cloneOptions).format(value);
}
/**
*
* /ICU
*/
private td(date: Date, options?: DateTimeFormatOptions): FormattedValue {
if (!(this._intl?.isInitialized ?? false)) return date.toString();
const cloneOptions: DateTimeFormatOptions = {};
Object.assign(cloneOptions, options);
type DateTimeFormatOptionsKey = keyof DateTimeFormatOptions;
for (const key of Object.keys(cloneOptions) as DateTimeFormatOptionsKey[]) {
if (typeof cloneOptions[key] === 'string' && (cloneOptions[key] as string).length === 0) {
delete cloneOptions[key];
}
}
return new Intl.DateTimeFormat(this._intl?.language, cloneOptions as Intl.DateTimeFormatOptions).format(date);
}
/**
*
* ICU
*/
private tt(value: number, unit: RelativeTimeFormatUnit, options?: RelativeTimeFormatOptions): FormattedValue {
if (!(this._intl?.isInitialized ?? false)) return value.toString();
const cloneOptions: RelativeTimeFormatOptions = {};
Object.assign(cloneOptions, options);
type RelativeTimeFormatOptionsKey = keyof RelativeTimeFormatOptions;
for (const key of Object.keys(cloneOptions) as RelativeTimeFormatOptionsKey[]) {
if (typeof cloneOptions[key] === 'string' && (cloneOptions[key] as string).length === 0) {
delete cloneOptions[key];
}
}
return new Intl.RelativeTimeFormat(this._intl?.language, cloneOptions as Intl.RelativeTimeFormatOptions).format(
value,
unit as Intl.RelativeTimeFormatUnit,
);
}
/**
*
* ICU
*/
private tl(value: string[]): FormattedValue {
if (!(this._intl?.isInitialized ?? false)) return value.toString();
return new Intl.ListFormat(this._intl?.language).format(value);
}
public exists(key: L10nKey): boolean {
return this._intl?.exists(key) ?? false;
}
get currentLanguage(): Intl.BCP47LanguageTag {
return this._intl?.language ?? '';
}
get languages(): readonly Intl.BCP47LanguageTag[] {
return this.resourceList?.languages ?? [];
}
public direction(language?: Intl.BCP47LanguageTag): TextInfoDirection {
return (language ? new Intl.Locale(language) : new Intl.Locale(this._intl!.language)).textInfo()
.direction as TextInfoDirection;
}
public on(event: L10nListenEvent, callback: (...args: any[]) => void) {
this._intl?.on(event, callback);
}
public off(event: L10nListenEvent, callback: (...args: any[]) => void) {
this._intl?.off(event, callback);
}
public getResourceBundle(language: string, namespace: typeof L10nManager.ALLOW_NAMESPACE[number]): ResourceData | undefined {
return this._intl?.getResourceBundle(language, namespace);
}
protected setAssetOverrideMap(assetNamespace: Readonly<ResourceItem>) {
for (const key of Object.keys(assetNamespace)) {
assetManager.assetsOverrideMap.set(key, assetNamespace[key]);
}
}
protected releaseOverrideMap(assetNamespace: Readonly<ResourceItem>) {
for (const key of Object.keys(assetNamespace)) {
assetManager.assetsOverrideMap.delete(key);
}
}
}
const l10n: L10nManager = L10nManager.l10n;
export default l10n;

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "2856aec6-495f-456d-be77-9ce8a6277dc9",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,116 +0,0 @@
export type L10nKey = string;
export type L10nValue = string;
export interface ResourceList {
defaultLanguage?: Intl.BCP47LanguageTag;
fallbackLanguage?: Intl.BCP47LanguageTag;
languages: Intl.BCP47LanguageTag[];
}
export interface ResourceBundle {
[language: Intl.BCP47LanguageTag]: ResourceData;
}
export interface ResourceData {
[namespace: string]: ResourceItem;
}
export interface ResourceItem {
[key: string]: any;
}
export interface FallbackLanguageObjectList {
[language: string]: readonly string[];
}
export type FallbackLanguage =
| string
| readonly string[]
| FallbackLanguageObjectList
| ((language: Intl.BCP47LanguageTag) => string | readonly string[] | FallbackLanguageObjectList);
export interface L10nOptions {
/**
* Logs info level to console output. Helps finding issues with loading not working.
* @default false
*/
// debug?: boolean;
/**
* Resources to initialize with (if not using loading or not appending using addResourceBundle)
* @default undefined
*/
resources?: ResourceBundle;
/**
* Language to use (overrides language detection)
*/
language?: Intl.BCP47LanguageTag;
/**
* Language to use if translations in user language are not available.
* @default same as language
*/
fallbackLanguage?: false | FallbackLanguage;
/**
* @default IntlManager.LOCAL_STORAGE_LANGUAGE_KEY
*/
localStorageLanguageKey?: string;
/**
* @zh
* keykey
*
* @en
* Preprocess the key
*
* @param key
* @return string
* onBeforeProcessHandler
*/
beforeTranslate?: (key: L10nKey) => L10nValue;
/**
* @zh
* valuevalue
*
* @en
* Postprocess the value, return the processed value
*
* @param key
* @param value
* @return string
*/
afterTranslate?: (key: string, value: string) => string;
/**
* Allows null values as valid translation
* @default true
*/
returnNull?: boolean;
/**
* Allows empty string as valid translation
* @default true
*/
returnEmptyString?: boolean;
/**
* Allows objects as valid translation result
* @default false
*/
// returnObjects?: boolean;
/**
* Gets called if object was passed in as key but returnObjects was set to false
* @default noop
*/
// returnedObjectHandler?: (key: string, value: string, options: any) => void;
/**
* Char, eg. '\n' that arrays will be joined by
* @default false
*/
// joinArrays?: false | string;
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "b461821b-b11b-4b2d-b469-d9d42b137108",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,5 +0,0 @@
export const pluginName = 'Localization Editor';
export const mainName = 'localization-editor';
export const runtimeBundleName = 'l10n';
export const resourceListPath = 'resource-list';
export const resourceBundlePath = 'resource-bundle';

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "02d9eb4a-80d0-46a8-b3e9-bd4ed15f6f68",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,90 +0,0 @@
// @ts-ignore
import { BUILD, EDITOR } from 'cc/env';
import { AssetManager, assetManager, JsonAsset, settings, Settings } from 'cc';
import { ResourceBundle, ResourceList } from './l10n-options';
import { mainName, pluginName, resourceBundlePath, resourceListPath, runtimeBundleName } from './localization-global';
export default class ResourceDataManager {
async readResourceList(): Promise<ResourceList> {
if (EDITOR) {
return Editor.Message.request(mainName, 'get-resource-list');
} else if (BUILD) {
console.log(`[${pluginName}] this is build env`);
return this.runtimeLoad(resourceListPath);
} else {
return this.previewLoad(resourceListPath);
}
}
async readResourceBundle(tags: Intl.BCP47LanguageTag[]): Promise<ResourceBundle> {
if (EDITOR) {
return this.editorLoad(tags);
} else if (BUILD) {
return this.runtimeLoad(resourceBundlePath);
} else {
return this.previewLoad(resourceBundlePath);
}
}
/**
* 使
* @param locales
*/
async editorLoad(locales: Intl.BCP47LanguageTag[]): Promise<ResourceBundle | undefined> {
return Editor.Message.request(mainName, 'get-resource-bundle', locales);
}
/**
* 使
* @param fileName
*/
async runtimeLoad<T>(fileName: string): Promise<T | undefined> {
const bundle = await this.getBundle(runtimeBundleName);
if (!bundle) return undefined;
const jsonAsset = await this.getResource(bundle, fileName);
if (!jsonAsset || !jsonAsset.json) return undefined;
return jsonAsset.json as any as T;
}
/**
* 使
* @param urlPath
*/
async previewLoad<T>(urlPath: string): Promise<T | undefined> {
try {
return await (await fetch(`${mainName}/${urlPath}`)).json() as T;
} catch (e) {
return undefined;
}
}
async checkBundle(bundleName: string): Promise<boolean> {
const queryResult: { bundle: string, version: string }[] | null = settings.querySettings<{ bundle: string, version: string }[]>(Settings.Category.ASSETS, 'preloadBundles');
const bundle = queryResult?.find((it) => it.bundle === bundleName);
return !!bundle;
}
async getBundle(bundleName: string): Promise<AssetManager.Bundle | undefined> {
return new Promise(resolve => {
assetManager.loadBundle(bundleName, (error, bundle: AssetManager.Bundle) => {
if (error) {
resolve(undefined);
} else {
resolve(bundle);
}
});
});
}
async getResource(bundle: AssetManager.Bundle, resourceName: string): Promise<JsonAsset | undefined> {
return new Promise(resolve => {
bundle.load(resourceName, (error, asset: JsonAsset) => {
if (error) {
resolve(undefined);
} else {
resolve(asset);
}
});
});
}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "0a95ad24-8abb-499c-99cc-9d959245a167",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,12 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "5edb8c82-d058-4174-84ae-a6624ae65a90",
"files": [],
"subMetas": {},
"userData": {
"isBundle": true,
"bundleConfigID": "auto_98bI1zLFJFCrdkWrYdPI5l"
}
}

View File

@ -1,21 +0,0 @@
import l10n, { L10nManager } from './core/l10n-manager';
import L10nListenEvent from './core/l10n-listen-event';
import L10nLabel from './components/l10n-label';
export type {
L10nKey,
L10nValue,
ResourceList,
ResourceBundle,
ResourceData,
ResourceItem,
FallbackLanguageObjectList,
FallbackLanguage,
L10nOptions,
} from './core/l10n-options';
export {
l10n,
L10nManager,
L10nLabel,
L10nListenEvent,
};

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "07b549ce-14f5-4964-9fc4-366b956df8d8",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,12 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "43fd725b-630f-4c60-a864-7cea14073726",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e9a803d0-7f83-426e-b187-6d1caa791dc6",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "495ecfe5-9e27-4b3e-a048-df0d67da1f21",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "9ff49c15-8e75-44e3-955c-3d31f42d783d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3d4a4001-ed8e-4131-b245-b6b580406771",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "60bb8e28-ea3e-45ee-8314-911ce01dc8b0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1 +0,0 @@
import 'intl-pluralrules';

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "c959445d-20e1-483c-8aa7-08ca07d74dd4",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1d313b84-d501-43d7-8173-4315142c25d3",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "306c90e6-641a-46df-8383-07e477f49b91",
"files": [],
"subMetas": {},
"userData": {}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

View File

@ -1,904 +0,0 @@
{
"af": [
"one",
"other"
],
"ak": [
"one",
"other"
],
"am": [
"one",
"other"
],
"an": [
"one",
"other"
],
"ar": [
"zero",
"one",
"two",
"few",
"many",
"other"
],
"ars": [
"zero",
"one",
"two",
"few",
"many",
"other"
],
"as": [
"one",
"other"
],
"asa": [
"one",
"other"
],
"ast": [
"one",
"other"
],
"az": [
"one",
"other"
],
"bal": [
"one",
"other"
],
"be": [
"one",
"few",
"many",
"other"
],
"bem": [
"one",
"other"
],
"bez": [
"one",
"other"
],
"bg": [
"one",
"other"
],
"bho": [
"one",
"other"
],
"bm": [
"other"
],
"bn": [
"one",
"other"
],
"bo": [
"other"
],
"br": [
"one",
"two",
"few",
"many",
"other"
],
"brx": [
"one",
"other"
],
"bs": [
"one",
"few",
"other"
],
"ca": [
"one",
"other"
],
"ce": [
"one",
"other"
],
"ceb": [
"one",
"other"
],
"cgg": [
"one",
"other"
],
"chr": [
"one",
"other"
],
"ckb": [
"one",
"other"
],
"cs": [
"one",
"few",
"many",
"other"
],
"cy": [
"zero",
"one",
"two",
"few",
"many",
"other"
],
"da": [
"one",
"other"
],
"de": [
"one",
"other"
],
"doi": [
"one",
"other"
],
"dsb": [
"one",
"two",
"few",
"other"
],
"dv": [
"one",
"other"
],
"dz": [
"other"
],
"ee": [
"one",
"other"
],
"el": [
"one",
"other"
],
"en": [
"one",
"other"
],
"eo": [
"one",
"other"
],
"es": [
"one",
"many",
"other"
],
"et": [
"one",
"other"
],
"eu": [
"one",
"other"
],
"fa": [
"one",
"other"
],
"ff": [
"one",
"other"
],
"fi": [
"one",
"other"
],
"fil": [
"one",
"other"
],
"fo": [
"one",
"other"
],
"fr": [
"one",
"many",
"other"
],
"fur": [
"one",
"other"
],
"fy": [
"one",
"other"
],
"ga": [
"one",
"two",
"few",
"many",
"other"
],
"gd": [
"one",
"two",
"few",
"other"
],
"gl": [
"one",
"other"
],
"gsw": [
"one",
"other"
],
"gu": [
"one",
"other"
],
"guw": [
"one",
"other"
],
"gv": [
"one",
"two",
"few",
"many",
"other"
],
"ha": [
"one",
"other"
],
"haw": [
"one",
"other"
],
"he": [
"one",
"two",
"many",
"other"
],
"hi": [
"one",
"other"
],
"hnj": [
"other"
],
"hr": [
"one",
"few",
"other"
],
"hsb": [
"one",
"two",
"few",
"other"
],
"hu": [
"one",
"other"
],
"hy": [
"one",
"other"
],
"ia": [
"one",
"other"
],
"id": [
"other"
],
"ig": [
"other"
],
"ii": [
"other"
],
"io": [
"one",
"other"
],
"is": [
"one",
"other"
],
"it": [
"one",
"many",
"other"
],
"iu": [
"one",
"two",
"other"
],
"ja": [
"other"
],
"jbo": [
"other"
],
"jgo": [
"one",
"other"
],
"jmc": [
"one",
"other"
],
"jv": [
"other"
],
"jw": [
"other"
],
"ka": [
"one",
"other"
],
"kab": [
"one",
"other"
],
"kaj": [
"one",
"other"
],
"kcg": [
"one",
"other"
],
"kde": [
"other"
],
"kea": [
"other"
],
"kk": [
"one",
"other"
],
"kkj": [
"one",
"other"
],
"kl": [
"one",
"other"
],
"km": [
"other"
],
"kn": [
"one",
"other"
],
"ko": [
"other"
],
"ks": [
"one",
"other"
],
"ksb": [
"one",
"other"
],
"ksh": [
"zero",
"one",
"other"
],
"ku": [
"one",
"other"
],
"kw": [
"zero",
"one",
"two",
"few",
"many",
"other"
],
"ky": [
"one",
"other"
],
"lag": [
"zero",
"one",
"other"
],
"lb": [
"one",
"other"
],
"lg": [
"one",
"other"
],
"lij": [
"one",
"other"
],
"lkt": [
"other"
],
"ln": [
"one",
"other"
],
"lo": [
"other"
],
"lt": [
"one",
"few",
"many",
"other"
],
"lv": [
"zero",
"one",
"other"
],
"mas": [
"one",
"other"
],
"mg": [
"one",
"other"
],
"mgo": [
"one",
"other"
],
"mk": [
"one",
"other"
],
"ml": [
"one",
"other"
],
"mn": [
"one",
"other"
],
"mo": [
"one",
"few",
"other"
],
"mr": [
"one",
"other"
],
"ms": [
"other"
],
"mt": [
"one",
"few",
"many",
"other"
],
"my": [
"other"
],
"nah": [
"one",
"other"
],
"naq": [
"one",
"two",
"other"
],
"nb": [
"one",
"other"
],
"nd": [
"one",
"other"
],
"ne": [
"one",
"other"
],
"nl": [
"one",
"other"
],
"nn": [
"one",
"other"
],
"nnh": [
"one",
"other"
],
"no": [
"one",
"other"
],
"nqo": [
"other"
],
"nr": [
"one",
"other"
],
"nso": [
"one",
"other"
],
"ny": [
"one",
"other"
],
"nyn": [
"one",
"other"
],
"om": [
"one",
"other"
],
"or": [
"one",
"other"
],
"os": [
"one",
"other"
],
"osa": [
"other"
],
"pa": [
"one",
"other"
],
"pap": [
"one",
"other"
],
"pcm": [
"one",
"other"
],
"pl": [
"one",
"few",
"many",
"other"
],
"prg": [
"zero",
"one",
"other"
],
"ps": [
"one",
"other"
],
"pt": [
"one",
"many",
"other"
],
"pt-PT": [
"one",
"many",
"other"
],
"rm": [
"one",
"other"
],
"ro": [
"one",
"few",
"other"
],
"rof": [
"one",
"other"
],
"ru": [
"one",
"few",
"many",
"other"
],
"rwk": [
"one",
"other"
],
"sah": [
"other"
],
"saq": [
"one",
"other"
],
"sat": [
"one",
"two",
"other"
],
"sc": [
"one",
"other"
],
"scn": [
"one",
"other"
],
"sd": [
"one",
"other"
],
"sdh": [
"one",
"other"
],
"se": [
"one",
"two",
"other"
],
"seh": [
"one",
"other"
],
"ses": [
"other"
],
"sg": [
"other"
],
"sh": [
"one",
"few",
"other"
],
"shi": [
"one",
"few",
"other"
],
"si": [
"one",
"other"
],
"sk": [
"one",
"few",
"many",
"other"
],
"sl": [
"one",
"two",
"few",
"other"
],
"sma": [
"one",
"two",
"other"
],
"smi": [
"one",
"two",
"other"
],
"smj": [
"one",
"two",
"other"
],
"smn": [
"one",
"two",
"other"
],
"sms": [
"one",
"two",
"other"
],
"sn": [
"one",
"other"
],
"so": [
"one",
"other"
],
"sq": [
"one",
"other"
],
"sr": [
"one",
"few",
"other"
],
"ss": [
"one",
"other"
],
"ssy": [
"one",
"other"
],
"st": [
"one",
"other"
],
"su": [
"other"
],
"sv": [
"one",
"other"
],
"sw": [
"one",
"other"
],
"syr": [
"one",
"other"
],
"ta": [
"one",
"other"
],
"te": [
"one",
"other"
],
"teo": [
"one",
"other"
],
"th": [
"other"
],
"ti": [
"one",
"other"
],
"tig": [
"one",
"other"
],
"tk": [
"one",
"other"
],
"tl": [
"one",
"other"
],
"tn": [
"one",
"other"
],
"to": [
"other"
],
"tpi": [
"other"
],
"tr": [
"one",
"other"
],
"ts": [
"one",
"other"
],
"tzm": [
"one",
"other"
],
"ug": [
"one",
"other"
],
"uk": [
"one",
"few",
"many",
"other"
],
"und": [
"other"
],
"ur": [
"one",
"other"
],
"uz": [
"one",
"other"
],
"ve": [
"one",
"other"
],
"vi": [
"other"
],
"vo": [
"one",
"other"
],
"vun": [
"one",
"other"
],
"wa": [
"one",
"other"
],
"wae": [
"one",
"other"
],
"wo": [
"other"
],
"xh": [
"one",
"other"
],
"xog": [
"one",
"other"
],
"yi": [
"one",
"other"
],
"yo": [
"other"
],
"yue": [
"other"
],
"zh": [
"other"
],
"zu": [
"one",
"other"
]
}

View File

@ -1,36 +0,0 @@
{
"compilerOptions": {
"module": "CommonJS",
"target": "ES2017",
"lib": [
"DOM",
"ES5",
"ES6",
"ES7",
"ES2015",
"ES2016",
"ES2017",
"ES2018",
"ES2019",
"ES2020",
"ES2021",
"ESNext"
],
"rootDir": "./assets",
"declaration": true,
"declarationDir": "../@types/runtime",
"emitDeclarationOnly": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"typeRoots": ["../@types"],
"types": [
"intl",
"../../../@types/cc",
"../../../@types/editor",
"@editor/library-type"
],
},
"exclude": [
"../@types/**/*"
],
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More