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 690635 - Support i18n
Support i18n
Status: RESOLVED FIXED
Product: gupnp-tools
Classification: Other
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-22 04:42 UTC by Jiro Matsuzawa
Modified: 2019-02-22 05:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to initialize i18n support function (4.28 KB, patch)
2012-12-22 04:45 UTC, Jiro Matsuzawa
committed Details | Review
Patch to update autotools for i18n support (8.33 KB, patch)
2012-12-22 04:46 UTC, Jiro Matsuzawa
committed Details | Review
Add gupnp-av-cp.ui.in to POTFILES.in (406 bytes, patch)
2012-12-24 14:58 UTC, Jiro Matsuzawa
committed Details | Review
Mark messages as translatable (3.81 KB, patch)
2012-12-24 15:00 UTC, Jiro Matsuzawa
committed Details | Review
av-cp: Mark messages as translatable (6.11 KB, patch)
2012-12-24 15:03 UTC, Jiro Matsuzawa
committed Details | Review
universal-cp: Mark messages as translatable (18.53 KB, patch)
2012-12-24 15:04 UTC, Jiro Matsuzawa
accepted-commit_now Details | Review
universal-cp: mark messages as translatable (18.51 KB, patch)
2013-01-07 15:19 UTC, Jiro Matsuzawa
committed Details | Review
Include missing locale.h (591 bytes, patch)
2013-01-09 02:48 UTC, Jiro Matsuzawa
committed Details | Review

Description Jiro Matsuzawa 2012-12-22 04:42:01 UTC
GUPnP Tools have GUI applications.
It is better if they support i18n and get translatable.
Comment 1 Jiro Matsuzawa 2012-12-22 04:45:34 UTC
Created attachment 232104 [details] [review]
Patch to initialize i18n support function

Initialize i18n support function in av-cp, network-light, and universal-cp.
Comment 2 Jiro Matsuzawa 2012-12-22 04:46:56 UTC
Created attachment 232105 [details] [review]
Patch to update autotools for i18n support

Update autotools for i18n support.
Comment 3 Jiro Matsuzawa 2012-12-22 04:59:51 UTC
For the present, only messages in the ui files (gupnp-av-cp.ui, gupnp-network-light.ui, and gupnp-universal-cp.ui) and desktop files are translatable. I need to mark other messages in C files as translatable.
Comment 4 Jens Georg 2012-12-22 14:29:49 UTC
Review of attachment 232104 [details] [review]:

Looks good, please commit
Comment 5 Jens Georg 2012-12-22 14:30:04 UTC
Review of attachment 232105 [details] [review]:

Thank you, please commit
Comment 6 Jiro Matsuzawa 2012-12-22 15:14:10 UTC
Thank you for the review! I committed:
http://git.gnome.org/browse/gupnp-tools/commit/?id=f054334e5f8db2309da75092d72ef759526afdcf
http://git.gnome.org/browse/gupnp-tools/commit/?id=d90ffee6352619f461f329b33e1f5599b7abdc96

I'll close this ticket after we finish marking other messages as translatable.
Comment 7 Jiro Matsuzawa 2012-12-24 14:58:29 UTC
Created attachment 232192 [details] [review]
Add gupnp-av-cp.ui.in to POTFILES.in

POTFILES.in needs to have not gupnp-av-cp.ui but gupnp-av-cp.ui.in so that intltool can extract the messages of the ui.
Comment 8 Jiro Matsuzawa 2012-12-24 15:00:15 UTC
Created attachment 232193 [details] [review]
Mark messages as translatable

Not only marked messages as translatable but also enabled mnemonics to improve the user interface.

I removed setup_popup(). It just do markup "<b>On</b>". It can be replaced with the static ui file. And that respects the GNOME goal to remove markup in translatable messages [1].

[1] https://live.gnome.org/GnomeGoals/RemoveMarkupInMessages
Comment 9 Jiro Matsuzawa 2012-12-24 15:02:45 UTC
(In reply to comment #8)
> Created an attachment (id=232193) [details] [review]
> Mark messages as translatable
> 
It is for only network-light. Patches for other tools is coming.
Comment 10 Jiro Matsuzawa 2012-12-24 15:03:44 UTC
Created attachment 232194 [details] [review]
av-cp: Mark messages as translatable
Comment 11 Jiro Matsuzawa 2012-12-24 15:04:51 UTC
Created attachment 232195 [details] [review]
universal-cp: Mark messages as translatable
Comment 12 Jiro Matsuzawa 2012-12-24 15:06:40 UTC
Could you please review them?
Thank you.
Comment 13 Jiro Matsuzawa 2013-01-06 12:26:37 UTC
Hi Jens,

Could I commit the above patches [1][2][3]?
If they have any problems, please let me know.

Thank you.

[1] https://bugzilla.gnome.org/attachment.cgi?id=232193
[2] https://bugzilla.gnome.org/attachment.cgi?id=232194
[3] https://bugzilla.gnome.org/attachment.cgi?id=232195
Comment 14 Zeeshan Ali 2013-01-06 20:42:41 UTC
Review of attachment 232194 [details] [review]:

Why remove the mnemonics?
Comment 15 Zeeshan Ali 2013-01-06 20:44:14 UTC
Review of attachment 232194 [details] [review]:

Oh nm my last comment, you are adding them. :) Looks good. ACK
Comment 16 Zeeshan Ali 2013-01-06 20:44:54 UTC
Review of attachment 232192 [details] [review]:

ACK
Comment 17 Zeeshan Ali 2013-01-06 20:50:08 UTC
Review of attachment 232193 [details] [review]:

Looks right. Assuming you tested the setup_popup() change, ACK
Comment 18 Zeeshan Ali 2013-01-06 20:55:56 UTC
Review of attachment 232195 [details] [review]:

Looks good apart from that minor "issue" I pointed out. ACK with or without that change.

Now that we are marking all these strings for translation, it would be nice to provide some context for translators for some of the very technical strings through comments, especially the very UPnP specific terms in universal-cp. 10 extra points for taking on that task. :)

::: src/universal-cp/device-treeview.c
@@ +57,3 @@
+        details[i++] = AUTHOR_INFO;
+        details[i] = NULL;
+        update_details ((const char **) details);

Don't think the cast to 'const' is needed here.
Comment 19 Zeeshan Ali 2013-01-06 20:56:46 UTC
Oh and please do change the status of patches to "committed" once you push them. git-bz is your friend!
Comment 20 Jiro Matsuzawa 2013-01-07 15:19:02 UTC
Created attachment 232910 [details] [review]
universal-cp: mark messages as translatable

Don't cast to const:

@@ -43,6 +43,22 @@ static GtkWidget *separator;
 
 static gboolean   expanded;
 
+static void
+show_default_details ()
+{
+        const char *details[32];
+        int         i = 0;
+
+        details[i++] = _("Software");
+        details[i++] = _(SOFTWARE_INFO);
+        details[i++] = _("Version");
+        details[i++] = VERSION;
+        details[i++] = _("Author");
+        details[i++] = AUTHOR_INFO;
+        details[i] = NULL;
+        update_details (details);
+}
Comment 21 Jiro Matsuzawa 2013-01-07 15:23:54 UTC
Review of attachment 232104 [details] [review]:

committed
Comment 22 Jiro Matsuzawa 2013-01-07 15:24:25 UTC
Review of attachment 232105 [details] [review]:

committed
Comment 23 Jiro Matsuzawa 2013-01-07 15:24:38 UTC
Review of attachment 232192 [details] [review]:

committed
Comment 24 Jiro Matsuzawa 2013-01-07 15:24:52 UTC
Review of attachment 232193 [details] [review]:

committed
Comment 25 Jiro Matsuzawa 2013-01-07 15:25:06 UTC
Review of attachment 232194 [details] [review]:

committed
Comment 26 Jiro Matsuzawa 2013-01-07 15:25:20 UTC
Review of attachment 232910 [details] [review]:

committed
Comment 27 Jens Georg 2013-01-07 15:25:57 UTC
Thanks for reviewing, Zeeshan, I forgot about that before going to vacation.
Comment 28 Jiro Matsuzawa 2013-01-07 15:32:48 UTC
Hi Zeeshan,

Thank you for the review! I've committed them.

(In reply to comment #18)
> Review of attachment 232195 [details] [review]:
> 
> Looks good apart from that minor "issue" I pointed out. ACK with or without
> that change.
> 
> Now that we are marking all these strings for translation, it would be nice to
> provide some context for translators for some of the very technical strings
> through comments, especially the very UPnP specific terms in universal-cp. 10
> extra points for taking on that task. :)
> 
You are right. Some context like that would be helpful for translators. I'd like to improve i18n of the module.

Thank you.
Comment 29 Jiro Matsuzawa 2013-01-09 02:48:30 UTC
Created attachment 233030 [details] [review]
Include missing locale.h

Oops, some files don't include <locale.h>. Somehow, this seems to work in some environments (e.g. Debian). In others, however, it causes a build error. It should be fixed.

I'm sorry for the mistake.
Comment 30 Jiro Matsuzawa 2013-01-09 02:58:16 UTC
Review of attachment 233030 [details] [review]:

I've committed it:
5792057584dccb12dcd9097ea7f22c4fe1042138
Comment 31 Jens Georg 2013-01-18 07:37:21 UTC
This can be closed now, I suppose?
Comment 32 Jiro Matsuzawa 2013-01-18 13:00:01 UTC
(In reply to comment #31)
> This can be closed now, I suppose?

Yes. Thank you.