[PATCH] Mark a few more important strings for translation.

Vratislav Podzimek vpodzime at redhat.com
Thu Nov 1 21:58:33 UTC 2012


On Thu, 2012-11-01 at 17:41 -0400, Chris Lumens wrote:
> Note:  When using the P_ method, the strings inside it cannot be in parens or
> gettext will not pick them up.
> ---
>  pyanaconda/ui/gui/spokes/lib/accordion.py | 2 +-
>  pyanaconda/ui/gui/spokes/lib/cart.py      | 8 ++++----
>  pyanaconda/ui/gui/spokes/storage.py       | 4 ++--
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
> index f29b4ee..240b5a8 100644
> --- a/pyanaconda/ui/gui/spokes/lib/accordion.py
> +++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
> @@ -241,7 +241,7 @@ class CreateNewPage(Page):
>          label = self._createNewButton.get_children()[0]
>          label.set_line_wrap(True)
>          label.set_use_markup(True)
> -        label.set_markup("""<span foreground='blue'><u>Click here to create them automatically.</u></span>""")
> +        label.set_markup(_("<span foreground='blue'><u>Click here to create them automatically.</u></span>"))
>  
>          self._createNewButton.set_halign(Gtk.Align.START)
>          self._createNewButton.connect("clicked", cb)
> diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py b/pyanaconda/ui/gui/spokes/lib/cart.py
> index 8cc22d5..8d40a1f 100644
> --- a/pyanaconda/ui/gui/spokes/lib/cart.py
> +++ b/pyanaconda/ui/gui/spokes/lib/cart.py
> @@ -121,10 +121,10 @@ class SelectedDisksDialog(GUIObject):
>          size = str(Size(bytes=long(size))).upper()
>          free = str(Size(bytes=long(free))).upper()
>  
> -        text = P_(("<b>%d disk; %s capacity; %s free space</b> "
> -                   "(unpartitioned and in filesystems)"),
> -                  ("<b>%d disks; %s capacity; %s free space</b> "
> -                   "(unpartitioned and in filesystems)"),
> +        text = P_("<b>%d disk; %s capacity; %s free space</b> "
> +                   "(unpartitioned and in filesystems)",
> +                  "<b>%d disks; %s capacity; %s free space</b> "
> +                   "(unpartitioned and in filesystems)",
>                    count) % (count, size, free)
>          self._summary_label.set_markup(text)
>  
> diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
> index 79a370e..52fe80b 100644
> --- a/pyanaconda/ui/gui/spokes/storage.py
> +++ b/pyanaconda/ui/gui/spokes/storage.py
> @@ -568,8 +568,8 @@ class StorageSpoke(NormalSpoke, StorageChecker):
>              free += free_space[disk.name][0]
>              count += 1
>  
> -        summary = (P_(("%d disk selected; %s capacity; %s free"),
> -                      ("%d disks selected; %s capacity; %s free"),
> +        summary = (P_("%d disk selected; %s capacity; %s free",
> +                      "%d disks selected; %s capacity; %s free",
>                        count) % (count, str(Size(spec="%s MB" % capacity)), free))
>          summary_label = self.builder.get_object("summary_label")
>          summary_label.set_text(summary)
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list