Skip to content

Commit

Permalink
Merge pull request #77775 from Maleclypse/Fix-Portuguese-
Browse files Browse the repository at this point in the history
[Suggestions requested ] Portuguese for Portugal is still missing in options.  Attempts to fix
  • Loading branch information
Night-Pryanik authored Nov 13, 2024
2 parents d4abac3 + a57636c commit 918bc6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ static void AddGlyphRangesFromCLDR( ImFontGlyphRangesBuilder *b, const std::stri
AddGlyphRangesFromCLDRForNL( b );
} else if( lang == "pl" ) {
AddGlyphRangesFromCLDRForPL( b );
} else if( lang == "pt_BR" ) {
} else if( lang == "pt" ) {
AddGlyphRangesFromCLDRForPT( b );
} else if( lang == "pt_PT" ) {
} else if( lang == "pt_BR" ) {
AddGlyphRangesFromCLDRForPT( b );
} else if( lang == "ru" ) {
AddGlyphRangesFromCLDRForRU( b );
Expand Down
6 changes: 3 additions & 3 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,8 +1360,8 @@ std::vector<options_manager::id_and_option> options_manager::get_lang_options()
{ "nb", R"(Norsk)" },
{ "nl", R"(Nederlands)" },
{ "pl", R"(Polski)" },
{ "pt", R"(Português (Portugal))" },
{ "pt_BR", R"(Português (Brasil))" },
{ "pt_PT", R"(Português (Portugal))" },
{ "ru", R"(Русский)" },
{ "sr", R"(Српски)" },
{ "tr", R"(Türkçe)" },
Expand Down Expand Up @@ -4243,10 +4243,10 @@ void options_manager::update_global_locale()
std::locale::global( std::locale( "nl_NL.UTF-8" ) );
} else if( lang == "pl" ) {
std::locale::global( std::locale( "pl_PL.UTF-8" ) );
} else if( lang == "pt" ) {
std::locale::global( std::locale( "pt_PT.UTF-8" ) );
} else if( lang == "pt_BR" ) {
std::locale::global( std::locale( "pt_BR.UTF-8" ) );
} else if( lang == "pt_PT" ) {
std::locale::global( std::locale( "pt_PT.UTF-8" ) );
} else if( lang == "ru" ) {
std::locale::global( std::locale( "ru_RU.UTF-8" ) );
} else if( lang == "sr" ) {
Expand Down
3 changes: 2 additions & 1 deletion src/system_locale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ std::optional<std::string> Language()
{"nb", {{ 1044, 2068 }} },
{"nl", { 1043 } },
{"pl", { 1045 } },
{"pt_BR", {{ 1046, 2070 }} },
{"pt", { 2070 } },
{"pt_BR", { 1046 } },
{"ru", {{ 25, 1049, 2073 }} },
{"sr", { 3098 } },
{"tr", { 1055 } },
Expand Down

0 comments on commit 918bc6f

Please sign in to comment.