Failsafe X troubleshooting dialogs not translatable

Bug #335678 reported by Gabor Kelemen
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
High
Unassigned
xorg (Guadalinex)
Fix Released
High
Juanje Ojeda
xorg (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: x11-common

If something goes bad with the xorg.conf file, the /etc/gdm/failsafeXinit script activates and offers the user various options to correct his configuration. These dialogs are not translatable, despite being quite user-visible and sometimes the last pieces of GUI the user sees :).

$grep zenity /etc/gdm/failsafe*
/etc/gdm/failsafeXinit: zenity --list \
/etc/gdm/failsafeXinit: zenity --list \
/etc/gdm/failsafeXinit: zenity --list \
/etc/gdm/failsafeXinit: zenity --info --text "A bug report has been written.\nYou can send it next time you log in."
/etc/gdm/failsafeXinit: zenity --error --text "Your bug could not be recorded successfully.\n"
/etc/gdm/failsafeXinit: zenity --error --text "Cannot file bug: $apport_hook is not present."
/etc/gdm/failsafeXinit: return zenity --question --text "Your config could not be backed up.\nDo you want to continue anyway?\n"
/etc/gdm/failsafeXinit: zenity --info --text "Your configuration has been restored to default,\nand your old configuration backed up.\nPlease restart.\n"
/etc/gdm/failsafeXinit: zenity --error --text "Failure restoring configuration to default.\nYour config has not been changed."
/etc/gdm/failsafeXinit: zenity --info --text "A new configuration has been generated,\nand your old configuration backed up.\nPlease restart.\n"
/etc/gdm/failsafeXinit: zenity --error --text "Could not generate a new configuration"
/etc/gdm/failsafeXinit: zenity --error --text "Sorry, this option is not implemented yet"
/etc/gdm/failsafeXinit: zenity --info --text "Relevant configuration and log files have been saved to:\n$xorg_backup_file\nBug reports can be submitted at http://www.launchpad.net/ubuntu/.\n"
/etc/gdm/failsafeXinit: zenity --warning --text "<big><b>Ubuntu is running in low-graphics mode</b></big>\n\nYour screen, graphics card, and input device settings\ncould not be detected correctly. You will need to configure these yourself."
/etc/gdm/failsafeXinit: zenity --warning --text "<big><b>Ubuntu is running in low-graphics mode</b></big>\n\nThe following error was encountered. You may need\nto update your configuration to solve this.\n\n${LOG_ERRORS}"
/etc/gdm/failsafeXinit:# TODO: Add --window-icon "$app_icon" to all zenity windows
/etc/gdm/failsafeXinit: zenity --progress --pulsate --text "Stand by one minute while the display restarts..."

Tags: i18n

Related branches

CVE References

Bryce Harrington (bryce)
Changed in xorg:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

It is true the strings aren't translatable, however it's not been a priority to solve. However if you can suggest an approach for implementing translations (a patch would be awesome) it may help speed up getting a fix in for this.

Changed in xorg:
status: Confirmed → Triaged
Juanje Ojeda (juanje)
Changed in xorg:
assignee: nobody → juanje
importance: Undecided → High
status: New → Triaged
Bryce Harrington (bryce)
Changed in xorg (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Juanje Ojeda (juanje) wrote : Re: [Guadalinex-members] [Bug 335678] Re: Failsafe X troubleshooting dialogs not translatable

Bryce Harrington escribió:
> ** Changed in: xorg (Ubuntu)
> Status: Triaged => Fix Committed
>

Excuse me Bryce, where the fix is commited? I was trying to get the source code
to dong someting but I didn't find any branch I had to get with 'apt-get source'.

Thanks for the fixing anyway :-)

Revision history for this message
Bryce Harrington (bryce) wrote : Re: [Guadalinex-members] [Bug 335678] Re: Failsafe X troubleshooting dialogs not translatable

On Tue, Mar 17, 2009 at 11:22:28AM +0100, Juanje Ojeda Croissier wrote:
> Bryce Harrington escribió:
>> ** Changed in: xorg (Ubuntu)
>> Status: Triaged => Fix Committed
>>
>
> Excuse me Bryce, where the fix is commited? I was trying to get the
> source code to dong someting but I didn't find any branch I had to get
> with 'apt-get source'.
>
> Thanks for the fixing anyway :-)

Committed to git

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

This bug was fixed in the package xorg - 1:7.4~5ubuntu16

---------------
xorg (1:7.4~5ubuntu16) jaunty; urgency=low

  [Tormod Volden]
  * apport/source_xorg.py: Use grep directly instead of shelling out, and
    look in /proc/modules as well. Also only set 'fglrx-installed' if
    there was a definite match.

  [Bryce Harrington]
  * x11-common.links: Add apport support for a several more packages.
  * local/Xsession.d/60x11-common_localhost:
    - Rename from 60x11-localhost for consistency (LP: #340807)
    - Redirect stderr in an sh-safe fashion
  * x11-common.postinst.in, x11-common.preinst.in, x11-common.postrm.in:
    - Remove renamed 60x11-localhost; handle upgrade failures gracefully
  * local/dexconf, local/Failsafe/failsafeDexconf:
    - Add hooks for Sun's virtualbox (LP: #319373)
  * local/Failsafe/failsafeXinit:
    - Use zenity for viewing logs, and vt2 for console login
      (LP: #310126)
    - Make translatable (LP: #335678)
  * apport/source_xorg.py: Suppress warning about keyboard geometry on :0
    (LP: #315777)

 -- Bryce Harrington <email address hidden> Wed, 18 Mar 2009 13:54:27 -0700

Changed in xorg:
status: Fix Committed → Fix Released
Revision history for this message
Gabor Kelemen (kelemeng) wrote :

I'm sorry to say, but this is not completely fixed yet.
Thanks Bryce for adding the gettext calls, but we still need to add this file to po/POTFILES.in and make sure launchpad extracts the template and translations at packaging time and puts them into the language-pack-base packages - this needs changes in the debian packaging rules, I think.

Changed in xorg:
status: Fix Released → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Send me a patch, I already spent way more time than planned on this already. It's disappointing to see this bug reopened.

Adi Roiban (adiroiban)
tags: added: i18n
Revision history for this message
Juanje Ojeda (juanje) wrote :

There were a little bug with a string. Some quotes were mixed.
I attach a patch for fixing this.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, patch applied and committed.

Juanje Ojeda (juanje)
Changed in xorg (Guadalinex):
milestone: none → rc
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(if it wasn't clear, Gabor's comment still applies and there is work to be done still... maybe for 9.10)

Revision history for this message
Bryce Harrington (bryce) wrote :

"there is work to be done still..."

Send a patch. I'm not a translator and don't know how to hook up all this stuff.

Bryce Harrington (bryce)
Changed in xorg (Ubuntu):
status: Confirmed → Incomplete
Changed in ubuntu-translations:
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

<vorlon> bryce_: so I had a look at gettext + failsafe X... the gettext tool for extracting quoted strings from shell isn't very robust. I think porting to python may be the better approach after all.

Revision history for this message
David Planella (dpm) wrote :

Although I agree that using Python would make things easier for internationalisation, in the meantime I'm attaching a patch to complete the current package's i18n support.

A few notes:

* The current sources already had gettext calls in debian/local/Failsafe/failsafeXinit. Apart from modifying some of those calls, basically what remained to be done was to extract the strings from that source file and put them in a POT template. This POT template is now generated during the package build, so that it can be imported into Launchpad.

* I do not know of any standard approach to gettextizing shell files (intltool does not support them, so I had to use xgettext directly), so I've used a POTFILES.in file in a similar way to intltool-based packages. There might be more elegant approaches, but this should give you an idea of what is needed.

* My Debian packaging skills are limited, so if the modifications in debian/rules are not appropriate, let me know and I'll fix it.

* This patch needs testing.

Changed in xorg (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Данило Шеган (danilo) wrote : Re: [Bug 335678] Re: Failsafe X troubleshooting dialogs not translatable

У уто, 24. 11 2009. у 22:29 +0000, David Planella пише:
>
> * I do not know of any standard approach to gettextizing shell files
> (intltool does not support them, so I had to use xgettext directly),
> so I've used a POTFILES.in file in a similar way to intltool-based
> packages. There might be more elegant approaches, but this should give
> you an idea of what is needed.

intltool should support whatever format gettext does as well. You
should be able to use standard intltool makefiles as well, though I am
not sure how one would integrate them into packaging info: intltool
approach is usually applied on the bare version-controlled tree, not
against a tarball with pre-built makefiles and such.

To get intltool to extract messages from shell files, if they have no
extension, you might need to prefix entries in POTFILES.in with
[gettext/shell], i.e.

[gettext/shell] debian/local/Failsafe/failsafeXinit

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (137.5 KiB)

This bug was fixed in the package xorg - 1:7.5+1ubuntu1

---------------
xorg (1:7.5+1ubuntu1) lucid; urgency=low

  * Merge from Debian unstable.

xorg (1:7.5+1) unstable; urgency=low

  * Drop xorg-dev dependency on x11proto-xf86misc-dev and libxxf86misc-dev,
    which are obsolete.
  * Same with x11proto-trap-dev and libxtrap-dev.
  * The call to udevadm trigger has moved to xserver-xorg-core and the
    drivers, remove it from xserver-xorg.postinst.
  * Upload to unstable.

xorg (1:7.5~3ubuntu4) lucid; urgency=low

  * debian/x11-common.failsafe-x.upstart:
    - Revert the changes from the last upload since it's been decided that
      there won't be a DKMS upstart task.

xorg (1:7.5~3ubuntu3) lucid; urgency=low

  * debian/x11-common.failsafe-x.upstart: (LP: #453365)
    - Start on the build-failed signal that DKMS may emit
      during a failed build for nvidia or fglrx.

xorg (1:7.5~3ubuntu2) lucid; urgency=low

  * scripts/vars.*: Drop wacom from input-all until it builds again.

xorg (1:7.5~3ubuntu1) lucid; urgency=low

  * Merge from Debian experimental. Remaining changes:
    - apport/source_xorg.py, x11-common.install, x11-common.links:
      + apport hook for xorg-server crashes
    - control:
      + Add xqbiff (<= 0.75-4) to x11-common Conflicts (LP 217724).
      + Add xinput to xorg Depends so it will stay in main
      + Move xfonts-scalable to Recommends (LP 84938)
    - rules, control:
      + Add a dependency to x11-common for each binary built to save
        disk/livecd space.
      + Symlink the doc directories to x11-common, explicitly remove the
        doc directories on upgrade for the now symlinked doc directories
    - local/Failsafe/*, x11-common.install, x11-common.failsafe-x.upstart,
      rules: Bulletproof-X.
    - local/Xsession:
      + If ~/.xsession-errors is bigger than 0.5MiB, truncate it to the last
        0.5MiB to avoid having it grow indefinitively. (This does not happen
        with gdm anyway since gdm cleans the file on login).
    - local/Xsession.d/60x11-common_localhost: Allow X connections from
      local unix domain sockets instead of forcing TCP since hostname
      validation is not necessary in this case. (LP 276357)
    - local/dexconf:
      + Add extra bits for ps3fb xorg.conf.
      + dexconf: Bring Device back to the Screen-section, nvidia-settings
        and aticonfig need that.
      + Add customizations to detect if running in KVM/VBOX environment
        and specify the driver, H/V rates, DefaultDepth, etc.
    - local/xserver-wrapper.c: Stop handling -config specifically in the
      wrapper, as Xorg now handles this itself.
    - scripts/vars.*: Don't include radeonhd in video-all.
    - scripts/vars.i386: Add geode to video-all.
    - scripts/vars.{i386,amd64}: Add vmmouse (LP 407816).
    - x11-common.postinst.in, postrm.in, preinst.in: Remove old configuration
      files.
    - xserver-xorg.postinst.in: Migrate psb users to vesa.
  * control: Drop Breaks on gdm, since it was only needed during karmic.
    Likewise for Conflicts/Replaces hal.
  * control, local/debian-setup-keyboard: Use console-setup, until the
    new version is merged.

xorg (1:7.5~3) experimental; ur...

Changed in xorg (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
David Planella (dpm) wrote :

It seems that the patch was not included and that the bug was not fixed, thus changing back status to Confirmed and adding a branch and an updated merge proposal.

Changed in xorg (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg - 1:7.5+1ubuntu2

---------------
xorg (1:7.5+1ubuntu2) lucid; urgency=low

  [ David Planella ]
  * Completed internationalisation support for failsafeXinit (LP: #335678)

  [ Didier Roche ]
  * debian/local/Xsession.d/20x11-common_process-args: Add support for
    session command containing args (LP: #512235)

  [ Bryce Harrington ]
  * debian/local/Failsafe/failsafeXinit: Remove all use of dexconf, as it
    no longer does anything interesting. Instead, to restore a system to
    default configuration, just remove the xorg.conf after backing it up.
  * debian/local/Failsafe/failsafeDexconf: Drop script since it is no
    longer needed by failsafe.
  * debian/apport/source_xorg.py: Update info apport collects on X issues
    - Include make.log and dkms status info for proprietary drivers
    - Collect -nouveau version
    - Don't expect xorg.conf or Xorg.0.log.old to always be present
    - Don't run commands that need X if X is not available (LP: #368282)

  [ Timo Aaltonen ]
  * Add wacom back to -input-all.
 -- Bryce Harrington <email address hidden> Mon, 25 Jan 2010 15:33:13 -0800

Changed in xorg (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Gabor Kelemen (kelemeng) wrote :

I managed to test this a bit, and it works only under X11 :)
So, if I start manually /etc/gdm/failsafeXinit in gnome-terminal, I see the translated strings, but when I damage the xorg.conf file and starts automatically, it's all english. I guess we should set some environment variables...

David Planella (dpm)
Changed in ubuntu-translations:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
David Planella (dpm) wrote :

This particular bug (i.e. failsafeXinit not translatable) is fixed.

I've opened a new bug for the fact that translations are not loaded (bug 528908)

Changed in ubuntu-translations:
status: Triaged → Fix Released
Changed in xorg (Guadalinex):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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