i18n: remove rc.cpp only after xgettext

Authored by pino on Nov 19 2019, 12:13 PM.

Description

i18n: remove rc.cpp only after xgettext

This way, the messages in it are actually used.

Details

Committed
pinoNov 19 2019, 12:13 PM
Parents
R1045:88bae1c5c263: Move Messages.sh into src/ to avoid unwanted messages in the future
Branches
Unknown
Tags
Unknown

Behaviour did not change, however I think the former version was more bulletproof. Now we have a little issue: if someone leaves on disk an old rc.cpp before running Messages.sh, we might get duplicate or extra messages.

Please revert.

pino added a comment.Nov 19 2019, 6:24 PM

Behaviour did not change, however I think the former version was more bulletproof.

Nowhere else in our Messages.sh scripts the rc.cpp files is removed at the very beginning, and for a good reason: it may contains already strings that are useful for the application.
In this case, the comparison is the following:

diff -urN -I POT-Creation-Date po.before/ktimetracker.pot po.after/ktimetracker.pot
--- po.before/ktimetracker.pot
+++ po.after/ktimetracker.pot
@@ -18,6 +18,16 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
+#, kde-format
+msgctxt "NAME OF TRANSLATORS"
+msgid "Your names"
+msgstr ""
+
+#, kde-format
+msgctxt "EMAIL OF TRANSLATORS"
+msgid "Your emails"
+msgstr ""
+
 #. i18n("Exporting to CSV..."), i18n("Cancel"),
 #. 0, static_cast<int>(2 * storage()->tasksModel()->getAllTasks().size()), m_tasksWidget, nullptr);
 #. dialog.setAutoClose(true);

Without them, they will not be shown in the translator section of the about dialog.

Now we have a little issue: if someone leaves on disk an old rc.cpp before running Messages.sh, we might get duplicate or extra messages.

Considering Messages.sh now removes rc.cpp after the extraction, what you describe is very unlikely.

Please revert.

Considering this fixes a bug, I will not.

Ah, right. Thanks for the explaination!

Sorry for the noise. I didn't know where NAME OF TRANSLATORS/EMAIL OF TRANSLATORS come from.