On Tue, Oct 30, 2012 at 4:26 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: > On Tue, Oct 30, 2012 at 02:50:16PM +0200, Zeeshan Ali (Khattak) wrote: >> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> >> >> Make some strings more translator-friendly at the same time. >> --- >> osinfo/osinfo_deployment.c | 4 +- >> osinfo/osinfo_devicelink.c | 2 +- >> osinfo/osinfo_devicelinkfilter.c | 2 +- >> osinfo/osinfo_entity.c | 2 +- >> osinfo/osinfo_install_config_param.c | 4 +- >> osinfo/osinfo_install_script.c | 42 +++++++++---------- >> osinfo/osinfo_list.c | 2 +- >> osinfo/osinfo_loader.c | 28 ++++++------- >> osinfo/osinfo_media.c | 40 +++++++++--------- >> osinfo/osinfo_os.c | 4 +- >> osinfo/osinfo_priv.h | 1 + >> osinfo/osinfo_product.c | 12 +++--- >> osinfo/osinfo_resources.c | 10 ++--- >> osinfo/osinfo_tree.c | 22 +++++----- >> po/POTFILES.in | 17 ++++++++ >> tools/osinfo-db-validate.c | 24 ++++++----- >> tools/osinfo-detect.c | 35 ++++++++-------- >> tools/osinfo-install-script.c | 22 +++++----- >> tools/osinfo-query.c | 79 ++++++++++++++++++------------------ >> 19 files changed, 187 insertions(+), 165 deletions(-) >> >> diff --git a/osinfo/osinfo_deployment.c b/osinfo/osinfo_deployment.c >> index 5f70e0d..c67456a 100644 >> --- a/osinfo/osinfo_deployment.c >> +++ b/osinfo/osinfo_deployment.c >> @@ -148,7 +148,7 @@ osinfo_deployment_class_init (OsinfoDeploymentClass *klass) >> */ >> pspec = g_param_spec_object("os", >> "Os", >> - "Operating system", >> + _("Operating system"), > > spice-gtk does not translate any of the args to g_param_spec_object, gtk+ > does translate both the 2nd and 3rd arg. Dunno if you are doing something > different from both on purpose? There was lots of strings to decide about and it was a boring task so I just made quick decisions: The 2nd argument is a 'nickname' so I didn't see the point of translating that. No strong feelings either way and I don't know if even description is something worth translating. >> diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c >> index 5b7274b..5a86af8 100644 >> --- a/tools/osinfo-db-validate.c >> +++ b/tools/osinfo-db-validate.c >> @@ -35,7 +35,7 @@ static gboolean verbose = FALSE; >> >> static const GOptionEntry entries[] = { >> { "verbose", 'v', 0, G_OPTION_ARG_NONE, (void*)&verbose, >> - "Verbose progress information", NULL, }, >> + N_("Verbose progress information"), NULL, }, >> { NULL, 0, 0, 0, NULL, NULL, NULL } >> }; > > Do these strings get translated without a call to > g_option_context_set_translation_domain ? Probably not, I'll add that call. >> static struct OsinfoLabel deployment_labels[] = { >> { OSINFO_ENTITY_PROP_ID, >> - "ID", TRUE, 40 }, >> + N_("ID"), TRUE, 40 }, >> { NULL, NULL, 0, 0 }, >> }; > > When you mark a string for translation with N_, you still need to use > gettext() (which _() is #defined to) when you use it to get its > translation, this does not seem to be done here. Thanks for pointing it out, missed that from the docs. -- Regards, Zeeshan Ali (Khattak) FSF member#5124