gen_emu_config: make sure each line in supported languages is lowercase

This commit is contained in:
otavepto 2024-06-26 23:16:06 +03:00
parent 4b49edbf5e
commit 433dc405bd
2 changed files with 3 additions and 3 deletions

View File

@ -643,11 +643,11 @@ static std::set<std::string> parse_supported_languages(class Local_Storage *loca
if (input.is_open()) {
common_helpers::consume_bom(input);
for( std::string line; getline( input, line ); ) {
if (!line.empty() && line[line.length()-1] == '\n') {
if (!line.empty() && line.back() == '\n') {
line.pop_back();
}
if (!line.empty() && line[line.length()-1] == '\r') {
if (!line.empty() && line.back() == '\r') {
line.pop_back();
}

View File

@ -826,7 +826,7 @@ def main():
for lang in langs:
support: str = langs[lang].get("supported", "").lower()
if support == "true" or support == "1":
languages.append(lang)
languages.append(f'{lang}'.lower())
if languages:
with open(os.path.join(emu_settings_dir, "supported_languages.txt"), 'wt', encoding='utf-8') as f: