Repository navigation
Ungate item strings whose only variant is tagged for another region - #70
Conversation
An item whose name, plural or description exists only under a CN, JP or KR locale key resolves to nothing on any other client, so items such as 20300738 (Mini Vitality Elixir (30)) show without a name on NA. Drop the locale from those keys and keep any feature gate. Clients of the region they were tagged for still resolve them, since an ungated key is their fallback when no key matches their region. Ids with several region-gated variants (20001735, 30001446) are left alone: dropping the locale would collapse them onto one key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
About 1,070 items have a name, plural or description only under a key tagged for another region (
<id>--CN,<id>-Event-JP, ...). Any client outside that region resolves no string at all, so the item has no name or description. For example, 20300738 (Mini Vitality Elixir (30)) shows blank on NA. This drops the locale from those keys and keeps any feature gate.Why it is safe for the region the key was tagged for: an ungated key is the fallback a client uses when no key matches its region. A CN client still finds
20300738--exactly as it found20300738--CN, because no competing variant exists for these ids.What changed
WeblateConverter/Json/{ko,en,cn,jp}/itemname.json,itemnameplural.json,koritemdescription.json: renamed keys. The rule, applied per file and taken from thekosource template: if every variant of an id carries a non-NA locale and the id has exactly one variant,<id>-<feature>-<locale>becomes<id>-<feature>-. Renamed by exact text substitution in every locale file, so values, formatting and key order are unchanged.Event/JP,Event/CN,Develop/*,Level60Item/KRand others. The feature half of each key is kept, so feature gating behaves as before.Xml/string/{cn,en,jp,kr}/…: regenerated withjson-to-xml-all. Every changed line differs only by a droppedlocale="CN|JP|KR", and the line counts match the renames one for one.Left alone: 20001735 (
Event/JP+Event/CN) and 30001446 (MassiveHideAndSeek/JP+/CN). Dropping the locale would collapse two variants onto one key, so which one wins is a human call.One visible side effect: a KR client will now show these items'
kosource text where it previously showed nothing. For CN-origin keys that text is Chinese. These items are not part of KMS2 content anyway.Before merging: Weblate
Weblate matches units by key, so for Weblate these are new units. The translations travel with them, because the key is renamed in every locale file at once. Their review state (approved, and so on) may come back as plain "translated". To avoid a merge conflict on Weblate's side:
item/itemname,item/itemnamepluralanditem/koritemdescription, then lock those components.20300738--, then unlock.Verification
verify-all: passes for all 7 locales, with 0 structural and 0 key issues.20300738inXml/string/en/itemname.xml:<key id="20300738" name="Mini Vitality Elixir (30)" class="consume" />.json-to-xml-allon currentmainalso reorders a few lines inen/koradditionaldescription.xml,en/korskilldescription_50/70.xmlandjp/koradditionaldescription.xml. That is churn already present onmain, not caused by this change, so it is deliberately not included here.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit