Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Don't crash when translating untranslated strings #2765

merged 1 commit into from May 15, 2017


None yet
2 participants

ralsina commented May 14, 2017

keturn just reported on IRC that an old theme crashed because it used messages['Posted'] instead of the current messages['Posted:'] ... that's harsh :-)

@ralsina ralsina merged commit b61f406 into master May 15, 2017

5 checks passed

codacy/pr Good work! A positive pull request.
continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@ralsina ralsina deleted the kinder-messages branch May 15, 2017

+ if lang not in self:
+ LOGGER.warning('Unknown language %s', lang)
+ elif key not in self[lang]:
+ LOGGER.warning('Unknown message %s', key)

Kwpolska May 15, 2017


Is this enough to fix it? Perhaps you should add some fallback?


Kwpolska commented May 15, 2017

This breaks spectacularly and generates 161 error messages for the demo site (from post meta failing to be found). Reverting this.


Kwpolska commented May 15, 2017

Fixing this right is hard, since functionaries are used for post metadata, post data, and messages. But I’d argue this is too rare to bother fixing anyway. The original issue was using v6 themes, which are already pretty incompatible, and v7.0.0 was released almost exactly 3 years ago.


ralsina commented May 15, 2017

Ok, sorry about that :-P

I could do a subclass that is only for messages and use that only in that place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment