diff --git a/doc/translations.xls b/doc/translations.xls index 5ac8e719..1711ceab 100644 Binary files a/doc/translations.xls and b/doc/translations.xls differ diff --git a/release-notes.txt b/release-notes.txt index f2d30e42..082b6d1c 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -1,9 +1,8 @@ -VERSION 0.7 +VERSION 1.0 =========== -This is the Beta version of Easy!Appointments. It has many improvements -and bug fixes from the Alpha version and will be the first major release -candidate. If you have any suggestions or problems please visit the -links below. +The first major release will include translated interface (English, +Greek, German) and the user will also be able to select a specific +calendar for synchronization. Official Easy!Appointments Website: diff --git a/src/application/language/english/backend_lang.php b/src/application/language/english/backend_lang.php index 3d0dadb8..2f7f2d18 100644 --- a/src/application/language/english/backend_lang.php +++ b/src/application/language/english/backend_lang.php @@ -182,4 +182,9 @@ $lang['be_filter'] = 'Filter'; $lang['be_clear'] = 'Clear'; $lang['be_uncategorized'] = 'Uncategorized'; $lang['be_username_already_exists'] = 'Username already exists.'; -$lang['be_password_length_notice'] = 'Password must be at least $number characters long.'; \ No newline at end of file +$lang['be_password_length_notice'] = 'Password must be at least $number characters long.'; +$lang['be_general_settings'] = 'General Settings'; +$lang['be_personal_information'] = 'Personal Information'; +$lang['be_system_login'] = 'System Login'; +$lang['be_user_settings_are_invalid'] = 'User settings are invalid! Please review your settings and try again.'; +$lang['be_add_break'] = 'Add Break'; diff --git a/src/application/language/german/backend_lang.php b/src/application/language/german/backend_lang.php index 7952e89a..4e489020 100644 --- a/src/application/language/german/backend_lang.php +++ b/src/application/language/german/backend_lang.php @@ -182,4 +182,9 @@ $lang['be_filter'] = 'Filtern'; $lang['be_clear'] = 'Deaktivieren'; $lang['be_uncategorized'] = 'Nicht Zugeordnet'; $lang['be_username_already_exists'] = 'Benutzername ist bereits vorhanden.'; -$lang['be_password_length_notice'] = 'Das Passwort muss mindestens $number Zeichen lang sein.'; \ No newline at end of file +$lang['be_password_length_notice'] = 'Das Passwort muss mindestens $number Zeichen lang sein.'; +$lang['be_general_settings'] = 'Allgemeine Einstellungen'; +$lang['be_personal_information'] = 'Persönliche Informationen'; +$lang['be_system_login'] = 'System Login'; +$lang['be_user_settings_are_invalid'] = 'Benutzereinstellungen sind ungültig! Bitte überprüfen Sie Ihre Einstellungen und wiederholen Sie den Vorgang.'; +$lang['be_add_break'] = 'Interval Hinzufügen'; \ No newline at end of file diff --git a/src/application/language/greek/backend_lang.php b/src/application/language/greek/backend_lang.php index 74663efe..3377d4a1 100644 --- a/src/application/language/greek/backend_lang.php +++ b/src/application/language/greek/backend_lang.php @@ -182,4 +182,11 @@ $lang['be_filter'] = 'Φιλτράρισμα'; $lang['be_clear'] = 'Καθαρισμός'; $lang['be_uncategorized'] = 'Χωρίς Κατηγορία'; $lang['be_username_already_exists'] = 'Το όνομα χρήστη υπάρχει ήδη.'; -$lang['be_password_length_notice'] = 'Ο κωδικός θα πρέπει να είναι τουλάχιστον $number χαρακτήρες.'; \ No newline at end of file +$lang['be_password_length_notice'] = 'Ο κωδικός θα πρέπει να είναι τουλάχιστον $number χαρακτήρες.'; +$lang['be_general_settings'] = 'Γενικές Ρυθμίσεις'; +$lang['be_personal_information'] = 'Προσωπικές Πληροφορίες'; +$lang['be_system_login'] = 'Σύνδεση Στο Σύστημα'; +$lang['be_user_settings_are_invalid'] = 'Οι ρυθμίσεις του χρήστη δεν είναι έγκυρες. Παρακαλώ ελέγξτε τις ρυθμίσεις και προσπαθήστε ξανά.'; +$lang['be_add_break'] = 'Προσθήκη Διαλείμματος'; +$lang['be_edit_break'] = 'Επεξεργασία Διαλείμματος'; +$lang['be_delete_break'] = 'Διαγραφή Διαλείμματος'; \ No newline at end of file diff --git a/src/application/views/backend/settings.php b/src/application/views/backend/settings.php index 9a0214f5..37748794 100644 --- a/src/application/views/backend/settings.php +++ b/src/application/views/backend/settings.php @@ -23,6 +23,8 @@ } }; + var EALang = lang->language); ?>; + $(document).ready(function() { BackendSettings.initialize(true); }); @@ -31,18 +33,18 @@
- General Settings + lang->line('be_general_settings'); ?> - +
- + - Company name will be displayed everywhere on the system - (required). + + lang->line('be_company_name_hint'); ?> +
- + - This will be the company email address. It will be used - as the sender and the reply address of the system emails (required). + + lang->line('be_company_email_hint'); ?> +
- + - Company link should point to the official website of - the company (optional). + + lang->line('be_company_link_hint'); ?> +
- Go To Booking Page + lang->line('be_go_to_booking_page'); ?>
@@ -106,65 +113,62 @@
- Business Logic + lang->line('be_business_logic'); ?> - +
-

Working Plan

+

lang->line('be_working_plan'); ?>

- Mark below the days and hours that your company will accept appointments. - You will be able to adjust appointments in non working hours but the customers - will not be able to book appointments by themselves in non working periods. - This working plan will be the default for every new provider record but - you will be able to change each provider's plan separately by editing his - record. After that you can add break periods. + lang->line('be_edit_working_plan_hint'); ?> - - - + + + - + - + - + - + - + - + - + @@ -173,28 +177,26 @@
-

Book Advance Timeout

+

lang->line('be_book_advance_timeout'); ?>

- Define the timeout (in minutes) before the customers can book or re-arrange - appointments with the company. + lang->line('be_book_advance_timeout_hint'); ?> - +
-

Breaks

+

lang->line('be_breaks'); ?>

- Add the working breaks during each day. These breaks will be applied for - all new providers. + lang->line('be_edit_breaks_hint'); ?>
@@ -203,10 +205,10 @@
DayStartEndlang->line('be_day'); ?>lang->line('fe_start'); ?>lang->line('fe_end'); ?>
- - - - + + + + @@ -230,62 +232,64 @@
- Personal Info + lang->line('be_personal_information'); ?> - + - + - + - + - + - + - + - + - + - + - +
- Miscellaneous + lang->line('be_system_login'); ?> - + - + - +
@@ -301,16 +305,13 @@

Easy!Appointments

- Easy!Appointments is a highly customizable web application that allows - your customers to book appointments with you via the web. Moreover, it - provides the ability to sync your data with Google Calendar so you can - use them with other services. + lang->line('be_about_ea_info'); ?>


- Current Version + lang->line('be_current_version'); ?> config->item('ea_version') . ' ' . $this->config->item('ea_release_title'); @@ -319,30 +320,32 @@
-

Support

+

lang->line('be_support'); ?>

- If you encounter any problems when using Easy!Appointments you can search the - official Google Group for answers. You might also need to create a new issue - on the Google Code page in order to help the development progress. + lang->line('be_about_ea_support'); ?>

- Official Website + + lang->line('be_official_website'); ?> + | - Google+ Community + lang->line('be_google_plus_community'); ?> + | - Support Group + lang->line('be_support_group'); ?> + | - Project Issues + + lang->line('be_project_issues'); ?> +


-

License

+

lang->line('be_license'); ?>

- Easy!Appointments is licensed under the GPLv3 license. By using - the code of Easy!Appointments in any way
you are agreeing to the - terms described in the following url: + lang->line('be_about_ea_license'); ?> http://www.gnu.org/copyleft/gpl.html

diff --git a/src/application/views/backend/users.php b/src/application/views/backend/users.php index 382f93b4..8b52f129 100644 --- a/src/application/views/backend/users.php +++ b/src/application/views/backend/users.php @@ -360,8 +360,7 @@
@@ -376,8 +375,7 @@
- - +
DayStartEndActionslang->line('be_day'); ?>lang->line('fe_start'); ?>lang->line('fe_end'); ?>lang->line('be_actions'); ?>
lang->line('be_actions');?>
diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index ae0c227d..d53b6b29 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -984,7 +984,7 @@ var BackendCalendar = { if (calendarDateStart < workDateStart) { unavailablePeriod = { - 'title': EALang['be_now_working'], + 'title': EALang['be_not_working'], 'start': calendarDateStart, 'end': workDateStart, 'allDay': false, diff --git a/src/assets/js/backend_settings.js b/src/assets/js/backend_settings.js index 69097b4b..a11f1e36 100644 --- a/src/assets/js/backend_settings.js +++ b/src/assets/js/backend_settings.js @@ -181,7 +181,7 @@ var BackendSettings = { if (!GeneralFunctions.handleAjaxExceptions(response)) return; if (response == false) { $input.css('border', '2px solid red'); - Backend.displayNotification('Username already exists.'); + Backend.displayNotification(EALang['be_username_already_exists']); $input.attr('already-exists', 'true'); } else { $input.css('border', ''); @@ -218,7 +218,7 @@ SystemSettings.prototype.save = function(settings) { if (!GeneralFunctions.handleAjaxExceptions(response)) return; - Backend.displayNotification('Settings saved successfully!'); + Backend.displayNotification(EALang['be_settings_saved']); // Update the logo title on the header. $('#header-logo span').text($('#company-name').val()); @@ -282,13 +282,13 @@ SystemSettings.prototype.validate = function() { } }); if (missingRequired) { - throw 'Fields with * are required.'; + throw EALang['fe_fields_are_required']; } // Validate company email address. if (!GeneralFunctions.validateEmail($('#company-email').val())) { $('#company-email').css('border', '2px solid red'); - throw 'Invalid email address!'; + throw EALang['be_invalid_email']; } return true; @@ -342,8 +342,7 @@ UserSettings.prototype.get = function() { */ UserSettings.prototype.save = function(settings) { if (!BackendSettings.settings.validate(settings)) { - Backend.displayNotification('User settings are invalid! Please review your settings ' - + 'and try again.'); + Backend.displayNotification(EALang['be_user_settings_are_invalid']); return; // Validation failed, do not procceed. } @@ -359,7 +358,7 @@ UserSettings.prototype.save = function(settings) { ////////////////////////////////////////////////////////// if (!GeneralFunctions.handleAjaxExceptions(response)) return; - Backend.displayNotification('Settings saved successfully!'); + Backend.displayNotification(EALang['be_settings_saved']); // Update footer greetings. $('#footer-user-display-name').text('Hello, ' + $('#first-name').val() + ' ' + $('#last-name').val() + '!'); @@ -387,24 +386,24 @@ UserSettings.prototype.validate = function() { } }); if (missingRequired) { - throw 'Fields with * are required.'; + throw EALang['fe_fields_are_required']; } // Validate passwords (if provided). if ($('#password').val() != $('#retype-password').val()) { $('#password, #retype-password').css('border', '2px solid red'); - throw 'Passwords mismatch!'; + throw EALang['be_passwords_mismatch']; } // Validate user email. if (!GeneralFunctions.validateEmail($('#email').val())) { $('#email').css('border', '2px solid red'); - throw 'Invalid email address!'; + throw EALang['be_invalid_email']; } if ($('#username').attr('already-exists') === 'true') { $('#username').css('border', '2px solid red'); - throw 'Username already exists.'; + throw EALang['be_username_already_exists']; } return true; diff --git a/src/assets/js/working_plan.js b/src/assets/js/working_plan.js index f5617264..3c53af68 100644 --- a/src/assets/js/working_plan.js +++ b/src/assets/js/working_plan.js @@ -36,22 +36,24 @@ WorkingPlan.prototype.setup = function(workingPlan) { // Add the day's breaks on the breaks table. $.each(workingDay.breaks, function(i, brk) { + var day = WorkingPlan.prototype.convertValueToDay(index); + var tr = '' + - '' + GeneralFunctions.ucaseFirstLetter(index) + '' + + '' + GeneralFunctions.ucaseFirstLetter(day) + '' + '' + brk.start + '' + '' + brk.end + '' + '' + - '' + - '' + - '' + - '' + '' + @@ -77,13 +79,13 @@ WorkingPlan.prototype.setup = function(workingPlan) { */ WorkingPlan.prototype.editableBreakDay = function($selector) { var weekDays = {}; - weekDays[EALang['be_monday']] = 'Monday'; - weekDays[EALang['be_tuesday']] = 'Tuesday'; - weekDays[EALang['be_wednesday']] = 'Wednesday'; - weekDays[EALang['be_thursday']] = 'Thursday'; - weekDays[EALang['be_friday']] = 'Friday'; - weekDays[EALang['be_saturday']] = 'Saturday'; - weekDays[EALang['be_sunday']] = 'Sunday'; + weekDays[EALang['be_monday']] = EALang['be_monday']; //'Monday'; + weekDays[EALang['be_tuesday']] = EALang['be_tuesday']; //'Tuesday'; + weekDays[EALang['be_wednesday']] = EALang['be_wednesday']; //'Wednesday'; + weekDays[EALang['be_thursday']] = EALang['be_thursday']; //'Thursday'; + weekDays[EALang['be_friday']] = EALang['be_friday']; //'Friday'; + weekDays[EALang['be_saturday']] = EALang['be_saturday']; //'Saturday'; + weekDays[EALang['be_sunday']] = EALang['be_sunday']; //'Sunday'; $selector.editable(function(value, settings) { return value; @@ -161,20 +163,20 @@ WorkingPlan.prototype.bindEventHandlers = function() { $('.add-break').click(function() { var tr = '' + - 'Monday' + + '' + EALang['be_monday'] + '' + '09:00' + '10:00' + '' + - '' + - '' + - '' + - '' + '' + @@ -186,6 +188,7 @@ WorkingPlan.prototype.bindEventHandlers = function() { WorkingPlan.prototype.editableBreakDay($(tr).find('.break-day')); WorkingPlan.prototype.editableBreakTime($(tr).find('.break-start, .break-end')); $(tr).find('.edit-break').trigger('click'); + $('.add-break').prop('disabled', true); }); /** @@ -208,7 +211,8 @@ WorkingPlan.prototype.bindEventHandlers = function() { // Show save - cancel buttons. $(this).closest('table').find('.edit-break, .delete-break').addClass('hidden'); $(this).parent().find('.save-break, .cancel-break').removeClass('hidden'); - + + $('.add-break').prop('disabled', true); }); /** @@ -232,6 +236,7 @@ WorkingPlan.prototype.bindEventHandlers = function() { $(this).closest('table').find('.edit-break, .delete-break').removeClass('hidden'); $(this).parent().find('.save-break, .cancel-break').addClass('hidden'); + $('.add-break').prop('disabled', false); }); /** @@ -251,8 +256,9 @@ WorkingPlan.prototype.bindEventHandlers = function() { $(this).parent().parent().find('.editable .submit-editable').trigger('click'); WorkingPlan.prototype.enableSubmit = false; - $(this).closest('table').find('.edit-break, .delete-break').removeClass('hidden'); $(this).parent().find('.save-break, .cancel-break').addClass('hidden'); + $(this).closest('table').find('.edit-break, .delete-break').removeClass('hidden'); + $('.add-break').prop('disabled', false); }); }; @@ -266,13 +272,14 @@ WorkingPlan.prototype.get = function() { $('.working-plan input[type="checkbox"').each(function() { var id = $(this).attr('id'); if ($(this).prop('checked') == true) { - workingPlan[id] = {} + workingPlan[id] = {}; workingPlan[id].start = $('#' + id + '-start').val(); workingPlan[id].end = $('#' + id + '-end').val(); workingPlan[id].breaks = []; $('.breaks tr').each(function(index, tr) { - var day = $(tr).find('.break-day').text().toLowerCase(); + var day = WorkingPlan.prototype.convertDayToValue( + $(tr).find('.break-day').text()); if (day == id) { var start = $(tr).find('.break-start').text(); var end = $(tr).find('.break-end').text(); @@ -281,7 +288,6 @@ WorkingPlan.prototype.get = function() { 'start': start, 'end': end }); - } }); @@ -327,4 +333,66 @@ WorkingPlan.prototype.timepickers = function(disabled) { */ WorkingPlan.prototype.reset = function() { +}; + +/** + * This is necessary for translated days. + * + * @param {string} value Day value could be like "monday", "tuesday" etc. + */ +WorkingPlan.prototype.convertValueToDay = function(value) { + switch (value) { + case 'monday': + return EALang['be_monday']; + break; + case 'tuesday': + return EALang['be_tuesday']; + break; + case 'wednesday': + return EALang['be_wednesday']; + break; + case 'thursday': + return EALang['be_thursday']; + break; + case 'friday': + return EALang['be_friday']; + break; + case 'saturday': + return EALang['be_saturday']; + break; + case 'sunday': + return EALang['be_sunday']; + break; + } +}; + +/** + * This is necessary for translated days. + * + * @param {string} value Day value could be like "Monday", "Tuesday" etc. + */ +WorkingPlan.prototype.convertDayToValue = function(day) { + switch (day) { + case EALang['be_monday']: + return 'monday'; + break; + case EALang['be_tuesday']: + return 'tuesday'; + break; + case EALang['be_wednesday']: + return 'wednesday'; + break; + case EALang['be_thursday']: + return 'thursday'; + break; + case EALang['be_friday']: + return 'friday'; + break; + case EALang['be_saturday']: + return 'saturday'; + break; + case EALang['be_sunday']: + return 'sunday'; + break; + } }; \ No newline at end of file