-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
un-i18n Modal Analytics #4688
un-i18n Modal Analytics #4688
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,15 +72,15 @@ module.exports = React.createClass({ | |
|
||
onViewSourceClick: function() { | ||
const ViewSource = sdk.getComponent('structures.ViewSource'); | ||
Modal.createDialog(ViewSource, { | ||
Modal.createTrackedDialog('View Event Source', '', ViewSource, { | ||
content: this.props.mxEvent.event, | ||
}, 'mx_Dialog_viewsource'); | ||
this.closeMenu(); | ||
}, | ||
|
||
onViewClearSourceClick: function() { | ||
const ViewSource = sdk.getComponent('structures.ViewSource'); | ||
Modal.createDialog(ViewSource, { | ||
Modal.createTrackedDialog('View Clear Event Source', '', ViewSource, { | ||
// FIXME: _clearEvent is private | ||
content: this.props.mxEvent._clearEvent, | ||
}, 'mx_Dialog_viewsource'); | ||
|
@@ -89,7 +89,7 @@ module.exports = React.createClass({ | |
|
||
onRedactClick: function() { | ||
const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog"); | ||
Modal.createDialog(ConfirmRedactDialog, { | ||
Modal.createTrackedDialog('Confirm Redact Dialog', '', ConfirmRedactDialog, { | ||
onFinished: (proceed) => { | ||
if (!proceed) return; | ||
|
||
|
@@ -99,7 +99,7 @@ module.exports = React.createClass({ | |
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
// display error message stating you couldn't delete this. | ||
const code = e.errcode || e.statusCode; | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('You cannot delete this message', e.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Error'), | ||
description: _t('You cannot delete this message. (%(code)s)', {code: code}) | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ module.exports = React.createClass({ | |
|
||
onRedactClick: function() { | ||
const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog"); | ||
Modal.createDialog(ConfirmRedactDialog, { | ||
Modal.createTrackedDialog('Confirm Redact Dialog', 'Image View', ConfirmRedactDialog, { | ||
onFinished: (proceed) => { | ||
if (!proceed) return; | ||
var self = this; | ||
|
@@ -76,7 +76,7 @@ module.exports = React.createClass({ | |
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
// display error message stating you couldn't delete this. | ||
var code = e.errcode || e.statusCode; | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('You cannot delete this image.', e.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Error'), | ||
description: _t('You cannot delete this image. (%(code)s)', {code: code}) | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,7 @@ module.exports = React.createClass({ | |
this._refreshFromServer(); | ||
}, (error) => { | ||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('Error saving email notification preferences', error.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Error saving email notification preferences'), | ||
description: _t('An error occurred whilst saving your email notification preferences.'), | ||
}); | ||
|
@@ -175,7 +175,7 @@ module.exports = React.createClass({ | |
} | ||
|
||
var TextInputDialog = sdk.getComponent("dialogs.TextInputDialog"); | ||
Modal.createDialog(TextInputDialog, { | ||
Modal.createTrackedDialog('Keywords Dialog', '', TextInputDialog, { | ||
title: _t('Keywords'), | ||
description: _t('Enter keywords separated by a comma:'), | ||
button: _t('OK'), | ||
|
@@ -241,7 +241,7 @@ module.exports = React.createClass({ | |
}, function(error) { | ||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
console.error("Failed to change settings: " + error); | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('Failed to change settings', error.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Failed to change settings'), | ||
description: ((error && error.message) ? error.message : _t('Operation failed')), | ||
onFinished: self._refreshFromServer | ||
|
@@ -311,7 +311,7 @@ module.exports = React.createClass({ | |
}, function(error) { | ||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
console.error("Can't update user notification settings: " + error); | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('Can\'t update user notifcation settings', error.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Can\'t update user notification settings'), | ||
description: ((error && error.message) ? error.message : _t('Operation failed')), | ||
onFinished: self._refreshFromServer | ||
|
@@ -353,7 +353,7 @@ module.exports = React.createClass({ | |
var onError = function(error) { | ||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); | ||
console.error("Failed to update keywords: " + error); | ||
Modal.createDialog(ErrorDialog, { | ||
Modal.createTrackedDialog('Failed to update keywords', error.toString(), ErrorDialog, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.toString() |
||
title: _t('Failed to update keywords'), | ||
description: ((error && error.message) ? error.message : _t('Operation failed')), | ||
onFinished: self._refreshFromServer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.toString()