Changeset - r28416:80b9d00c99dd
[Not reviewed]
master
0 4 0
Kaspars Putniņš - 11 months ago 2024-01-07 21:03:38
36342248+kputnins@users.noreply.github.com
Add: Latvian Lats currency (#11691)
4 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/currency.cpp
Show inline comments
 
@@ -66,12 +66,13 @@ static const CurrencySpec origin_currenc
 
	{   40, "", CF_NOEURO, "NTD" NBSP,     "",               "NTD", 0, STR_GAME_OPTIONS_CURRENCY_NTD    }, ///< new taiwan dollar
 
	{    8, "", CF_NOEURO, u8"\u00a5",     "",               "CNY", 0, STR_GAME_OPTIONS_CURRENCY_CNY    }, ///< chinese renminbi
 
	{   10, "", CF_NOEURO, "HKD" NBSP,     "",               "HKD", 0, STR_GAME_OPTIONS_CURRENCY_HKD    }, ///< hong kong dollar
 
	{   90, "", CF_NOEURO, u8"\u20b9",     "",               "INR", 0, STR_GAME_OPTIONS_CURRENCY_INR    }, ///< Indian Rupee
 
	{   19, "", CF_NOEURO, "Rp",           "",               "IDR", 0, STR_GAME_OPTIONS_CURRENCY_IDR    }, ///< Indonesian Rupiah
 
	{    5, "", CF_NOEURO, "RM",           "",               "MYR", 0, STR_GAME_OPTIONS_CURRENCY_MYR    }, ///< Malaysian Ringgit
 
	{    1, "", 2014,      "",             NBSP "Ls",        "LVL", 1, STR_GAME_OPTIONS_CURRENCY_LVL    }, ///< latvian lats
 
};
 

	
 
/** Array of currencies used by the system */
 
CurrencySpec _currency_specs[CURRENCY_END];
 

	
 
/**
src/currency.h
Show inline comments
 
@@ -63,12 +63,13 @@ enum Currencies {
 
	CURRENCY_NTD,       ///< New Taiwan Dollar
 
	CURRENCY_CNY,       ///< Chinese Renminbi
 
	CURRENCY_HKD,       ///< Hong Kong Dollar
 
	CURRENCY_INR,       ///< Indian Rupee
 
	CURRENCY_IDR,       ///< Indonesian Rupiah
 
	CURRENCY_MYR,       ///< Malaysian Ringgit
 
	CURRENCY_LVL,       ///< Latvian Lats
 
	CURRENCY_END,       ///< always the last item
 
};
 

	
 
/** Specification of a currency. */
 
struct CurrencySpec {
 
	uint16_t rate;           ///< The conversion rate compared to the base currency.
src/lang/english.txt
Show inline comments
 
@@ -956,13 +956,13 @@ STR_GAME_OPTIONS_VOLUME_100             
 

	
 
STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME                           :{BLACK}Currency units
 
STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP                :{BLACK}Currency units selection
 

	
 
STR_GAME_OPTIONS_CURRENCY_CODE                                  :{STRING} ({RAW_STRING})
 

	
 
###length 42
 
###length 43
 
STR_GAME_OPTIONS_CURRENCY_GBP                                   :British Pound
 
STR_GAME_OPTIONS_CURRENCY_USD                                   :American Dollar
 
STR_GAME_OPTIONS_CURRENCY_EUR                                   :Euro
 
STR_GAME_OPTIONS_CURRENCY_JPY                                   :Japanese Yen
 
STR_GAME_OPTIONS_CURRENCY_ATS                                   :Austrian Shilling
 
STR_GAME_OPTIONS_CURRENCY_BEF                                   :Belgian Franc
 
@@ -999,12 +999,13 @@ STR_GAME_OPTIONS_CURRENCY_MXN           
 
STR_GAME_OPTIONS_CURRENCY_NTD                                   :New Taiwan Dollar
 
STR_GAME_OPTIONS_CURRENCY_CNY                                   :Chinese Renminbi
 
STR_GAME_OPTIONS_CURRENCY_HKD                                   :Hong Kong Dollar
 
STR_GAME_OPTIONS_CURRENCY_INR                                   :Indian Rupee
 
STR_GAME_OPTIONS_CURRENCY_IDR                                   :Indonesian Rupiah
 
STR_GAME_OPTIONS_CURRENCY_MYR                                   :Malaysian Ringgit
 
STR_GAME_OPTIONS_CURRENCY_LVL                                   :Latvian Lats
 

	
 
STR_GAME_OPTIONS_AUTOSAVE_FRAME                                 :{BLACK}Autosave
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP                      :{BLACK}Select interval between automatic game saves
 

	
 
# Autosave dropdown
 
###length 5
src/table/settings/locale_settings.ini
Show inline comments
 
@@ -7,13 +7,13 @@
 
; Locale settings as stored in the main configuration file ("openttd.cfg") and
 
; in the savegame PATS chunk. These settings are not sync'd over the network.
 

	
 
[pre-amble]
 
uint8_t _old_units;                                      ///< Old units from old savegames
 

	
 
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR"};
 
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR", "LVL"};
 
static constexpr std::initializer_list<const char*> _locale_units{"imperial", "metric", "si", "gameunits"};
 

	
 
static_assert(_locale_currencies.size() == CURRENCY_END);
 

	
 
static const SettingVariant _locale_settings_table[] = {
 
[post-amble]
0 comments (0 inline, 0 general)