Skip to content

Add 国服 (Simplified-Chinese) item-paste translation#2334

Draft
addohm wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
addohm:cn-item-paste-upstream
Draft

Add 国服 (Simplified-Chinese) item-paste translation#2334
addohm wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
addohm:cn-item-paste-upstream

Conversation

@addohm

@addohm addohm commented Jun 30, 2026

Copy link
Copy Markdown

Lets players paste an item copied from the Simplified-Chinese (WeGame / 国服) PoE2 client and have PoB parse it, by translating the paste to the English item-paste text the parser already expects. No parser changes — a thin hook in the Item constructor runs the translation before sanitiseText(); it is a no-op when the text contains no CJK, so English pastes are completely unaffected.

What it translates: item class, rarity, base type, unique name, properties (quality/spirit/sockets/item level + weapon & defence stats), requirements, explicit/implicit/rune/desecrated mod lines (via the client's StatDescriptions, with (min-max) range + (augmented) stripping), flask/charm charge & duration lines, granted skills, anointments (配置 X -> Allocates X, incl. passive-node names), and affix annotations ({ 前缀属性 "name" (等阶:N) } with the affix name translated so PoB fills prefix/suffix tiers).

Data: src/Data/ChineseTranslation.lua is generated by the self-contained datamine toolchain in tools/cn-translate/ (Node + pathofexile-dat) from the WeGame client, joining en<->zh on the language-independent metadata Id. NOTE: regeneration requires the 国服 client (the only source of the SC strings), so it can't be reproduced from the international GGPK — see tools/cn-translate/README.md.

Tested: spec/System/TestChineseItemParse_spec.lua round-trips a corpus of real 国服 pastes through the parser (base recognised; affix tiers populated; mods resolved). ~94.5% line coverage on the corpus (remainder is procedural rare names + unique flavour, which PoB ignores). Baseline item-parse specs unaffected.

Fixes # .

Description of the problem being solved:

Steps taken to verify a working solution:

Link to a build that showcases this PR:

Before screenshot:

After screenshot:

Lets players paste an item copied from the Simplified-Chinese (WeGame / 国服)
PoE2 client and have PoB parse it, by translating the paste to the English
item-paste text the parser already expects. No parser changes — a thin hook in
the Item constructor runs the translation before sanitiseText(); it is a no-op
when the text contains no CJK, so English pastes are completely unaffected.

What it translates: item class, rarity, base type, unique name, properties
(quality/spirit/sockets/item level + weapon & defence stats), requirements,
explicit/implicit/rune/desecrated mod lines (via the client's StatDescriptions,
with (min-max) range + (augmented) stripping), flask/charm charge & duration
lines, granted skills, anointments (配置 X -> Allocates X, incl. passive-node
names), and affix annotations ({ 前缀属性 "name" (等阶:N) } with the affix name
translated so PoB fills prefix/suffix tiers).

Data: src/Data/ChineseTranslation.lua is generated by the self-contained
datamine toolchain in tools/cn-translate/ (Node + pathofexile-dat) from the
WeGame client, joining en<->zh on the language-independent metadata Id. NOTE:
regeneration requires the 国服 client (the only source of the SC strings), so it
can't be reproduced from the international GGPK — see tools/cn-translate/README.md.

Tested: spec/System/TestChineseItemParse_spec.lua round-trips a corpus of real
国服 pastes through the parser (base recognised; affix tiers populated; mods
resolved). ~94.5% line coverage on the corpus (remainder is procedural rare
names + unique flavour, which PoB ignores). Baseline item-parse specs unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant