bash - French - "hash" alignment

Bug #1743914 reported by William Andrea
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Ubuntu French Translators

Bug Description

The output of the "hash" builtin is not properly aligned. Specifically the "occurences" column needs more leading spaces.

For example:

$ bash -c ''
$ hash
occurrences commande
   1 /bin/bash

It should be like this:

$ hash
occurrences commande
          1 /bin/bash

This occurs in Bash 4.4.12 on Ubuntu 17.10.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The original string of the French translation "occurrences" is "hits", i.e. 4 characters, and the print width is hard coded to 4 characters:

http://git.savannah.gnu.org/cgit/bash.git/tree/builtins/hash.def#n226

So while this issue is related to translations, there is not much the translators can do. To suggest a change, i.e. a print width which takes into account the length of the translated term, you'd need to file an upstream bash bug.

Revision history for this message
William Andrea (wjandrea) wrote :

@gunnarhj, True. Then maybe it would be better to change the header. They could shorten "occurences" as "ocs." or change the translation to "nom." or something, like this:

$ hash
nom. commande
   1 /bin/bash

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Yeah, maybe, as a workaround... if it's worth it. But also such a workaround should better be made upstream IMO, and not only in Ubuntu.

Actually, up to seven characters makes it look ok. In Swedish it looks like this:

$ bash -c ''
$ hash
träffar kommando
   1 /bin/bash

But probably the current translation of "hits" consists of more than seven characters in many languages, not only French.

Changed in ubuntu-translations:
assignee: nobody → Ubuntu French Translators (ubuntu-l10n-fr)
Changed in ubuntu-translations:
status: New → Fix Committed
Revision history for this message
William Andrea (wjandrea) wrote :

@febcrash, just curious, what is the fix? I'm not familiar with the source code.

Also, should I report this upstream too? If yes, please point me in the right direction. I assume it would go to GNU Savannah, but I'm not sure where exactly.

Revision history for this message
Olivier Febwin (febcrash) wrote :

crash@HP-EliteBook-820-G3:~$ hash
occ. commande
   1 /bin/grep

You can test it by copy bash.mo file in attachment on /usr/share/locale-langpack/fr/LC_MESSAGES/bash.mo

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The latest version of language-pack-fr includes this fix.

Changed in ubuntu-translations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.