flipwise / unibody-kickoff

This repository contains the version of KDE's Kickoff widget without the patch which introduced a permanent search field.
GNU General Public License v2.0
2 stars 1 forks source link

Provide translations for all languages #1

Closed flipwise closed 5 years ago

flipwise commented 5 years ago

This Kickoff applet needs to be distinguished from the existing Kickoff provided by KDE.

I cannot provide the translations for other languages so for now I've simply added "(2)" to avoid confusion.

flipwise commented 5 years ago

Probably not too necessary.

Zren commented 5 years ago

In order to reuse kickoff's translations, you'll have to replace all i18n(...) calls with i18nd("plasma_applet_org.kde.plasma.kickoff", ...).

https://github.com/KDE/plasma-workspace/blob/master/wallpapers/image/imagepackage/contents/ui/main.qml#L59

There's literally no examples, but you should be able to use KLocalizedContext if you want to shorten the function call code. I remember playing around with that ages ago when trying to figure out how to bundle translations.

    KLocalizedContext {
        id: asdf
        translationDomain: "plasma_applet_org.kde.plasma.kickoff"
    }

    Label {
        text: asdf.i18n(...)
    }
flipwise commented 5 years ago

Thanks, Zren!

I circumvented the problem for now by just having the package name match KDE's Kickoff. I have to think some more on if it's too dirty of a way out, and if so I'll have to start changing the QMLs.