translate-po icon indicating copy to clipboard operation
translate-po copied to clipboard

Minor output formatting issues

Open okellogg opened this issue 1 year ago • 0 comments

Nice tool! I found two small issues.

  1. Linebreak between msgid/msgstr pairs is not preserved

Example input:

#: desktop/MigrateShortcuts.cpp:72 src/ShortcutActions.cpp:33
#, kde-format
msgid "Launch Spectacle"
msgstr ""

#: desktop/MigrateShortcuts.cpp:77 src/ShortcutActions.cpp:39
#, kde-format
msgid "Capture Entire Desktop"
msgstr ""

#: desktop/MigrateShortcuts.cpp:82 src/ShortcutActions.cpp:45

Generated output:

#: desktop/MigrateShortcuts.cpp:72 src/ShortcutActions.cpp:33
#, kde-format
msgid "Launch Spectacle"
msgstr "Lanĉu Spektaklon"
#: desktop/MigrateShortcuts.cpp:77 src/ShortcutActions.cpp:39
#, kde-format
msgid "Capture Entire Desktop"
msgstr "Kaptu Tutan Labortablon"
#: desktop/MigrateShortcuts.cpp:82 src/ShortcutActions.cpp:45
  1. On numbered format specifiers (%1), a space is inserted between % and the number in the translated msgstr

Examples:

#: src/ExportManager.cpp:326
#, kde-format
msgid "QImageWriter cannot write image: %1"
msgstr "QImageWriter ne povas skribi bildon: % 1"

#: src/Gui/RecordingView.qml:65
#, kde-format
msgid ""
"Recording:\n"
"%1"
msgstr ""
"Registrado:\n"
"% 1"

okellogg avatar Jun 14 '23 22:06 okellogg