Feat/i18n (#92)

* feat: add vue-i18n

* feat: add vue-i18n

* feat: add vue-i18n

* feat: add language class

* add: en templates and configs

* add: en names

* refactor: name gender id and sect id

* feat(i18n): add gettext infrastructure for dynamic text translation (#81)

* feat(i18n): add gettext infrastructure for dynamic text translation

- Add src/i18n/ module with t() translation function
- Add .po/.mo files for zh_CN and en_US locales
- Update LanguageManager to reload translations on language change
- Add comprehensive tests (14 tests, all passing)
- Add implementation spec at docs/specs/i18n-dynamic-text.md

Phase 1 of i18n dynamic text implementation.

* feat(i18n): expand .po files with comprehensive translation entries

Add translation messages for:
- Battle result messages (fatal/non-fatal outcomes)
- Fortune event messages (item discovery, cultivation gains)
- Misfortune event messages (losses, damage, regression)
- Death reason messages
- Item exchange messages (equip, sell, discard)
- Single choice context and option labels
- Common labels (weapon, auxiliary, technique, elixir)

Both zh_CN and en_US locales updated with matching entries.

* test: add .po file integrity tests

* feat: i18n for actions

* feat: i18n for effects

* feat: i18n for gathering

* feat: i18n for classes

* feat: i18n for classes

* feat: i18n for classes

* feat: i18n for classes

* fix bugs

* fix bugs

* fix bugs

* fix bugs

* fix bugs

* fix bugs

* fix bugs

* fix bugs

* update csv

* update world info

* update prompt

* update prompt

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Zihao Xu <xzhseh@gmail.com>
This commit is contained in:
4thfever
2026-01-24 13:47:23 +08:00
committed by GitHub
parent 6f4b648d6e
commit e1091fdf5a
243 changed files with 18297 additions and 3148 deletions

View File

@@ -0,0 +1,28 @@
item_id,name,grade,desc,effects
,Name,Grade (Qi Refinement/Foundation Establishment/Core Formation/Nascent Soul),Description/Prompt,JSON format (supports loose format, see effects.py description)
2001,Wood Spirit Armor,Foundation Establishment,Woven with spiritual wood fibers, full of vitality, fair defense.,{damage_reduction: 0.08}
2002,Blood Bodhi,Foundation Establishment,Grown where the Fire Qilin dripped blood, will heal severe injuries, increases power if uninjured.,{extra_hp_recovery_rate: 0.3}
2003,Ginseng Fruit (Pseudo),Foundation Establishment,Though not as good as the real thing, a sniff can prolong life by three hundred and sixty years.,{extra_max_lifespan: 50}
2004,Wanbao Token,Foundation Establishment,A high-level commercial token commonly used in Thousand Sails City.,"{extra_item_sell_price_multiplier: 0.1, shop_buy_price_reduction: 0.1}"
2005,Iron Essence,Foundation Establishment,Refined from a hundred jin of common iron to get one tael, a basic material for improving artifact quality.,{extra_weapon_upgrade_chance: 0.05}
2006,Heavenly Origin Eye,Foundation Establishment,Able to see through falsehoods, look directly at the source, and find dragon veins.,"{extra_observation_radius: 1, extra_fortune_probability: 0.005}"
2007,Cloud Treading Boots,Foundation Establishment,Steps born on clouds, body light as a swallow, essential for traveling.,"{extra_escape_success_rate: 0.15, extra_move_step: 1}"
2008,Bodhi Seed,Foundation Establishment,A supreme treasure of Buddhism, holding it clears the mind and greatly increases comprehension.,{extra_breakthrough_success_rate: 0.1}
2009,Golden Thread Soft Armor,Foundation Establishment,Invulnerable to swords and spears, unaffected by water and fire, a close-fitting soft armor.,"{extra_max_hp: 100, damage_reduction: 0.05}"
2010,Cold Jade Bed,Foundation Establishment,A supreme treasure of the Ancient Tomb Sect, cultivating on this bed yields twice the result with half the effort and avoids heart demons.,{cultivate_duration_reduction: 0.2}
2011,Formless Mask,Foundation Establishment,A thousand faces for a thousand people, it not only masks appearance but also masks aura.,{extra_plunder_multiplier: 0.5}
2051,Divine Wind Boat,Core Formation,A flying artifact, extremely fast, essential for traveling and plundering.,"{extra_move_step: 2, extra_escape_success_rate: 0.15}"
2052,Kunlun Mirror,Core Formation,An ancient divine artifact with the power to travel through time and space; this is an imitation, only able to peek into the distance.,{extra_observation_radius: 2}
2053,Heavenly Essence Vial,Nascent Soul,Seizes the creation of heaven and earth, gathers the essence of the sun and moon, and ripens all things.,"{extra_cultivate_exp: 150, cultivate_duration_reduction: 0.2}"
2054,Dragon and Phoenix Ring,Core Formation,Dragon and phoenix in harmony, hearts connected, dual cultivation progress advances rapidly.,{extra_dual_cultivation_exp: 100}
2055,Invisibility Cloak,Core Formation,When worn, the figure is completely hidden, making it difficult for even divine sense to detect.,"{extra_move_step: 1, extra_escape_success_rate: 0.2}"
2056,Beast Taming Ring,Core Formation,Placed on a demonic beast's neck, no matter how fierce it is, it must obey obediently.,{extra_catch_success_rate: 0.1}
2057,Void Armor,Core Formation,Transformed from the Void Illusion Realm, untouched by all dharmas, with amazing defensive power.,"{damage_reduction: 0.2, extra_max_hp: 200}"
2058,Eight Trigrams Furnace,Core Formation,An imitation of Grand Supreme Elder Lord's alchemy furnace, pills are refined nine times, doubling their effectiveness.,"{extra_hp_recovery_rate: 0.5, extra_refine_success_rate: 0.15}"
2059,Treasure Basin,Core Formation,Put in one coin, take out ten thousand; wealth rolls in.,"{extra_item_sell_price_multiplier: 0.2, extra_fortune_probability: 0.01, shop_buy_price_reduction: 0.2}"
2060,Heaven and Earth Furnace,Core Formation,Using heaven and earth as the furnace and creation as the worker, crafting all things.,"{extra_weapon_upgrade_chance: 0.15, extra_cast_success_rate: 0.1, extra_refine_success_rate: 0.1}"
2061,Six Paths Sword Casket,Core Formation,Carrying the six paths, swords emerge in reincarnation, a good companion for sword comprehension.,"{extra_breakthrough_success_rate: 0.2, extra_cultivate_exp: 100}"
2062,Imperial Seal,Nascent Soul,Mandated by Heaven, may you live long and prosper. Imperial majesty is immense, intimidating petty people.,{realm_suppression_bonus: 0.15}
2063,Spirit Eye Spring,Core Formation,A portable source of spiritual qi, a cave heaven land carried with you.,"{cultivate_duration_reduction: 0.3, extra_cultivate_exp: 50}"
2064,Ten Thousand Souls Banner,Nascent Soul,The sea of blood never dries, the Styx never dies. An extremely evil plundering artifact.,"{legal_actions: ['DevourMortals'], extra_plunder_multiplier: 1.0, realm_suppression_bonus: 0.15, extra_battle_strength_points: 'avatar.auxiliary.special_data.get(""devoured_souls"", 0) // 100 * 0.1'}"
2065,Divine Wood King Tripod,Nascent Soul,A wood-attribute supreme treasure, not only can refine divine pills, but the tripod also contains its own world, able to ripen spirit herbs.,"{extra_refine_success_rate: 0.25, cultivate_duration_reduction: 0.15}"
1 item_id name grade desc effects
2 Name Grade (Qi Refinement/Foundation Establishment/Core Formation/Nascent Soul) Description/Prompt JSON format (supports loose format see effects.py description)
3 2001 Wood Spirit Armor Foundation Establishment Woven with spiritual wood fibers full of vitality fair defense. {damage_reduction: 0.08}
4 2002 Blood Bodhi Foundation Establishment Grown where the Fire Qilin dripped blood will heal severe injuries increases power if uninjured. {extra_hp_recovery_rate: 0.3}
5 2003 Ginseng Fruit (Pseudo) Foundation Establishment Though not as good as the real thing a sniff can prolong life by three hundred and sixty years. {extra_max_lifespan: 50}
6 2004 Wanbao Token Foundation Establishment A high-level commercial token commonly used in Thousand Sails City. {extra_item_sell_price_multiplier: 0.1, shop_buy_price_reduction: 0.1}
7 2005 Iron Essence Foundation Establishment Refined from a hundred jin of common iron to get one tael a basic material for improving artifact quality. {extra_weapon_upgrade_chance: 0.05}
8 2006 Heavenly Origin Eye Foundation Establishment Able to see through falsehoods look directly at the source and find dragon veins. {extra_observation_radius: 1, extra_fortune_probability: 0.005}
9 2007 Cloud Treading Boots Foundation Establishment Steps born on clouds body light as a swallow essential for traveling. {extra_escape_success_rate: 0.15, extra_move_step: 1}
10 2008 Bodhi Seed Foundation Establishment A supreme treasure of Buddhism holding it clears the mind and greatly increases comprehension. {extra_breakthrough_success_rate: 0.1}
11 2009 Golden Thread Soft Armor Foundation Establishment Invulnerable to swords and spears unaffected by water and fire a close-fitting soft armor. {extra_max_hp: 100, damage_reduction: 0.05}
12 2010 Cold Jade Bed Foundation Establishment A supreme treasure of the Ancient Tomb Sect cultivating on this bed yields twice the result with half the effort and avoids heart demons. {cultivate_duration_reduction: 0.2}
13 2011 Formless Mask Foundation Establishment A thousand faces for a thousand people it not only masks appearance but also masks aura. {extra_plunder_multiplier: 0.5}
14 2051 Divine Wind Boat Core Formation A flying artifact extremely fast essential for traveling and plundering. {extra_move_step: 2, extra_escape_success_rate: 0.15}
15 2052 Kunlun Mirror Core Formation An ancient divine artifact with the power to travel through time and space; this is an imitation only able to peek into the distance. {extra_observation_radius: 2}
16 2053 Heavenly Essence Vial Nascent Soul Seizes the creation of heaven and earth gathers the essence of the sun and moon and ripens all things. {extra_cultivate_exp: 150, cultivate_duration_reduction: 0.2}
17 2054 Dragon and Phoenix Ring Core Formation Dragon and phoenix in harmony hearts connected dual cultivation progress advances rapidly. {extra_dual_cultivation_exp: 100}
18 2055 Invisibility Cloak Core Formation When worn the figure is completely hidden making it difficult for even divine sense to detect. {extra_move_step: 1, extra_escape_success_rate: 0.2}
19 2056 Beast Taming Ring Core Formation Placed on a demonic beast's neck no matter how fierce it is it must obey obediently. {extra_catch_success_rate: 0.1}
20 2057 Void Armor Core Formation Transformed from the Void Illusion Realm untouched by all dharmas with amazing defensive power. {damage_reduction: 0.2, extra_max_hp: 200}
21 2058 Eight Trigrams Furnace Core Formation An imitation of Grand Supreme Elder Lord's alchemy furnace pills are refined nine times doubling their effectiveness. {extra_hp_recovery_rate: 0.5, extra_refine_success_rate: 0.15}
22 2059 Treasure Basin Core Formation Put in one coin take out ten thousand; wealth rolls in. {extra_item_sell_price_multiplier: 0.2, extra_fortune_probability: 0.01, shop_buy_price_reduction: 0.2}
23 2060 Heaven and Earth Furnace Core Formation Using heaven and earth as the furnace and creation as the worker crafting all things. {extra_weapon_upgrade_chance: 0.15, extra_cast_success_rate: 0.1, extra_refine_success_rate: 0.1}
24 2061 Six Paths Sword Casket Core Formation Carrying the six paths swords emerge in reincarnation a good companion for sword comprehension. {extra_breakthrough_success_rate: 0.2, extra_cultivate_exp: 100}
25 2062 Imperial Seal Nascent Soul Mandated by Heaven may you live long and prosper. Imperial majesty is immense intimidating petty people. {realm_suppression_bonus: 0.15}
26 2063 Spirit Eye Spring Core Formation A portable source of spiritual qi a cave heaven land carried with you. {cultivate_duration_reduction: 0.3, extra_cultivate_exp: 50}
27 2064 Ten Thousand Souls Banner Nascent Soul The sea of blood never dries the Styx never dies. An extremely evil plundering artifact. {legal_actions: ['DevourMortals'], extra_plunder_multiplier: 1.0, realm_suppression_bonus: 0.15, extra_battle_strength_points: 'avatar.auxiliary.special_data.get("devoured_souls", 0) // 100 * 0.1'}
28 2065 Divine Wood King Tripod Nascent Soul A wood-attribute supreme treasure not only can refine divine pills but the tripod also contains its own world able to ripen spirit herbs. {extra_refine_success_rate: 0.25, cultivate_duration_reduction: 0.15}