[gtranslator/remove-prev-msg-when-not-fuzzy] Remove old messages when marked as not fuzzy




commit 7013d0768a4c82de519b03965672035ff7ee4d00
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Wed Dec 8 10:32:04 2021 +0100

    Remove old messages when marked as not fuzzy
    
    Fix https://gitlab.gnome.org/GNOME/gtranslator/-/issues/118

 src/gtr-msg.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/gtr-msg.c b/src/gtr-msg.c
index ad5f380c..6dd275f4 100644
--- a/src/gtr-msg.c
+++ b/src/gtr-msg.c
@@ -234,6 +234,14 @@ gtr_msg_set_fuzzy (GtrMsg * msg, gboolean fuzzy)
   g_return_if_fail (GTR_IS_MSG (msg));
 
   po_message_set_fuzzy (priv->message, fuzzy);
+
+  // Remove "previous msgid" when marked as not fuzzy
+  // https://www.gnu.org/software/gettext/manual/html_node/msgattrib-Invocation.html
+  if (!fuzzy)
+    {
+      po_message_set_prev_msgid (priv->message, NULL);
+
+    }
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]