flexboxfroggy icon indicating copy to clipboard operation
flexboxfroggy copied to clipboard

Automatically detect PT-BR (Issue #181)

Open Quenix opened this issue 5 years ago • 4 comments

This is a workaround to automatically detect languages added with country sufix in lang code

Quenix avatar Aug 28 '20 00:08 Quenix

I've tried to link this to the issue but I failed, sorry! If accepted I will manually close the issue! Thank you

Quenix avatar Aug 28 '20 00:08 Quenix

Hey @Quenix, thanks for the PR! Looks like it's on the right path.

How about instead of keeping a hard-coded list of languages, we check if the hyphenated language code exists in messages.languageActive first, if not we continue with the split language code? We wouldn't have to maintain a list that way.

thomaspark avatar Sep 02 '20 14:09 thomaspark

Hey @Quenix, thanks for the PR! Looks like it's on the right path.

How about instead of keeping a hard-coded list of languages, we check if the hyphenated language code exists in messages.languageActive first, if not we continue with the split language code? We wouldn't have to maintain a list that way.

Sounds way better! Thanks, I will try improving it!

Quenix avatar Sep 02 '20 18:09 Quenix

Hey @Quenix, have you had any progress with this? Let me know if you have any questions about the code or would like me to take over.

thomaspark avatar Sep 26 '20 00:09 thomaspark