Hey All:We've had some good discussion at http://bugzilla.gnome.org/show_bug.cgi?id=569118 for how to handle Python files.
http://bugzilla.gnome.org/show_bug.cgi?id=569118#c9 provides the Python equivalent for C_.
http://bugzilla.gnome.org/show_bug.cgi?id=569118#c17 provides a script that hammers through the *.po files to change them from Q_ form to C_ form.
I've attached two patches to the bug for Orca - one for the source code and another for the *.po files. It all seems to work fine in my testing between the C locale and the en_GB locale -- I made some temporary mods to the en_GB.po file to make sure I was getting the right string for the right context.
In the past, I was slapped seriously by the l10n team for touching *.po files. So, I'm requesting permission here before I check in the *.po changes. Is this OK with you all?
Will Willie Walker wrote:
Hi All:I'm looking at http://bugzilla.gnome.org/show_bug.cgi?id=569118, which is a request to migrate to C_ from Q_. Doing this in the C programming language seems pretty straightforward, but I'm puzzled about how to do it in Python.The current Orca code does the equivalent of this: def Q_(s): s = _(s) s = s[s.find('|')+1:] return sThis was easy to do since we controlled the whole string. Now that a context is explicitly called out with the C_ method, it seems like we might need to make a different gettext method call. I'm not quite sure what to do.Is there a Python precedence that exists that I can take a look at? Will