Skip to content

Commit

Permalink
Merge pull request #6126 from fernandoporazzi/translate-sweetalert-bu…
Browse files Browse the repository at this point in the history
…ttons

Translate sweetalert buttons.
  • Loading branch information
engelgabriel committed Feb 24, 2017
2 parents d17c695 + 046754a commit b2eca4f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/rocketchat-ui-account/account/accountProfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ Template.accountProfile.events
type: "input",
inputType: "password",
showCancelButton: true,
closeOnConfirm: false
closeOnConfirm: false,
confirmButtonText: t('Save'),
cancelButtonText: t('Cancel')

, (typedPassword) =>
if typedPassword
Expand All @@ -144,7 +146,9 @@ Template.accountProfile.events
type: "input",
inputType: "password",
showCancelButton: true,
closeOnConfirm: false
closeOnConfirm: false,
confirmButtonText: t('Delete')
cancelButtonText: t('Cancel')

, (typedPassword) =>
if typedPassword
Expand All @@ -165,7 +169,9 @@ Template.accountProfile.events
text: t("If_you_are_sure_type_in_your_username"),
type: "input",
showCancelButton: true,
closeOnConfirm: false
closeOnConfirm: false,
confirmButtonText: t('Delete')
cancelButtonText: t('Cancel')

, (deleteConfirmation) =>
if deleteConfirmation is Meteor.user()?.username
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-master/master/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ Template.main.onRendered ->
$('.input-message').focus()
, 100


Tracker.autorun ->
swal.setDefaults({cancelButtonText: t('Cancel')})

prefs = Meteor.user()?.settings?.preferences
if prefs?.hideUsernames
$(document.body).on('mouseleave', 'button.thumb', (e) ->
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-ui/lib/fileUpload.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ readAsArrayBuffer = (file, callback) ->
showCancelButton: true
closeOnConfirm: false
closeOnCancel: false
confirmButtonText: t('Send')
cancelButtonText: t('Cancel')
html: true
, (isConfirm) ->
consume()
Expand Down

0 comments on commit b2eca4f

Please sign in to comment.