From ff74a67a09d84ba919be6353975a075e7b50e818 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 12 Jul 2016 16:43:33 +0200 Subject: [PATCH] translate alertify button messages --- customize.dist/messages.js | 3 +++ www/common/cryptpad-common.js | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 4018ced64..5097739e8 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -38,6 +38,9 @@ define(function () { out.tryIt = 'Try it out!'; out.recentPads = 'Your recent pads (stored only in your browser)'; + out.okButton = 'OK (enter)'; + out.cancelButton = 'Cancel (esc)'; + out.initialState = [ '

', 'This is CryptPad, the zero knowledge realtime collaborative editor.', diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 92d419532..318c12e40 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1,8 +1,9 @@ define([ + '/customize/messages.js', '/bower_components/chainpad-crypto/crypto.js', '/bower_components/alertifyjs/dist/js/alertify.js', '/bower_components/jquery/dist/jquery.min.js', -], function (Crypto, Alertify) { +], function (Messages, Crypto, Alertify) { /* This file exposes functionality which is specific to Cryptpad, but not to any particular pad type. This includes functions for committing metadata about pads to your local storage for future use and improved usability. @@ -253,8 +254,8 @@ define([ Alertify .defaultValue(def || '') - .okBtn(opt.ok || 'OK') - .cancelBtn(opt.cancel || 'Cancel') + .okBtn(opt.ok || Messages.okButton || 'OK') + .cancelBtn(opt.cancel || Messages.cancelButton || 'Cancel') .prompt(msg, function (val, ev) { cb(val, ev); stopListening(keyHandler); @@ -274,8 +275,8 @@ define([ }); Alertify - .okBtn(opt.ok || 'OK') - .cancelBtn(opt.cancel || 'Cancel') + .okBtn(opt.ok || Messages.okButton || 'OK') + .cancelBtn(opt.cancel || Messages.cancelButton || 'Cancel') .confirm(msg, function () { cb(true); stopListening(keyHandler);