Skip to content

Commit

Permalink
reencrypt -> re-encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
tessus committed Mar 14, 2020
1 parent e399474 commit 1ee8861
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions ElectronClient/gui/EncryptionConfigScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ class EncryptionConfigScreenComponent extends React.Component {
if (!shim.isElectron()) return null;

const theme = themeStyle(this.props.theme);
const buttonLabel = _('Reencrypt data');
const buttonLabel = _('Re-encrypt data');

const intro = this.props.shouldReencrypt ? _('The default encryption method has been changed to a more secure one and it is recommended that you apply it to your data.') : _('You may use the tool below to reencrypt your data, for example if you know that some of your notes are encrypted with an obsolete encryption method.');
const intro = this.props.shouldReencrypt ? _('The default encryption method has been changed to a more secure one and it is recommended that you apply it to your data.') : _('You may use the tool below to re-encrypt your data, for example if you know that some of your notes are encrypted with an obsolete encryption method.');

let t = `${intro}\n\n${_('In order to do so, your entire data set will have to encrypted and synchronised, so it is best to run it overnight.\n\nTo start, please follow these instructions:\n\n1. Synchronise all your devices.\n2. Click "%s".\n3. Let it run to completion. While it runs, avoid changing any note on your other devices, to avoid conflicts.\n4. Once sync is done on this device, sync all your other devices and let it run to completion.\n\nImportant: you only need to run this ONCE on one device.', buttonLabel)}`;

Expand All @@ -127,7 +127,7 @@ class EncryptionConfigScreenComponent extends React.Component {

return (
<div>
<h1 style={theme.h1Style}>{_('Reencryption')}</h1>
<h1 style={theme.h1Style}>{_('Re-encryption')}</h1>
<p style={theme.textStyle} dangerouslySetInnerHTML={{ __html: t }}></p>
<span style={{ marginRight: 10 }}>
<button onClick={() => shared.reencryptData()} style={theme.buttonStyle}>{buttonLabel}</button>
Expand Down
2 changes: 1 addition & 1 deletion ElectronClient/gui/MainScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ class MainScreenComponent extends React.Component {
} else if (this.props.showShouldReencryptMessage) {
msg = (
<span>
{_('The default encryption method has been changed, you should reencrypt your data.')}{' '}
{_('The default encryption method has been changed, you should re-encrypt your data.')}{' '}
<a href="#" onClick={() => onViewEncryptionConfigScreen()}>
{_('More info')}
</a>
Expand Down
4 changes: 2 additions & 2 deletions ReactNativeClient/lib/BaseApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ class BaseApplication {
}

if (Setting.value('encryption.shouldReencrypt') < 0) {
// We suggest reencryption if the user has at least one notebook
// and if encryptino is enabled. This code runs only when shouldReencrypt = -1
// We suggest re-encryption if the user has at least one notebook
// and if encryption is enabled. This code runs only when shouldReencrypt = -1
// which can be set by a maintenance script for example.
const folderCount = await Folder.count();
const itShould = Setting.value('encryption.enabled') && !!folderCount ? Setting.SHOULD_REENCRYPT_YES : Setting.SHOULD_REENCRYPT_NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ shared.refreshStats = async function(comp) {
};

shared.reencryptData = async function() {
const ok = confirm(_('Please confirm that you would like to reencrypt your complete database.'));
const ok = confirm(_('Please confirm that you would like to re-encrypt your complete database.'));
if (!ok) return;

await BaseItem.forceSyncAll();
reg.waitForSyncFinishedThenSync();
Setting.setValue('encryption.shouldReencrypt', Setting.SHOULD_REENCRYPT_NO);
alert(_('Your data is going to be reencrypted and synced again.'));
alert(_('Your data is going to be re-encrypted and synced again.'));
};

shared.dontReencryptData = function() {
Expand Down
6 changes: 3 additions & 3 deletions ReactNativeClient/lib/models/Setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,9 +1058,9 @@ Setting.DATE_FORMAT_7 = 'YYYY.MM.DD';
Setting.TIME_FORMAT_1 = 'HH:mm';
Setting.TIME_FORMAT_2 = 'h:mm A';

Setting.SHOULD_REENCRYPT_NO = 0; // Data doesn't need to be reencrypted
Setting.SHOULD_REENCRYPT_YES = 1; // Data should be reencrypted
Setting.SHOULD_REENCRYPT_NOTIFIED = 2; // Data should be reencrypted, and user has been notified
Setting.SHOULD_REENCRYPT_NO = 0; // Data doesn't need to be re-encrypted
Setting.SHOULD_REENCRYPT_YES = 1; // Data should be re-encrypted
Setting.SHOULD_REENCRYPT_NOTIFIED = 2; // Data should be re-encrypted, and user has been notified

Setting.custom_css_files = {
JOPLIN_APP: 'userchrome.css',
Expand Down

0 comments on commit 1ee8861

Please sign in to comment.