We are checking if every language known to us is present just to make
sure that we have more than one and show the dialog entry.
Always showing it is not a big deal and we'd save up this penalty at
start.
Details
- Reviewers
dfaure asturmlechner - Group Reviewers
Frameworks - Commits
- R263:555409eb206b: Save up a bunch of stat() calls on application start
Diff Detail
- Repository
- R263 KXmlGui
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
+1
We bundle translations in tarballs almost everywhere now, so it's safe to assume that we have > 1 translations around.
That's one solution. The other is to add bool KLocalizedString::hasApplicationTranslations() which stops at the first translation found.
Does the argument about shipping translations in tarballs apply to kmail, dolphin, etc. or just to KF5 and extragear? For apps, I thought only releaseme did that, is that used by the "Applications" product?
Just wondering, I don't care much either way.
I would still ask distributions: some of them may strip the translations in some cases.
Thanks for adding me, at least Gentoo indeed supports stripping translations even after they were moved into the packages - so that would break.
A minor "breakage" though, just a menu item that brings a selection of 0 or 1 language, i.e. showing the user that no translation is available. Arguably that's actually better user interface than a missing menu item (A: "click on that menu item!" -- B: "where? you're dreaming, there's no such menu item!")