Skip to content

Commit

Permalink
Update in-game data from 0.10.28.21014
Browse files Browse the repository at this point in the history
Adopt new in-game locale system, remove France
  • Loading branch information
huww98 committed Dec 24, 2023
1 parent 8b093a1 commit 1787a04
Show file tree
Hide file tree
Showing 168 changed files with 803 additions and 364 deletions.
14 changes: 0 additions & 14 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
<option value="auto">{{t('自动选择语言')}}</option>
<option value="en">English</option>
<option value="zh">中文</option>
<option value="fr">Français</option>
</select>
</div>
</li>
Expand Down Expand Up @@ -531,18 +530,5 @@ ul.operations {
"重做": "Redo",
"自动选择语言": "Auto Select"
},
fr: {
"复制": "Copier",
"粘贴": "Coller",
"选择文件": "Sélectionner le fichier",
"清空": "Effacer",
"复制粘贴不支持": "Non pris en charge, veuillez copier manuellement",
"保存文件": "Enregistrer le fichier",

"批量替换": "Remplacement en vrac",
"撤销": "Annuler",
"重做": "Refaire",
"自动选择语言": "Auto Select"
}
}
</i18n>
Binary file added src/assets/icons/item_recipe/assembler-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/battle-base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/bullet-alloy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/bullet-titanium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/bullet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/cannonball-alloy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/cannonball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/capsule-deuteron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/capsule-energy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/engine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/explosive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/fighter-laser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/fighter-plasma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/fighter-shield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/item_recipe/fuel-plant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/item_recipe/fusion-power-station.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/high-explosive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/lab-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/memory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/missile-graviton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/missile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/item_recipe/negentropy.png
Binary file added src/assets/icons/item_recipe/reassembler.png
Binary file added src/assets/icons/item_recipe/silicon-neuron.png
Binary file added src/assets/icons/item_recipe/smelter-3.png
Binary file added src/assets/icons/item_recipe/soil-pile.png
Binary file added src/assets/icons/item_recipe/turret-cannon.png
Binary file added src/assets/icons/item_recipe/turret-gauss.png
Binary file added src/assets/icons/item_recipe/turret-jammer.png
Binary file added src/assets/icons/item_recipe/turret-laser.png
Binary file added src/assets/icons/item_recipe/turret-missile.png
Binary file added src/assets/icons/item_recipe/turret-plasma.png
Binary file added src/assets/icons/item_recipe/turret-shield.png
Binary file added src/assets/icons/item_recipe/turret-signal.png
Binary file added src/assets/icons/item_recipe/warship-laser.png
Binary file added src/assets/icons/item_recipe/warship-plasma.png
Binary file added src/assets/icons/item_recipe/warship-shield.png
Binary file modified src/assets/icons/signal/signal-405.png
Binary file added src/assets/icons/signal/signal-406.png
Binary file added src/assets/icons/signal/signal-512.png
Binary file added src/assets/icons/signal/signal-513.png
Binary file added src/assets/icons/signal/signal-514.png
Binary file added src/assets/icons/signal/signal-515.png
Binary file added src/assets/icons/signal/signal-516.png
Binary file added src/assets/icons/signal/signal-517.png
Binary file added src/assets/icons/tech/1801.png
Binary file added src/assets/icons/tech/1802.png
Binary file added src/assets/icons/tech/1803.png
Binary file added src/assets/icons/tech/1804.png
Binary file added src/assets/icons/tech/1805.png
Binary file added src/assets/icons/tech/1806.png
Binary file added src/assets/icons/tech/1807.png
Binary file added src/assets/icons/tech/1808.png
Binary file added src/assets/icons/tech/1809.png
Binary file added src/assets/icons/tech/1810.png
Binary file added src/assets/icons/tech/1811.png
Binary file added src/assets/icons/tech/1812.png
Binary file added src/assets/icons/tech/1813.png
Binary file added src/assets/icons/tech/1814.png
Binary file added src/assets/icons/tech/1815.png
Binary file added src/assets/icons/tech/1816.png
Binary file added src/assets/icons/tech/1817.png
Binary file added src/assets/icons/tech/1818.png
Binary file added src/assets/icons/tech/1819.png
Binary file added src/assets/icons/tech/1820.png
Binary file added src/assets/icons/tech/1821.png
Binary file added src/assets/icons/tech/1822.png
Binary file added src/assets/icons/tech/1823.png
Binary file added src/assets/icons/tech/1826.png
Binary file added src/assets/icons/tech/1901.png
Binary file added src/assets/icons/tech/1902.png
Binary file added src/assets/icons/tech/1903.png
Binary file added src/assets/icons/tech/1904.png
Binary file added src/assets/icons/tech/2801.png
Binary file added src/assets/icons/tech/2802.png
Binary file added src/assets/icons/tech/2803.png
Binary file added src/assets/icons/tech/2804.png
Binary file added src/assets/icons/tech/2805.png
Binary file added src/assets/icons/tech/2806.png
Binary file added src/assets/icons/tech/2807.png
Binary file added src/assets/icons/tech/2951.png
Binary file added src/assets/icons/tech/2952.png
Binary file added src/assets/icons/tech/2953.png
Binary file added src/assets/icons/tech/2954.png
Binary file added src/assets/icons/tech/2955.png
Binary file added src/assets/icons/tech/2956.png
Binary file added src/assets/icons/tech/2957.png
Binary file added src/assets/icons/tech/5001.png
Binary file added src/assets/icons/tech/5002.png
Binary file added src/assets/icons/tech/5003.png
Binary file added src/assets/icons/tech/5004.png
Binary file added src/assets/icons/tech/5005.png
Binary file added src/assets/icons/tech/5006.png
Binary file added src/assets/icons/tech/5101.png
Binary file added src/assets/icons/tech/5102.png
Binary file added src/assets/icons/tech/5103.png
Binary file added src/assets/icons/tech/5104.png
Binary file added src/assets/icons/tech/5105.png
Binary file added src/assets/icons/tech/5106.png
Binary file added src/assets/icons/tech/5201.png
Binary file added src/assets/icons/tech/5202.png
Binary file added src/assets/icons/tech/5203.png
Binary file added src/assets/icons/tech/5204.png
Binary file added src/assets/icons/tech/5205.png
Binary file added src/assets/icons/tech/5206.png
Binary file added src/assets/icons/tech/5301.png
Binary file added src/assets/icons/tech/5302.png
Binary file added src/assets/icons/tech/5303.png
Binary file added src/assets/icons/tech/5304.png
Binary file added src/assets/icons/tech/5305.png
Binary file added src/assets/icons/tech/5401.png
Binary file added src/assets/icons/tech/5402.png
Binary file added src/assets/icons/tech/5403.png
Binary file added src/assets/icons/tech/5404.png
Binary file added src/assets/icons/tech/5405.png
Binary file added src/assets/icons/tech/5501.png
Binary file added src/assets/icons/tech/5502.png
Binary file added src/assets/icons/tech/5503.png
Binary file added src/assets/icons/tech/5504.png
Binary file added src/assets/icons/tech/5505.png
Binary file added src/assets/icons/tech/5601.png
Binary file added src/assets/icons/tech/5602.png
Binary file added src/assets/icons/tech/5603.png
Binary file added src/assets/icons/tech/5604.png
Binary file added src/assets/icons/tech/5605.png
Binary file added src/assets/icons/tech/5701.png
Binary file added src/assets/icons/tech/5702.png
Binary file added src/assets/icons/tech/5703.png
Binary file added src/assets/icons/tech/5704.png
Binary file added src/assets/icons/tech/5705.png
Binary file added src/assets/icons/tech/5801.png
Binary file added src/assets/icons/tech/5802.png
Binary file added src/assets/icons/tech/5803.png
Binary file added src/assets/icons/tech/5804.png
Binary file added src/assets/icons/tech/5805.png
Binary file added src/assets/icons/tech/5806.png
Binary file added src/assets/icons/tech/5807.png
Binary file added src/assets/icons/tech/5901.png
Binary file added src/assets/icons/tech/5902.png
Binary file added src/assets/icons/tech/5903.png
Binary file added src/assets/icons/tech/5904.png
Binary file added src/assets/icons/tech/5905.png
Binary file added src/assets/icons/tech/5906.png
Binary file added src/assets/icons/tech/5907.png
Binary file added src/assets/icons/tech/6001.png
Binary file added src/assets/icons/tech/6002.png
Binary file added src/assets/icons/tech/6003.png
Binary file added src/assets/icons/tech/6004.png
Binary file added src/assets/icons/tech/6005.png
Binary file added src/assets/icons/tech/6006.png
4 changes: 2 additions & 2 deletions src/data/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ python3 gen_tech_icons.py < $BASE/MonoBehaviour/TechProtoSet.json > techIconsDat

find $BASE/Texture2D -regex '.*/[0-9]+.png' | xargs cp -t ../assets/icons/tech/
find $BASE/Texture2D -regex '.*/signal-[0-9]+.png' | xargs cp -t ../assets/icons/signal/
cp $BASE/Texture2D/itemrecipe/*.png ../assets/icons/item_recipe/
cp $BASE/itemrecipe/*.png ../assets/icons/item_recipe/

python3 i18n.py $BASE/MonoBehaviour -o ../locales
python3 i18n.py $BASE/MonoBehaviour "$GAME_BASE/Locale" -o ../locales
30 changes: 22 additions & 8 deletions src/data/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
def main():
parser = argparse.ArgumentParser()
parser.add_argument('mono_behaviour', type=Path)
parser.add_argument('locale', type=Path)
parser.add_argument('-o', type=Path, required=True)
args = parser.parse_args()

Expand All @@ -22,18 +23,31 @@ def main():
required_keys = sorted(required_keys)
required_keys.extend(sorted(additional_keys))

# get official zh, en, fr translations
with open(args.mono_behaviour / 'StringProtoSet.json', 'rb') as f:
data = {i['Name']: i for i in json.load(f)['dataArray']}
# get official zh, en translations
def load_locale(path):
result = {}
for f_path in path.glob('*.txt'):
with f_path.open('r', encoding='utf-16-le') as f:
for line in f:
cells = line.strip().split('\t')
if len(cells) != 4:
continue
result[cells[0]] = cells[3]
return result

def output_translation(lang, offical_name):
trans = {k: data[k][offical_name] for k in required_keys if data[k][offical_name]}
data = {
'zh': load_locale(args.locale / '2052'),
'en': load_locale(args.locale / '1033'),
}

def output_translation(lang):
d = data[lang]
trans = {k: d[k] for k in required_keys if d[k]}
with open(args.o / f'{lang}.json', 'w', encoding='utf-8') as f:
json.dump(trans, f, ensure_ascii=False, indent=4)

output_translation('zh', 'ZHCN')
output_translation('en', 'ENUS')
output_translation('fr', 'FRFR')
output_translation('zh')
output_translation('en')

if __name__ == '__main__':
main()
160 changes: 99 additions & 61 deletions src/data/itemsData.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 1787a04

Please sign in to comment.