Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version 1.6.0 is no longer working interface translation #204

Closed
antrrax opened this issue Sep 6, 2019 · 7 comments

Comments

@antrrax
Copy link
Contributor

commented Sep 6, 2019

I use Linux Mint 19.2 x64 Cinnamon
Git clone: September 06, 2019

New version 1.6.0 is no longer working interface translation

The August (11, 2019) version was installed in this directory:
-- Install configuration: ""
-- Installing: /usr/bin/ksnip
-- Installing: /usr/share/ksnip/translations/ksnip_de.qm
-- Installing: /usr/share/ksnip/translations/ksnip_es.qm
-- Installing: /usr/share/ksnip/translations/ksnip_fr.qm
-- Installing: /usr/share/ksnip/translations/ksnip_gl.qm
-- Installing: /usr/share/ksnip/translations/ksnip_id.qm
-- Installing: /usr/share/ksnip/translations/ksnip_nl.qm
-- Installing: /usr/share/ksnip/translations/ksnip_no.qm
-- Installing: /usr/share/ksnip/translations/ksnip_pl.qm
-- Installing: /usr/share/ksnip/translations/ksnip_pt.qm
-- Installing: /usr/share/ksnip/translations/ksnip_ru.qm
-- Installing: /usr/share/ksnip/translations/ksnip_tr.qm
-- Installing: /usr/share/ksnip/translations/ksnip_uk.qm
-- Installing: /usr/share/applications/ksnip.desktop
-- Installing: /usr/share/pixmaps/ksnip.svg
-- Installing: /usr/share/metainfo/ksnip.appdata.xml

The September (06, 2019) version is in this directory, has this change influenced the translation to fail?
-- Install configuration: ""
-- Installing: /usr/local/bin/ksnip
-- Installing: /usr/local/share/ksnip/translations/ksnip_de.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_es.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_fr.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_gl.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_id.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_nl.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_no.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_pl.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_pt.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_ru.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_tr.qm
-- Installing: /usr/local/share/ksnip/translations/ksnip_uk.qm
-- Installing: /usr/local/share/applications/ksnip.desktop
-- Installing: /usr/local/share/pixmaps/ksnip.svg
-- Installing: /usr/local/share/metainfo/ksnip.appdata.xml

Note: I tested the windows version and the translation worked

@antrrax

This comment has been minimized.

Copy link
Contributor Author

commented Sep 7, 2019

I also did the test on:

  • Fedora 30 Workstation
  • Xubuntu 19.04
  • Linux Mint 19.2 Mate

with Appimage 1.6.0 and the Ksnip interface has not been translated to Portuguese either.

Already on Windows 7, Ksnip had the interface in Portuguese
But with this new string "Add Watermark" still in English

@DamirPorobic

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2019

Have you manually build ksnip and installed it or why packging (deb or rmp)? Is the issue that the translations are not loaded anymore or you're missing some translated strings?

@DamirPorobic DamirPorobic self-assigned this Sep 8, 2019

@DamirPorobic DamirPorobic added the bug label Sep 8, 2019

@DamirPorobic

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2019

If you want the installations to be installed under /usr/share/ then you can provide the cmake flag -DCMAKE_INSTALL_PREFIX=/usr this should install them where the were. Without providing this flag they will be installed under /usr/local/share

@ronnystandtke

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2019

I manually created a Debian package and noticed that the translations were not used. So I straced ksnip and noticed that ksnip searched for the translations in the wrong directories (e.g. share/ksnip/translations instead of /usr/share/ksnip/translations). When I did a "cd /usr" before starting ksnip on the command line the translations were picked up (because in src/backend/TranslationLoader.cpp it also calls loadTranslationFromRelativePath) but I didn't want do write a workaround-wrapper-script. So I took a look into the source code and saw that the variable KSNIP_LANG_INSTAL_DIR is used in the TranslationLoader. This explained this issue. After applying the fix in my merge request the translations were picked up again. They are still incomplete because there seems to be a mismatch between the translation context in the classes and the translation files (see https://doc.qt.io/qt-5/i18n-source-translation.html), but I guess this is #186.

@DamirPorobic

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2019

Yeah, good catch. I've only changed the prefix, instead of using it hard coded to /usr I've set to use CMAKE_INSTALL_PREFIX. I believe it should be working now on the master branch, if you could double check, would be great.

@antrrax

This comment has been minimized.

Copy link
Contributor Author

commented Sep 9, 2019

Here the translation is back to work on both linux and windows.
Just that problem: not translating configuration window items

reported here:
#186

@DamirPorobic

This comment has been minimized.

Copy link
Owner

commented Sep 10, 2019

Ok, lats investigate this further under #186

@DamirPorobic DamirPorobic added this to In progress in v1.6.0 Sep 13, 2019

@DamirPorobic DamirPorobic moved this from In progress to Done in v1.6.0 Sep 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.