File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -123,29 +123,16 @@ Date ck3BookmarkDate
123123 if ( ! string . IsNullOrEmpty ( ImperatorCharacter . CustomName ) ) {
124124 var loc = ImperatorCharacter . CustomName ;
125125 Name = "IMPTOCK3_CUSTOM_NAME_" + loc . Replace ( ' ' , '_' ) ;
126- Localizations . Add ( Name , new LocBlock {
127- english = loc ,
128- french = loc ,
129- german = loc ,
130- russian = loc ,
131- simp_chinese = loc ,
132- spanish = loc
133- } ) ;
126+ Localizations . Add ( Name , new LocBlock ( loc ) ) ;
134127 } else {
135- Name = ImperatorCharacter . Name ;
128+ var nameLoc = ImperatorCharacter . Name ;
129+ Name = nameLoc . Replace ( ' ' , '_' ) ;
136130 if ( ! string . IsNullOrEmpty ( Name ) ) {
137- var impNameLoc = localizationMapper . GetLocBlockForKey ( Name ) ;
138- if ( impNameLoc is not null ) {
139- Localizations . Add ( Name , impNameLoc ) ;
131+ var matchedLocBlock = localizationMapper . GetLocBlockForKey ( Name ) ;
132+ if ( matchedLocBlock is not null ) {
133+ Localizations . Add ( Name , matchedLocBlock ) ;
140134 } else { // fallback: use unlocalized name as displayed name
141- Localizations . Add ( Name , new LocBlock {
142- english = Name ,
143- french = Name ,
144- german = Name ,
145- russian = Name ,
146- simp_chinese = Name ,
147- spanish = Name
148- } ) ;
135+ Localizations . Add ( Name , new LocBlock ( nameLoc ) ) ;
149136 }
150137 }
151138 }
Original file line number Diff line number Diff line change 22
33namespace ImperatorToCK3 . Imperator . Characters {
44 public class CharacterName : Parser {
5- public string Name { get ; private set ; } = string . Empty ; // key for localization
5+ public string Name { get ; private set ; } = string . Empty ; // key for localization or literal name
66 public string ? CustomName { get ; private set ; } // localized
77
88 public CharacterName ( BufferedReader reader ) {
You can’t perform that action at this time.
0 commit comments