mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
Fix "Server Error: [missing {{code}} value]" page
The translation was expecting a non-existent parameter.
This commit is contained in:
parent
a11cc46c73
commit
5261f2e751
@ -41,6 +41,7 @@ export default ObjectController.extend({
|
||||
if (this.get('thrown.jqTextStatus') === "timeout") return true;
|
||||
return false;
|
||||
}.property(),
|
||||
isForbidden: Em.computed.equal('thrown.status', 403),
|
||||
isServer: Em.computed.gte('thrown.status', 500),
|
||||
isUnknown: Em.computed.none('isNetwork', 'isServer'),
|
||||
|
||||
@ -59,6 +60,8 @@ export default ObjectController.extend({
|
||||
return I18n.t('errors.reasons.network');
|
||||
} else if (this.get('isServer')) {
|
||||
return I18n.t('errors.reasons.server');
|
||||
} else if (this.get('isForbidden')) {
|
||||
return I18n.t('errors.reasons.forbidden');
|
||||
} else {
|
||||
// TODO
|
||||
return I18n.t('errors.reasons.unknown');
|
||||
@ -73,7 +76,7 @@ export default ObjectController.extend({
|
||||
} else if (this.get('isNetwork')) {
|
||||
return I18n.t('errors.desc.network');
|
||||
} else if (this.get('isServer')) {
|
||||
return I18n.t('errors.desc.server', this.get('thrown.statusText'));
|
||||
return I18n.t('errors.desc.server', { status: this.get('thrown.status') + " " + this.get('thrown.statusText') });
|
||||
} else {
|
||||
// TODO
|
||||
return I18n.t('errors.desc.unknown');
|
||||
@ -85,8 +88,6 @@ export default ObjectController.extend({
|
||||
return [ButtonLoadPage];
|
||||
} else if (this.get('isNetwork')) {
|
||||
return [ButtonBackDim, ButtonTryAgain];
|
||||
} else if (this.get('isServer')) {
|
||||
return [ButtonBackBright];
|
||||
} else {
|
||||
return [ButtonBackBright, ButtonTryAgain];
|
||||
}
|
||||
|
@ -507,12 +507,13 @@ en:
|
||||
prev_page: "while trying to load"
|
||||
reasons:
|
||||
network: "Network Error"
|
||||
server: "Server Error: {{code}}"
|
||||
server: "Server Error"
|
||||
forbidden: "Access Denied"
|
||||
unknown: "Error"
|
||||
desc:
|
||||
network: "Please check your connection."
|
||||
network_fixed: "Looks like it's back."
|
||||
server: "Something went wrong."
|
||||
server: "Error code: {{status}}"
|
||||
unknown: "Something went wrong."
|
||||
buttons:
|
||||
back: "Go Back"
|
||||
|
Loading…
Reference in New Issue
Block a user