After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695559 - Please add translator comment to explain what None refers to
Please add translator comment to explain what None refers to
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-03-10 12:48 UTC by TLE
Modified: 2013-03-12 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
imap-smtp: Add some context for "None" (1.67 KB, patch)
2013-03-11 11:07 UTC, Debarshi Ray
none Details | Review
imap-smtp: Add translation context for "None", and some comments too (2.29 KB, patch)
2013-03-12 11:14 UTC, Debarshi Ray
needs-work Details | Review
imap-smtp: Refactor the encryption combo-box code (4.26 KB, patch)
2013-03-12 14:17 UTC, Debarshi Ray
committed Details | Review

Description TLE 2013-03-10 12:48:21 UTC
Hallo online-accounts devs

Can you please add a translator comment that explain what None in this string refers to, as that will influence the translation.

#: ../src/goabackend/goaimapsmtpprovider.c:694
#: ../src/goabackend/goaimapsmtpprovider.c:726
msgid "None"

Regards Kenneth
Comment 1 Matthias Clasen 2013-03-11 10:05:44 UTC
I think message context ( C_() ) would be even better.
Comment 2 Debarshi Ray 2013-03-11 11:07:26 UTC
Created attachment 238571 [details] [review]
imap-smtp: Add some context for "None"

Good catch!

So you have a combobox like this:
"_Encryption": "None", "STARTTLS after connecting", "SSL on a dedicated port".

There is a similar combo box in Evolution, but with "Encryption method" and "No encryption" for the first two strings. It would be cool to have similar translations in both modules. I don't know what is the best way to send that point across.
Comment 3 TLE 2013-03-11 22:17:10 UTC
Thanks for fixing this up.
Comment 4 Debarshi Ray 2013-03-12 11:14:35 UTC
Created attachment 238682 [details] [review]
imap-smtp: Add translation context for "None", and some comments too

Added a comment mentioning the similarity with the strings in evolution.
Comment 5 Debarshi Ray 2013-03-12 11:15:33 UTC
(In reply to comment #3)
> Thanks for fixing this up.

Since we are in string freeze, would you be willing to give one of the two approvals needed to get this in?
Comment 6 TLE 2013-03-12 11:45:15 UTC
Well. Since this is a single string can be potentially problematic for many I do think that it should get a string freeze exception. However, I think that those approvals need to come from members of some official i18n team (the structure has always confused me a bit), so I don't think I can.

Sorry.
Comment 7 Gabor Kelemen 2013-03-12 13:14:22 UTC
Review of attachment 238682 [details] [review]:

::: src/goabackend/goaimapsmtpprovider.c
@@ +736,3 @@
       gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (data->smtp_encryption),
                                  "none",
+                                 C_("Encryption", "None"));

Using the same context for the same string is absolutely pointless.

Contexts are used to differentiate between the different meanings of the same string.
If "None" here has a different meaning than in the other place [BTW, this isn't true either, so no need for contexts], normally you would end up with only one translatable string in the po files as you can see in the original report text. 

Now if you want two strings for the two different meanings, you would use contexts to differentiate between the identical strings. That makes two different entries appear in the translation file, which would have the same msgid, but different msgctxt fields. This way localizers can use different translations for the different meanings. See also: https://developer.gnome.org/glib/stable/glib-I18N.html#C-:CAPS and http://www.gnu.org/software/gettext/manual/gettext.html#Contexts

The content of the msgctxt field is going to be the first parameter of the C_() macro. Those HAVE to be unique, unless you want to end up with something like this:

#: ../src/goabackend/goaimapsmtpprovider.c:700
#: ../src/goabackend/goaimapsmtpprovider.c:738
msgctxt "Encryption"
msgid "None"

(actual excerpt from g-o-a.pot after applying this patch)

The comments can stay though, that is helpful and needs no i18n approval.
Comment 8 Og Maciel 2013-03-12 13:18:20 UTC
Looks good to me.
Comment 9 Debarshi Ray 2013-03-12 13:30:13 UTC
(In reply to comment #7)
> Review of attachment 238682 [details] [review]:
> 
> ::: src/goabackend/goaimapsmtpprovider.c
> @@ +736,3 @@
>        gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (data->smtp_encryption),
>                                   "none",
> +                                 C_("Encryption", "None"));
> 
> Using the same context for the same string is absolutely pointless.

Yes, but I used it to guard against a future use of "None" in a different context.

> #: ../src/goabackend/goaimapsmtpprovider.c:700
> #: ../src/goabackend/goaimapsmtpprovider.c:738
> msgctxt "Encryption"
> msgid "None"
> 
> (actual excerpt from g-o-a.pot after applying this patch)

Yes, the string "None" is used in the same context in both those places. In fact I have a subsequent patch that refactors the code so that it shows up only in one place.

So what do you suggest? Should I remove the context or keep it?
Comment 10 Petr Kovar 2013-03-12 14:04:53 UTC
(In reply to comment #9)
> Yes, the string "None" is used in the same context in both those places. In
> fact I have a subsequent patch that refactors the code so that it shows up only
> in one place.
> 
> So what do you suggest? Should I remove the context or keep it?

Looks like you don't need to specify the context. I think adding a comment pointing out that the string can be found in evo should be ok here.
Comment 11 Debarshi Ray 2013-03-12 14:17:57 UTC
Created attachment 238693 [details] [review]
imap-smtp: Refactor the encryption combo-box code
Comment 12 Debarshi Ray 2013-03-12 14:18:21 UTC
I removed the context and left the comments.