Opened 13 years ago

Closed 13 years ago

#1108 closed Bug (fixed)

transmission includes several unlocalized strings

Reported by: fujiwara Owned by: charles
Priority: Normal Milestone: 1.30
Component: GTK+ Client Version: 1.22
Severity: Normal Keywords:
Cc:

Description

transmission includes several unlocalized strings.

Case 1:
Invoke transmission.

Then the window title is not localized.

Solution: Need to set setlocale() before g_set_application_name() is called.

Case 2:

  1. Invoke transmission.
  2. Choose [Torrent] -> [Add] and choose *.torrent file.
  3. Check the download status.

Then the date format is not localized.

Solution: Need gettext() for "%a, %d %b %Y %T %Z"

Case 3:

  1. Invoke transmission.
  2. Choose [Help] -> [Statistics].

Then several informations are not localized.

Solution: Use HAVE_LIBINTL_H instead of HAVE_LIBINTL in util.h

Case 4:

  1. Invoke transmission
  2. Choose [Help] -> [About]
  3. Click [License]

Then the license text is not localized.

Solution: Need gettext() for the license text.

I'm attaching the patch.

Attachments (1)

transmission-6729782-g11n-i18n-ui.diff (2.5 KB) - added by fujiwara 13 years ago.
Patch for gtk/main.c, gtk/util.c, libtransmission/utils.h

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by fujiwara

Patch for gtk/main.c, gtk/util.c, libtransmission/utils.h

comment:1 Changed 13 years ago by charles

  • Component changed from Transmission to GTK+ Client
  • Milestone changed from None Set to 1.30
  • Owner set to charles

I've committed part of this patch in r6400. Thank you!

I haven't marked the license for translation. As I understand it, there are legal implications to translating a license, so I think it ought to stay in its original language.

Also I didn't see anything for the "%a, %d %b %Y %T %Z" issue in your patch. But I'm wondering, since that code is designed to generate rfc822 timestamps, is that really something that translators should be able to customize?

comment:2 Changed 13 years ago by fujiwara

Thanks much for your review & integration.

When I saw the actual GUI, I thought it makes sense to localize the shown date and time.

the gettext for "%a, %d %b %Y %T %Z" is needed. e.g.
The order is different by locale.
Some locales need to add localized fixed strings in the format or the %* shows the localized strings.

If you need the English string, LC_TIME=C may be needed in the function.

Another solution is to use "%c", "%C" , "%x" or "%X".

Regarding to license text, when you see the latest GNOME applications(2.22), many applications show the localized license text but I don't mind this issue.

comment:3 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

Looking through the code, it looks like we no longer have the strict need for rfc822 formatting. I've replaced this function with a new one, tr_localtime(), that just uses asctime(), which should already be localized by the OS.

Thanks very much for the feedback. It seems like everybody reporting i18n errors always finds two or three *different* strings than everyone else, so i18n is very much a community effort. :)

Note: See TracTickets for help on using tickets.