I am watching the open source QT4 game ( http://cockatrice.de ) and it uses QTranslator for internationalization. However, each phrase relating to the player uses a masculine pronoun ("his hand", "his deck", "he does such and such," etc.).
My first thought on how to fix this is to simply replace each instance of "my" or "he" with a variable that is set to the correct pronoun place, but I do not know how this will affect translations. But for translation / internationalization, this can break down, especially if the vocabulary affects the rest of the phrase.
Has anyone else worked with similar issues before? Is it possible to separate a pronoun and a phrase in at least simple languages ββ(for example, in English)? Will the translation file include a copy of each phrase for each pronoun? (doubling at least the size of the translation file)?
some sample code from how it is currently configured:
calling source:
case CaseNominative: return hisOwn ? tr("his hand", "nominative") : tr("%1 hand", "nominative").arg(ownerName); case CaseGenitive: return hisOwn ? tr("of his hand", "genitive") : tr("of %1 hand", "genitive").arg(ownerName); case CaseAccusative: return hisOwn ? tr("his hand", "accusative") : tr("%1 hand", "accusative").arg(ownerName);
English translation file:
<message> <location filename="../src/cardzone.cpp" line="51"/> <source>his hand</source> <comment>nominative</comment> <translation type="unfinished"></translation> </message>
Yenthefirst
source share