Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crash when translating untranslated strings #2765

Merged
merged 1 commit into from May 15, 2017

Conversation

Projects
None yet
2 participants
@ralsina
Copy link
Member

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.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@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)

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska May 15, 2017

Member

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

@Kwpolska

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

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
You can’t perform that action at this time.