SUMMARY There's documentation explaining how to script Localize. However I can't get it to work. After seeing this commit - https://github.com/KDE/lokalize/commit/a0dc91ddc032485f850bc8fd5333e5a8a58024b6 - I'm drawn to believe that scripting functionality has been removed, and the docs never got updated. I tried placing the scripts linked from "Chapter 7. Scripting Lokalize" in what I believe to be the right location, but can't get them to work. The script that gets shipped with Lokalize (/usr/share/lokalize/scripts/) doesn't seem to work either. STEPS TO REPRODUCE 1. Start Lokalize 2. Press F1 och click Help -> Localize Handbook 3. Click Scripting Lokalize. OBSERVED RESULT The documentation states that scripting is possible, but I can't get it to work. EXPECTED RESULT - If there is no support for scripting any longer, it shouldn't say so in the manual. - Example scripts (/usr/share/lokalize/scripts/) shouldn't be provided if there isn't any scripting functionality any more. SOFTWARE/OS VERSIONS KDE Plasma Version: 6.3.3 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION
Thanks for reporting. I think Kross doesn't exist any more. There are things to do with DBus in the code still, but testing / maintaining scripting hasn't been a priority for a long time. I haven't looked into how it's supposed to work, but most likely scripting just will be removed. The handbook is unmaintained at the moment and the example scripts are known to not work.
(In reply to fin-w from comment #1) > Thanks for reporting. I think Kross doesn't exist any more. There are things > to do with DBus in the code still, but testing / maintaining scripting > hasn't been a priority for a long time. I haven't looked into how it's > supposed to work, but most likely scripting just will be removed. The > handbook is unmaintained at the moment and the example scripts are known to > not work. Thanks for confirming. At first I thought I was just being really dense, not being able to figure out how to make it work.
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/217
> The handbook is unmaintained There is nothing in KDE Gear that unmaintained
Just as a note - I manage to solve my particular issue once I saw that Lokalize supported D-Bus. Using `busctl` to call the `org.kde.Lokalize.Editor reloadFile` function was exactly what I needed. I'm just mentioning this in case you decide to update the handbook. It might be worth noting that Lokalize exposes a D-Bus interface that can be used to script behavior, if one is inclined to do so :).
Git commit aaa29d78a81d2bc08c1d0efe715f819a0329e96e by Christoph Cullmann, on behalf of Finley Watson. Committed on 21/04/2025 at 20:36. Pushed by cullmann into branch 'master'. Remove all Python scripting The DBus code still exists in the codebase but hasn't been recently tested to make sure it works. The Python code is old and does not work any more because (among other things) Kross doesn't exist any more. M +0 -1 CMakeLists.txt D +0 -16 scripts/CMakeLists.txt M +0 -0 scripts/find-gui-text.sh D +0 -20 scripts/msgfmt.py D +0 -6 scripts/msgfmt.rc D +0 -124 scripts/msgmerge.py D +0 -10 scripts/msgmerge.rc D +0 -86 scripts/xliff2odf-standalone.py D +0 -50 scripts/xliff2odf.py D +0 -10 scripts/xliff2odf.rc D +0 -384 scripts/xliffmerge.py https://invent.kde.org/sdk/lokalize/-/commit/aaa29d78a81d2bc08c1d0efe715f819a0329e96e
That commit did not fix the documentation.
Git commit 64a5c84ae80ba32d1b8ae5babb05ac1d625c680e by Albert Astals Cid. Committed on 03/05/2025 at 20:21. Pushed by aacid into branch 'master'. Doc: Remove mention python/js scripting It does not exist anymore. M +2 -43 doc/index.docbook https://invent.kde.org/sdk/lokalize/-/commit/64a5c84ae80ba32d1b8ae5babb05ac1d625c680e