FontManager / font-manager

http://fontmanager.github.io/
GNU General Public License v3.0
829 stars 44 forks source link

Default pangram no longer localised #389

Closed Moilleadoir closed 3 months ago

Moilleadoir commented 3 months ago

Describe the bug Previously the preview text pangram was aligned with the system language, but now it’s in English.

To Reproduce Steps to reproduce the behavior:

  1. Open in Manage mode
  2. Select a font
  3. Preview tab displays “The quick brown fox jumps over the lazy dog.”

Expected behavior My locale is Irish so I’d expect “Chuaigh bé mhórshách le dlúthspád trí hata mo dhea-phorcáin bhig.”

System Information

Additional context

~$ locale
LANG=ga_IE.UTF-8
LC_CTYPE="ga_IE.UTF-8"
LC_NUMERIC="ga_IE.UTF-8"
LC_TIME="ga_IE.UTF-8"
LC_COLLATE="ga_IE.UTF-8"
LC_MONETARY="ga_IE.UTF-8"
LC_MESSAGES="ga_IE.UTF-8"
LC_PAPER="ga_IE.UTF-8"
LC_NAME="ga_IE.UTF-8"
LC_ADDRESS="ga_IE.UTF-8"
LC_TELEPHONE="ga_IE.UTF-8"
LC_MEASUREMENT="ga_IE.UTF-8"
LC_IDENTIFICATION="ga_IE.UTF-8"
LC_ALL=
JerryCasiano commented 3 months ago

Interesting...

I'm not getting the same result you are.

LANG=ga_IE.UTF-8 font-manager gives this result

ga_IE UTF-8

LANG=zh_CN.UTF-8 font-manager gives this result

zh_CN UTF-8

I think we're going to need you to build from source, from the latest commit please, and verify this is still an issue. I don't believe there has been any changes related to this but there has been quite a few changes and some of them definitely apply to some of the other issues you have filed.

JerryCasiano commented 3 months ago

Apologies. I see what you're referring to now. Or at least I think I do.

The preview tab that is editable defaults to English. Clicking the undo button does clear that and load a localized preview but this should happen by default.

Will look into this.

JerryCasiano commented 3 months ago

So, I've added a check which looks at the saved preview text and if matches the default English version loads the localized version instead if available.

However, this breaks on locale changes. Unfortunately we have no way of knowing whether the string was modified by the user or not in that case. I think this is probably as good as we're going to get for now.

I'm closing this out since the changes are in master.

Feel free to re-open if there's still an issue here.

And once again, thanks for pointing this out.

Hopefully we can also get the other two issues you encountered resolved before the next point release.