Political World — treating localization keys as owned content
✅ Source verified 🌐 Collision prevention
Localization often looks harmless:
key → translated stringIn an addon ecosystem, the key is a global identity.
Two addons using the same generic key can overwrite or confuse each other.
Political World’s approach
Section titled “Political World’s approach”RegisterLocalization(...) requires the key to be owned by the registered addon.
The API also tracks:
localization key → owner addon IDIf a different addon already owns the key, the second registration is rejected and the framework records diagnostic code:
PWDIAG190Bad key design
Section titled “Bad key design”government.namemenu.titledescriptionThese are easy to collide with.
Better key design
Section titled “Better key design”YourName.MyAddon.government.technocracy.nameYourName.MyAddon.action.reform.descriptionNow the key itself communicates ownership.
Why this matters beyond localization
Section titled “Why this matters beyond localization”The same principle applies to:
- actions;
- ideologies;
- governments;
- rare events;
- save-data keys;
- tags;
- UI routes;
- settings.
If content is globally addressable, it needs globally safe identity.
Fallback does not bypass ownership
Section titled “Fallback does not bypass ownership”Political World’s internal helper can seed English fallback text from DisplayName/Description, but only when:
- the addon is registered;
- the localization key exists;
- the fallback is non-empty;
- the key belongs to that addon.
Convenience should not disable ownership rules.
Framework lesson
Section titled “Framework lesson”Do not treat localization as a special ungoverned side table.
Localization keys are part of the public content namespace and deserve:
- ownership;
- collision detection;
- stable naming;
- migration discipline;
- diagnostics.