mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Avoid invalid locales in language picker (fixes #7950)
We should probably prune the translations though.
This commit is contained in:
		@@ -59,7 +59,10 @@ class SettingsGeneralController : SettingsController() {
 | 
			
		||||
                    for (i in 0 until parser.attributeCount) {
 | 
			
		||||
                        if (parser.getAttributeName(i) == "name") {
 | 
			
		||||
                            val langTag = parser.getAttributeValue(i)
 | 
			
		||||
                            langs.add(Pair(langTag, LocaleHelper.getDisplayName(langTag)))
 | 
			
		||||
                            val displayName = LocaleHelper.getDisplayName(langTag)
 | 
			
		||||
                            if (displayName.isNotEmpty()) {
 | 
			
		||||
                                langs.add(Pair(langTag, displayName))
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user