fix(ui) : keep technical labels English and compact badges
This commit is contained in:
@@ -22,7 +22,16 @@ describe("export translations", () => {
|
||||
expect(exportText("weaponTitle", { name: "Raiden" })).toBe("Raiden Weapons");
|
||||
expect(exportText("rotation", { seconds: "20.5" })).toBe("Rotation duration: 20.5 seconds");
|
||||
expect(exportText("weaponTitle", { name: "{seconds}" })).toBe("{seconds} Weapons");
|
||||
expect(exportText("condition", { index: 2 }, "th")).toBe("เงื่อนไข 2");
|
||||
expect(exportText("condition", { index: 2 }, "th")).toBe("Condition 2");
|
||||
});
|
||||
|
||||
it("keeps technical labels in English while localising export controls", () => {
|
||||
for (const key of ["materials", "materialLevel", "weaponTitle", "talents", "mainStats", "teamDamage"] as const) {
|
||||
expect(exportText(key, { name: "Raiden", level: 90 }, "th")).toBe(exportText(key, { name: "Raiden", level: 90 }, "en"));
|
||||
}
|
||||
expect(exportText("materials", {}, "th")).toBe("MATERIALS");
|
||||
expect(exportText("materialLevel", { level: 90 }, "th")).toBe("LV.90");
|
||||
expect(exportText("exportImage", {}, "th")).toBe("ส่งออกภาพ");
|
||||
});
|
||||
|
||||
it("uses English stat names for exports while retaining Thai page labels and custom values", () => {
|
||||
|
||||
+30
-29
@@ -53,6 +53,7 @@ const english = {
|
||||
|
||||
export type ExportMessageKey = keyof typeof english;
|
||||
|
||||
// Technical headings and labels use English in every locale.
|
||||
const thai: Record<ExportMessageKey, string> = {
|
||||
exportImage: "ส่งออกภาพ",
|
||||
withoutNote: "ส่งออกภาพโดยไม่รวมโน้ต",
|
||||
@@ -60,47 +61,47 @@ const thai: Record<ExportMessageKey, string> = {
|
||||
exportError: "ส่งออกภาพไม่สำเร็จ กรุณาลองอีกครั้ง",
|
||||
damageTitle: "เลือกประเภทดาเมจ",
|
||||
damageDescription: "เลือกค่าที่ต้องการใช้สร้างภาพเปรียบเทียบอาวุธ",
|
||||
overallDamage: "ดาเมจทั้งทีม",
|
||||
personalDamage: "ดาเมจส่วนตัว",
|
||||
weaponTitle: "อาวุธของ {name}",
|
||||
condition: "เงื่อนไข {index}",
|
||||
overallDamage: english.overallDamage,
|
||||
personalDamage: english.personalDamage,
|
||||
weaponTitle: english.weaponTitle,
|
||||
condition: english.condition,
|
||||
sectionTitle: "เลือกข้อมูลสำหรับส่งออก",
|
||||
sectionDescription: "เลือกได้หลายส่วน หรือเลือกทั้งหมดเพื่อส่งออกทุกส่วน",
|
||||
allSections: "ทั้งหมด",
|
||||
tierlist: "อันดับอาร์ติแฟกต์",
|
||||
bestStats: "ออฟหลักและออฟรองที่ดีที่สุด",
|
||||
targetStats: "ค่าสถานะเป้าหมาย",
|
||||
talents: "ลำดับการอัพพรสวรรค์",
|
||||
tierlist: english.tierlist,
|
||||
bestStats: english.bestStats,
|
||||
targetStats: english.targetStats,
|
||||
talents: english.talents,
|
||||
addNote: "รวมโน้ต",
|
||||
recommendedCondition: "เงื่อนไขค่าสถานะแนะนำ",
|
||||
targetCondition: "เงื่อนไขค่าสถานะเป้าหมาย",
|
||||
mainStats: "ออฟหลักที่ดีที่สุด",
|
||||
substats: "ออฟรองที่ดีที่สุด",
|
||||
sands: "นาฬิกา",
|
||||
goblet: "ถ้วย",
|
||||
circlet: "หัว",
|
||||
artifactRecommendation: "อาร์ติแฟกต์และสแตทที่แนะนำ",
|
||||
artifactTitle: "อาร์ติแฟกต์และค่าสถานะ",
|
||||
lateGame: "เลทเกม",
|
||||
earlyGame: "ต้นเกม",
|
||||
minimumStats: "ค่าสถานะต่ำๆที่ควรจะปั้นไว้",
|
||||
level: "เลเวล {level}+",
|
||||
normalAttack: "ตีปกติ",
|
||||
skill: "สกิลธาตุ",
|
||||
burst: "ท่าไม้ตาย",
|
||||
recommendedCondition: english.recommendedCondition,
|
||||
targetCondition: english.targetCondition,
|
||||
mainStats: english.mainStats,
|
||||
substats: english.substats,
|
||||
sands: english.sands,
|
||||
goblet: english.goblet,
|
||||
circlet: english.circlet,
|
||||
artifactRecommendation: english.artifactRecommendation,
|
||||
artifactTitle: english.artifactTitle,
|
||||
lateGame: english.lateGame,
|
||||
earlyGame: english.earlyGame,
|
||||
minimumStats: english.minimumStats,
|
||||
level: english.level,
|
||||
normalAttack: english.normalAttack,
|
||||
skill: english.skill,
|
||||
burst: english.burst,
|
||||
note: "โน็ต",
|
||||
extraGuide: "คู่มือเสริม",
|
||||
missingItem: "ไม่พบรายการ",
|
||||
constellationTitle: "กลุ่มดาวของ {name}",
|
||||
teamDamage: "ดาเมจทั้งทีม",
|
||||
rotation: "ระยะเวลาโรเทชั่น {seconds} วิ",
|
||||
constellationTitle: english.constellationTitle,
|
||||
teamDamage: english.teamDamage,
|
||||
rotation: english.rotation,
|
||||
teamCredit: "Genshin isnt Mobile Game",
|
||||
watermark: "Genshin isnt Mobile Game",
|
||||
disclaimer: "ไม่สามารถเอาไปเปรียบเทียบกับการคำนวณของ TC ท่านอื่นๆได้\nเพราะแต่ละคนใช้สแตทในการคำนวณที่ไม่เหมือนกัน\nและตารางที่เห็นอาจมีการเปลี่ยนแปลงได้ในอนาคต",
|
||||
overviewDownloaded: "ดาวน์โหลดภาพ Overview แล้ว",
|
||||
downloadPng: "ดาวน์โหลด PNG {width}×{height}",
|
||||
materials: "วัสดุ",
|
||||
materialLevel: "เลเวล {level}"
|
||||
materials: english.materials,
|
||||
materialLevel: english.materialLevel
|
||||
};
|
||||
|
||||
export const exportMessages = { en: english, th: thai };
|
||||
|
||||
Reference in New Issue
Block a user