Skip to content

Commit

Permalink
Work on tidying up language handling
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Aug 2, 2024
1 parent ecad656 commit 18362b2
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 15 deletions.
103 changes: 93 additions & 10 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,55 @@ STR_CONCAT_3s : {STRING} {STRING} {STRING}
STR_CONCAT_4s : {STRING} {STRING} {STRING} {STRING}
STR_CONCAT_5s : {STRING} {STRING} {STRING} {STRING} {STRING}

STR_LIVERY : ({STRING} - {STRING})
STR_LIVERY_SPECIAL : ({STRING} - {STRING} - {SILVER}{STRING})

# Company name, whyte notation, nickname
STR_Name_SteamTender :{STRING} {STRING} "{STRING}" Tender
STR_Name_SteamTank :{STRING} {STRING}T "{STRING}" Tank

# TOPS class, nickname, length
STR_Name_BR_MUClass :BR Class {STRING} "{STRING}" ({STRING}-car)
# TOPS class, length
STR_Name_BR_MUClass_NoNickname :BR Class {STRING} ({STRING}-car)


# Abbreviations
str_abbr_BR :BR
str_abbr_EMR :EMR
str_abbr_LNER :LNER
str_abbr_LNWR :LNWR
str_abbr_TPE :TPE
str_abbr_VXC :VXC
str_abbr_VTEC :VTEC
str_abbr_VTWC :VTWC
str_abbr_WMR :WMR

# Companies
str_comp_Avanti :Avanti West Coast
str_comp_BR :British Rail
str_comp_Furness :Furness Railway
str_comp_GWR :Great Western Railway
str_comp_Northern :Northern
str_comp_NorthernRail :Northern Rail
str_comp_SWR :South Western Railway
str_comp_TPE :Transpennine Express
str_comp_VXC :Virgin CrossCountry
str_comp_VTEC :Virgin East Coast
str_comp_VTWC :Virgin West Coast
str_comp_WMR :West Midland Railway

# Suffixes used to build names
strsuffix_Blue : - Blue
strsuffix_Black : - Black
strsuffix_Desert : - Desert Sands
strsuffix_Green : - Green
strsuffix_GoldenOchre : - Golden Ochre
strsuffix_Maroon : - Maroon
strsuffix_Named : - Named
strsuffix_Olympics : - Olympics
strsuffix_Unnamed : - Unnamed
str_col_Blue :Blue
str_col_Black :Black
str_col_Desert :Desert Sands
str_col_Green :Green
str_col_GoldenOchre :Golden Ochre
str_col_Maroon :Maroon

str_var_Named :Named
str_var_Olympics :Olympics
str_var_Unnamed :Unnamed

# Parameters
STR_PARAM_MAX_SPEED :Max Speed
Expand Down Expand Up @@ -1738,4 +1777,48 @@ str_Wrexham : (Wrexham & Shropshire)
str_WYPTEMetro : (WYPTE Metro)
str_WYPTEVerona : (WYPTE Verona - Green and Cream)
str_XC : (CrossCountry)
str_xfcc : (Thameslink - ex-First Capital Connect)
str_xfcc : (Thameslink - ex-First Capital Connect)

# Whyte
str_whyte_020 :0-2-0
str_whyte_022 :0-2-2
str_whyte_024 :0-2-4
str_whyte_040 :0-4-0
str_whyte_042 :0-4-2
str_whyte_044 :0-4-4
str_whyte_060 :0-6-0
str_whyte_062 :0-6-2
str_whyte_064 :0-6-4
str_whyte_080 :0-8-0
str_whyte_082 :0-8-2
str_whyte_084 :0-8-4

str_whyte_220 :2-2-0
str_whyte_222 :2-2-2
str_whyte_224 :2-2-4
str_whyte_240 :2-4-0
str_whyte_242 :2-4-2
str_whyte_244 :2-4-4
str_whyte_260 :2-6-0
str_whyte_262 :2-6-2
str_whyte_264 :2-6-4
str_whyte_280 :2-8-0
str_whyte_282 :2-8-2
str_whyte_284 :2-8-4
str_whyte_2100 :2-10-0

str_whyte_420 :4-2-0
str_whyte_422 :4-2-2
str_whyte_424 :4-2-4
str_whyte_440 :4-4-0
str_whyte_442 :4-4-2
str_whyte_444 :4-4-4
str_whyte_460 :4-6-0
str_whyte_462 :4-6-2
str_whyte_464 :4-6-4
str_whyte_480 :4-8-0
str_whyte_482 :4-8-2
str_whyte_484 :4-8-4

str_whyte_garrett260 :2-6-0+0-6-2
str_whyte_garrett280 :2-8-0+0-8-2
2 changes: 1 addition & 1 deletion src/trains/electric_mu/BR374.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ switch (FEAT_TRAINS, SELF, switch_articulated_BR374, extra_callback_info1) {

switch(FEAT_TRAINS,SELF,sw_BR374_cargo_subtype_text,cargo_subtype){
0: return string(str_Eurostar);
1: return string(STR_CONCAT_2, string(str_Eurostar), string(strsuffix_Olympics));
1: return string(STR_CONCAT_2, string(str_Eurostar), string(str_var_Olympics));
return CB_RESULT_NO_TEXT;
}

Expand Down
8 changes: 4 additions & 4 deletions src/trains/steam/BR/Standard9F.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ switch(FEAT_TRAINS,SELF, sw_Standard9FTender,cargo_subtype){
}

switch(FEAT_TRAINS,SELF,sw_Standard9F_cargo_subtype_text,cargo_subtype){
0: return string(STR_CONCAT_2, string(str_BRBlack), string(strsuffix_Unnamed));
1: return string(STR_CONCAT_2, string(str_BRGreen), string(strsuffix_Unnamed));
2: return string(STR_CONCAT_2, string(str_BRBlack), string(strsuffix_Named));
3: return string(STR_CONCAT_2, string(str_BRGreen), string(strsuffix_Named));
0: return string(STR_CONCAT_2, string(str_BRBlack), string(str_var_Unnamed));
1: return string(STR_CONCAT_2, string(str_BRGreen), string(str_var_Unnamed));
2: return string(STR_CONCAT_2, string(str_BRBlack), string(str_var_Named));
3: return string(STR_CONCAT_2, string(str_BRGreen), string(str_var_Named));
return CB_RESULT_NO_TEXT;
}

Expand Down

0 comments on commit 18362b2

Please sign in to comment.