Description of problem: When translating anaconda/master for F18, I came across this string: #: pyanaconda/ui/tui/hubs/__init__.py:104 #: pyanaconda/ui/tui/simpleline/base.py:301 msgid "c" msgstr "" Taking a look in the gitweb, it seems this is used as a short command. In the __init__.py file it means "close", and in base.py it means "continue". However, the Swedish translations of these two words don't start with the same letter. So there isn't really any sensible way to translate this string to Swedish. To get it right, the two cases need to be separated. Something like the pgettext() functionality in C.
This might be a bit harder to do.. python for some reason does not export pgettext method (there is an upstream bug about it - http://bugs.python.org/issue2504). The workaround with \0x04 might work, but I am not sure how to "package" it so the automatic gettext tools pick it up properly.
Maybe the reason it isn't already available in Python is that it is implemented as a C macro, not as a real function. It's just a guess, I don't know. See /usr/share/gettext/gettext.h for details on how it is implemented. Doing a similar function in pure Python would be pretty straightforward, I believe. But as you say, it isn't there now, so you would have to add it yourself. As for extraction, are you running the command line gettext tool directly when you build anaconda? If so, I think all you need to do is to add a flag like --keyword=pgettext:1c,2 to the invocation, gettext will look for a function pgettext. It is default in C, but can be added this way to any other language. (You may of course call the function anything you want, since you will have to add it.)
Adding gettext context support would really not be straightforward, given that we'd be working against the current context-unaware gettext support in python, but I don't think we actually need it. Both 'c's stand for "continue", at least in the latest anaconda. I added some translator comments to all of the single character TUI inputs.
> Both 'c's stand for "continue", at least in the latest anaconda. Oh, it does! There is a comment immediately before the line with the string in base.py saying # global close command and the immediately following line says self.close_screen() That probably led me to believe that the "c" actually meant "close". But I don't think I investigated the code wider, so I may have jumped to conclusions. (It seems I swapped the meanings in my original description.) > I added some translator comments to all of the single character TUI inputs. That's appreciated! :-)
anaconda-20.18-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/anaconda-20.18-1.fc20
Package anaconda-20.18-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing anaconda-20.18-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-17065/anaconda-20.18-1.fc20 then log in and leave karma (feedback).
anaconda-20.18-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.