Bug 198872 - Automatic syntax check with msgfmt when saving
Summary: Automatic syntax check with msgfmt when saving
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
: 194770 248125 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-04 09:09 UTC by Zayed Al-Saidi
Modified: 2019-08-22 14:35 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zayed Al-Saidi 2009-07-04 09:09:15 UTC
Version:            (using KDE 4.2.4)
Installed from:    SuSE RPMs

What I miss from Kbabel is checking for syntax errors. Please implement it. I see this:
Automatic syntax check with msgfmt when saving and, if an error occured, easy navigation to messages, which contain errors. == Syntax check (msgfmt --statistics) for existing files to control if the translated files will compile and, accordingly, work when distributed [Kross (project) action] 

In this page:
http://techbase.kde.org/Projects/Summer_of_Code/2007/Projects/KAider
Comment 1 Nick Shaforostoff 2009-11-08 18:54:11 UTC
pology checks are now integrated with Lokalize: http://l10n.kde.org/docs/translation-howto/check-gui.html

pure msgfmt checks are to come (as a scripts)...
Comment 2 Māris Nartišs 2009-11-20 10:16:59 UTC
Missing automatic syntax checks and "goto error" functionality makes QA hard in lokalize in comparison to KBabel. It's good that KBabel is still running :)
Just adding myself to CC list.
Comment 3 Laszlo Papp 2010-04-03 01:26:28 UTC
*** Bug 194770 has been marked as a duplicate of this bug. ***
Comment 4 Laszlo Papp 2010-05-04 00:58:40 UTC
Yeah, it would be an important feature definitely that so much translators said to me earlier, even if not with an automatical operation, but with a selection e.g.
Comment 5 sweta 2011-12-08 06:36:08 UTC
Someone is working on this feature? It's very important.

Thanks,
Sweta
Comment 6 Dimitrios Glentadakis 2011-12-09 20:54:45 UTC
(In reply to comment #1)
> pology checks are now integrated with Lokalize:
> http://l10n.kde.org/docs/translation-howto/check-gui.html
> 
> pure msgfmt checks are to come (as a scripts)...

Is this possible with Lokalize ?
I read this :
"Some specialized programs like Lokalize will assist you with this. Lokalize even contains an automated syntax check (among others) that saves you a lot of the work."
But i dont see Lokalize to do any checks when saving the file
Comment 7 Carlos E. R. 2012-04-05 22:21:53 UTC
I sorely miss the validation checks that kbabel does. It forces me to edit with lokalize, save, then load in kbabel and verify the file and save it - thank goodness kde3/kbabel is still available in openSUSE.

Yes, of course, I could verify with my own scripts, but kbabel places the editor automatically on each wrong string and shift-pgdn positions me on the next, which is highly convenient.

Any idea if/when the lokalize team plan to add that feature?
Comment 8 Adrián Chaves (Gallaecio) 2018-05-27 10:24:20 UTC
*** Bug 248125 has been marked as a duplicate of this bug. ***
Comment 9 Simon Depiets 2018-09-29 11:02:31 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 342615, bug 65061
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
Comment 10 Luiz Fernando Ranghetti 2019-08-22 14:35:59 UTC
Hi,

I think automatic msgfmt on saving will be simpler than having to install pology, configure and it run every time you translate something.

Maybe finishing this:
https://phabricator.kde.org/D13521

Regards