Skip to content

Setting locales with region or script doesn't work due to case sensitive locale tag comparison #12

@daniel-micic

Description

@daniel-micic

Setting locales like zh-Hans or pt-BR doesn't work because of case sensitive comparison in resolveLocale(locale) in Tolgee class.
Locale tags fetched from cachedManifest from Tolgee backend are strings like "zh-Hans", "pt-BR" etc. But generateLocaleFallbacks(locale) function generates tags "zh-hans", "pt-br" which causes the condition if (candidate in availableLocales) on line 244 to wrongly result in false since contains() is case sensitive

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions