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
Merged

Conversation

@ralsina
Copy link
Member

@ralsina 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
@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)
Copy link
Member

@Kwpolska Kwpolska May 15, 2017

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

@Kwpolska
Copy link
Member

@Kwpolska 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
Copy link
Member

@Kwpolska 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
Copy link
Member Author

@ralsina 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants