flathub / net.ankiweb.Anki

https://flathub.org/apps/details/net.ankiweb.Anki
20 stars 13 forks source link

The language setting doesnt work #2

Closed haevalencia closed 5 years ago

haevalencia commented 6 years ago

After installing Anki and establishing a different language (eg. Spanish) and restarting, the interface is still displayed in English.

org.kde.Platform/x86_64/5.9 and org.kde.Platform.Locale/x86_64/5.9 are correctly installed (tested on fedora 27, Anki version 2.1.0beta37).

jurf commented 6 years ago

Yeah, can confirm.

kafran commented 6 years ago

Are you sure org.kde.Platform.Locale/x86_64/5.9 is not only partially installed? Take a look at flatpak list --all and see if it returns something like: org.kde.Platform.Locale/x86_64/5.9 system,runtime,partial If so, do flatpak install --reinstall flathub org.kde.Platform.Locale//5.9to fully install locale.

jurf commented 6 years ago

@kafran why wouldn’t I want a Platform.Locale partially installed? All of mine are, and all other apps function correctly.

kafran commented 6 years ago

@jurf I don't know why you would want a Platform.Locale partially installed. Some apps tries to guess your locale and install it partially, probably to save space, I don't know. Most time I have to reinstall it completely. This shouldn't be your case then. Lets wait the maintainers =).

jurf commented 6 years ago

@kafran it’s not about apps guessing, Flatpak installs only the locales you need based on your system preferences – it’s built to work that way, so that you don’t have 60 locales installed lying around catching dust. If you need to install the full .Locale to get your language to work, you should report that ASAP.

I’m thinking about stepping up as the maintainer since this package has a lot of usability problems and is out of date. Do I understand that your install doesn’t have this issue?

kafran commented 6 years ago

@jurf owh, I see. Now I understand. I always need to install the full .Locale because I like to have the system in english (I prefer this for reading errors), but some apps I like to have in my language. So, flatpak always install the apps in english and I need to download the full .Locale to have Portuguese available.

Yes, I just installed Anki on a freshly installed Xubuntu 18.04 and everything works nice.

jurf commented 6 years ago

@kafran by ‘working nice’ you mean you can choose Portuguese, or you use English?

dsd commented 5 years ago

I can reproduce this here, tested with:

  1. Uninstall Anki
  2. Remove Anki data dir
  3. Change OS to Spanish and restart
  4. Reinstall anki
  5. Launch Anki
  6. When prompted, select Spanish language

It still comes up in English.

Based on the above comments I was thinking the reinstall (after changing system language) would be necessary in order to make it not exclude Anki's spanish translations during installation. However upon running flatpak run --command=/bin/bash net.ankiweb.Anki I can see that all language translations seem to be present in /app/share/anki/locale - not sure if that's a bug or just something I misunderstood from above?

And since the Spanish translation is definitely there either way, I'll have to look closer why it is not being activated.

dsd commented 5 years ago

Spotted it - langDir hardcodes /usr/share/anki/locale, need to make it respect the PREFIX passed at build time.

jurf commented 5 years ago

A simple sed should fix that.

dsd commented 5 years ago

It was fixed upstream in https://github.com/dae/anki/commit/57d7b1f54b2656f187ada3cf1a067b4da672307a. I pushed v2.1.5 to fix this.