|
Hi, some OSQA error messages are directly hardcoded in python scripts like the following sample:
There is an entry in djongo.po for the above sample:
As you can see msgid is empty. The error message is coming directly from qandy.py. How can I translate these kind of error messages? I need to use unicode characters. Saving the qanda.py as UNICODE file craches OSQA. Thank you for your help. |
|
'msgid' is not empty. it's contents follows till the 'msgstr' string the following will be a correct translation:
|
|
This threw me too when I first picked up OSQA - I've never worked w/ Django before. There are some hardcoded strings in the application, but this isn't one of them. When using Django's i18n support, you provide the default string value which becomes both the display string and the message id. That way you don't have to manage separate message identifiers and separate translations and you see the actual message in code. If this were a hardcoded string, that innocent looking underscore and parenthesis wouldn't be required. Take a look at the imports:
The msgid isn't actually empty, multi-line translations start with an empty string like this. Just enter a value for msgstr. See the Django Book for more - Chapter 18: Internationalization |