bugwdiff - Bugs: bug #58157, Text for translation should be...

 
 

bug #58157: Text for translation should be complete sentence

Submitter:  None
Submitted:  Fri 10 Apr 2020 08:56:55 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Roland Illig
Originator Email:  -email is unavailable- Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Fri 10 Apr 2020 10:18:06 PM UTC, comment #1: 

For a justification, see the GNU gettext manual: https://www.gnu.o ... ring-Strings.html

Bruno Haible <haible>
Fri 10 Apr 2020 08:56:55 PM UTC, original submission:  

From wdiff2.c:

      /* TRANSLATORS: This and the next string are one message. */
      fprintf (stderr, _("Launching `%s"), MDIFF_PROGRAM);
      for (counter = 1; counter < arguments; counter++)
fprintf (stderr, " %s", argument_list[counter]);
      fprintf (stderr, _("'\n"));

The above code makes it unnecessarily hard for translators. "This and the next string" should be merged into a single string. Here's an idea.

    const char *launching_msg = _("Launching `%s'");
    const char *percent = strchr (launching_msg, '%');
    fprintf (stderr, "%*s", (int)(percent - launching_msg),
launching_msg);
    for (counter = 1; counter < arguments; counter++)
      fprintf (stderr, " %s", argument_list[counter]);
    fprintf (stderr, "%s", percent + 2);

This puts the burden onto the programmer instead of the translators. Sure, the code is more difficult to understand, but the translators will find it easier to translate the complete sentence instead of having to translate two separate pieces.

Or if you don't like the %s placeholder, you could also take another character that is unlikely to occur in any translation. Or you just tell the translators to keep the %s as-is and not add any modifiers like %00000002s.

Anonymous

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by haible
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-10 haible Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code