The goal of this task is to implement the feature request at https://bugs.kde.org/show_bug.cgi?id=198872
The plan is:
# Implement the following:
- Upon saving a translation file manually (either through Save or
Save As), before the file is actually saved, check if the new file
content passes the msgfmt checks.
- If it does not pass the checks, show a dialog box.
This dialog box should be similar to the one that appears when
you try to close Lokalize while having open files with unsaved
changes, but with the following differences:
- A different icon, one that suggest an error notification,
rather than a warning.
- The following choices:
- Show Issues
It cancels the file saving, and does something similar
to what pology does, showing only messages with issues,
and displaying the issues on the comments panel.
- Save Anyway
- Cancel
- If they do pass the checks, go on and save the file.
- If the msgfmt executable is not callable, exits with an
unexpected status or returns unexpected output, log details
about the error to stdout, then go on and save the file.
- Upon closing Lokalize while there are open files with unsaved
changes, before a dialog is displayed for each file asking what to
do with the file (Save, Discard, Cancel), check if the new file
content passes the msgfmt checks.
- If it does not pass the checks, show a different dialog box
instead.
This dialog box should be similar to the one that currently
appears in this scenario, but with the following changes:
- A different icon, one that suggest an error notification,
rather than a warning.
- The following choices:
- Show Issues
It cancels exiting Lokalize, and does something similar
to what pology does, showing only messages with issues,
and displaying the issues on the comments panel.
- Save Anyway
- Discard
- Cancel
- If they do pass the checks, go on and save the file.
- If the msgfmt executable is not callable, exits with an
unexpected status or returns unexpected output, log details
about the error to stdout, then go on and save the file.
# Update the automated tests to provide complete coverage of the new
code.
# Update the user-facing documentation as needed.