Untranslatable string in ubiquity (even after 20090406 template update)

Bug #356333 reported by Timo Jyrinki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: ubiquity

The following strings seem untranslatable even in the latest 20090406 template at Rosetta.

This is not available for translation:
"This will delete xxx and replace it with Ubuntu 9.04"

Using http://cdimage.ubuntu.com/daily-live/20090406/

(updated: this bug report only about the string completely missing, the remaining part split to bug #356876)

description: updated
description: updated
Revision history for this message
Evan (ev) wrote :

This string is quite difficult to provide translation support for as it's dealing with a list. It can be anything from "This will delete Ubuntu 8.10 and replace it with Ubuntu 9.04" to "This will delete Windows XP, Fedora 11, and Ubuntu 8.10 and replace them with Ubuntu 9.04". Equally, breaking this into a bullet-point list creates problems as we're already spending a lot of time trying to shave pixels off of the partitioning page so it will fit on low resolution screens.

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

Could something like ${whatisreplaced} be used? Another choice would be to split into multiple strings, "This will delete", "and replace it with (Ubuntu 9.04)".

Revision history for this message
Colin Watson (cjwatson) wrote :

I don't think we should split up a sentence into multiple separately-translatable parts, ever. It might work for Finnish but not universally.

Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Evan (ev) wrote :

I'm not sure I follow what you mean by "whatisreplaced". As for splitting it up into multiple strings, ignoring the necessity to violate English grammar and remove "and" from before the last item in the list, wouldn't word ordering in other languages make this impossible? That is, can we guarantee that in every language "this will delete" is followed by the list, which is followed by "it/them with", which is followed by the release name?

For clarity, I've included the code in question below. Note that l is a list of operating systems present on the disk in question.

                    # TODO evand 2008-11-05: i18n
                    if len(l) == 1:
                        txt = l[0]
                    if len(l) == 2:
                        txt = '%s and %s' % (l[0], l[1])
                    elif len(l) > 2:
                        l[-1] = 'and ' + l[-1]
                        txt = ', '.join(l)
                    txt = 'This will delete %s and replace' % txt
                    if len(l) > 1:
                        txt = txt + ' them with %s.' % get_release_name()
                    else:
                        txt = txt + ' it with %s.' % get_release_name()

Revision history for this message
Evan (ev) wrote :

Sorry, I had not refreshed the page before posting, and missed that Colin had made the same point a few minutes earlier.

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

Ok, I just meant that "%s" there, ie. to have the list as %s so it's a string to be substituted and there is no need to translate the numerous variations possible. If the hard-coded "and" would be dropped (so that it would be eg. "will delete Window XP, Fedora 11, Ubuntu 7.10", maybe ok enough) there would not be any problem besides that translators needing to compensate the text around %s:s so that it's at least somehow fluent language.

But the current code fills in the %s:s already before the gettext would be called, so that would need replacing.

My proposal would be to:
1. change '%s and %s' to '%s, %s' to simplify the problem a bit
2. make the list into a separate variable (like removeddistributions) containing the whole "Win, Fedora, Ubuntu" string
3. call gettext in plural form finally with something like this, but python equivalent:
sprintf( finaltxt, ngettext ('This will delete %s and replace it with %s.', 'This will delete %s and replace them with %s'., len(l) ) , removeddistributions, get_release_name() );

The finaltxt would be then what gets displayed, after ngettext has fetched the translation (taking into account the possibility of a plural form) and sprintf replaced the %s:s with the list (removeddistributions) and release name. len(l) is used to determine the plural form(s).

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

Ok, reportedly there is no ngettext-like functionality available. Options:

- Like above otherwise, but use a single form "This will delete %s and install %s.", if suitable (would avoid the need for "it"/"them")
- Like above otherwise, but emulate plural form for most languages with two separate strings (this will however not work for languages having more than two forms, at least not optimally).

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

This bug was fixed in the package ubiquity - 1.12.6

---------------
ubiquity (1.12.6) jaunty; urgency=low

  [ Colin Watson ]
  * GTK frontend:
    - Copy-and-paste gdm-signal from powermanagement-interface, since that
      package is no longer in main and is slated to go away. In future we
      ought to be able to use gnome-session D-BUS calls or similar for this
      work (LP: #357101).
  * Use gksudo --preserve-env / sudo -E so that we can check DESKTOP_SESSION
    from the GTK frontend, and use other desktop environment variables in
    future.
  * Try a couple of different locations for NetworkManager's init script
    (LP: #356813).
  * Sync with console-setup 1.28ubuntu8: treat the Kazakhstan layout (kz) as
    non-Latin (LP: #356816).
  * Work around a debconf bug which broke the default time zone for some
    countries: REGISTER does not appear to give a newly-registered question
    the same default as the question associated with its template, unless we
    also RESET it, so do that (LP: #356794).
  * Update translations from Launchpad.
  * Automatic update of included source packages: base-installer
    1.98ubuntu6, console-setup 1.28ubuntu8, flash-kernel 2.13ubuntu6,
    partman-auto 84ubuntu3, partman-base 129ubuntu7, partman-target
    58ubuntu7, user-setup 1.23ubuntu18.

  [ Evan Dandrea ]
  * Provide translation support for the format warning on the automatic
    partitioning page, and make it less tied to English grammar. Thanks
    Timo Jyrinki (LP: #356333).
  * Only show the migration-assistant page if we have items we can
    import.
  * Don't let the time zone map image grow larger than the original.
  * Automatic update of included source packages: migration-assistant
    0.6.4.

 -- Evan Dandrea <email address hidden> Thu, 09 Apr 2009 14:46:10 +0100

Changed in ubiquity (Ubuntu):
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.