Bug 342615

Summary: Add syntax checks to Lokalize
Product: [Applications] lokalize Reporter: Vit Pelcak <vit>
Component: generalAssignee: Nick Shaforostoff <shafff>
Status: RESOLVED FIXED    
Severity: wishlist CC: adrian, karl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Vit Pelcak 2015-01-08 08:57:18 UTC
It would be very nice to add synctax checks (which would be basically msgfmt -c -o /dev/null file.po for the whole project) which would open wrong string in lokalize to fix it.

Checks for missing dots at the end of the sentences would also be nice. And so on. I remember that translation tool from KDE3 had something like that.

Reproducible: Always
Comment 1 Adrián Chaves (Gallaecio) 2018-05-27 11:19:15 UTC
Please, open separate reports for separate wishes.

Also, consider whether https://bugs.kde.org/show_bug.cgi?id=198872 would make your first wish unnecessary.
Comment 2 Karl Ove Hufthammer 2018-05-30 20:08:07 UTC
The first wish is covered by #198872, as Adrián Chaves mentioned.

For the other checks, I think it would be better to integrate support for Pology’s validation rules (http://pology.nedohodnik.net/doc/user/en_US/ch-lingo.html#sec-lgrules) (#342614) and/or the tests in the Translate Toolkit (http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter_tests.html) instead of trying to reimplement them in Lokalize directly.
Comment 3 Simon Depiets 2018-09-29 11:02:30 UTC
Git commit 52b94d0b6c41cb7e77ef64fcf9b32e403522b436 by Simon Depiets.
Committed on 29/09/2018 at 11:02.
Pushed by sdepiets into branch 'master'.

Add new ways to launch pology on file(s)

Summary:
Pology is a great tool but is not easily accessible from Lokalize currently, you need to launch a command line or configure a script, which is cumbersome and complicated in user space. After adding a line by line feature a few weeks ago, this review focuses on the file level :

- Launch the Pology "-s lokalize" command on file, files or folders from the Project Overview : this will open problematic messages in different tabs.
{F6285626}
- Launch the Pology "-s lokalize" command from within the file (Ctrl+Alt+P) : this will filter on problematic messages directly from within the file.
{F6285627}

The next step I see would be displaying pology statistics in the TM file, I'm open to your ideas for a better integration. I'm also counting on you to pass the message to your respective communities and update their documentation for the usage of pology.

As the agreement seems to be that syntax checks shall be handle externally, I will close the following bugs :
Related: bug 342614, bug 65061, bug 198872
GUI:

Reviewers: #localization, aacid, adrianchavesfernandez, huftis, mlaurent

Reviewed By: mlaurent

Subscribers: mlaurent

Tags: #localization

Differential Revision: https://phabricator.kde.org/D15759

M  +1    -1    src/CMakeLists.txt
M  +45   -8    src/editortab.cpp
M  +7    -0    src/editortab.h
M  +2    -1    src/editorui.rc
M  +4    -4    src/filesearch/filesearchtab.cpp
M  +9    -9    src/lokalizemainwindow.cpp
M  +4    -4    src/msgctxtview.cpp
M  +11   -0    src/prefs/lokalize.kcfg
M  +7    -6    src/prefs/prefs.cpp
A  +83   -0    src/prefs/prefs_pology.ui
D  +0    -64   src/project/prefs_project_pology.ui
M  +0    -6    src/project/projectlocal.kcfg
M  +53   -5    src/project/projecttab.cpp
M  +7    -0    src/project/projecttab.h
M  +5    -5    src/tm/tmtab.cpp

https://commits.kde.org/lokalize/52b94d0b6c41cb7e77ef64fcf9b32e403522b436