GNOME Bugzilla – Bug 690635
Support i18n
Last modified: 2019-02-22 05:57:25 UTC
GUPnP Tools have GUI applications. It is better if they support i18n and get translatable.
Created attachment 232104 [details] [review] Patch to initialize i18n support function Initialize i18n support function in av-cp, network-light, and universal-cp.
Created attachment 232105 [details] [review] Patch to update autotools for i18n support Update autotools for i18n support.
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.
Review of attachment 232104 [details] [review]: Looks good, please commit
Review of attachment 232105 [details] [review]: Thank you, please commit
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.
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.
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
(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.
Created attachment 232194 [details] [review] av-cp: Mark messages as translatable
Created attachment 232195 [details] [review] universal-cp: Mark messages as translatable
Could you please review them? Thank you.
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
Review of attachment 232194 [details] [review]: Why remove the mnemonics?
Review of attachment 232194 [details] [review]: Oh nm my last comment, you are adding them. :) Looks good. ACK
Review of attachment 232192 [details] [review]: ACK
Review of attachment 232193 [details] [review]: Looks right. Assuming you tested the setup_popup() change, ACK
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.
Oh and please do change the status of patches to "committed" once you push them. git-bz is your friend!
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); +}
Review of attachment 232104 [details] [review]: committed
Review of attachment 232105 [details] [review]: committed
Review of attachment 232192 [details] [review]: committed
Review of attachment 232193 [details] [review]: committed
Review of attachment 232194 [details] [review]: committed
Review of attachment 232910 [details] [review]: committed
Thanks for reviewing, Zeeshan, I forgot about that before going to vacation.
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.
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.
Review of attachment 233030 [details] [review]: I've committed it: 5792057584dccb12dcd9097ea7f22c4fe1042138
This can be closed now, I suppose?
(In reply to comment #31) > This can be closed now, I suppose? Yes. Thank you.