-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Fix plugin credit and check level minimums #3513
Conversation
Workflow failed, but the following artifacts are still available for this pull request: |
I do not remember. At some point Idecided to change the place where the conversion to decibel was done when compared to the gtk branch. I probably forgot that the class member were still initialized like the old way.
There is but somehow I did not notice the comment about argument substitution https://api.kde.org/frameworks/ki18n/html/prg_guide.html. Or maybe the link I found before is another one.
Translations are handled in a very different way in KDE's land. It took me a while to figure out how to adapt KDe's example to our needs. But long story short do
This will update the translation template and the language files. It may be needed to install it somewhere to make the new translation strings active. In case you need to do this the procedure I have been doing is
|
I decided to do some tests after uninstalling the gtk based easyeffects package and the strings that were translated before are now in English. This is a sign that the translation framework is searching for strings in the system path and not the custom installation folder. Hum... I will see if I can make it replicate the old behavior somehow. |
For testing purposes I installed the qt branch in the system path |
So, If I understood correctly, we have to install the development build under /usr/ to test the translations. There's no other way we can do the same from |
No. Use |
Okay, but if I make the build normally, I won't see new translations, right? |
I saw them. I had to update the brazilian translation for |
Just building and running from the build folder does not work even in the gtk branch. It also needs that we install the binary somewhere. |
I tried to implement ftm::format to fix plugin credits translations, then discovered QString can make formatting with
arg()
method. Passing the result ofi18n
I got ai18n_argument_missing
.Later I made a search and went to this:
In which I discovered that we can do the same in QML. So it was more easy than we though, but it's weird there's no documentation on that system and I had to find this solution on a bugtracker.
Besides I saw you initialized plugin peak levels to the minimum linear value, but this was weird to me because those class properties are in dB units (we pass them to QML to show levels). So I changed them to the minimum db level (defined in util.hpp), but this led to show -100 on all levels when the app is started (which is reasonable since nothing is playing, but maybe this was not your purpose).
So in order to show 0 at the start when nothing is playing (the same happens on libadwaita), I initialized them to
0.0F
.At last, I added a check for -99 db like we did in libadwaita for the output levels.
Update. I forgot to mention the following: Is there a way to translate new QML strings? I'd like to test those plugin credits in my local language. I suppose I won't find them in weblate.