add-apt-repository i18n problems

Bug #945245 reported by Gabor Kelemen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Medium
Unassigned
software-properties (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

There are some small i18n problems in add-apt-repository:
- some parentheses are misplaced around translatable strings
- strings with multiple %s's are not using named arguments, so they are not reorderable. To properly translate, I'd like to reorder them.
- there is no textdomain set, so gettext doesn't know where to look for the strings
- strings in the output of --help are not marked for translation. They also need to workaround optparser's lack of utf8 awareness.
- the big usage help text should be broken up into smaller pieces to make its translation easier to maintain.

I'll attach a branch for most of these, but I couldn't figure out how to solve everything of the above, so it's still going to need some work.

Related branches

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

The branch fixes mentioned problems except the last, but there is a small problem I don't like:

The --help output has this line:

        help=_("URL of keyserver. Default: %default").decode(enc))

Now because this is in an extensionless file, xgettext thinks this is a C file and above is a C format string, which makes it possible for translators to break the %default variable into %d + some text. This needs some more work. Also for the same reason translator comments are not extracted, which I don't like either.

For the big usage text, I have not found an elegant way to mark it for translation, so that needs the help of someone more experienced with Python.

Robert Roth (evfool)
Changed in software-properties (Ubuntu):
status: New → Confirmed
Revision history for this message
David Planella (dpm) wrote : Re: [Ubuntu-translations-coordinators] [Bug 945245] Re: add-apt-repository i18n problems

Al 03/03/12 01:54, En/na Gabor Kelemen ha escrit:
> The branch fixes mentioned problems except the last, but there is a
> small problem I don't like:
>
> The --help output has this line:
>
> help=_("URL of keyserver. Default: %default").decode(enc))
>
> Now because this is in an extensionless file, xgettext thinks this is a
> C file and above is a C format string, which makes it possible for
> translators to break the %default variable into %d + some text. This
> needs some more work. Also for the same reason translator comments are
> not extracted, which I don't like either.
>
> For the big usage text, I have not found an elegant way to mark it for
> translation, so that needs the help of someone more experienced with
> Python.
>

That's due to bug 377872 in intltool. I guess a workaround would be to
make it look like a valid c-format string, e.g.:

help=_("URL of keyserver. Default: %s" % default).decode(enc))

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella

Gabor Kelemen (kelemeng)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.83

---------------
software-properties (0.83) quantal; urgency=low

  [ Robert Roth ]
  * lp:~evfool/software-properties/lp599803:
    - Added support for case-insensitive typeahead searching activated
      with Ctrl+F (by default) in the Other Software tab (custom sources).
      LP: #599803
  * lp:~evfool/software-properties/lp709079:
    - Refactored SimpleGtkBuilder __init__ method to use the setup_ui
      method containing exactly the same code (removes some duplicated code)
      and replaced print to stderr with debug logging message,
      fixing bug LP: #709079.

  [ Michael Vogt ]
  * lp:~mvo/software-properties/fix-policykit-prompt-on-startup:
    - This fixes a policykit prompt on startup if the default
      policy is set to something other than "daily" for Check for
      updates LP: #1012035

  [ Gabor Kelemen ]
  * lp:~kelemeng/software-properties/bug945245:
    - I18n fixes for bug LP: #945245.
 -- Michael Vogt <email address hidden> Tue, 12 Jun 2012 11:57:18 +0200

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

I'll mark this bug as fixed, as the branch that takes care of the majority of issues has been merged and released.

Gabor, for the parts where you still feel need a better fix, would you mind opening separate follow-up bugs?

Thanks!

Changed in ubuntu-translations:
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.