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

Add function for loading translations #173

Merged
merged 1 commit into from Dec 23, 2020

Conversation

volkov0aa
Copy link
Contributor

It's more logical for the library than for user code to know
where the library's translations are located and how to load them.

It's more logical for the library than for user code to know
where the library's translations are located and how to load them.
@DamirPorobic
Copy link
Member

I'm not sure about this one. I agree that the library should take care of it's own stuff but a problem that I run into is that depending on the binaries the translation files are located differently, like for Windows they are in a directory next to executable, for AppImages and Snaps I think the path differs also. I have now some logic in ksnip that finds the translation files which would not work with this function.

And why a function, why not a method?

@DamirPorobic
Copy link
Member

Oh, sorry, I was not reading carefully, you look already at the variable that ksnip sets. This might be working for me. But still, why not a method?

@DamirPorobic DamirPorobic added the enhancement New feature or request label Dec 14, 2020
@DamirPorobic DamirPorobic self-requested a review December 14, 2020 21:42
@volkov0aa
Copy link
Contributor Author

  • translations apply to the entire library, not to a single class
  • kImageAnnotator::loadTranslations() is shorter than kImageAnnotator::KImageAnnotator::loadTranslations()

@DamirPorobic DamirPorobic merged commit fa2df08 into ksnip:master Dec 23, 2020
DamirPorobic added a commit that referenced this pull request Dec 23, 2020
DamirPorobic added a commit that referenced this pull request Dec 24, 2020
DamirPorobic added a commit that referenced this pull request Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants