New proofing / consistency feature
Karl Ove Hufthammer
karl at huftis.org
Fri Feb 13 20:58:32 GMT 2026
To use Pology, you just have to check the ‘Enable Pology verification’
option in the settings. Then it should work automatically (though it’s a
bit slow).
First you have to have some translation files in one the the languages
that have Pology rules:
https://invent.kde.org/sdk/pology/-/tree/master/lang?ref_type=heads
Then you just have to open a PO file that has ‘mistakes’ that the rules
would detected. Navigate to a string that would trigger a rule. The
corresponding error messages are shown in the unit metadata
(unfortunately only after about a second or so).
Here is an example file with strings that trigger many of the Norwegian
Nynorsk rules:
msgid ""
msgstr ""
"Project-Id-Version: kpat\n"
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
"PO-Revision-Date: 2025-10-26 13:39+0100\n"
"Last-Translator: Nomen Nescio <nn at example.com>\n"
"Language-Team: Norwegian Nynorsk <l10n-no at lister.huftis.org>\n"
"Language: nn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
msgid "Load Existing Thumbnail"
msgstr "Last inn eksisterande miniatyrbilete"
msgid "This will make the PC crash: %1"
msgstr "Dette gjer at PCen krasjar : %1"
msgid "If enabled, all packages will first be deleted."
msgstr "Om det er slått på, vil fyrst alle pakkene bli sletta."
To see the corresponding error messages when running Pology directly,
try this command (where test.po is the name of the PO file):
posieve check-rules test.po
Though there seems to be a bug in Lokalize which causes just the text
[note] to be displayed if more than one rule is triggered (strings 2 and
3 above).
And sometimes the error message is shown repeatedly:
https://bugs.kde.org/show_bug.cgi?id=502712
And the error message shown in Lokalize doesn’t use the highlighting
that Pology does: https://bugs.kde.org/show_bug.cgi?id=393694
(So currently, I prefer to run Pology from the command-line instead.
It’s also much faster. And if I add -slokalize, it will automatically
open all files that have errors in Lokalize and filter the unit list to
only show the strings with errors.)
About ‘depending’ on Pology: I’m not suggesting *depending* on Pology.
But if you have Pology installed, you get a bunch of QA checks for free.
And using Pology will probably be the best way to implement all but the
most simple of checks (a simple check would be that both source and
target end with a ‘.’).
Karl Ove Hufthammer
fin-w at tutanota.com skreiv 13.02.2026 21:00:
> Thanks for the feedback Karl,
>
> We can certainly make this optional with a setting in the config.
>
> Would you mind explaining how to use Pology? I never got it working in
> a way I could really understand, and its output in the editor tab
> wasn't very helpful for me to learn.
>
> And I'm a little cautious about depending on Pology for a check like
> this --- unless we set Pology as a required package (and get
> maintainers to provide it for their distro), or bundle it with
> Lokalize somehow, we're depending on proofing from a tool that might
> not exist on the user's system, and might require building just to set
> up. This is not user-friendly...
>
> Thanks,
> Finley
>
> Feb 13, 2026, 19:47 by karl at huftis.org:
>
> fin-w at tutanota.com skreiv 12.02.2026 14:55:
>
>
> Hi translators,
>
> Varun, a Season of KDE mentee, is working in this merge
> request here, adding more functionality to Lokalize's editor
> tab https://invent.kde.org/sdk/lokalize/-/merge_requests/286
>
> What are you thoughts about this new feature being
> implemented? Is the KMessageWidget warning too distracting?
>
>
> I would find it annoying. I have seen the feature in other
> (online) PO editors, and have *never* found it useful. There are
> tons of false positives (partly because my translations are
> usually much more consistent than the original English strings).
> Also note that a good implementation must take into
> language-specific rules. See the Translate Toolkit rules for some
> inspiration:
> https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter_tests.html
>
> I’m not *against* this feature, but it must be possible to easily
> disable it.
>
> And I actually think the suggested KMessageWidget UI is OK. The
> (supposed) error is easy to notice, which is important.
>
> But I would prefer that work would be done to use this UI for the
> Pology-based checks that *already exist* in Lokalize. In the
> current UI, it’s easy to miss the errors. An advantage of the
> Pology-based checks is that each translation team can easily add
> their own language-specific (and even file-specific and
> project-specific) rules, and the checks can be much more
> sophisticated.
>
> Regarding the trailing space feature: I like this very much and
> would *not* want to see it moved to a KMessageWidget.
>
>
> --
> Karl Ove Hufthammer
>
>
--
Karl Ove Hufthammer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20260213/89244b87/attachment-0001.htm>
More information about the kde-i18n-doc
mailing list