[jaunty] The "Shut Down", "Restart" and "Log Out" buttons do not appear translatable

Bug #345344 reported by Tomasz Dominikowski
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fast-user-switch-applet (Ubuntu)
Fix Released
Low
Ted Gould
Jaunty
Fix Released
Low
Ted Gould

Bug Description

Binary package hint: fast-user-switch-applet

The entries in the drop-down menu are translatable, but when you click "Shut Down...", "Restart..." or "Log Out..." the window that appears does not have the titlebar string or the button string translatable.

Also, why don't the buttons have mnemonics? You can't use this without a mouse. It would seem that both the titlebar and the button use the same string, a bad practice I don't think I have ever seen before.

Tags: i18n
Revision history for this message
Christoph Korn (c-korn) wrote :

I can confirm the untranslated strings.

Those are in src/logout-dialog.c:
static const gchar * title_strings[LOGOUT_DIALOG_ACTION_CNT] = {
 /* LOGOUT_DIALOG_LOGOUT, */ N_("Log Out"),
 /* LOGOUT_DIALOG_RESTART, */ N_("Restart"),
 /* LOGOUT_DIALOG_SHUTDOWN, */ N_("Shut Down")
};

I have poedit installed but I cannot figure out how those untranslated strings can be imported there to translate them.

Revision history for this message
Christoph Korn (c-korn) wrote :

I just found out that the source file is not listed in po/POTFILES.in

Revision history for this message
Christoph Korn (c-korn) wrote :

Does the function N_ tell that the string is not translatable?

Revision history for this message
Tomasz Dominikowski (dominikowski) wrote :

Well, I've no idea, but the problem is two-fold, not only are the strings unavailable for translation, but they shouldn't be reused for titlebars. Why isn't this being worked on, I think this is a rather high-profile, very visible bug.

Changed in fast-user-switch-applet:
status: New → Confirmed
Revision history for this message
Christoph Korn (c-korn) wrote :

/usr/include/glib-2.0/glib/gi18n.h:
#define N_(String) (String)

Indeed those string are left untranslated.

static const gchar * title_strings[LOGOUT_DIALOG_ACTION_CNT] = {
 /* LOGOUT_DIALOG_LOGOUT, */ N_("Log Out"),
 /* LOGOUT_DIALOG_RESTART, */ N_("Restart"),
 /* LOGOUT_DIALOG_SHUTDOWN, */ N_("Shut Down")
};

static const gchar * restart_auth = N_("Restart...");

static const gchar * body_logout_update = N_("You recently installed updates which will only take effect after a restart. Restart to apply software updates.");

static const gchar * singular_strings[LOGOUT_DIALOG_ACTION_CNT] = {
 /* LOGOUT_DIALOG_LOGOUT, */ N_("Unless you cancel, you will be logged out in %d second."),
 /* LOGOUT_DIALOG_RESTART, */ N_("Unless you cancel, the computer will restart in %d second."),
 /* LOGOUT_DIALOG_SHUTDOWN, */ N_("Unless you cancel, the computer will be shut down in %d second.")
};

static const gchar * plural_strings[LOGOUT_DIALOG_ACTION_CNT] = {
 /* LOGOUT_DIALOG_LOGOUT, */ N_("Unless you cancel, you will be logged out in %d seconds."),
 /* LOGOUT_DIALOG_RESTART, */ N_("Unless you cancel, the computer will restart in %d seconds."),
 /* LOGOUT_DIALOG_SHUTDOWN, */ N_("Unless you cancel, the computer will be shut down in %d seconds.")
};

Why are those strings left untranslated?

Revision history for this message
Christoph Korn (c-korn) wrote :

I have to correct myself.

Really only the titles are left untranslatable.
All other strings are translated in the actual code.

This patch also makes the titles translatable.

https://launchpad.net/~getdeb.packages/+archive/ppa
I have built the package in this PPA and string are now translated.

Revision history for this message
Christoph Korn (c-korn) wrote :

Subscribed the ubuntu-main-sponsors to review the patch.

Revision history for this message
Milo Casagrande (milo) wrote :

I'm attaching a patch that adds a context to the messages, differentiating between a button and a title. I didn't test it, can somebody give it a try? It is necessary also to update the POT file after that.

Revision history for this message
Milo Casagrande (milo) wrote :

Sorry, the previous patch has a missing coma on one line, this one is the right one.

Revision history for this message
Christoph Korn (c-korn) wrote :

This bug also gets fixed in the patch attached here:
https://bugs.launchpad.net/ubuntu/+source/fast-user-switch-applet/+bug/345587/comments/15

Thanks for your work!

Ted Gould replied to my mail on the ubuntu-devel mailing list and he will review the patches.

Adi Roiban (adiroiban)
tags: added: i18n
Revision history for this message
Ted Gould (ted) wrote :

Debdiff to fix this and a bunch of other FUSA related bugs. Changelog:

fast-user-switch-applet (2.24.0-0ubuntu10) jaunty; urgency=low

  * 84_session_management.patch:
    * Patch from Christoph Korn to fix the translations for the titles
      of the dialogs and the plural strings. (LP: #345587 and LP: #345344)
    * Patch from Christoph Korn to add a configuration option for whether
      the confirmation dialogs are shown. (LP: #345480)
    * Clean up the confirmation configuration patch to make the labels
      change dynamically as the GConf key is changed.
    * Switch key on the configuration patch to make it so that it defaults
      to false, which is the same as no key. This makes it so that the
      default upgrade case is to have the confirmation dialogs.
    * Change the logout dialogs to be standard dialogs instead of special
      ones and shorten the text in them. Also make them appear on all desktops
      and in the window switcher list incase they get lost.
  * 90_status_management.patch: Update to add invisible entry and icons
    for that entry. Patch from Walter Somerville. (LP: #294731) Fixed
    patch to make the invisible item above the logout item.
  * 88_status_icons.patch: Add icons for invisible status (above). Contributed
    by Ken Wimer.
  * 92_autotools.patch: Update for changes above.
  * Closes meta-bug for upload request: (LP: #347697)

 -- Ted Gould <email address hidden> Mon, 23 Mar 2009 21:37:32 -0500

Changed in fast-user-switch-applet (Ubuntu):
assignee: nobody → ted-gould
importance: Undecided → Low
milestone: none → ubuntu-9.04
Revision history for this message
Christoph Korn (c-korn) wrote :

I have built the package in the PPA:
https://launchpad.net/~getdeb.packages/+archive/ppa

Works like a charm.

Hopefully the patches will make it into jaunty.

Revision history for this message
Tomasz Dominikowski (dominikowski) wrote :

Any progress on this? How is the priority Low?

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

I can only comment on the priority issue, while it looks like the bug is well on its way to getting fixed. But it is a persisting issue that I18N problems are still being classified as Low or even Wishlist priority, while these problems essentially break parts of Ubuntu for most of the world's people. I do think the priority should be High in most cases of visible default install I18N problems like this. These are the problems that get mentioned separately in eg. magazines doing a review of Ubuntu.

Another point of view is noting that the number 2. point at Ubuntu philosophy (http://www.ubuntu.com/community/ubuntustory/philosophy) should not be something of a "Low" or "Wishlist" priority.

</rant><sorry, not specific to this bug report, and thanks for proceeding with the fix />

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fast-user-switch-applet - 2.24.0-0ubuntu10

---------------
fast-user-switch-applet (2.24.0-0ubuntu10) jaunty; urgency=low

  * 84_session_management.patch:
    * Patch from Christoph Korn to fix the translations for the titles
      of the dialogs and the plural strings. (LP: #345587 and LP: #345344)
    * Patch from Christoph Korn to add a configuration option for whether
      the confirmation dialogs are shown. (LP: #345480)
    * Clean up the confirmation configuration patch to make the labels
      change dynamically as the GConf key is changed.
    * Switch key on the configuration patch to make it so that it defaults
      to false, which is the same as no key. This makes it so that the
      default upgrade case is to have the confirmation dialogs.
    * Change the logout dialogs to be standard dialogs instead of special
      ones and shorten the text in them. Also make them appear on all desktops
      and in the window switcher list incase they get lost.
  * 90_status_management.patch: Update to add invisible entry and icons
    for that entry. Patch from Walter Somerville. (LP: #294731) Fixed
    patch to make the invisible item above the logout item.
  * 88_status_icons.patch: Add icons for invisible status (above). Contributed
    by Ken Wimer.
  * 92_autotools.patch: Update for changes above.
  * Closes meta-bug for upload request: (LP: #347697)

 -- Ted Gould <email address hidden> Mon, 23 Mar 2009 21:37:32 -0500

Changed in fast-user-switch-applet:
status: Confirmed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Is there a chance for removing the window decorators (title bar, etc.) from the Logout-Restart-Shutdown dialog, as well as converting it into a modal window? IMHO, this improves the consistent with previous logout methods in previous Ubuntu releases.

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 345344] Re: [jaunty] The "Shut Down", "Restart" and "Log Out" buttons do not appear translatable

On Tue, 2009-03-31 at 10:49 +0000, Ricardo Pérez López wrote:
> Is there a chance for removing the window decorators (title bar, etc.)
> from the Logout-Restart-Shutdown dialog, as well as converting it into a
> modal window? IMHO, this improves the consistent with previous logout
> methods in previous Ubuntu releases.

We actually put the decorators in to specifically make it more similar
to other logout options. For instance if you hit the power button, that
dialog is decorated and non-modal.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.