All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spaces (label, UUID)
@ 2009-12-28  1:17 Carles Pina i Estany
  2009-12-28 18:18 ` Carles Pina i Estany
  2010-01-01 12:22 ` Robert Millan
  0 siblings, 2 replies; 7+ messages in thread
From: Carles Pina i Estany @ 2009-12-28  1:17 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]


Hi,

This patch should fix a small problem that Vladimir spotted and
commented on IRC, plus adds a quotes on the label (looks nicer) and
clearer in my opinion.

Cheers,

-- 
Carles Pina i Estany
	http://pinux.info

[-- Attachment #2: spaces.patch --]
[-- Type: text/x-diff, Size: 1192 bytes --]

=== modified file 'ChangeLog'
--- ChangeLog	2009-12-27 21:32:52 +0000
+++ ChangeLog	2009-12-28 01:16:20 +0000
@@ -1,3 +1,8 @@
+2009-12-28  Carles Pina i Estany  <carles@pina.cat>
+
+	* normal/misc.c (grub_normal_print_device_info): Add spaces and double
+	quotes.
+
 2009-12-27  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	* normal/menu_text.c (grub_print_message_indented): Prevent

=== modified file 'normal/misc.c'
--- normal/misc.c	2009-12-20 23:32:15 +0000
+++ normal/misc.c	2009-12-28 01:15:34 +0000
@@ -68,7 +68,10 @@ grub_normal_print_device_info (const cha
 	      if (grub_errno == GRUB_ERR_NONE)
 		{
 		  if (label && grub_strlen (label))
-		    grub_printf_ (N_("- Label %s"), label);
+		    {
+		      grub_putchar (' ');
+		      grub_printf_ (N_("- Label \"%s\""), label);
+		    }
 		  grub_free (label);
 		}
 	      grub_errno = GRUB_ERR_NONE;
@@ -81,6 +84,7 @@ grub_normal_print_device_info (const cha
 	      if (grub_errno == GRUB_ERR_NONE)
 		{
 		  grub_unixtime2datetime (tm, &datetime);
+		  grub_putchar (' ');
 		  grub_printf_ (N_("- Last modification time %d-%02d-%02d "
 			       "%02d:%02d:%02d %s"),
 			       datetime.year, datetime.month, datetime.day,


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2009-12-28  1:17 [PATCH] spaces (label, UUID) Carles Pina i Estany
@ 2009-12-28 18:18 ` Carles Pina i Estany
  2010-01-01 12:22 ` Robert Millan
  1 sibling, 0 replies; 7+ messages in thread
From: Carles Pina i Estany @ 2009-12-28 18:18 UTC (permalink / raw)
  To: grub-devel


Hi,

On Dec/28/2009, Carles Pina i Estany wrote:

> This patch should fix a small problem that Vladimir spotted and

Committed.

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2009-12-28  1:17 [PATCH] spaces (label, UUID) Carles Pina i Estany
  2009-12-28 18:18 ` Carles Pina i Estany
@ 2010-01-01 12:22 ` Robert Millan
  2010-01-01 13:10   ` Carles Pina i Estany
  1 sibling, 1 reply; 7+ messages in thread
From: Robert Millan @ 2010-01-01 12:22 UTC (permalink / raw)
  To: The development of GNU GRUB

On Mon, Dec 28, 2009 at 02:17:37AM +0100, Carles Pina i Estany wrote:
> === modified file 'normal/misc.c'
> --- normal/misc.c	2009-12-20 23:32:15 +0000
> +++ normal/misc.c	2009-12-28 01:15:34 +0000
> @@ -68,7 +68,10 @@ grub_normal_print_device_info (const cha
>  	      if (grub_errno == GRUB_ERR_NONE)
>  		{
>  		  if (label && grub_strlen (label))
> -		    grub_printf_ (N_("- Label %s"), label);
> +		    {
> +		      grub_putchar (' ');
> +		      grub_printf_ (N_("- Label \"%s\""), label);
> +		    }
>  		  grub_free (label);
>  		}
>  	      grub_errno = GRUB_ERR_NONE;
> @@ -81,6 +84,7 @@ grub_normal_print_device_info (const cha
>  	      if (grub_errno == GRUB_ERR_NONE)
>  		{
>  		  grub_unixtime2datetime (tm, &datetime);
> +		  grub_putchar (' ');
>  		  grub_printf_ (N_("- Last modification time %d-%02d-%02d "
>  			       "%02d:%02d:%02d %s"),
>  			       datetime.year, datetime.month, datetime.day,

Why not just add a space before the -?

Uhm, I guess I know the answer in advance :-)

Carles, we shouldn't avoid changing translatable strings at the cost of
making the code bigger or less efficient.  It's not hard for translators
to reuse the old string.

I notice that you committed it already.  Please can you adjust?

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2010-01-01 12:22 ` Robert Millan
@ 2010-01-01 13:10   ` Carles Pina i Estany
  2010-01-01 15:52     ` Robert Millan
  2010-01-02  2:04     ` Isaac Dupree
  0 siblings, 2 replies; 7+ messages in thread
From: Carles Pina i Estany @ 2010-01-01 13:10 UTC (permalink / raw)
  To: The development of GNU GRUB


Hi,

On Jan/01/2010, Robert Millan wrote:
> On Mon, Dec 28, 2009 at 02:17:37AM +0100, Carles Pina i Estany wrote:
> > === modified file 'normal/misc.c'
> > --- normal/misc.c	2009-12-20 23:32:15 +0000
> > +++ normal/misc.c	2009-12-28 01:15:34 +0000
> > @@ -68,7 +68,10 @@ grub_normal_print_device_info (const cha
> >  	      if (grub_errno == GRUB_ERR_NONE)
> >  		{
> >  		  if (label && grub_strlen (label))
> > -		    grub_printf_ (N_("- Label %s"), label);
> > +		    {
> > +		      grub_putchar (' ');
> > +		      grub_printf_ (N_("- Label \"%s\""), label);
> > +		    }

> Why not just add a space before the -?
> 
> Uhm, I guess I know the answer in advance :-)

I think that you thought about half of the reasons :-)

> Carles, we shouldn't avoid changing translatable strings at the cost
> of making the code bigger or less efficient.  It's not hard for
> translators to reuse the old string.

This is half of the reason (and not too bad: this translation will
appear as "fuzzy" so it's not everything lost)

The other reason:
http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00131.html

Avoiding to have trailing spaces helps the translators (they will do
less mistakes).

Of course makes the code slightly bigger (source code and binary)

> I notice that you committed it already.  Please can you adjust?

Yes I can adjust, but could you reconfirm if I should adjust after above
message?

Thanks,

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2010-01-01 13:10   ` Carles Pina i Estany
@ 2010-01-01 15:52     ` Robert Millan
  2010-01-02  2:04     ` Isaac Dupree
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Millan @ 2010-01-01 15:52 UTC (permalink / raw)
  To: The development of GNU GRUB

On Fri, Jan 01, 2010 at 02:10:51PM +0100, Carles Pina i Estany wrote:
> 
> Hi,
> 
> On Jan/01/2010, Robert Millan wrote:
> > On Mon, Dec 28, 2009 at 02:17:37AM +0100, Carles Pina i Estany wrote:
> > > === modified file 'normal/misc.c'
> > > --- normal/misc.c	2009-12-20 23:32:15 +0000
> > > +++ normal/misc.c	2009-12-28 01:15:34 +0000
> > > @@ -68,7 +68,10 @@ grub_normal_print_device_info (const cha
> > >  	      if (grub_errno == GRUB_ERR_NONE)
> > >  		{
> > >  		  if (label && grub_strlen (label))
> > > -		    grub_printf_ (N_("- Label %s"), label);
> > > +		    {
> > > +		      grub_putchar (' ');
> > > +		      grub_printf_ (N_("- Label \"%s\""), label);
> > > +		    }
> 
> > Why not just add a space before the -?
> > 
> > Uhm, I guess I know the answer in advance :-)
> 
> I think that you thought about half of the reasons :-)
> 
> > Carles, we shouldn't avoid changing translatable strings at the cost
> > of making the code bigger or less efficient.  It's not hard for
> > translators to reuse the old string.
> 
> This is half of the reason (and not too bad: this translation will
> appear as "fuzzy" so it's not everything lost)
> 
> The other reason:
> http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00131.html
> 
> Avoiding to have trailing spaces helps the translators (they will do
> less mistakes).
> 
> Of course makes the code slightly bigger (source code and binary)

Meh, ok.  I hope we don't have a lot of these...

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2010-01-01 13:10   ` Carles Pina i Estany
  2010-01-01 15:52     ` Robert Millan
@ 2010-01-02  2:04     ` Isaac Dupree
  2010-01-02 10:16       ` Carles Pina i Estany
  1 sibling, 1 reply; 7+ messages in thread
From: Isaac Dupree @ 2010-01-02  2:04 UTC (permalink / raw)
  To: The development of GNU GRUB

Carles Pina i Estany wrote:
>>> +		      grub_putchar (' ');
>>> +		      grub_printf_ (N_("- Label \"%s\""), label);
>>> ...
> Avoiding to have trailing spaces helps the translators (they will do
> less mistakes).

In this case it is a space at the beginning, not the end of the string 
-- does it still have this problem for translators? Or are you perhaps 
just trying to make code a bit more consistent re: beginning/end of strings?

-Isaac



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spaces (label, UUID)
  2010-01-02  2:04     ` Isaac Dupree
@ 2010-01-02 10:16       ` Carles Pina i Estany
  0 siblings, 0 replies; 7+ messages in thread
From: Carles Pina i Estany @ 2010-01-02 10:16 UTC (permalink / raw)
  To: The development of GNU GRUB


Hi,

On Jan/01/2010, Isaac Dupree wrote:
> Carles Pina i Estany wrote:
> >>>+		      grub_putchar (' ');
> >>>+		      grub_printf_ (N_("- Label \"%s\""), label);
> >>>...
> >Avoiding to have trailing spaces helps the translators (they will do
> >less mistakes).
> 
> In this case it is a space at the beginning, not the end of the
> string -- does it still have this problem for translators? Or are

I would say that it's the same kind of problem.

> you perhaps just trying to make code a bit more consistent re:
> beginning/end of strings?

This is true too.

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-02 10:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28  1:17 [PATCH] spaces (label, UUID) Carles Pina i Estany
2009-12-28 18:18 ` Carles Pina i Estany
2010-01-01 12:22 ` Robert Millan
2010-01-01 13:10   ` Carles Pina i Estany
2010-01-01 15:52     ` Robert Millan
2010-01-02  2:04     ` Isaac Dupree
2010-01-02 10:16       ` Carles Pina i Estany

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.