[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposed patch



Sure looks reasonable to me. From the Department of Redundancy Department.

On Sat, Mar 16, 2002 at 02:32:31AM +0300, Mikhail Sobolev wrote:
> In the light of fighting for the free space, I propose the following
> patch.  I just takes out the common words for a number of messasges,
> which from one hand allows to reduce the size of the translation, from
> the other -- it simplifies the work of translators :).
> 
> What do you think?
> 
> --
> Misha
> 
> --- util.c	Sat Mar 16 00:31:27 2002
> +++ util.c.new	Sat Mar 16 02:29:12 2002
> @@ -713,52 +713,56 @@
>    if ( ( 0 == strcmp( Arch2, "PowerMac" ) ) && ( NULL != Arch3 ) && 
>  	( 0 == strcmp( Arch3, "NewWorld" ) ) ) {
>      struct fdisk_partition *bootstrap;
> +    char *message = NULL, *title = NULL;
> +
>      bootstrap = fdisk_find_partition_by_type( PTYPE_MAC_BOOT );
>      if ( NULL == bootstrap ) {
> -	problemBox( _("No Apple_Bootstrap partition was detected.  "
> -		      "You should repartition your disk.\n\n"
> -		      "If you do not repartition and add an 800K Apple_Bootstrap "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("Missing Bootstrap Partition"));
> +	message = _("No Apple_Bootstrap partition was detected.");
> +	title = _("Missing Bootstrap Partition");
>      }
>      else if ( 800 > bootstrap->size ) {
> -	problemBox( _("The Apple_Bootstrap partition must be at least 800K.  "
> -		      "You should repartition your disk.\n\n"
> -		      "If you do not repartition and add an 800K Apple_Bootstrap "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("Bootstrap Partition Too Small"));
> +	message = _("The Apple_Bootstrap partition must be at least 800K.");
> +	title = _("Bootstrap Partition Too Small");
>      }
>      else if ( 0 != strcmp( bootstrap->disk->name, Root->disk->name ) ) {
> -	problemBox( _("The Apple_Bootstrap partition must reside on the same disk "
> -		      "as the root partition. You should repartition your disk.\n\n"
> +	message = _("The Apple_Bootstrap partition must reside on the same disk "
> +		      "as the root partition.");
> +	title = _("No Bootstrap Partition On Root Disk");
> +    }
> +
> +    if (message != NULL && title != NULL)
> +    {
> +        snprintf (prtbuf, sizeof (prtbuf), _("%s  You should repartition your disk.\n\n"
>  		      "If you do not repartition and add an 800K Apple_Bootstrap "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("No Bootstrap Partition On Root Disk"));
> +		      "partition you will not be able to make the disk bootable."), message);
> +
> +        problemBox (prtbuf, title);
>      }
>    } 
>    else if ( 0 == strcmp( Arch2, "chrp" ) ) {
>      struct fdisk_partition *bootstrap;
> +    char *message = NULL, *title = NULL;
> +
>      bootstrap = fdisk_find_partition_by_type( PTYPE_CHRP_BOOT );
>      if ( NULL == bootstrap ) {
> -	problemBox( _("No CHRP bootstrap partition was detected.  "
> -		      "You should repartition your disk.\n\n"
> -		      "If you do not repartition and add an 800K type 0x41 "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("Missing Bootstrap Partition"));
> +	message = _("No CHRP bootstrap partition was detected.");
> +	title = _("Missing Bootstrap Partition");
>      }
>      else if ( 800 > bootstrap->size ) {
> -	problemBox( _("The CHRP bootstrap partition must be at least 800K.  "
> -		      "You should repartition your disk.\n\n"
> -		      "If you do not repartition and add an 800K type 0x41 "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("Bootstrap Partition Too Small"));
> +	message = _("The CHRP bootstrap partition must be at least 800K.");
> +	title =_("Bootstrap Partition Too Small");
>      }
>      else if ( 0 != strcmp( bootstrap->disk->name, Root->disk->name ) ) {
> -	problemBox( _("The CHRP bootstrap partition must reside on the same disk "
> -		      "as the root partition.  You should repartition your disk.\n\n"
> -		      "If you do not repartition and add an 800K type 0x41 "
> -		      "partition you will not be able to make the disk bootable."),
> -		    _("No Bootstrap Partition On Root Disk"));
> +        message = _("The CHRP bootstrap partition must reside on the same disk as the root partition.");
> +        title = _("No Bootstrap Partition On Root Disk");
> +    }
> +
> +    if (message != NULL && title != NULL)
> +    {
> +        snprintf (prtbuf, sizeof (prtbuf), _("%s  You should repartition your disk.\n\nIf you do not repartition and add an 800K type 0x41 "
> +		      "partition you will not be able to make the disk bootable."), message);
> +
> +        problemBox (prtbuf, title);
>      }
>    }
>  #endif
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-boot-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 

-- 
*------v--------- Installing Debian GNU/Linux 3.0 --------v------*
|      <http://www.debian.org/releases/woody/installmanual>      |
|   debian-imac (potato): <http://debian-imac.sourceforge.net>   |
|            Chris Tillman        tillman@voicetrak.com          |
|                   May the Source be with you                   |
*----------------------------------------------------------------*



Reply to: