FS#26382 - pacman-key's help doesn't display one translated string

Attached to Project: Pacman
Opened by Rafael Fontenelle (josephg) - Monday, 10 October 2011, 18:44 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 11 October 2011, 13:44 GMT
Task Type Bug Report
Category i18n & l10n
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version 4.0.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
When run "pacman-key --help" I get all output in my native language (pt_BR), except for "Manage pacman's list of trusted keys" which is all english.
The expected output, already translated in Transifex, is "Gerencia lista de chaves confiáveis do pacman"

Steps to Reproduce:
pacman-key --help

Version:
pacman-git 20111006-1 (or pacman 4.0.0rc2)

This task depends upon

Closed by  Dan McGee (toofishes)
Tuesday, 11 October 2011, 13:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in git
Comment by Allan McRae (Allan) - Monday, 10 October 2011, 20:02 GMT
Is this due to the "\" in the string:

scripts/pacman-key.sh.in: printf "$(gettext "Manage pacman\'s list of trusted keys")\n"
scripts/po/pt_BR.po: msgid "Manage pacman's list of trusted keys"
Comment by Rafael Fontenelle (josephg) - Monday, 10 October 2011, 21:04 GMT
Indeed. Translation works if I replace "pacman\'s" with "pacmans", for example, but pacman fails to compile if I replace in pt_BR.po with "pacman\'s".

Maybe this string should be renamed to something like "Manage the list of trusted keys of Pacman", or something similar.
Comment by Dan McGee (toofishes) - Monday, 10 October 2011, 21:13 GMT
  • Field changed: Due in Version (4.0.0 → 4.0.1)
We'll fix it somehow in 4.0.1, not messing with strings at all before then. Is this an xgettext bug then? We can work around it but something doesn't seem right if it isn't correctly extracting shell-escaped strings.
Comment by Dan McGee (toofishes) - Tuesday, 11 October 2011, 13:02 GMT
Interestingly enough:

$ export TEXTDOMAIN='pacman-scripts'
$ LANG=es_MX.utf8 printf "$(gettext "Manage pacman's list of trusted keys")\n"
Manage pacman's list of trusted keys
$ LANG=es_MX.utf8 echo $(gettext "Manage pacman's list of trusted keys")
Manage pacman's list of trusted keys
$ LANG=es_MX.utf8 gettext "Manage pacman's list of trusted keys"
Administrar la lista de claves confiadas por pacman

So it works when it isn't executed inside $() and isn't escaped. I was trying to find a quick solution for 4.0 before we just reword the message in 4.0.1 to avoid this.
Comment by Dan McGee (toofishes) - Tuesday, 11 October 2011, 13:41 GMT
This is fixed, switching out \' for ' did end up working, regardless of the above tests...
Comment by Allan McRae (Allan) - Tuesday, 11 October 2011, 20:50 GMT
Note that this is a reversal of commit e2f00abe which added the backslash to fix syntax highlighting. Not sure if it is still worth considering changing the message at a later stage.
Comment by Dan McGee (toofishes) - Tuesday, 11 October 2011, 21:10 GMT
We already have several other strings that contain bare ' characters (see repo-add --verify and --files). What editor is showing broken syntax highlighting still? I'm not seeing it in vim at any of these locations.
Comment by Allan McRae (Allan) - Tuesday, 11 October 2011, 21:47 GMT
This is using geany. repo-add is interesting because the two ' characters cancel each other out so there is only a small bit of bad syntax highlighting.
Comment by Dan McGee (toofishes) - Tuesday, 11 October 2011, 22:04 GMT
Sounds like this needs to get fixed: http://git.geany.org/geany/tree/scintilla/lexers/LexBash.cxx

At least for now, I'd like to fix it this way because we get the benefit of anyone having translated this string actually seeing their work and having the output fully translated. I'm up for alternate fixes or wording changes for 4.0.1 but it seems to me we should let geany developers (although scintilla looks like the root of the problem) know of the issue here.

Loading...