This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils request related to translation


Hi Deniz,

> I went through the POT files and found what I think are the problem
> strings.

OK, I have a patch below to fix some of these.  Others however are
more problematical:

> Looks like it should have an end?
> lexsup.c:279

Do you mean that it is missing a new-line character ?  The source code
in question is this line:

      'I', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES },

which is an entry in the command-line switch table.  None of the
textual descriptions in this table have new-lines, because the code
that displays them adds them automatically.  The description itself I
think is fairly clear, although it could be rewritten.  The intent is
to say that this command line option (-I) can be used to specify the
name of the dynamic linker which should be invoked to load the binary
that is being created by the linker.

> Looks like it should have an end?
> pe-dll.c:1092

The source line here is:

    fprintf (out, _("; no contents available\n"));

The semicolon is a comment character in the output file being
created.  Perhaps a full sentence would be more appropriate ?  eg:

    fprintf (out, _("; No contents are available as there was no .def file specified.\n"));


> Looks like beginning of sentence is hard coded somewhere.  
> elf.c:771

Actually this is a message inside a for loop:

      fprintf (f, _("\nVersion References:\n"));
      for (t = elf_tdata (abfd)->verref; t != NULL; t = t->vn_nextref)
	{
	  Elf_Internal_Vernaux *a;
	  fprintf (f, _("  required from %s:\n"), t->vn_filename);

ie this is a list of files which are being referenced by the current
file.


> Looks like some number is printed before this statement: 
> readelf:2187
> Looks like some number is printed before this statement: 
> readelf:2189

Actually these are from a switch statement displaying the "class" of
an ELF file:

    case ELFCLASSNONE: return _("none");
    case ELFCLASS32:   return _("ELF32");
    case ELFCLASS64:   return _("ELF64");

The "none" entry means that no class has been specified.  (ie the
field in the ELF header has a 0 value).

> Plural s is probably added by program: 
> readelf.c:2327
> 
> These should be combined
> readelf.c:2937
> readelf.c:2944
> 
> This sentence needs an object. Probably elsewhere in code?
> readelf.c:5706
>
> End of sentence seems to be missing. 
> readelf.c:7904

I could not find these entries in the binutils.po file. :-(


Anyway here is the patch for the other problems you mentioned.  Do you
think this will work for you ?

Cheers
        Nick

ld/ChangeLog
2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>

	* emultempl/pe.em (..._list_options): Replace multiple fprintf
	statements describing a single option with a single, newline
	escaped fprintf.  This allows better translation into other
	languages.
        
        * ldmain.c (add_archive_element): Combine multiple strings
        into a single string to permit better translation into other
        languages.

bfd/ChangeLog
2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>

	* elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
	fragmented sentence parts into a whole sentence to permit
	better translation into foreign languages.

binutils/ChangeLog
2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>

	* dllwrap.c (main) Replace multiple strings describing a
	single error with a single, newline escaped sentence to permit
	better translation into foreign languages.

Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.54
diff -p -c -r1.54 pe.em
*** pe.em	2001/09/24 18:21:24	1.54
--- pe.em	2001/12/05 17:17:02
*************** gld_${EMULATION_NAME}_list_options (file
*** 338,356 ****
    fprintf (file, _("  --out-implib <file>                Generate import library\n"));
    fprintf (file, _("  --output-def <file>                Generate a .DEF file for the built DLL\n"));
    fprintf (file, _("  --warn-duplicate-exports           Warn about duplicate exports.\n"));
!   fprintf (file, _("  --compat-implib                    Create backward compatible import libs;\n"));
!   fprintf (file, _("                                       create __imp_<SYMBOL> as well.\n"));
!   fprintf (file, _("  --enable-auto-image-base           Automatically choose image base for DLLs\n"));
!   fprintf (file, _("                                       unless user specifies one\n"));
    fprintf (file, _("  --disable-auto-image-base          Do not auto-choose image base. (default)\n"));
!   fprintf (file, _("  --dll-search-prefix=<string>       When linking dynamically to a dll witout an\n"));
!   fprintf (file, _("                                       importlib, use <string><basename>.dll \n"));
!   fprintf (file, _("                                       in preference to lib<basename>.dll \n"));
!   fprintf (file, _("  --enable-auto-import               Do sophistcated linking of _sym to \n"));
!   fprintf (file, _("                                       __imp_sym for DATA references\n"));
    fprintf (file, _("  --disable-auto-import              Do not auto-import DATA items from DLLs\n"));
!   fprintf (file, _("  --enable-extra-pe-debug            Enable verbose debug output when building\n"));
!   fprintf (file, _("                                       or linking to DLLs (esp. auto-import)\n"));
  #endif
  }
  
--- 338,356 ----
    fprintf (file, _("  --out-implib <file>                Generate import library\n"));
    fprintf (file, _("  --output-def <file>                Generate a .DEF file for the built DLL\n"));
    fprintf (file, _("  --warn-duplicate-exports           Warn about duplicate exports.\n"));
!   fprintf (file, _("  --compat-implib                    Create backward compatible import libs;\n\
!                                        create __imp_<SYMBOL> as well.\n"));
!   fprintf (file, _("  --enable-auto-image-base           Automatically choose image base for DLLs\n\
!                                        unless user specifies one\n"));
    fprintf (file, _("  --disable-auto-image-base          Do not auto-choose image base. (default)\n"));
!   fprintf (file, _("  --dll-search-prefix=<string>       When linking dynamically to a dll witout an\n\
!                                        importlib, use <string><basename>.dll \n\
!                                        in preference to lib<basename>.dll \n"));
!   fprintf (file, _("  --enable-auto-import               Do sophistcated linking of _sym to \n\
!                                        __imp_sym for DATA references\n"));
    fprintf (file, _("  --disable-auto-import              Do not auto-import DATA items from DLLs\n"));
!   fprintf (file, _("  --enable-extra-pe-debug            Enable verbose debug output when building\n\
!                                        or linking to DLLs (esp. auto-import)\n"));
  #endif
  }
  
Index: ld/ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.38
diff -p -c -r1.38 ldmain.c
*** ldmain.c	2001/12/03 23:15:26	1.38
--- ldmain.c	2001/12/05 17:17:30
*************** add_archive_element (info, abfd, name)
*** 836,843 ****
  	{
  	  char buf[100];
  
! 	  sprintf (buf, "%-29s %s\n\n", _("Archive member included"),
! 		   _("because of file (symbol)"));
  	  minfo ("%s", buf);
  	  header_printed = true;
  	}
--- 836,842 ----
  	{
  	  char buf[100];
  
! 	  sprintf (buf, _("Archive member included because of file (symbol)\n\n"));
  	  minfo ("%s", buf);
  	  header_printed = true;
  	}
Index: bfd/elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.64
diff -p -c -r1.64 elf32-arm.h
*** elf32-arm.h	2001/11/23 12:17:18	1.64
--- elf32-arm.h	2001/12/05 17:17:53
*************** Error: %s uses %s floating point, wherea
*** 2282,2295 ****
        /* Interworking mismatch is only a warning.  */
        if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
  	{
! 	  char *s1 = (in_flags & EF_ARM_INTERWORK
! 		      ? _("supports") : _("does not support"));
! 	  char *s2 = out_flags & EF_ARM_INTERWORK ? _("does") : _("does not");
! 
! 	  _bfd_error_handler (_("\
! Warning: %s %s interworking, whereas %s %s"),
! 			      bfd_archive_filename (ibfd), s1,
! 			      bfd_get_filename (obfd), s2);
  	}
      }
  
--- 2282,2301 ----
        /* Interworking mismatch is only a warning.  */
        if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
  	{
! 	  if (in_flags & EF_ARM_INTERWORK)
! 	    {
! 	      _bfd_error_handler (_("\
! Warning: %s supports interworking, whereas %s does not"),
! 				  bfd_archive_filename (ibfd),
! 				  bfd_get_filename (obfd));    
! 	    }
! 	  else
! 	    {
! 	      _bfd_error_handler (_("\
! Warning: %s does not support interworking, whereas %s does"),
! 				  bfd_archive_filename (ibfd),
! 				  bfd_get_filename (obfd));
! 	    }
  	}
      }
  
Index: binutils/dllwrap.c
===================================================================
RCS file: /cvs/src/src/binutils/dllwrap.c,v
retrieving revision 1.8
diff -p -c -r1.8 dllwrap.c
*** dllwrap.c	2001/09/19 05:33:15	1.8
--- dllwrap.c	2001/12/05 17:18:20
*************** main (argc, argv)
*** 849,856 ****
        delete_def_file = 1;
        free (fileprefix);
        delete_def_file = 1;
!       warn (_("no export definition file provided"));
!       warn (_("creating one, but that may not be what you want"));
      }
    
    /* set the target platform. */
--- 849,856 ----
        delete_def_file = 1;
        free (fileprefix);
        delete_def_file = 1;
!       warn (_("no export definition file provided.\n\
! Creating one, but that may not be what you want"));
      }
    
    /* set the target platform. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]