[PATCH HEAD] i18n fixes

Ineiev ineiev at gnu.org
Fri Oct 7 08:44:46 CEST 2016


On Wed, Oct 05, 2016 at 07:37:42PM +0200, Werner Koch wrote:
> On Wed,  5 Oct 2016 17:24, ineiev at gnu.org said:
>
> > I really think this is where context should be used
> > with the messages joined, like
>
> Right.  We usuallay do this with ad-hoc methods instead of the
> non-portable pgettext.

I wonder if pgettext is really non-portable.

> Anyway, many texts in tofu.c are not suitable for translation because
> they split strings and translate only parts.  Instead of providing lot
> of contexts and a bulk of very similar strings, we should rework the
> texts to be better translatable.  That may require that we resort to
> some table-like texts, like

Indeed, the number of fragments can be dramatically reduced in this
message, with more context provided. the drawback is that the total
volume of msgids increases because the new strings share more parts.

diff --git a/g10/tofu.c b/g10/tofu.c
index c100c43..bd47eb0 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1556,7 +1556,6 @@ ask_about_binding (ctrl_t ctrl,
               key = stats_iter->fingerprint;
               this_key = strcmp (key, fingerprint) == 0;
               key_pp = format_hexfingerprint (key, NULL, 0);
-              es_fprintf (fp, "  %s (", key_pp);

               /* Find the associated binding.  */
               for (binding = conflict_set;
@@ -1567,22 +1566,15 @@ ask_about_binding (ctrl_t ctrl,
               log_assert (binding);

               if ((binding->flags & BINDING_REVOKED))
-                {
-                  es_fprintf (fp, _("revoked"));
-                  es_fprintf (fp, _(", "));
-                }
+                es_fprintf (fp, "  %s (binding revoked, ", key_pp);
               else if ((binding->flags & BINDING_EXPIRED))
-                {
-                  es_fprintf (fp, _("expired"));
-                  es_fprintf (fp, _(", "));
-                }
+                es_fprintf (fp, "  %s (binding expired, ", key_pp);

               if (this_key)
-                es_fprintf (fp, _("this key"));
+                es_fprintf (fp, _("this key):\n"));
               else
-                es_fprintf (fp, _("policy: %s"),
+                es_fprintf (fp, _("policy: %s):\n"),
                             tofu_policy_str (stats_iter->policy));
-              es_fputs ("):\n", fp);
               xfree (key_pp);

               seen_in_past = 0;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: </pipermail/attachments/20161007/a04b9d72/attachment.sig>


More information about the Gnupg-devel mailing list