Summary: | Menu items in Tools -> External Tools are untranslatable | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Burkhard Lück <lueck> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, aspotashev, christoph, lamarque |
Priority: | NOR | Flags: | aspotashev:
Translation_missing+
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Unspecified | ||
Latest Commit: | https://commits.kde.org/kate/f65192bbe6a6d259e13a2bab9408442b7f4dbe6b | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Replaced 'name' to 'Name' in externaltools |
Description
Burkhard Lück
2009-01-21 22:06:24 UTC
Created attachment 57471 [details]
Replaced 'name' to 'Name' in externaltools
This problem seems fixed in 4.6.1. Can I close this bug? (In reply to comment #2) > This problem seems fixed in 4.6.1. Can I close this bug? Using kate using locale x-test in master + 4.6 I still see untranslatable menu items. Lamarque why do you say it's fixed? Here I don't see any translation inside kate/plugins/externaltools/externaltools nor those texts extracted to kate.pot Because when I tested it I did not see anything unstranslated, but externaltools is not enabled by default. When it is enabled I see the unstranslated strings. External Tools is removed for 4.8, lack of maintainer, closing bugs, asking for somebody to step up, all bugs to look at listed there for archiving. http://kate-editor.org/2011/08/09/maintainer-needed-kate-external-tools-plugin/ PS: It's back. We have to check translation issues, though. https://kate-editor.org/post/2019/2019-09-21-external-tools-plugin/ Tested with Kate 19.11.90 on ArchLinux with Russian and Ukrainian translations, still does not work (menu items are all in English), I don't know why. The messages are correctly extracted into kateexternaltoolsplugin.pot by kate.git/addons/externaltools/Messages.sh Git commit df460443bf6e651812acb17d31ec1a9d26c71c6a by Dominik Haumann. Committed on 02/12/2019 at 20:31. Pushed by dhaumann into branch 'fix-translation'. Fix: Do not translate KActionCollection identifier M +1 -1 addons/externaltools/kateexternaltoolsview.cpp https://invent.kde.org/kde/kate/commit/df460443bf6e651812acb17d31ec1a9d26c71c6a Git commit df460443bf6e651812acb17d31ec1a9d26c71c6a by Dominik Haumann. Committed on 02/12/2019 at 20:31. Pushed by scmsync into branch 'fix-translation'. Fix: Do not translate KActionCollection identifier M +1 -1 addons/externaltools/kateexternaltoolsview.cpp https://commits.kde.org/kate/df460443bf6e651812acb17d31ec1a9d26c71c6a I think I know how to fix it: these must be i18nc() calls, not just i18n() because strings are extracted with contexts "External tool name" or "External tool category". diff --git a/addons/externaltools/kateexternaltool.cpp b/addons/externaltools/kateexternaltool.cpp index 3a8ce0e31..45c0ac879 100644 --- a/addons/externaltools/kateexternaltool.cpp +++ b/addons/externaltools/kateexternaltool.cpp @@ -144,12 +144,12 @@ void KateExternalTool::save(KConfigGroup &cg) const QString KateExternalTool::translatedName() const { - return name.isEmpty() ? QString() : i18n(name.toUtf8().data()); + return name.isEmpty() ? QString() : i18nc("External tool name", name.toUtf8().data()); } QString KateExternalTool::translatedCategory() const { - return category.isEmpty() ? QString() : i18n(category.toUtf8().data()); + return category.isEmpty() ? QString() : i18nc("External tool category", category.toUtf8().data()); } bool operator==(const KateExternalTool &lhs, const KateExternalTool &rhs) Ah I think that makes a lot of sense! Thanks, will post a patch. Quite a hacky approach, huh? I would use the standard translatable .json files if I was implementing this from scratch, like this one https://cgit.kde.org/purpose.git/tree/src/plugins/twitter/metadata.json Git commit f65192bbe6a6d259e13a2bab9408442b7f4dbe6b by Dominik Haumann. Committed on 02/12/2019 at 20:45. Pushed by dhaumann into branch 'ext-tools-fix-translation'. Fix translation of external tools M +2 -2 addons/externaltools/kateexternaltool.cpp https://invent.kde.org/kde/kate/commit/f65192bbe6a6d259e13a2bab9408442b7f4dbe6b Git commit f65192bbe6a6d259e13a2bab9408442b7f4dbe6b by Dominik Haumann. Committed on 02/12/2019 at 20:45. Pushed by scmsync into branch 'ext-tools-fix-translation'. Fix translation of external tools M +2 -2 addons/externaltools/kateexternaltool.cpp https://commits.kde.org/kate/f65192bbe6a6d259e13a2bab9408442b7f4dbe6b OTOH those JSONs assume that you are using KPlugin while here we won't ever use a plugin per external command... Merge request: https://invent.kde.org/kde/kate/merge_requests/50 |