Commit fbb2c3e7 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Factor out dialogue messages

parent d9ee1353
......@@ -288,7 +288,7 @@ window.setInterval(function() {
if (windows.dialogue === null) {
windows['dialogue'] = gui.Window.open(
'dialogue.html', {
toolbar: false, focus: true, width: 550, height: 220});
toolbar: false, focus: true, width: 420, height: 220});
windows['dialogue'].on('closed', function() {
var d = get_dialogue();
if (d.response) post_force(socket);
......
......@@ -33,7 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
token_error: 'Failed to authenticate',
token_cloudless: 'No cloud to try this token against',
container_empty: 'Provide the name of the remote container',
dir_not_chosen: 'Select the local directory'
dir_not_chosen: 'Select the local directory',
confirm_exit_with_errors: 'There are some errors, are you sure?'
}
var settings = {};
......@@ -227,7 +228,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
token_error: SETTINGS["AUTHENTICATION FAILED"] || 'Failed to authenticate',
token_cloudless: SETTINGS["TOKEN WITHOUT CLOUD"] || 'No cloud to try this token against',
container_empty: SETTINGS["PROVIDE CONTAINER"] || 'Provide the name of the remote container',
dir_not_chosen: SETTINGS["SELECT DIRECTORY"] || 'Select the local directory'
dir_not_chosen: SETTINGS["SELECT DIRECTORY"] || 'Select the local directory',
confirm_exit_with_errors: SETTINGS["CONFIRM EXIT WITH ERRORS"] || 'There are some errors, are you sure?'
}
document.getElementById('title').innerHTML = SETTINGS.TITLE || "Settings";
document.getElementById('appearance_label').innerHTML = SETTINGS.GENERAL || "General";
......@@ -377,13 +379,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</fieldset>
<div class="clearfix">
<a id="sync_button" class="button right"
onclick="if(check_fields() || confirm(
'There are some concerns about your settings.\n'
+ 'To fix the errors: Cancel\n'
+ 'To save anyway: OK')) {
onclick="
if(check_fields() || confirm(errors.confirm_exit_with_errors)) {
export_settings(settings);
window.close();
}">Save</a>
}
">Save</a>
</div>
</form>
</div>
......
......@@ -80,6 +80,7 @@
"TOKEN WITHOUT CLOUD": "Δεν έχετε δώσει διεύθυνση νέφους",
"PROVIDE CONTAINER": "Απαιτείται όνομα περιέκτη (container) του Pithos+",
"SELECT DIRECTORY": "Επιλέξτε ένα τοπικό φάκελο",
"CONFIRM EXIT WITH ERRORS": "Οι ρυθμίσεις σας ίσως να είναι προβληματικές.\nΓια να τις διορθώσετε: Cancel\nΓια να τις διατηρήσετε και να συνεχίσετε: OK",
"EXPLAIN CLOUD": "Για να ρυθμίσετε την πρόσβαση, επισκευθείτε τη σελίδα του νέφους και μετά την είσοδο επιλέξτε <u>API access</u>. Αντιγράψτε τη Διεύθυνση εξουσιοδότησης (Authentication URL) και το κλειδί (token) παρακάτω.",
"EXPLAIN SYNC": "Τα περιεχόμενα του απομακρυσμένου περιέκτη σας (container) και του τοπικού σας φακέλου διατηρούνται συγχρονισμένα, δηλαδή κάθε αλλαγή που κάνετε στη μία πλευρά αντιγράφεται και στην άλλη. Εάν τυχόν αλλάξετε ένα αρχείο και στις δύο πλευρές ταυτόχρονα, η Agkyra θα εφαρμόσει τη μία εκδοχή και θα αντιγράψει την άλλη σε ξεχωριστό αρχείο."
}
......
......@@ -80,6 +80,7 @@
"TOKEN WITHOUT CLOUD": "The cloud URL is missing",
"PROVIDE CONTAINER": "Needs a Pithos+ container name",
"SELECT DIRECTORY": "Select the local directory",
"CONFIRM EXIT WITH ERRORS": "There are some concerns about your settings.\nTo fix the errors: Cancel\nTo keep them and continue: OK",
"EXPLAIN CLOUD": "To get your cloud credentials, browse to your cloud website, log in and click on <u>API access</u>. Copy the Authentication URL and Token below.",
"EXPLAIN SYNC": "The contents of your remote container and your local directory are kept synchronized, which means any changes you make in one side are copied to the other. If you happen to change a file in both sides at the same time, Agkyra will apply one version and copy the other into a separate conflict file."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment