From 8e1dc63a6b81de182a112a7e67d9552b3cde44bf Mon Sep 17 00:00:00 2001 From: zhangyuesai Date: Wed, 17 Jan 2024 17:25:26 +0800 Subject: [PATCH 1/3] Add localization support --- files/Localization/en-us.cfg | 20 +++++++++++++ files/Localization/localization_patch.cfg | 36 +++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 files/Localization/en-us.cfg create mode 100644 files/Localization/localization_patch.cfg diff --git a/files/Localization/en-us.cfg b/files/Localization/en-us.cfg new file mode 100644 index 0000000..9ce1804 --- /dev/null +++ b/files/Localization/en-us.cfg @@ -0,0 +1,20 @@ +Localization +{ + en-us + { + #LOC_IndicatorLights_agent_blinken_title = Blinkenlights LLC + #LOC_IndicatorLights_agent_blinken_description = Give us your tired old technology and we'll glitz it up with distracting glowy things! + + #LOC_IndicatorLights_part_BL01_title = BL-01 Indicator Light + #LOC_IndicatorLights_part_BL01_description = Doesn't seem to achieve much, but we'll probably find out what it's for later on. + #LOC_IndicatorLights_part_BL01_tags = snark indicator light blinken led + + // The following lines should look like: + // ... = :LEDs indicate operational status.:: + // DO NOT modify the English text between the 1st and 2nd colons (:)! + #LOC_IndicatorLights_part_ISRU_description = :LEDs indicate operational status.:LEDs indicate operational status.: + #LOC_IndicatorLights_part_reactionWheel_description = :Indicator lights show the reaction wheel's status.:Indicator lights show the reaction wheel's status.: + #LOC_IndicatorLights_part_controller_description = :New, improved model now has status light!:New, improved model now has status light!: + #LOC_IndicatorLights_part_scanner_description = :LED indicates operational status.:LED indicates operational status.: + } +} \ No newline at end of file diff --git a/files/Localization/localization_patch.cfg b/files/Localization/localization_patch.cfg new file mode 100644 index 0000000..51c10ac --- /dev/null +++ b/files/Localization/localization_patch.cfg @@ -0,0 +1,36 @@ +// In order not to alter Snark's code, this MM patch was created +// to add localization support. + +@AGENT[Blinkenlights?LLC]:FINAL +{ + @title = #LOC_IndicatorLights_agent_blinken_title //Blinkenlights LLC + @description = #LOC_IndicatorLights_agent_blinken_description //Give us your tired old technology and we'll glitz it up with distracting glowy things! +} + +@PART[indicatorLightSmall]:FINAL +{ + @title = #LOC_IndicatorLights_part_BL01_title //BL-01 Indicator Light + @manufacturer = #LOC_IndicatorLights_agent_blinken_title //Blinkenlights LLC + @description = #LOC_IndicatorLights_part_BL01_description //Doesn't seem to achieve much, but we'll probably find out what it's for later on. + @tags = #LOC_IndicatorLights_part_BL01_tags //snark indicator light blinken led +} + +@PART[ISRU,MiniISRU]:FINAL +{ + @description ^= #LOC_IndicatorLights_part_ISRU_description +} + +@PART[asasmodule1-2,advSasModule,sasModule]:FINAL +{ + @description ^= #LOC_IndicatorLights_part_reactionWheel_description +} + +@PART[controller1000]:FINAL +{ + @description ^= #LOC_IndicatorLights_part_controller_description +} + +@PART[SurfaceScanner,SurveyScanner]:FINAL +{ + @description ^= #LOC_IndicatorLights_part_scanner_description +} \ No newline at end of file From f031044c3f4e4fe6f631e655d53166a0a2c5e4a5 Mon Sep 17 00:00:00 2001 From: zhangyuesai Date: Wed, 17 Jan 2024 17:25:45 +0800 Subject: [PATCH 2/3] Add Chinese localization --- files/Localization/zh-cn.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 files/Localization/zh-cn.cfg diff --git a/files/Localization/zh-cn.cfg b/files/Localization/zh-cn.cfg new file mode 100644 index 0000000..e533960 --- /dev/null +++ b/files/Localization/zh-cn.cfg @@ -0,0 +1,20 @@ +Localization +{ + zh-cn + { + #LOC_IndicatorLights_agent_blinken_title = 闪烁灯光有限责任公司 //Blinkenlights LLC + #LOC_IndicatorLights_agent_blinken_description = 把你那老掉牙的技术交给我们,我们会用一些光彩夺目的小玩意儿来装饰它! //Give us your tired old technology and we'll glitz it up with distracting glowy things! + + #LOC_IndicatorLights_part_BL01_title = BL-01指示灯 //BL-01 Indicator Light + #LOC_IndicatorLights_part_BL01_description = 看起来没什么用,但我们以后可能会知道它的用途。 //Doesn't seem to achieve much, but we'll probably find out what it's for later on. + #LOC_IndicatorLights_part_BL01_tags = snark 指示 灯 blinken 闪烁灯光 led //snark indicator light blinken led + + // 以下几行应为这样的形式: + // ... = :LEDs indicate operational status.:<中文翻译>: + // 不!要!修改前两个冒号之间的英文文本! + #LOC_IndicatorLights_part_ISRU_description = :LEDs indicate operational status.:LED灯指示转化炉的运行状态。: + #LOC_IndicatorLights_part_reactionWheel_description = :Indicator lights show the reaction wheel's status.:LED灯指示动量轮的运行状态。: + #LOC_IndicatorLights_part_controller_description = :New, improved model now has status light!:改进后的新型号增加了状态指示灯喔!: + #LOC_IndicatorLights_part_scanner_description = :LED indicates operational status.:LED灯指示扫描仪的运行状态。: + } +} \ No newline at end of file From d2c2a49f459502d7621f0da82c213d2b09c9ed0a Mon Sep 17 00:00:00 2001 From: zhangyuesai Date: Thu, 18 Jan 2024 10:45:42 +0800 Subject: [PATCH 3/3] minor --- files/Localization/en-us.cfg | 4 ++-- files/Localization/localization_patch.cfg | 12 ++++++------ files/Localization/zh-cn.cfg | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/files/Localization/en-us.cfg b/files/Localization/en-us.cfg index 9ce1804..39701eb 100644 --- a/files/Localization/en-us.cfg +++ b/files/Localization/en-us.cfg @@ -9,8 +9,8 @@ Localization #LOC_IndicatorLights_part_BL01_description = Doesn't seem to achieve much, but we'll probably find out what it's for later on. #LOC_IndicatorLights_part_BL01_tags = snark indicator light blinken led - // The following lines should look like: - // ... = :LEDs indicate operational status.:: + // IMPORTANT: the following lines should look like: + // ... = :LEDs indicate operational status.:: // DO NOT modify the English text between the 1st and 2nd colons (:)! #LOC_IndicatorLights_part_ISRU_description = :LEDs indicate operational status.:LEDs indicate operational status.: #LOC_IndicatorLights_part_reactionWheel_description = :Indicator lights show the reaction wheel's status.:Indicator lights show the reaction wheel's status.: diff --git a/files/Localization/localization_patch.cfg b/files/Localization/localization_patch.cfg index 51c10ac..5557050 100644 --- a/files/Localization/localization_patch.cfg +++ b/files/Localization/localization_patch.cfg @@ -1,13 +1,13 @@ // In order not to alter Snark's code, this MM patch was created // to add localization support. -@AGENT[Blinkenlights?LLC]:FINAL +@AGENT[Blinkenlights?LLC]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @title = #LOC_IndicatorLights_agent_blinken_title //Blinkenlights LLC @description = #LOC_IndicatorLights_agent_blinken_description //Give us your tired old technology and we'll glitz it up with distracting glowy things! } -@PART[indicatorLightSmall]:FINAL +@PART[indicatorLightSmall]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @title = #LOC_IndicatorLights_part_BL01_title //BL-01 Indicator Light @manufacturer = #LOC_IndicatorLights_agent_blinken_title //Blinkenlights LLC @@ -15,22 +15,22 @@ @tags = #LOC_IndicatorLights_part_BL01_tags //snark indicator light blinken led } -@PART[ISRU,MiniISRU]:FINAL +@PART[ISRU,MiniISRU]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @description ^= #LOC_IndicatorLights_part_ISRU_description } -@PART[asasmodule1-2,advSasModule,sasModule]:FINAL +@PART[asasmodule1-2,advSasModule,sasModule]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @description ^= #LOC_IndicatorLights_part_reactionWheel_description } -@PART[controller1000]:FINAL +@PART[controller1000]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @description ^= #LOC_IndicatorLights_part_controller_description } -@PART[SurfaceScanner,SurveyScanner]:FINAL +@PART[SurfaceScanner,SurveyScanner]:NEEDS[IndicatorLights]:AFTER[IndicatorLights] { @description ^= #LOC_IndicatorLights_part_scanner_description } \ No newline at end of file diff --git a/files/Localization/zh-cn.cfg b/files/Localization/zh-cn.cfg index e533960..4ef9c19 100644 --- a/files/Localization/zh-cn.cfg +++ b/files/Localization/zh-cn.cfg @@ -9,9 +9,9 @@ Localization #LOC_IndicatorLights_part_BL01_description = 看起来没什么用,但我们以后可能会知道它的用途。 //Doesn't seem to achieve much, but we'll probably find out what it's for later on. #LOC_IndicatorLights_part_BL01_tags = snark 指示 灯 blinken 闪烁灯光 led //snark indicator light blinken led - // 以下几行应为这样的形式: + // 注意!!!以下几行应为这样的形式: // ... = :LEDs indicate operational status.:<中文翻译>: - // 不!要!修改前两个冒号之间的英文文本! + // 不要将三个半角冒号修改为全角冒号!!!不要修改前两个冒号之间的英文文本!!! #LOC_IndicatorLights_part_ISRU_description = :LEDs indicate operational status.:LED灯指示转化炉的运行状态。: #LOC_IndicatorLights_part_reactionWheel_description = :Indicator lights show the reaction wheel's status.:LED灯指示动量轮的运行状态。: #LOC_IndicatorLights_part_controller_description = :New, improved model now has status light!:改进后的新型号增加了状态指示灯喔!: