From 0c4c39fddb99ed18d4d0990d15004417cf6058f5 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 1 Feb 2016 14:53:53 +1000 Subject: [PATCH 01/25] Add morphic relations to backend --- modules/backend/behaviors/RelationController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index e9431dbe7..29e80d8ff 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1102,7 +1102,7 @@ class RelationController extends ControllerBehavior if ($this->relationType == 'belongsToMany') { $this->relationObject->detach($checkedIds); } - elseif ($this->relationType == 'hasMany') { + elseif ($this->relationType == 'hasMany' || $this->relationType == 'morphMany') { $relatedModel = $this->relationObject->getRelated(); foreach ($checkedIds as $relationId) { if ($obj = $relatedModel->find($relationId)) { @@ -1121,7 +1121,7 @@ class RelationController extends ControllerBehavior $this->relationObject->dissociate(); $this->relationObject->getParent()->save(); } - elseif ($this->relationType == 'hasOne') { + elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') { if ($obj = $this->relationModel->find($recordId)) { $this->relationObject->remove($obj); } @@ -1295,10 +1295,12 @@ class RelationController extends ControllerBehavior switch ($this->relationType) { case 'hasMany': + case 'morphMany': case 'belongsToMany': return ['create', 'add', 'delete', 'remove']; case 'hasOne': + case 'morphOne': case 'belongsTo': return ['create', 'update', 'link', 'delete', 'unlink']; } @@ -1316,10 +1318,12 @@ class RelationController extends ControllerBehavior switch ($this->relationType) { case 'hasMany': + case 'morphMany': case 'belongsToMany': return 'multi'; case 'hasOne': + case 'morphOne': case 'belongsTo': return 'single'; } @@ -1358,7 +1362,9 @@ class RelationController extends ControllerBehavior else return 'list'; case 'hasOne': + case 'morphOne': case 'hasMany': + case 'morphMany': if ($this->eventTarget == 'button-add') return 'list'; else return 'form'; } From 8388998b64f9c6e03cd4b972c7993f8f2f4d815d Mon Sep 17 00:00:00 2001 From: Cladis Date: Tue, 14 Jun 2016 23:42:35 +0300 Subject: [PATCH 02/25] Adding Ukrainian translation --- modules/backend/lang/uk/lang.php | 373 +++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 modules/backend/lang/uk/lang.php diff --git a/modules/backend/lang/uk/lang.php b/modules/backend/lang/uk/lang.php new file mode 100644 index 000000000..055865e52 --- /dev/null +++ b/modules/backend/lang/uk/lang.php @@ -0,0 +1,373 @@ + [ + 'title' => 'Зона адміністрування' + ], + 'field' => [ + 'invalid_type' => 'Використано неправиоьний тип поля :type.', + 'options_method_not_exists' => "Клас моделі :model повинен визначати метод :method(), що повертає опції для ':field' з поля." + ], + 'widget' => [ + 'not_registered' => "Назву класу віджету «:name»не зареєстровано", + 'not_bound' => "Назву класу віджету «:name» не прив'зано до контролера" + ], + 'page' => [ + 'untitled' => 'Без назви', + 'access_denied' => [ + 'label' => 'Заборонено доступ', + 'help' => "У Вас немає необхідних для перегляду цієї сторінки прав.", + 'cms_link' => 'Повернутися до back-end-у' + ], + 'invalid_token' => [ + 'label' => 'Неправильний токен безпеки' + ] + ], + 'partial' => [ + 'not_found_name' => "Частину «:name» не знайдено." + ], + 'account' => [ + 'sign_out' => 'Вийти', + 'login' => 'Увійти', + 'reset' => 'Скинути', + 'restore' => 'Відновити', + 'login_placeholder' => "ім'я користувача", + 'password_placeholder' => 'пароль', + 'forgot_password' => 'Забули свій пароль?', + 'enter_email' => 'Введіть свою електронну адресу', + 'enter_login' => "Введіть своє ім'я користувача", + 'email_placeholder' => 'електронна адреса', + 'enter_new_password' => 'Введіть новий пароль', + 'password_reset' => 'Скинути пароль', + 'restore_success' => 'На Вашу електронну адресу було надіслано інструкції з відновлення паролю.', + 'restore_error' => "Неможливо знайти користувача з іменем користувача «:login»", + 'reset_success' => 'Ваш пароль було успішно змінено. Тепер Ви можете ввійти.', + 'reset_error' => 'Надано неправильні дані з відновлення паролю. Будь ласка, спробуйте знову!', + 'reset_fail' => 'Не вдалося змінити Ваш пароль!', + 'apply' => 'Застосувати', + 'cancel' => 'Скасувати', + 'delete' => 'Вилучити', + 'ok' => 'ОК' + ], + 'dashboard' => [ + 'menu_label' => 'Панель', + 'widget_label' => 'Віджет', + 'widget_width' => 'Ширина', + 'full_width' => 'повна ширина', + 'add_widget' => 'Додати віджет', + 'widget_inspector_title' => 'Налаштування віджету', + 'widget_inspector_description' => 'Налаштування віджету-звіту', + 'widget_columns_label' => 'Ширина :columns', + 'widget_columns_description' => 'Ширина віджету, число між 1 та 10.', + 'widget_columns_error' => 'Будь ласка, уведіть ширину віджету як число між 1 та 10.', + 'columns' => '{1} колонка|[2,4] колонки|[5,Inf] колонок', + 'widget_new_row_label' => 'Створити новий рядок', + 'widget_new_row_description' => 'Помістити віджет у новий рядок.', + 'widget_title_label' => 'Назва віджету', + 'widget_title_error' => 'Назва віджету є обов'язковою.', + 'status' => [ + 'widget_title_default' => 'Статус системи', + 'online' => 'онлайн', + 'maintenance' => 'у технічному обслугованні', + 'update_available' => 'Доступно {0} оновлень!|Доступно {1} оновлення!|Доступно [2,4] оновленя|Доступно [5,Inf] оновлень!' + ] + ], + 'user' => [ + 'name' => 'Адміністратор', + 'menu_label' => 'Адміністратори', + 'menu_description' => 'Керування адміністративними користувачами, групами та дозволами back-end-у.', + 'list_title' => 'Керування адміністраторами', + 'new' => 'Новий адміністратор', + 'login' => "Ім'я користувача", + 'first_name' => "Ім'я", + 'last_name' => 'Прізвище', + 'full_name' => "Повне ім'я", + 'email' => 'Електронна пошта', + 'groups' => 'Групи', + 'groups_comment' => 'Вкажіть до яких груп повинен належати цей обліковий запис.', + 'avatar' => 'Аватар', + 'password' => 'Пароль', + 'password_confirmation' => 'Підтвердження паролю', + 'permissions' => 'Дозволи', + 'account' => 'Обліковий запис', + 'superuser' => 'Супер-користувач', + 'superuser_comment' => 'Надає цьому обліковому запису необмежений доступ до всіх зон.', + 'send_invite' => 'Надіслати запрошення за електронною адресою', + 'send_invite_comment' => "Надсилає вітальне повідомлення, що містить інформацію про ім'я користувача та пароль.", + 'delete_confirm' => 'Ви дійсно хочете вилучити цього адміністратора?', + 'return' => 'Повернутися до списку адміністраторів', + 'allow' => 'Дозволити', + 'inherit' => 'Успадкувати', + 'deny' => 'Заборонити', + 'group' => [ + 'name' => 'Група', + 'name_field' => 'Назва', + 'description_field' => 'Опис', + 'is_new_user_default_field' => 'Додавати нових адміністраторів до цієї групи за замовчуванням.', + 'code_field' => 'Код', + 'code_comment' => 'Введіть унікальний код якщо Ви хочете отримувати до неї доступ через API.', + 'menu_label' => 'Групи', + 'list_title' => 'Керування групами', + 'new' => 'Нова група', + 'delete_confirm' => 'Ви дійсно хочете вилучити цю групу адміністраторів?', + 'return' => 'Повернутись до списку груп', + 'users_count' => 'Користувачі' + ], + 'preferences' => [ + 'not_authenticated' => 'Немає автентифікованих користувачів, чиї налаштування можна завантажити або зберегти.' + ] + ], + 'list' => [ + 'default_title' => 'Список', + 'search_prompt' => 'Пошук…', + 'no_records' => 'У цьому вигляді немає записів.', + 'missing_model' => 'Поведінка списку, що використовується в :class не містить визначення моделі.', + 'missing_column' => 'Немає визначень колонок для :columns.', + 'missing_columns' => 'Список використаний в :class не містить визначених колонок.', + 'missing_definition' => "Поведінка списку не містить колонки для «:field».", + 'behavior_not_ready' => 'Поведінку списку не було ініціалізовано, перевірте чи Ви викликали makeLists() у своєму контролері.', + 'invalid_column_datetime' => "Значення колонки «:column» не є DateTime-об'єктом, Ви не пропускаєте посилання на \$dates посилання в моделі?", + 'pagination' => 'Показано записів: :from-:to з :total', + 'prev_page' => 'Попередня сторінка', + 'next_page' => 'Наступна сторінка', + 'refresh' => 'Оновити', + 'updating' => 'Оновлення…', + 'loading' => 'Завантаження…', + 'setup_title' => 'Створення списку', + 'setup_help' => 'Використовуйте позначки для вибору колонок, які Ви хочете бачити в списку. Ви моєете змінювати позиції колонок перетягуючи їх вниз-вгору.', + 'records_per_page' => 'Записів на сторінку', + 'records_per_page_help' => 'Оберіть число записів на сторінку для показу. Будь ласка, зауважте, що велике число записів на одну сторінку може зменшити швидкодію.', + 'delete_selected' => 'Вилучити обрані', + 'delete_selected_empty' => 'Немає обраних до вилучення записів.', + 'delete_selected_confirm' => 'Вилучити обрані записи?', + 'delete_selected_success' => 'Успішно вилучено обрані записи.', + 'column_switch_true' => 'Так', + 'column_switch_false' => 'Ні' + ], + 'fileupload' => [ + 'attachment' => 'Прикріплення', + 'help' => 'Додайте назву та опис для цього прикріплення.', + 'title_label' => 'Назва', + 'description_label' => 'Опис', + 'default_prompt' => 'Натисніть %s або перетягніть файл сюди для завантаження', + 'attachment_url' => 'URL прикріплення', + 'upload_file' => 'Завантажити файл', + 'upload_error' => 'Помилка завантаження', + 'remove_confirm' => 'Ви впевнені?', + 'remove_file' => 'Вилучити файл' + ], + 'form' => [ + 'create_title' => 'Нова :name', + 'update_title' => 'Редагувати :name', + 'preview_title' => 'Попередній перегляд :name', + 'create_success' => ':name було успішно створено', + 'update_success' => ':name було успішно оновлено', + 'delete_success' => ':name було успішно вилучено', + 'missing_id' => 'Ідентифікатор запису форми не було вказано.', + 'missing_model' => 'Поведінка форми, що використовується в :class не містить визначення моделі.', + 'missing_definition' => "Поведніка форми не містить поля для «:field».", + 'not_found' => 'Запис форми з ідентифікатором :id не знайдено.', + 'action_confirm' => 'Ви впевнені?', + 'create' => 'Створити', + 'create_and_close' => 'Створити та закрити', + 'creating' => 'Створення…', + 'creating_name' => 'Створення :name…', + 'save' => 'Зберегти', + 'save_and_close' => 'Зберегти та закрити', + 'saving' => 'Збереження…', + 'saving_name' => 'Збереження :name…', + 'delete' => 'Вилучити', + 'deleting' => 'Вилучення…', + 'confirm_delete' => 'Ви дійсно хочете вилучити цей запис?', + 'confirm_delete_multiple' => 'Ви дійсно хочете вилучити обрані записи?', + 'deleting_name' => 'Вилучення :name…', + 'reset_default' => 'Скинути до значення за замовчуванням', + 'resetting' => 'Скидання', + 'resetting_name' => 'Скидання :name', + 'undefined_tab' => 'Різне', + 'field_off' => 'Викл', + 'field_on' => 'Вкл', + 'add' => 'Додати', + 'apply' => 'Застосувати', + 'cancel' => 'Скасувати', + 'close' => 'Закрити', + 'confirm' => 'Підтвердити', + 'reload' => 'Перезавантажити', + 'complete' => 'Готово', + 'ok' => 'ОК', + 'or' => 'або', + 'confirm_tab_close' => 'Ви дійсно хочете закрити цю вкладку? Незбережені зміни буде втрачено.', + 'behavior_not_ready' => 'Поведінку форми не було ініціалізовано, перевірте чи Ви викликали initForm() у своєму контролері.', + 'preview_no_files_message' => 'Немає завантажених файлів.', + 'preview_no_record_message' => 'Немає обраних записів.', + 'select' => 'Обрати', + 'select_all' => 'всі', + 'select_none' => 'жоден', + 'select_placeholder' => 'будь ласка, оберіть', + 'insert_row' => 'Вставити рядок', + 'insert_row_below' => 'Вставити рядок нижче', + 'delete_row' => 'Вилучити рядок', + 'concurrency_file_changed_title' => 'Файл було змінено', + 'concurrency_file_changed_description' => "Файл, що Ви редагуєте, було змінено на диску іншим користувачем. Ви можете або перезавантажити файл та втратити свої зміни, або перезаписати файл на диску.", + 'return_to_list' => 'Повернутися до списку' + ], + 'recordfinder' => [ + 'find_record' => 'Знайти запис' + ], + 'relation' => [ + 'missing_config' => "Поведінка відношення не містить жодного налаштування для «:config».", + 'missing_definition' => "Поведінка відношення не містить визначення для «:field».", + 'missing_model' => 'Поведінка відношення, що використовується в :class не містить визначення моделі.', + 'invalid_action_single' => 'Ця дія не може бути здійсненою щодо одного відношення.', + 'invalid_action_multi' => 'Ця дія не може бути здійснена щодо кількох відношень.', + 'help' => 'Натисніть по елементу щоб додати', + 'related_data' => 'Відносяться дані :name', + 'add' => 'Додати', + 'add_selected' => 'Додати обрані', + 'add_a_new' => 'Додати нове :name', + 'link_selected' => "Обрано зв'язок", + 'link_a_new' => "Прив'язати нове :name", + 'cancel' => 'Скасувати', + 'close' => 'Закрити', + 'add_name' => 'Додати :name', + 'create' => 'Створити', + 'create_name' => 'Створити :name', + 'update' => 'Оновити', + 'update_name' => 'Оновити :name', + 'preview' => 'Попередній перегляд', + 'preview_name' => 'Попередній перегляд :name', + 'remove' => 'Вилучити', + 'remove_name' => 'Вилучити :name', + 'delete' => 'Вилучити', + 'delete_name' => 'Вилучити :name', + 'delete_confirm' => 'Ви впевнені?', + 'link' => "Пов'язати", + 'link_name' => "Пов'язати :name", + 'unlink' => "Відв'язати", + 'unlink_name' => "Відв'язати :name", + 'unlink_confirm' => 'Ви впевнені?' + ], + 'reorder' => [ + 'default_title' => 'Перевпорядкувати записи', + 'no_records' => 'Немає доступних до сортування записів.', + ], + 'model' => [ + 'name' => 'Модель', + 'not_found' => "Модель «:class» з ідентифікатором :id не знайдено", + 'missing_id' => 'Не вказано ідентифікатор для пошуку запису моделі.', + 'missing_relation' => "Модель «:class» не містить визначення для «:relation».", + 'missing_method' => "Модель «:class» не містить метод «:method».", + 'invalid_class' => "Модель :model використана в :class не є правильною, вона повинна успадковувати клас \Model .", + 'mass_assignment_failed' => "Масове призначення не вдалось для атрибуту «:attribute» моделі." + ], + 'warnings' => [ + 'tips' => 'Підказки з налаштування системи', + 'tips_description' => 'Є речі, на які потрібно звернути увагу щоб правильно налаштувати систему.', + 'permissions' => 'Директорія :name та її субдиректорії не мають дозволу для запису для PHP. Будь ласка, встановіть відповідні дозволи для веб-серверу для цієї директорії.', + 'extension' => 'Розширення PHP :name не встановлено. Будь ласка, встановіть цю бібліотеку та активуйте розширення.' + ], + 'editor' => [ + 'menu_label' => 'Налаштування редактору коду', + 'menu_description' => 'Персоналізуйте свої налаштування редактору коду, такі як розмір шрифту та кольорова схема.', + 'font_size' => 'Розмір шрифту', + 'tab_size' => 'Розмір табуляції', + 'use_hard_tabs' => 'Відступ табуляціями', + 'code_folding' => 'Згортання коду', + 'word_wrap' => 'Перенос слів', + 'highlight_active_line' => 'Підсвічувати активні рядки', + 'auto_closing' => 'Автоматично закривати теги та спецсимволи', + 'show_invisibles' => 'Показувати невидимі символи', + 'show_gutter' => 'Показувати нумерацію рядків', + 'theme' => 'Кольорова схема' + ], + 'tooltips' => [ + 'preview_website' => 'Попередній перегляд веб-сайту' + ], + 'mysettings' => [ + 'menu_label' => 'Мої налаштування', + 'menu_description' => 'Налаштування, що стосуються Вашого адміністративного облікового запису' + ], + 'myaccount' => [ + 'menu_label' => 'Мій обліковий запис', + 'menu_description' => "Оновіть свої деталі облікового запису, такі як ім'я, електронна адреса та пароль.", + 'menu_keywords' => "безпека ім'я користувача" + ], + 'branding' => [ + 'menu_label' => 'Налаштування вигляду back-end-у', + 'menu_description' => "Налаштуйте адміністративну зону, зокрема ім'я, кольори та лого.", + 'brand' => 'Бренд', + 'logo' => 'Лого', + 'logo_description' => 'Завантажити власне лого для використання в back-end-і.', + 'app_name' => 'Назва додатку', + 'app_name_description' => 'Ця назва показується в заголовку back-end-у.', + 'app_tagline' => 'Девіз додатку', + 'app_tagline_description' => 'Ця назва покахується на екрані входу до back-end-у.', + 'colors' => 'Кольори', + 'primary_light' => 'Основний (світлий)', + 'primary_dark' => 'Основний (темний)', + 'secondary_light' => 'Вторинний (світлий)', + 'secondary_dark' => 'Вторинний (темний)', + 'styles' => 'Стилі', + 'custom_stylesheet' => 'Власна таблиця стилів' + ], + 'backend_preferences' => [ + 'menu_label' => 'Налаштування back-end-у', + 'menu_description' => 'Керуйте своїми налаштуваннями облікового запису, як то бажана мова.', + 'locale' => 'Мова', + 'locale_comment' => 'Оберіть свою бажану локаль мови для використання.' + ], + 'access_log' => [ + 'hint' => 'Цей журнал показує список успішних спроб входу адміністраторів. Записи зберігаються для :days днів.', + 'menu_label' => 'Журнал доступу', + 'menu_description' => 'Дивитись список успішних входів користувачів back-end-у.', + 'created_at' => 'Дата та час', + 'login' => "Ім'я користувача", + 'ip_address' => 'IP-адреса', + 'first_name' => "Ім'я", + 'last_name' => 'Прізвище', + 'email' => 'Електронна адреса' + ], + 'filter' => [ + 'all' => 'усі' + ], + 'import_export' => [ + 'upload_csv_file' => '1. Завантажити CSV-файл', + 'import_file' => 'Імпортувати файл', + 'first_row_contains_titles' => 'Перший рядок містить назви колонок', + 'first_row_contains_titles_desc' => 'Залиште це відміченим якщо перший рядок CSV використовується для назв колонок.', + 'match_columns' => '2. Віднести колонки файлу до полів бази даних', + 'file_columns' => 'Колонки файлу', + 'database_fields' => 'Поля бази даних', + 'set_import_options' => '3. Встановити опції імпорту', + 'export_output_format' => '1. Експортувати формат виводу', + 'file_format' => 'Формат файлу', + 'standard_format' => 'Стандартний формат', + 'custom_format' => 'Власний формат', + 'delimiter_char' => 'Розділювач', + 'enclosure_char' => 'Огортувач', + 'escape_char' => 'Символ екранування', + 'select_columns' => '2. Оберіть колонки до експорту', + 'column' => 'Колонка', + 'columns' => 'Колонки', + 'set_export_options' => '3. Встановіть опції експорту', + 'show_ignored_columns' => 'Показати ігноровані колонки', + 'auto_match_columns' => 'Автовіднесення колонок', + 'created' => 'Створено', + 'updated' => 'Оновлено', + 'skipped' => 'Пропущено', + 'warnings' => 'Попереджень', + 'errors' => 'Помилок', + 'skipped_rows' => 'Пропущені рядки', + 'import_progress' => 'Прогрес імпорту', + 'processing' => 'Обробка', + 'import_error' => 'Помилка імпорту', + 'upload_valid_csv' => 'Будь ласка, завантажте правильний CSV-файл.', + 'drop_column_here' => 'Перетягніть колонку сюди…', + 'ignore_this_column' => 'Ігнорувати цю колонку', + 'processing_successful_line1' => 'Процес експорту файлу було успішно завершено!', + 'processing_successful_line2' => 'Тепер браузер має автоматично перенаправити до завантаження файлу.', + 'export_progress' => 'Прогрес експорту', + 'export_error' => 'Помилка експорту', + 'column_preview' => 'Попередній перегляд колонки', + 'file_not_found_error' => 'Файл не знайдено', + 'empty_error' => 'Не вказано даних для експорту' + ], From 587b8a449d451f687729b25bcc02ee4d0f4520ca Mon Sep 17 00:00:00 2001 From: Roman Gerasimov Date: Fri, 17 Jun 2016 10:55:03 +0300 Subject: [PATCH 03/25] morphMany Relation support --- modules/backend/behaviors/RelationController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 37dc405b9..d466d2c94 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1313,7 +1313,8 @@ class RelationController extends ControllerBehavior case 'hasMany': case 'belongsToMany': return ['create', 'add', 'delete', 'remove']; - + case 'morphMany': + return ['create', 'delete']; case 'hasOne': case 'belongsTo': return ['create', 'update', 'link', 'delete', 'unlink']; @@ -1334,7 +1335,8 @@ class RelationController extends ControllerBehavior case 'hasMany': case 'belongsToMany': return 'multi'; - + case 'morphMany': + return 'multi'; case 'hasOne': case 'belongsTo': return 'single'; @@ -1408,7 +1410,10 @@ class RelationController extends ControllerBehavior case 'hasMany': if ($this->eventTarget == 'button-add') return 'list'; else return 'form'; + case 'morphMany': + return 'form'; } + } /** From 953b92ba0a5b62214bc5d7d5cadc94b95533d39a Mon Sep 17 00:00:00 2001 From: reg2005 Date: Mon, 20 Jun 2016 16:18:39 +0300 Subject: [PATCH 04/25] Critical bugFix in themeData.php Additional check is added, without it there is a critical error "Call to a member function hasCustomData() on null" --- modules/cms/models/ThemeData.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/cms/models/ThemeData.php b/modules/cms/models/ThemeData.php index 52bc2337c..1df32f0b5 100644 --- a/modules/cms/models/ThemeData.php +++ b/modules/cms/models/ThemeData.php @@ -207,6 +207,11 @@ class ThemeData extends Model public static function applyAssetVariablesToCombinerFilters($filters) { $theme = CmsTheme::getActiveTheme(); + + if(!$theme){ + return; + } + if (!$theme->hasCustomData()) { return; } From 6cc50b8ca8ad4dc4be7674bac11022dfa3857272 Mon Sep 17 00:00:00 2001 From: Prasanth Darsan Date: Tue, 28 Jun 2016 22:44:43 +0530 Subject: [PATCH 05/25] Fixed error on saving attachment config when its put on pivot form of a relation --- modules/backend/formwidgets/FileUpload.php | 2 ++ .../backend/formwidgets/fileupload/partials/_config_form.htm | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/backend/formwidgets/FileUpload.php b/modules/backend/formwidgets/FileUpload.php index c911d4be9..40aa52060 100644 --- a/modules/backend/formwidgets/FileUpload.php +++ b/modules/backend/formwidgets/FileUpload.php @@ -296,6 +296,8 @@ class FileUpload extends FormWidgetBase $this->vars['file'] = $file; $this->vars['displayMode'] = $this->getDisplayMode(); $this->vars['cssDimensions'] = $this->getCssDimensions(); + $this->vars['relationManageId'] = post('manage_id'); + $this->vars['relationField'] = post('_relation_field'); return $this->makePartial('config_form'); } diff --git a/modules/backend/formwidgets/fileupload/partials/_config_form.htm b/modules/backend/formwidgets/fileupload/partials/_config_form.htm index 2ec611db9..733fcf07f 100644 --- a/modules/backend/formwidgets/fileupload/partials/_config_form.htm +++ b/modules/backend/formwidgets/fileupload/partials/_config_form.htm @@ -1,6 +1,8 @@
+ +
@@ -57,4 +59,4 @@
-
\ No newline at end of file + From ccf7a3b6e596f23edbf3244b157395b1f875ec61 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 29 Jun 2016 19:40:58 +0300 Subject: [PATCH 06/25] Added missing russian translation --- modules/backend/lang/ru/lang.php | 37 +++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/modules/backend/lang/ru/lang.php b/modules/backend/lang/ru/lang.php index 995e20f48..176747170 100644 --- a/modules/backend/lang/ru/lang.php +++ b/modules/backend/lang/ru/lang.php @@ -99,9 +99,11 @@ return [ 'deny' => 'Запретить', 'group' => [ 'name' => 'Группы', + 'name_comment' => 'Название отображается в списке групп в форме создания/редактирования администраторов.', 'name_field' => 'Название', 'description_field' => 'Описание', - 'is_new_user_default_field' => 'Добавлять новых администраторов в эту группу по умолчанию.', + 'is_new_user_default_field_label' => 'Группа по умолчанию', + 'is_new_user_default_field_comment' => 'Добавлять новых администраторов в эту группу по умолчанию.', 'code_field' => 'Уникальный код', 'code_comment' => 'Введите уникальный код, если вы хотите открыть доступ к нему с помощью API.', 'menu_label' => 'Группы', @@ -276,7 +278,27 @@ return [ 'auto_closing' => 'Автоматическое закрытие тегов и специальных символов', 'show_invisibles' => 'Показывать невидимые символы', 'show_gutter' => 'Показывать нумерацию строк', - 'theme' => 'Цветовая схема' + 'theme' => 'Цветовая схема', + 'markup_styles' => 'Стили разметки', + 'custom_styles' => 'Дополнительные CSS стили', + 'custom styles_comment' => 'Дополнительные стили для использования в HTML редакторе.', + 'markup_classes' => 'Классы разметки', + 'paragraph' => 'Параграф', + 'link' => 'Ссылка', + 'table' => 'Таблица', + 'table_cell' => 'Ячейка таблицы', + 'image' => 'Изображение', + 'label' => 'Название', + 'class_name' => 'Класс', + 'markup_tags' => 'Теги разметки', + 'allowed_empty_tags' => 'Разрешенные пустые теги', + 'allowed_empty_tags_comment' => 'Список тегов, которые не будут удаляться, если внутри них нет содержания.', + 'allowed_tags' => 'Разрешенные теги', + 'allowed_tags_comment' => 'Список разрешенных тегов.', + 'no_wrap' => 'Do not wrap теги', + 'no_wrap_comment' => 'Список тегов, которые не должны быть обернуты в блочные элементы.', + 'remove_tags' => 'Удаляемые теги', + 'remove_tags_comment' => 'Список тегов, которые будут удалены вместе с их содержанием.' ], 'tooltips' => [ 'preview_website' => 'Просмотр сайта' @@ -305,11 +327,20 @@ return [ 'secondary_color' => 'Вторичный color', 'accent_color' => 'Accent color', 'styles' => 'Стили', - 'custom_stylesheet' => 'Пользовательские стили' + 'custom_stylesheet' => 'Пользовательские стили', + 'navigation' => 'Навигация', + 'menu_mode' => 'Стиль меню', + 'menu_mode_inline' => 'Строчный', + 'menu_mode_tile' => 'Плитка', + 'menu_mode_collapsed' => 'Схлопнутый' ], 'backend_preferences' => [ 'menu_label' => 'Настройки панели управления', 'menu_description' => 'Управление языком и внешним видом панели управления.', + 'region' => 'Регион', + 'code_editor' => 'Редактор кода', + 'timezone' => 'Часовой пояс', + 'timezone_comment' => 'Выводить даты в выбранном часовом поясе.', 'locale' => 'Язык', 'locale_comment' => 'Выберите желаемый язык панели управления.' ], From 40a755a6ccefed7ea4cdce898af871db6b38fdc1 Mon Sep 17 00:00:00 2001 From: Jens Herlevsen Date: Sun, 3 Jul 2016 19:36:24 +0200 Subject: [PATCH 07/25] Expose danish language in backend locale dropdown --- modules/backend/models/Preference.php | 1 + modules/system/assets/js/lang/lang.da.js | 9 +++++++++ modules/system/lang/bg/lang.php | 1 + modules/system/lang/cs/lang.php | 1 + modules/system/lang/de/lang.php | 1 + modules/system/lang/el/lang.php | 1 + modules/system/lang/en/lang.php | 1 + modules/system/lang/es-ar/lang.php | 1 + modules/system/lang/es/lang.php | 1 + modules/system/lang/fa/lang.php | 1 + modules/system/lang/fr/lang.php | 1 + modules/system/lang/hu/lang.php | 1 + modules/system/lang/id/lang.php | 1 + modules/system/lang/it/lang.php | 1 + modules/system/lang/ja/lang.php | 1 + modules/system/lang/lv/lang.php | 1 + modules/system/lang/nb-no/lang.php | 1 + modules/system/lang/nl/lang.php | 1 + modules/system/lang/pl/lang.php | 1 + modules/system/lang/pt-br/lang.php | 1 + modules/system/lang/ro/lang.php | 1 + modules/system/lang/ru/lang.php | 1 + modules/system/lang/sv/lang.php | 1 + modules/system/lang/tr/lang.php | 1 + modules/system/lang/zh-cn/lang.php | 1 + modules/system/lang/zh-tw/lang.php | 1 + 26 files changed, 34 insertions(+) create mode 100644 modules/system/assets/js/lang/lang.da.js diff --git a/modules/backend/models/Preference.php b/modules/backend/models/Preference.php index bed6bce80..64a31f70e 100644 --- a/modules/backend/models/Preference.php +++ b/modules/backend/models/Preference.php @@ -125,6 +125,7 @@ class Preference extends Model { $locales = Config::get('app.localeOptions', [ 'cs' => [Lang::get('system::lang.locale.cs'), 'flag-cz'], + 'da' => [Lang::get('system::lang.locale.da'), 'flag-dk'], 'en' => [Lang::get('system::lang.locale.en'), 'flag-us'], 'en-au' => [Lang::get('system::lang.locale.en-au'), 'flag-au'], 'en-ca' => [Lang::get('system::lang.locale.en-ca'), 'flag-ca'], diff --git a/modules/system/assets/js/lang/lang.da.js b/modules/system/assets/js/lang/lang.da.js new file mode 100644 index 000000000..d3c771b5c --- /dev/null +++ b/modules/system/assets/js/lang/lang.da.js @@ -0,0 +1,9 @@ +/* + * This file has been compiled from: /modules/system/lang/da/client.php + */ +if ($.oc === undefined) $.oc = {} +if ($.oc.langMessages === undefined) $.oc.langMessages = {} +$.oc.langMessages['da'] = $.extend( + $.oc.langMessages['da'] || {}, + {"markdowneditor":{"formatting":"Formatering","quote":"Citat","code":"Kode","header1":"Overskrift 1","header2":"Overskrift 2","header3":"Overskrift 3","header4":"Overskrift 4","header5":"Overskrift 5","header6":"Overskrift 6","bold":"Fed","italic":"Skrå","unorderedlist":"Usorteret Liste","orderedlist":"Nummereret Liste","video":"Video","image":"Billede","link":"Link","horizontalrule":"Indsæt horisontal streg","fullscreen":"Fuld skærm","preview":"Forhåndsvisning"},"mediamanager":{"insert_link":"Indsæt Link","insert_image":"Indsæt Billede","insert_video":"Indsæt Video","insert_audio":"Indsæt Lyd","invalid_file_empty_insert":"Vælg venligst en fil, at indsætte et link til.","invalid_file_single_insert":"Vælg venligst en enkel fil.","invalid_image_empty_insert":"Vælg venligst et eller flere billeder, at indsætte.","invalid_video_empty_insert":"Vælg venligst en videofil, at indsætte.","invalid_audio_empty_insert":"Vælg venligst en lydfil, at indsætte."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Fortryd"},"datepicker":{"previousMonth":"Sidste Måned","nextMonth":"Næste Måned","months":["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],"weekdays":["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],"weekdaysShort":["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},"filter":{"group":{"all":"Alle"},"dates":{"all":"alle","filter_button_text":"Filter","reset_button_text":"Nulstil","date_placeholder":"Dato","after_placeholder":"Efter","before_placeholder":"Før"}},"eventlog":{"show_stacktrace":"Vis stacktracen","hide_stacktrace":"Skjul stacktracen","tabs":{"formatted":"Formateret","raw":"Rå"},"editor":{"title":"Kildekode redigeringsværktøj","description":"Dit operativsystem bør konfigureres til at lytte til et af disse URL-skemaer.","openWith":"Åben med","remember_choice":"Husk valgte mulighed for denne session","open":"Åben","cancel":"Fortryd"}}} +); \ No newline at end of file diff --git a/modules/system/lang/bg/lang.php b/modules/system/lang/bg/lang.php index e800d0e3f..a79095cb7 100644 --- a/modules/system/lang/bg/lang.php +++ b/modules/system/lang/bg/lang.php @@ -7,6 +7,7 @@ return [ 'locale' => [ 'bg' => 'Bulgaria', 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'el' => 'Greek', diff --git a/modules/system/lang/cs/lang.php b/modules/system/lang/cs/lang.php index cf3a690dc..666c4a6b5 100644 --- a/modules/system/lang/cs/lang.php +++ b/modules/system/lang/cs/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Čeština', + 'da' => 'Danish', 'en' => 'Angličtina', 'de' => 'Němčina', 'el' => 'Řečtina', diff --git a/modules/system/lang/de/lang.php b/modules/system/lang/de/lang.php index 431aff33c..b0313adc9 100644 --- a/modules/system/lang/de/lang.php +++ b/modules/system/lang/de/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Tschechisch', + 'da' => 'Danish', 'en' => 'Englisch', 'de' => 'Deutsch', 'el' => 'Griechisch', diff --git a/modules/system/lang/el/lang.php b/modules/system/lang/el/lang.php index 22b0739d3..6e1aa91c2 100644 --- a/modules/system/lang/el/lang.php +++ b/modules/system/lang/el/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Τσέχος', + 'da' => 'Danish', 'en' => 'Αγγλικά', 'de' => 'Γερμανικά', 'el' => 'Ελληνικά', diff --git a/modules/system/lang/en/lang.php b/modules/system/lang/en/lang.php index f7d5dd0ad..818dd4136 100644 --- a/modules/system/lang/en/lang.php +++ b/modules/system/lang/en/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English (United States)', 'en-au' => 'English (Australia)', 'en-ca' => 'English (Canada)', diff --git a/modules/system/lang/es-ar/lang.php b/modules/system/lang/es-ar/lang.php index d00502b0d..2723b95ec 100644 --- a/modules/system/lang/es-ar/lang.php +++ b/modules/system/lang/es-ar/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Checo', + 'da' => 'Danish', 'en' => 'Inglés', 'nl' => 'Holandés', 'ja' => 'Japonés', diff --git a/modules/system/lang/es/lang.php b/modules/system/lang/es/lang.php index 89007e1b7..16f473f6d 100644 --- a/modules/system/lang/es/lang.php +++ b/modules/system/lang/es/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Checo', + 'da' => 'Danish', 'en' => 'Inglés (Estados Unidos)', 'en-au' => 'Inglés (Australia)', 'en-ca' => 'Inglés (Canada)', diff --git a/modules/system/lang/fa/lang.php b/modules/system/lang/fa/lang.php index bf4f618e8..70065eeb9 100644 --- a/modules/system/lang/fa/lang.php +++ b/modules/system/lang/fa/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'چک اسلواکی', + 'da' => 'Danish', 'en' => 'انگلیسی', 'de' => 'آلمانی', 'el' => 'یونانی', diff --git a/modules/system/lang/fr/lang.php b/modules/system/lang/fr/lang.php index f648e8b87..52224a47c 100644 --- a/modules/system/lang/fr/lang.php +++ b/modules/system/lang/fr/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Tchèque', + 'da' => 'Danish', 'en' => 'Anglais (Etats-Unis)', 'en-au' => 'Anglais (Australie)', 'en-ca' => 'Anglais (Canada)', diff --git a/modules/system/lang/hu/lang.php b/modules/system/lang/hu/lang.php index c833a3bf2..4ae40a265 100644 --- a/modules/system/lang/hu/lang.php +++ b/modules/system/lang/hu/lang.php @@ -6,6 +6,7 @@ return [ 'tagline' => 'Visszatérés az alapokhoz' ], 'locale' => [ + 'da' => 'Danish', 'en' => 'Angol (amerikai)', 'en-au' => 'Angol (ausztrál)', 'en-ca' => 'Angol (kanadai)', diff --git a/modules/system/lang/id/lang.php b/modules/system/lang/id/lang.php index fde8811ed..eee6f23db 100644 --- a/modules/system/lang/id/lang.php +++ b/modules/system/lang/id/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Inggris', 'de' => 'Jerman', 'es' => 'Spanyol', diff --git a/modules/system/lang/it/lang.php b/modules/system/lang/it/lang.php index 787786e42..7012027ac 100644 --- a/modules/system/lang/it/lang.php +++ b/modules/system/lang/it/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Ceco', + 'da' => 'Danish', 'en' => 'Inglese (Stati Uniti)', 'en-au' => 'Inglese (Australia)', 'en-ca' => 'Inglese (Canada)', diff --git a/modules/system/lang/ja/lang.php b/modules/system/lang/ja/lang.php index 00dfc4549..b7d2fb373 100644 --- a/modules/system/lang/ja/lang.php +++ b/modules/system/lang/ja/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'es' => 'Spanish', diff --git a/modules/system/lang/lv/lang.php b/modules/system/lang/lv/lang.php index 793f024b4..d32f44b51 100644 --- a/modules/system/lang/lv/lang.php +++ b/modules/system/lang/lv/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'es' => 'Spanish', diff --git a/modules/system/lang/nb-no/lang.php b/modules/system/lang/nb-no/lang.php index 4607a2049..ab6bb69f7 100644 --- a/modules/system/lang/nb-no/lang.php +++ b/modules/system/lang/nb-no/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Engelsk', 'de' => 'Tysk', 'es' => 'Spansk', diff --git a/modules/system/lang/nl/lang.php b/modules/system/lang/nl/lang.php index 011f9969d..8e285d4e6 100644 --- a/modules/system/lang/nl/lang.php +++ b/modules/system/lang/nl/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English (United States)', 'en-au' => 'English (Australia)', 'en-ca' => 'English (Canada)', diff --git a/modules/system/lang/pl/lang.php b/modules/system/lang/pl/lang.php index a87c57f85..e60149ba5 100644 --- a/modules/system/lang/pl/lang.php +++ b/modules/system/lang/pl/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Angielski', 'de' => 'Niemiecki', 'es' => 'Hiszpański', diff --git a/modules/system/lang/pt-br/lang.php b/modules/system/lang/pt-br/lang.php index 20b223af4..80de9c94f 100644 --- a/modules/system/lang/pt-br/lang.php +++ b/modules/system/lang/pt-br/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Inglês', 'en-au' => 'Inglês (Austrália)', 'en-ca' => 'Inglês (Canadá)', diff --git a/modules/system/lang/ro/lang.php b/modules/system/lang/ro/lang.php index 296231200..48f2ba559 100644 --- a/modules/system/lang/ro/lang.php +++ b/modules/system/lang/ro/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Engleza', 'nl' => 'Olandeza', 'ja' => 'Japoneza', diff --git a/modules/system/lang/ru/lang.php b/modules/system/lang/ru/lang.php index 293c920b3..aa92c948e 100644 --- a/modules/system/lang/ru/lang.php +++ b/modules/system/lang/ru/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'el' => 'Greek', diff --git a/modules/system/lang/sv/lang.php b/modules/system/lang/sv/lang.php index f0194da19..e4fa1660d 100644 --- a/modules/system/lang/sv/lang.php +++ b/modules/system/lang/sv/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'Engelska', 'de' => 'Tyska', 'el' => 'Grekiska', diff --git a/modules/system/lang/tr/lang.php b/modules/system/lang/tr/lang.php index 996558206..3a71dca9c 100644 --- a/modules/system/lang/tr/lang.php +++ b/modules/system/lang/tr/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Čeština (Česko)', + 'da' => 'Danish', 'en' => 'English (United States)', 'de' => 'Deutsch (Deutschland)', 'el' => 'Ελληνικά (Ελλάδα)', diff --git a/modules/system/lang/zh-cn/lang.php b/modules/system/lang/zh-cn/lang.php index e349ecba4..5a17d75cd 100644 --- a/modules/system/lang/zh-cn/lang.php +++ b/modules/system/lang/zh-cn/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'es' => 'Spanish', diff --git a/modules/system/lang/zh-tw/lang.php b/modules/system/lang/zh-tw/lang.php index 46facf91e..643a4be94 100644 --- a/modules/system/lang/zh-tw/lang.php +++ b/modules/system/lang/zh-tw/lang.php @@ -7,6 +7,7 @@ return [ ], 'locale' => [ 'cs' => 'Czech', + 'da' => 'Danish', 'en' => 'English', 'de' => 'German', 'es' => 'Spanish', From 10ec9030b33caf67d6a780253b4cef858e09a168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Desjardins?= Date: Wed, 6 Jul 2016 17:15:55 -0400 Subject: [PATCH 08/25] FR-CA with Canadian Flag! --- modules/backend/models/Preference.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/models/Preference.php b/modules/backend/models/Preference.php index bed6bce80..4bc0bc475 100644 --- a/modules/backend/models/Preference.php +++ b/modules/backend/models/Preference.php @@ -134,7 +134,7 @@ class Preference extends Model 'es-ar' => [Lang::get('system::lang.locale.es-ar'), 'flag-ar'], 'fa' => [Lang::get('system::lang.locale.fa'), 'flag-ir'], 'fr' => [Lang::get('system::lang.locale.fr'), 'flag-fr'], - 'fr-ca' => [Lang::get('system::lang.locale.fr-ca'), 'flag-fr'], + 'fr-ca' => [Lang::get('system::lang.locale.fr-ca'), 'flag-ca'], 'hu' => [Lang::get('system::lang.locale.hu'), 'flag-hu'], 'id' => [Lang::get('system::lang.locale.id'), 'flag-id'], 'it' => [Lang::get('system::lang.locale.it'), 'flag-it'], From 9be8a8c0a3d60b565be0a274cdb8c81377660f4c Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 7 Jul 2016 07:56:10 +1000 Subject: [PATCH 09/25] Minor code tidy --- modules/cms/models/ThemeData.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms/models/ThemeData.php b/modules/cms/models/ThemeData.php index 1df32f0b5..dde92f731 100644 --- a/modules/cms/models/ThemeData.php +++ b/modules/cms/models/ThemeData.php @@ -207,11 +207,11 @@ class ThemeData extends Model public static function applyAssetVariablesToCombinerFilters($filters) { $theme = CmsTheme::getActiveTheme(); - - if(!$theme){ + + if (!$theme){ return; } - + if (!$theme->hasCustomData()) { return; } From 53b8df0721a34d467e4a4aa5183d32bae8364683 Mon Sep 17 00:00:00 2001 From: Aleksey Bobkov Date: Wed, 6 Jul 2016 18:27:27 -0700 Subject: [PATCH 10/25] Force rich editor to synchronize when a form is saved. --- .../formwidgets/richeditor/assets/js/build-min.js | 3 +++ .../formwidgets/richeditor/assets/js/richeditor.js | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/backend/formwidgets/richeditor/assets/js/build-min.js b/modules/backend/formwidgets/richeditor/assets/js/build-min.js index 6b9a39850..9b076fcb7 100755 --- a/modules/backend/formwidgets/richeditor/assets/js/build-min.js +++ b/modules/backend/formwidgets/richeditor/assets/js/build-min.js @@ -513,6 +513,7 @@ this.$textarea.on('froalaEditor.contentChanged',this.proxy(this.onChange)) this.$textarea.on('froalaEditor.keydown',this.proxy(this.onKeydown)) this.$textarea.on('froalaEditor.html.get',this.proxy(this.onSyncContent)) this.$textarea.on('froalaEditor.html.set',this.proxy(this.onSetContent)) +this.$form.on('oc.beforeRequest',this.proxy(this.onFormBeforeRequest)) this.$textarea.froalaEditor(froalaOptions) this.editor=this.$textarea.data('froala.editor') this.$el.on('keydown','.fr-view figure',this.proxy(this.onFigureKeydown))} @@ -531,6 +532,7 @@ this.$textarea.off('froalaEditor.contentChanged',this.proxy(this.onChange)) this.$textarea.off('froalaEditor.keydown',this.proxy(this.onKeydown)) this.$textarea.off('froalaEditor.html.get',this.proxy(this.onSyncContent)) this.$textarea.off('froalaEditor.html.set',this.proxy(this.onSetContent)) +this.$form.off('oc.beforeRequest',this.proxy(this.onFormBeforeRequest)) $(window).off('resize',this.proxy(this.updateLayout)) $(window).off('oc.updateUi',this.proxy(this.updateLayout)) this.$el.off('dispose-control',this.proxy(this.dispose))} @@ -568,6 +570,7 @@ RichEditor.prototype.onFigureKeydown=function(ev){this.$textarea.trigger('figure RichEditor.prototype.onKeydown=function(ev,editor,keyEv){this.$textarea.trigger('keydown.oc.richeditor',[keyEv,this]) if(ev.isDefaultPrevented()){return false}} RichEditor.prototype.onChange=function(ev){this.$form.trigger('change')} +RichEditor.prototype.onFormBeforeRequest=function(ev){this.$textarea.val(this.$textarea.froalaEditor('html.get'))} var old=$.fn.richEditor $.fn.richEditor=function(option){var args=Array.prototype.slice.call(arguments,1),result this.each(function(){var $this=$(this) diff --git a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js index f27c39ca5..67094e691 100755 --- a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js +++ b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js @@ -167,6 +167,7 @@ this.$textarea.on('froalaEditor.keydown', this.proxy(this.onKeydown)) this.$textarea.on('froalaEditor.html.get', this.proxy(this.onSyncContent)) this.$textarea.on('froalaEditor.html.set', this.proxy(this.onSetContent)) + this.$form.on('oc.beforeRequest', this.proxy(this.onFormBeforeRequest)) this.$textarea.froalaEditor(froalaOptions) @@ -199,6 +200,7 @@ this.$textarea.off('froalaEditor.keydown', this.proxy(this.onKeydown)) this.$textarea.off('froalaEditor.html.get', this.proxy(this.onSyncContent)) this.$textarea.off('froalaEditor.html.set', this.proxy(this.onSetContent)) + this.$form.off('oc.beforeRequest', this.proxy(this.onFormBeforeRequest)) $(window).off('resize', this.proxy(this.updateLayout)) $(window).off('oc.updateUi', this.proxy(this.updateLayout)) @@ -329,6 +331,14 @@ this.$form.trigger('change') } + RichEditor.prototype.onFormBeforeRequest = function(ev) { + // Instantly synchronizes HTML content. + // The onSyncContent() method (above) is involved + // into this call, so the resulting HTML is (optionally) + // beautified + this.$textarea.val(this.$textarea.froalaEditor('html.get')) + } + // RICHEDITOR PLUGIN DEFINITION // ============================ From fb7e7ff1647ad65545ac2682ef9c1b12074b7226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20P=C5=82odowski?= Date: Tue, 31 May 2016 13:50:41 +0200 Subject: [PATCH 11/25] Command for changing configuration to env syntax --- modules/system/ServiceProvider.php | 1 + modules/system/console/OctoberEnv.php | 265 ++++++++++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 modules/system/console/OctoberEnv.php diff --git a/modules/system/ServiceProvider.php b/modules/system/ServiceProvider.php index d1afcfdbe..63040b869 100644 --- a/modules/system/ServiceProvider.php +++ b/modules/system/ServiceProvider.php @@ -219,6 +219,7 @@ class ServiceProvider extends ModuleServiceProvider $this->registerConsoleCommand('october.util', 'System\Console\OctoberUtil'); $this->registerConsoleCommand('october.mirror', 'System\Console\OctoberMirror'); $this->registerConsoleCommand('october.fresh', 'System\Console\OctoberFresh'); + $this->registerConsoleCommand('october.env', 'System\Console\OctoberEnv'); $this->registerConsoleCommand('october.install', 'System\Console\OctoberInstall'); $this->registerConsoleCommand('plugin.install', 'System\Console\PluginInstall'); diff --git a/modules/system/console/OctoberEnv.php b/modules/system/console/OctoberEnv.php new file mode 100644 index 000000000..1a29f37dd --- /dev/null +++ b/modules/system/console/OctoberEnv.php @@ -0,0 +1,265 @@ +error('.env file already exists.'); + } + + $this->overwriteConfig(); + + $this->info('.env configuration file has been created.'); + } + + /** + * Overwrite config file + */ + private function overwriteConfig() + { + foreach ($this->config() as $file => $keys) { + $content = $this->configToEnv($file, $keys); + + $this->writeToConfigFile($file, $content); + } + } + + /** + * Replace config values with env() syntax + * + * @param $file + * @param $keys + * @return string + */ + private function configToEnv($file, $keys) + { + $content = $this->readConfigFile($file); + + foreach ($keys as $envKey => $configKey) { + $pattern = $this->buildPattern($configKey); + $callback = $this->buildCallback($file, $envKey, $configKey); + + $content = preg_replace_callback($pattern, $callback, $content); + } + + $this->writeToEnv("\n"); + + return $content; + } + + /** + * @param $configKey + * @return string + */ + private function buildPattern($configKey) + { + return "/['\"]" . $configKey . "['\"]" . "\s*=>\s*[^,\[]+,/"; + } + + /** + * @param $file + * @param $envKey + * @param $configKey + * @return \Closure + */ + private function buildCallback($file, $envKey, $configKey) + { + return function ($matches) use ($envKey, $configKey, $file) { + + $value = $this->envValue($file, $configKey); + + if ( ! $this->envKeyExists($envKey)) { + $envLine = sprintf("%s=%s\n", $envKey, $this->stripQuotes($value)); + $this->writeToEnv($envLine); + } + + return $this->isEnv($matches[0]) ? $matches[0] : "'$configKey' => env('$envKey', {$value}),"; + }; + } + + /** + * @param $config + * @param $configKey + * @return string + */ + private function envValue($config, $configKey) + { + $value = config("$config.$configKey"); + + if ($config == 'database') { + $value = $this->databaseConfigValue($configKey); + } + + return $this->normalize($value); + } + + /** + * @param $configKey + * @return string + */ + private function databaseConfigValue($configKey) + { + $defaultConnection = config('database.default'); + + return $configKey == 'default' + ? $defaultConnection + : config("database.connections.$defaultConnection.$configKey"); + } + + /** + * @param $value + * @return string + */ + private function normalize($value) + { + if (is_string($value)) { + return "'$value'"; + } elseif (is_bool($value)) { + return $value ? 'true' : 'false'; + } elseif (is_null($value)) { + return 'null'; + } + + return $value; + } + + /** + * Strip single and double quotes + * + * @param $string + * @return string + */ + private function stripQuotes($string) + { + return strtr($string, ['"' => '', "'" => '']); + } + + /** + * @param $matches + * @return bool + */ + private function isEnv($matches) + { + return strpos($matches, 'env') !== false; + } + + /** + * Write content to .env file + * + * @param $content + */ + private function writeToEnv($content) + { + file_put_contents('.env', $content, FILE_APPEND); + } + + /** + * @return string + */ + private function readEnvFile() + { + return file_exists('.env') ? file_get_contents('.env') : ''; + } + + /** + * Write content to config file + * + * @param $file + * @param $content + */ + private function writeToConfigFile($file, $content) + { + file_put_contents(config_path($file . '.php'), $content); + } + + /** + * @param $file + * @return string + */ + private function readConfigFile($file) + { + return file_get_contents(config_path($file . '.php')); + } + + /** + * @param $key + * @return bool + */ + private function envKeyExists($key) + { + return strpos($this->readEnvFile(), $key) !== false; + } + + /** + * Configuration array for search and replace + * + * @return array + */ + private function config() + { + return [ + 'app' => [ + 'APP_DEBUG' => 'debug', + 'APP_URL' => 'url', + 'APP_KEY' => 'key', + ], + 'database' => [ + 'DB_CONNECTION' => 'default', + 'DB_HOST' => 'host', + 'DB_PORT' => 'port', + 'DB_DATABASE' => 'database', + 'DB_USERNAME' => 'username', + 'DB_PASSWORD' => 'password', + ], + 'cache' => [ + 'CACHE_DRIVER' => 'default', + ], + 'session' => [ + 'SESSION_DRIVER' => 'driver', + ], + 'queue' => [ + 'QUEUE_DRIVER' => 'default', + ], + 'mail' => [ + 'MAIL_DRIVER' => 'driver', + 'MAIL_HOST' => 'host', + 'MAIL_PORT' => 'port', + 'MAIL_USERNAME' => 'username', + 'MAIL_PASSWORD' => 'password', + 'MAIL_ENCRYPTION' => 'encryption', + ], + 'cms' => [ + 'ROUTES_CACHE' => 'enableRoutesCache', + 'ASSET_CACHE' => 'enableAssetCache', + 'LINK_POLICY' => 'linkPolicy', + 'ENABLE_CSRF' => 'enableCsrfProtection', + ], + ]; + } + +} From 7b1437d0269747beddc5efc759862ca9968d77b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20P=C5=82odowski?= Date: Sun, 5 Jun 2016 15:58:54 +0200 Subject: [PATCH 12/25] Fix database config parsing --- modules/system/console/OctoberEnv.php | 221 ++++++++++++++++++++------ 1 file changed, 172 insertions(+), 49 deletions(-) diff --git a/modules/system/console/OctoberEnv.php b/modules/system/console/OctoberEnv.php index 1a29f37dd..eb8607b46 100644 --- a/modules/system/console/OctoberEnv.php +++ b/modules/system/console/OctoberEnv.php @@ -15,6 +15,16 @@ class OctoberEnv extends Command */ protected $description = 'Creates .env file with default configuration values.'; + /** + * The current config cursor. + */ + protected $config; + + /** + * The current database connection cursor. + */ + protected $connection; + /** * Create a new command instance. */ @@ -42,34 +52,105 @@ class OctoberEnv extends Command */ private function overwriteConfig() { - foreach ($this->config() as $file => $keys) { - $content = $this->configToEnv($file, $keys); + foreach (array_keys($this->config()) as $config) { + $this->config = $config; - $this->writeToConfigFile($file, $content); + $this->configToEnv(); } } /** * Replace config values with env() syntax + */ + private function configToEnv() + { + $content = $this->parseConfigFile(); + + $this->writeToConfigFile($content); + } + + /** + * Parse config file line by line * - * @param $file - * @param $keys * @return string */ - private function configToEnv($file, $keys) + private function parseConfigFile() { - $content = $this->readConfigFile($file); + $lines = []; - foreach ($keys as $envKey => $configKey) { - $pattern = $this->buildPattern($configKey); - $callback = $this->buildCallback($file, $envKey, $configKey); + foreach ($this->lines() as $line) { + $keys = $this->config()[$this->config]; - $content = preg_replace_callback($pattern, $callback, $content); + $lines[] = $this->parseLine($line, $keys); } $this->writeToEnv("\n"); - return $content; + return implode('', $lines); + } + + /** + * @param $keys + * @param $line + * @return mixed + */ + private function parseLine($line, $keys) + { + $line = $this->replaceConfigLine($line, $keys); + + $line = $this->replaceDbConfigLine($line); + + return $line; + } + + /** + * @param $line + * @param $keys + * @return mixed + */ + private function replaceConfigLine($line, $keys) + { + foreach ($keys as $envKey => $configKey) { + $pattern = $this->buildPattern($configKey); + $callback = $this->buildCallback($envKey, $configKey); + + if (preg_match($pattern, $line)) { + $line = preg_replace_callback($pattern, $callback, $line); + } + } + + return $line; + } + + /** + * @param $line + * @return mixed + */ + private function replaceDbConfigLine($line) + { + if ($this->config == 'database') { + + foreach ($this->dbConfig() as $connection => $settings) { + $this->setCurrentConnection($line, $connection); + + if ($this->connection == $connection) { + $line = $this->replaceConfigLine($line, $settings); + } + } + } + + return $line; + } + + /** + * @param $line + * @param $connection + */ + private function setCurrentConnection($line, $connection) + { + if (preg_match("/['\"]" . $connection . "['\"]" . "\s*=>/", $line)) { + $this->connection = $connection; + } } /** @@ -82,36 +163,58 @@ class OctoberEnv extends Command } /** - * @param $file * @param $envKey * @param $configKey * @return \Closure */ - private function buildCallback($file, $envKey, $configKey) + private function buildCallback($envKey, $configKey) { - return function ($matches) use ($envKey, $configKey, $file) { + return function ($matches) use ($envKey, $configKey) { - $value = $this->envValue($file, $configKey); + $value = $this->envValue($configKey); - if ( ! $this->envKeyExists($envKey)) { - $envLine = sprintf("%s=%s\n", $envKey, $this->stripQuotes($value)); - $this->writeToEnv($envLine); - } + $this->saveEnvSettings($envKey, $value); return $this->isEnv($matches[0]) ? $matches[0] : "'$configKey' => env('$envKey', {$value}),"; }; } /** - * @param $config + * @param $key + * @param $value + */ + private function saveEnvSettings($key, $value) + { + if ( ! $this->envKeyExists($key)) { + $line = sprintf("%s=%s\n", $key, $this->stripQuotes($value)); + + if ($this->config == 'database' && $key != 'DB_CONNECTION') { + $this->writeDbEnvSettings($line); + } else { + $this->writeToEnv($line); + } + } + } + + /** + * @param $line + */ + private function writeDbEnvSettings($line) + { + if ($this->connection == config('database.default') || $this->connection == 'redis') { + $this->writeToEnv($line); + } + } + + /** * @param $configKey * @return string */ - private function envValue($config, $configKey) + private function envValue($configKey) { - $value = config("$config.$configKey"); + $value = config("$this->config.$configKey"); - if ($config == 'database') { + if ($this->config == 'database') { $value = $this->databaseConfigValue($configKey); } @@ -124,11 +227,15 @@ class OctoberEnv extends Command */ private function databaseConfigValue($configKey) { - $defaultConnection = config('database.default'); + if ($configKey == 'default') { + return config('database.default'); + } - return $configKey == 'default' - ? $defaultConnection - : config("database.connections.$defaultConnection.$configKey"); + if ($this->connection == 'redis') { + return config("database.redis.default.$configKey"); + } + + return config("database.connections.$this->connection.$configKey"); } /** @@ -149,8 +256,6 @@ class OctoberEnv extends Command } /** - * Strip single and double quotes - * * @param $string * @return string */ @@ -169,8 +274,6 @@ class OctoberEnv extends Command } /** - * Write content to .env file - * * @param $content */ private function writeToEnv($content) @@ -187,23 +290,19 @@ class OctoberEnv extends Command } /** - * Write content to config file - * - * @param $file * @param $content */ - private function writeToConfigFile($file, $content) + private function writeToConfigFile($content) { - file_put_contents(config_path($file . '.php'), $content); + file_put_contents(config_path($this->config . '.php'), $content); } /** - * @param $file - * @return string + * @return array */ - private function readConfigFile($file) + private function lines() { - return file_get_contents(config_path($file . '.php')); + return file(config_path($this->config . '.php')); } /** @@ -216,8 +315,6 @@ class OctoberEnv extends Command } /** - * Configuration array for search and replace - * * @return array */ private function config() @@ -230,11 +327,6 @@ class OctoberEnv extends Command ], 'database' => [ 'DB_CONNECTION' => 'default', - 'DB_HOST' => 'host', - 'DB_PORT' => 'port', - 'DB_DATABASE' => 'database', - 'DB_USERNAME' => 'username', - 'DB_PASSWORD' => 'password', ], 'cache' => [ 'CACHE_DRIVER' => 'default', @@ -262,4 +354,35 @@ class OctoberEnv extends Command ]; } -} + /** + * @return array + */ + private function dbConfig() + { + return [ + 'sqlite' => [ + 'DB_DATABASE' => 'database', + ], + 'mysql' => [ + 'DB_HOST' => 'host', + 'DB_PORT' => 'port', + 'DB_DATABASE' => 'database', + 'DB_USERNAME' => 'username', + 'DB_PASSWORD' => 'password', + ], + 'pgsql' => [ + 'DB_HOST' => 'host', + 'DB_PORT' => 'port', + 'DB_DATABASE' => 'database', + 'DB_USERNAME' => 'username', + 'DB_PASSWORD' => 'password', + ], + 'redis' => [ + 'REDIS_HOST' => 'host', + 'REDIS_PASSWORD' => 'password', + 'REDIS_PORT' => 'port', + ], + ]; + } + +} \ No newline at end of file From cc28b35b075cbbcb55b6e098b2c30010267176e5 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 9 Jul 2016 05:50:01 +1000 Subject: [PATCH 13/25] $this is not accessible in static context Fixes #2193 --- modules/backend/models/Preference.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/models/Preference.php b/modules/backend/models/Preference.php index 35413d164..076e065bd 100644 --- a/modules/backend/models/Preference.php +++ b/modules/backend/models/Preference.php @@ -105,7 +105,7 @@ class Preference extends Model { $settings = self::instance(); Config::set('app.locale', $settings->locale); - Config::set('app.fallback_locale', $this->getFallbackLocale($settings->locale)); + Config::set('app.fallback_locale', $settings->fallback_locale); } protected function getFallbackLocale($locale) From 87cd7d8bf6b1d4d5400b1c4dbb3fec91eba4f9d6 Mon Sep 17 00:00:00 2001 From: Sebastian Hilger Date: Sat, 9 Jul 2016 12:43:01 +0200 Subject: [PATCH 14/25] Added missing backend translations (German) (#1825) * Added auth.title which was missing in the German language file * Added missing backend translations to two language files * added more German translations --- modules/backend/lang/de/lang.php | 75 +++++++++++++++++++++++++------ modules/cms/lang/de/lang.php | 6 ++- modules/system/lang/de/lang.php | 77 +++++++++++++++++++++++++++++--- 3 files changed, 138 insertions(+), 20 deletions(-) diff --git a/modules/backend/lang/de/lang.php b/modules/backend/lang/de/lang.php index 3a9b2524d..31949a660 100644 --- a/modules/backend/lang/de/lang.php +++ b/modules/backend/lang/de/lang.php @@ -1,6 +1,9 @@ [ + 'title' => 'Admin-Bereich' + ], 'field' => [ 'invalid_type' => 'Ungültiger Feldtyp :type.', 'options_method_not_exists' => 'Die Model-Klasse :model muss eine Methode :method() mit Rückgabe der Werte von ":field" besitzen.', @@ -68,20 +71,23 @@ return [ 'user' => [ 'name' => 'Administrator', 'menu_label' => 'Administratoren', + 'menu_description' => 'Backend-Benutzer, Administratoren, Gruppen und Zugriffsrechte verwalten.', 'list_title' => 'Administratoren verwalten', 'new' => 'Neuer Administrator', - 'login' => "Benutzername", - 'first_name' => "Vorname", - 'last_name' => "Nachname", - 'full_name' => "Kompletter Name", - 'email' => "E-Mail", - 'groups' => "Gruppen", - 'groups_comment' => "Geben Sie hier die Gruppenzugehörigkeit an", - 'avatar' => "Avatar", - 'password' => "Passwort", - 'password_confirmation' => "Passwort bestätigen", - 'superuser' => "Super User", - 'superuser_comment' => "Bestätigen Sie hier, um dem Nutzer Vollzugriff zu geben", + 'login' => 'Benutzername', + 'first_name' => 'Vorname', + 'last_name' => 'Nachname', + 'full_name' => 'Kompletter Name', + 'email' => 'E-Mail', + 'groups' => 'Gruppen', + 'groups_comment' => 'Geben Sie hier die Gruppenzugehörigkeit an', + 'avatar' => 'Avatar', + 'password' => 'Passwort', + 'password_confirmation' => 'Passwort bestätigen', + 'permissions' => 'Rechte', + 'account' => 'Account', + 'superuser' => 'Super-User', + 'superuser_comment' => 'Bestätigen Sie hier, um dem Nutzer Vollzugriff zu geben', 'send_invite' => 'Einladung per E-Mail versenden', 'send_invite_comment' => 'Hier bestätigen, dass eine Einladung per E-Mail erfolgt', 'delete_confirm' => 'Möchten Sie diesen Administrator-Account wirklich löschen?', @@ -92,11 +98,16 @@ return [ 'group' => [ 'name' => 'Gruppe', 'name_field' => 'Name', + 'description_field' => 'Beschreibung', + 'is_new_user_default_field' => 'Neue Admins dieser Gruppe per Voreinstellung hinzufügen.', + 'code_field' => 'Code', + 'code_comment' => 'Eindeutigen Code hinzufügen, wenn dies über die API bearbeitet werden soll.', 'menu_label' => 'Gruppen', 'list_title' => 'Gruppen verwalten', 'new' => 'Neue Administratoren Gruppe', 'delete_confirm' => 'Möchten Sie diesen Administratoren-Gruppe wirklich löschen?', - 'return' => 'Zurück zur Gruppen Übersicht', + 'return' => 'Zurück zur Gruppen-Übersicht', + 'users_count' => 'Benutzer', ], 'preferences' => [ 'not_authenticated' => 'Zum Speichern oder Anzeigen dieser Einstellungen liegt kein Nutzerkonto vor' @@ -129,7 +140,13 @@ return [ 'attachment' => 'Anhang', 'help' => 'Fügen Sie dem Anhang einen Titel und eine Beschreibung hinzu.', 'title_label' => 'Titel', - 'description_label' => 'Beschreibung' + 'description_label' => 'Beschreibung', + 'default_prompt' => 'Auf %s klicken oder eine Datei hierhin ziehen, um sie hochzuladen', + 'attachment_url' => 'Originaldatei-URL', + 'upload_file' => 'Datei hochladen', + 'upload_error' => 'Fehler beim hochladen', + 'remove_confirm' => 'Sind Sie sicher?', + 'remove_file' => 'Datei entfernen', ], 'form' => [ 'create_title' => "Neuer :name", @@ -174,6 +191,7 @@ return [ 'return_to_list' => 'Zurück zur Liste' ], 'relation' => [ + 'missing_config' => "Verhalten (behaviour) der Verbindung hat keine Konfiguration für ':config'.", 'missing_definition' => "Verhalten (behaviour) der Verbindung umfasst keine Definition für ':field'.", 'missing_model' => "Verhalten (behaviour) der Verbindung, die in :class benutzt wird, hat kein definiertes Model", 'invalid_action_single' => "Dieser Vorgang kann nicht auf eine Einwege-Verbindung (singular) angewendet werden.", @@ -181,6 +199,12 @@ return [ 'help' => "Zum Hinzufügen auf ein Item klicken", 'related_data' => "Verwandte :name Daten", 'add' => "Hinzufügen", + 'add_selected' => 'Auswahl hinzufügen', + 'add_a_new' => ':name hinzufügen', + 'link_selected' => 'Auswahl verlinken', + 'link_a_new' => ':name verlinken', + 'cancel' => 'Abbrechen', + 'close' => 'Schließen', 'add_name' => ":name hinzufügen", 'create' => "Erstellen", 'create_name' => "Erstelle :name", @@ -191,6 +215,11 @@ return [ 'delete' => "Löschen", 'delete_name' => ":name löschen", 'delete_confirm' => "Sind Sie sicher?", + 'link' => 'Link', + 'link_name' => 'Link :name', + 'unlink' => 'Link entfernen', + 'unlink_name' => 'Link von :name entfernen', + 'unlink_confirm' => 'Sind Sie sicher?' ], 'model' => [ 'name' => "Model", @@ -231,6 +260,24 @@ return [ 'menu_description' => 'Updaten Sie Ihre Account-Details wie z.B. den Namen, die E-Mail-Adresse und das Passwort.', 'menu_keywords' => 'Sicheres Anmelden' ], + 'branding' => [ + 'menu_label' => 'Backend anpassen', + 'menu_description' => 'Passe den Admin-Bereich an - z.B. Name, Farben und Logo.', + 'brand' => 'Brand', + 'logo' => 'Logo', + 'logo_description' => 'Lade ein eigenes Logo hoch, das im Backend verwendet werden soll.', + 'app_name' => 'App-Name', + 'app_name_description' => 'Dieser Name wird als Titel des Backends angezeigt.', + 'app_tagline' => 'App-Tagline', + 'app_tagline_description' => 'Die Tagline wird im Log-In-Bereich des Backends angezeigt.', + 'colors' => 'Farben', + 'primary_light' => 'Primär (Hell)', + 'primary_dark' => 'Primär (Dunkel)', + 'secondary_light' => 'Sekundär (Hell)', + 'secondary_dark' => 'Sekundär (Dunkel)', + 'styles' => 'Styles', + 'custom_stylesheet' => 'Benutzerdefiniertes Stylesheet', + ], 'backend_preferences' => [ 'menu_label' => 'Backend Einstellungen', 'menu_description' => 'Verwalten der Spracheinstellungen und der Backenddarstellung.', diff --git a/modules/cms/lang/de/lang.php b/modules/cms/lang/de/lang.php index 86f327e20..4878afb7e 100644 --- a/modules/cms/lang/de/lang.php +++ b/modules/cms/lang/de/lang.php @@ -222,7 +222,11 @@ return [ 'manage_pages' => 'Seiten verwalten', 'manage_layouts' => 'Layouts verwalten', 'manage_partials' => 'Partials verwalten', - 'manage_themes' => 'Themes verwalten' + 'manage_themes' => 'Themes verwalten', + 'manage_media' => 'Medien verwalten', + ], + 'mediafinder' => [ + 'default_prompt' => 'Klicke auf %s um eine Mediendatei auszuwählen' ], 'media' => [ 'invalid_path' => "Ungültiger Dateipfad: ':path'.", diff --git a/modules/system/lang/de/lang.php b/modules/system/lang/de/lang.php index b0313adc9..4cd1cf371 100644 --- a/modules/system/lang/de/lang.php +++ b/modules/system/lang/de/lang.php @@ -44,6 +44,20 @@ return [ 'system' => [ 'name' => 'System', 'menu_label' => 'System', + 'categories' => [ + 'cms' => 'CMS', + 'misc' => 'Verschiedenes', + 'logs' => 'Logs', + 'mail' => 'Mail', + 'shop' => 'Shop', + 'team' => 'Team', + 'users' => 'Benutzer', + 'system' => 'System', + 'social' => 'Social', + 'events' => 'Events', + 'customers' => 'Kunden', + 'my_settings' => 'Meine Einstellungen' + ] ], 'plugin' => [ 'unnamed' => 'Unbenanntes Plugin', @@ -68,17 +82,20 @@ return [ ], 'settings' => [ 'menu_label' => 'Einstellungen', + 'not_found' => 'Die gesuchten Einstellungen können nicht gefunden werden.', 'missing_model' => 'Der Einstellungsseite fehlt eine Model-Definition.', 'update_success' => 'Einstellung für :name wurde erfolgreich aktualisiert.', 'return' => 'Zurück zu den Einstellungen', + 'search' => 'Suche', ], - 'email' => [ - 'menu_label' => 'Email Einstellungen', - 'menu_description' => 'Email Einstellungen verwalten.', + 'mail' => [ + 'menu_label' => 'Mail-Einstellungen', + 'menu_description' => 'Mail-Einstellungen verwalten.', 'general' => 'Allgemein', - 'method' => 'Email Method', + 'method' => 'Mail-Methode', 'sender_name' => 'Absender Name', - 'sender_email' => 'Absender Email', + 'sender_email' => 'Absender-E-Mail', + 'php_mail' => 'PHP-Mail', 'smtp' => 'SMTP', 'smtp_address' => 'SMTP Adresse', 'smtp_authorization' => 'SMTP Authorisation erforderlich', @@ -87,9 +104,58 @@ return [ 'smtp_password' => 'Passwort', 'smtp_port' => 'SMTP Port', 'smtp_ssl' => 'SSL Verbindung erforderlich', + 'smtp_encryption' => 'SMTP-Verschlüsselungs-Protokoll', + 'smtp_encryption_none' => 'Keine Verschlüsselung', + 'smtp_encryption_tls' => 'TLS', + 'smtp_encryption_ssl' => 'SSL', 'sendmail' => 'Sendmail', 'sendmail_path' => 'Sendmail Pfad', 'sendmail_path_comment' => 'Bitte gib den (absoluten) Pfad zum Sendmail Programm an.', + 'mailgun' => 'Mailgun', + 'mailgun_domain' => 'Mailgun-Domain', + 'mailgun_domain_comment' => 'Bitte gib die Mailgun-Domain an.', + 'mailgun_secret' => 'Mailgun-Schlüssel', + 'mailgun_secret_comment' => 'Gib Deinen Mailgun-API-Schlüssel an.', + 'mandrill' => 'Mandrill', + 'mandrill_secret' => 'Mandrill-Schlüssel', + 'mandrill_secret_comment' => 'Gib Deinen Mandrill-API-Schlüssel an.', + 'drivers_hint_header' => 'Treiber nicht installiert.', + 'drivers_hint_content' => 'Für diese Mail-Methode muss das Plugin ":plugin" installiert werden, bevor Du Mails verschicken kannst.' + ], + 'mail_templates' => [ + 'menu_label' => 'Mail-Vorlagen', + 'menu_description' => 'Verwalten die Mail-Vorlagen die für Mails an Benutzer und Administratoren verwendet werden und verwalte Mail-Layouts.', + 'new_template' => 'Neue Vorlage', + 'new_layout' => 'Neues Layout', + 'template' => 'Vorlage', + 'templates' => 'Vorlagen', + 'menu_layouts_label' => 'Mail-Layouts', + 'layout' => 'Layout', + 'layouts' => 'Layouts', + 'no_layout' => '-- Kein Layout --', + 'name' => 'Name', + 'name_comment' => 'Eindeutiger Name um diese Vorlage zu referenzieren', + 'code' => 'Code', + 'code_comment' => 'Eindeutiger Code um diese Vorlage zu referenzieren', + 'subject' => 'Betreff', + 'subject_comment' => 'E-Mail-Betreff', + 'description' => 'Beschreibung', + 'content_html' => 'HTML', + 'content_css' => 'CSS', + 'content_text' => 'Nur Text', + 'test_send' => 'Testnachricht senden', + 'test_success' => 'Die Testnachricht wurde erfolgreich versendet.', + 'test_confirm' => 'Eine Testnachricht wird an :email gesendet. Fortsetzen?', + 'creating' => 'Erstelle Vorlage...', + 'creating_layout' => 'Erstelle Layout...', + 'saving' => 'Speichere Vorlage...', + 'saving_layout' => 'Speichere Layout...', + 'delete_confirm' => 'Möchtest Du diese Vorlage wirklich löschen?', + 'delete_layout_confirm' => 'Möchtest Du dieses Layout wirklich löschen?', + 'deleting' => 'Lösche Vorlage...', + 'deleting_layout' => 'Lösche Layout...', + 'sending' => 'Sende Nachricht...', + 'return' => 'Zurück zur Vorlagen-Liste', ], 'install' => [ 'project_label' => 'Mit Projekt verbinden', @@ -102,6 +168,7 @@ return [ 'title' => 'Manage Updates', 'name' => 'Software-Aktualisierung', 'menu_label' => 'Aktualisierungen', + 'menu_description' => 'System aktualisieren, Plugins und Themes verwalten und installieren.', 'check_label' => 'Auf Aktualisierungen überprüfen', 'retry_label' => 'Erneut versuchen', 'plugin_name' => 'Name', From 5f7b7d8c6d21820209f40d2e9e5199b216329fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Ekstr=C3=B6m=20Svensson?= Date: Mon, 11 Jul 2016 17:32:30 +0200 Subject: [PATCH 15/25] Escapes exception output Fixes #2198 --- modules/system/classes/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/classes/Controller.php b/modules/system/classes/Controller.php index 32c559e1c..f5306b585 100644 --- a/modules/system/classes/Controller.php +++ b/modules/system/classes/Controller.php @@ -35,7 +35,7 @@ class Controller extends ControllerBase } catch (Exception $ex) { - return '/* '.$ex->getMessage().' */'; + return '/* '.e($ex->getMessage()).' */'; } } } From 75dbd74bca77f470a0bd724775918f5bed0f5e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20P=C5=82odowski?= Date: Mon, 11 Jul 2016 19:34:53 +0200 Subject: [PATCH 16/25] Polish language update (pl) --- modules/backend/lang/pl/lang.php | 211 ++++++++++++++++++++------ modules/cms/lang/pl/lang.php | 57 ++++--- modules/system/lang/pl/client.php | 92 +++++++++++ modules/system/lang/pl/lang.php | 139 ++++++++++------- modules/system/lang/pl/validation.php | 144 ++++++++++-------- 5 files changed, 456 insertions(+), 187 deletions(-) create mode 100644 modules/system/lang/pl/client.php diff --git a/modules/backend/lang/pl/lang.php b/modules/backend/lang/pl/lang.php index 94beb6909..2230eee6e 100644 --- a/modules/backend/lang/pl/lang.php +++ b/modules/backend/lang/pl/lang.php @@ -16,9 +16,14 @@ return [ 'untitled' => 'Bez nazwy', 'access_denied' => [ 'label' => 'Odmowa dostępu', - 'help' => "Nie posiadasz odpowiednich uprawnień, aby zobaczyć tą stronę.", + 'help' => 'Nie posiadasz odpowiednich uprawnień, aby zobaczyć tą stronę.', 'cms_link' => 'Powrót do panelu back-end' ], + 'no_database' => [ + 'label' => 'Brak bazy danych', + 'help' => 'Baza danych jest wymagana do dostępu do panelu administracyjnego. Sprawdz czy baza danych jest prawidłowo skonfigurowana i zmigrowana przed ponowną próbą.', + 'cms_link' => 'Powrót do strony głównej' + ], 'invalid_token' => [ 'label' => 'Nieprawidłowy żeton bezpieczeństwa' ] @@ -54,9 +59,10 @@ return [ 'widget_label' => 'Widget', 'widget_width' => 'Szerokość', 'full_width' => 'pełna szerokość', + 'manage_widgets' => 'Zarządzaj widgetami', 'add_widget' => 'Dodaj widget', 'widget_inspector_title' => 'Konfiguracja widgetu', - 'widget_inspector_description' => 'Configure the report widget', + 'widget_inspector_description' => 'Konfiguruj widget', 'widget_columns_label' => 'Szerokość: :columns', 'widget_columns_description' => 'Szerokość widgetu, cyfra pomiędzy 1 a 10.', 'widget_columns_error' => 'Proszę podać szerokość widgetu jako cyfrę pomiędzy 1 a 10.', @@ -65,9 +71,34 @@ return [ 'widget_new_row_description' => 'Umieść widget w nowym wierszu.', 'widget_title_label' => 'Nazwa widgetu', 'widget_title_error' => 'Nazwa widgetu jest wymagana.', + 'reset_layout' => 'Resetuj układ', + 'reset_layout_confirm' => 'Ustawić domyślny układ?', + 'reset_layout_success' => 'Został przywrócony domyślny układ', + 'make_default' => 'Ustaw jako domyślny', + 'make_default_confirm' => 'Ustawić obecny układ jako domyślny?', + 'make_default_success' => 'Obecny układ jest teraz domyślny', 'status' => [ 'widget_title_default' => 'Status systemu', - 'update_available' => '{0} dostępnych aktualizacji!|{1} dostępna aktualizacja!|[2,Inf] dostępne aktualizacje!' + 'update_available' => '{0} dostępnych aktualizacji!|{1} dostępna aktualizacja!|[2,Inf] dostępne aktualizacje!', + 'updates_pending' => 'Oczekujące aktualizacje', + 'updates_nil' => 'Wersja systemu jest aktualna', + 'updates_link' => 'Aktualizuj', + 'warnings_pending' => 'Niektóre kwestie wymagają uwagi', + 'warnings_nil' => 'Brak ostrzeżeń do wyświetlenia', + 'warnings_link' => 'Wyświetl', + 'core_build' => 'Wersja systemu', + 'event_log' => 'Dziennik zdarzeń', + 'request_log' => 'Log żądań', + 'app_birthday' => 'Online od', + ], + 'welcome' => [ + 'widget_title_default' => 'Witaj', + 'welcome_back_name' => 'Witaj z powrotem to :app, :name.', + 'welcome_to_name' => 'Witaj w :app, :name.', + 'first_sign_in' => 'To jest twoje pierwsze logowanie.', + 'last_sign_in' => 'Data ostatniego logowania', + 'view_access_logs' => 'Zobacz dziennik zdarzeń', + 'nice_message' => 'Miłego dnia!', ] ], 'user' => [ @@ -79,7 +110,7 @@ return [ 'login' => 'Login', 'first_name' => 'Imię', 'last_name' => 'Nazwisko', - 'full_name' => 'Pełna nazwa', + 'full_name' => 'Imię i nazwisko', 'email' => 'E-mail', 'groups' => 'Grupa', 'groups_comment' => 'Określ, do której grupy należy ten użytkownik', @@ -99,9 +130,11 @@ return [ 'deny' => 'Odmów', 'group' => [ 'name' => 'Grupa', + 'name_comment' => 'Nazwa wyświetlana na liście grup oraz w formularzu dodawania/edycji administratora.', 'name_field' => 'Nazwa', 'description_field' => 'Opis', 'is_new_user_default_field' => 'Dodawaj nowych administratorów do tej grupy jako domyślnej.', + 'is_new_user_default_field_comment' => 'Dodaj nowych administratorów domyślnie do tej grupy', 'code_field' => 'Kod', 'code_comment' => 'Wpisz unikalny kod, jeżeli chcesz mieć do niego dostęp poprzez API.', 'menu_label' => 'Grupy', @@ -123,16 +156,20 @@ return [ 'missing_column' => 'Brak definicji kolumn dla :columns.', 'missing_columns' => 'Lista użyta w :class nie posiada zdefiniowanej listy kolumn.', 'missing_definition' => "Zachowanie listy nie posiada kolumn dla ':field'.", + 'missing_parent_definition' => "Zachowanie listy nie zawiera definicji dla ':definition'.", 'behavior_not_ready' => 'Zachowanie listy nie zostało zainicjowane, sprawdź czy wywołałeś makeLists() w swoim kontrolerze.', 'invalid_column_datetime' => "Wartość kolumny ':column' nie jest objektem typu DateTime, czy nie brakuje Ci referencji \$dates w Modelu?", 'pagination' => 'Wyświetlono rekordy: :from-:to z :total', 'prev_page' => 'Poprzednia strona', 'next_page' => 'Następna strona', + 'refresh' => 'Odśwież', + 'updating' => 'Aktualizowanie...', 'loading' => 'Wczytywanie...', 'setup_title' => 'Ustawienia listy', 'setup_help' => 'Użyj pól wyboru, aby wybrać kolumny, które chcesz zobaczyć w liście. Możesz zmienić pozycję kolumny przeciągająć ją w dół lub w górę.', 'records_per_page' => 'Rekordy na stronę', 'records_per_page_help' => 'Wybierz liczbnę rekordów do wyświetlenia na stronę. Wyższa liczba rekordów na jedną stronę może zmniejszyć wydajność.', + 'check' => 'Sprawdź', 'delete_selected' => 'Usuń zaznaczone', 'delete_selected_empty' => 'Nie wybrano elementów do usunięcia.', 'delete_selected_confirm' => 'Usunąć zaznaczone elementy?', @@ -159,8 +196,9 @@ return [ 'create_success' => ':name został stworzony pomyślnie', 'update_success' => ':name został stworzony pomyślnie', 'delete_success' => ':name został usunięty pomyślnie', - 'missing_id' => 'ID rekordu formularza nie zostało określone.', - 'missing_model' => 'Zachowanie formularza w klasie :class nie ma zadefiniowanego modelu.', + 'reset_success' => 'Resetowanie zostało zakończone', + 'missing_id' => 'ID rekordu formularza nie zostało znalezione.', + 'missing_model' => 'Zachowanie formularza w klasie :class nie ma zadefiniowanego Modelu.', 'missing_definition' => "Zachowanie formularza nie posiada pola dla ':field'.", 'not_found' => 'Rekord formularza o ID :id nie został znaleziony.', 'action_confirm' => 'Czy jesteś pewny?', @@ -172,9 +210,11 @@ return [ 'save_and_close' => 'Zapisz i zamknij', 'saving' => 'Zapisywanie...', 'saving_name' => 'Zapisywanie :name...', - 'delete' => 'Skasuj', - 'deleting' => 'Kasowanie...', - 'deleting_name' => 'Kasowanie :name...', + 'delete' => 'Usuń', + 'deleting' => 'Usuwanie...', + 'confirm_delete' => 'Usunąć rekord?', + 'confirm_delete_multiple' => 'Usunąć zaznaczone rekordy?', + 'deleting_name' => 'Usuwanie :name...', 'reset_default' => 'Resetuj do domyślnych', 'resetting' => 'Resetowanie', 'resetting_name' => 'Resetowanie :name', @@ -187,67 +227,77 @@ return [ 'close' => 'Zamknij', 'confirm' => 'Potwierdź', 'reload' => 'Przeładuj', + 'complete' => 'Zakończ', 'ok' => 'OK', 'or' => 'lub', 'confirm_tab_close' => 'Czy naprawdę chcesz zamknąć tą kartę? Wszystkie niezapisane zmiany zostaną utracone.', 'behavior_not_ready' => 'Zachowanie formularza nie zostało zainicjowane, sprawdź czy wywołałeś initForm() w swoim kontrolerze.', 'preview_no_files_message' => 'Brak wgranych plików.', - 'preview_no_record_message' => 'Break zaznaczonych elementów.', + 'preview_no_record_message' => 'Brak zaznaczonych elementów.', 'select' => 'Zaznacz', 'select_all' => 'wszystkie', 'select_none' => 'żadne', 'select_placeholder' => 'proszę zaznacz', 'insert_row' => 'Wstaw wiersz', - 'delete_row' => 'Skasuj wiersz', + 'insert_row_below' => 'Wstaw wiersz poniżej', + 'delete_row' => 'Usuń wiersz', 'concurrency_file_changed_title' => 'Plik został zmieniony.', - 'concurrency_file_changed_description' => "Plik, który edytujesz został zmieniony na dysku przez innego użytkownika. Możesz przeładować plik i stracić swoje zmiany lub nadpisać plik na dysku." + 'concurrency_file_changed_description' => 'Plik, który edytujesz został zmieniony na dysku przez innego użytkownika. Możesz przeładować plik i stracić swoje zmiany lub nadpisać plik na dysku.', + 'return_to_list' => 'Powrót do listy' + ], + 'recordfinder' => [ + 'find_record' => 'Znajdź Rekord' ], 'relation' => [ 'missing_config' => "Zachowanie relacji nie zawiera konfiguracji dla pola ':config'.", 'missing_definition' => "Zachowanie relacji nie zawiera definicji dla pola ':field'.", - 'missing_model' => "Zachowanie relacji użyte w klasie :class nie zawiera definicji modelu.", - 'invalid_action_single' => "Ta akcja nie może zostać wykonana na pojedynczej zależności.", - 'invalid_action_multi' => "Ta akcja nie może zostać wykonana na wielokrotnej zależności.", - 'help' => "Kliknij element, aby dodać.", - 'related_data' => "Pokrewne :name dane", - 'add' => "Dodaj", - 'add_selected' => "Dodaj zaznaczony", - 'add_a_new' => "Dodaj nowy :name", + 'missing_model' => 'Zachowanie relacji użyte w klasie :class nie zawiera definicji modelu.', + 'invalid_action_single' => 'Ta akcja nie może zostać wykonana na pojedynczej zależności.', + 'invalid_action_multi' => 'Ta akcja nie może zostać wykonana na wielokrotnej zależności.', + 'help' => 'Kliknij element, aby dodać.', + 'related_data' => 'Pokrewne :name dane', + 'add' => 'Dodaj', + 'add_selected' => 'Dodaj zaznaczony', + 'add_a_new' => 'Dodaj nowy :name', 'link_selected' => 'Dołącz zaznaczone', 'link_a_new' => 'Dołącz nowy :name', - 'cancel' => "Anuluj", - 'close' => "Zamknij", - 'add_name' => "Dodaj :name", - 'create' => "Stwórz", - 'create_name' => "Stwórz :name", - 'update' => "Aktualizuj", - 'update_name' => "Aktualizuj :name", - 'preview' => "Podgląd", - 'preview_name' => "Podgląd :name", - 'remove' => "Usuń", - 'remove_name' => "Usuń :name", - 'delete' => "Skasuj", - 'delete_name' => "Skasuj :name", - 'delete_confirm' => "Na pewno?", + 'cancel' => 'Anuluj', + 'close' => 'Zamknij', + 'add_name' => 'Dodaj :name', + 'create' => 'Stwórz', + 'create_name' => 'Stwórz :name', + 'update' => 'Aktualizuj', + 'update_name' => 'Aktualizuj :name', + 'preview' => 'Podgląd', + 'preview_name' => 'Podgląd :name', + 'remove' => 'Usuń', + 'remove_name' => 'Usuń :name', + 'delete' => 'Usuń', + 'delete_name' => 'Usuń :name', + 'delete_confirm' => 'Na pewno?', 'link' => 'Dołącz', 'link_name' => 'Dołącz :name', 'unlink' => 'Odłącz', 'unlink_name' => 'Odłącz :name', 'unlink_confirm' => 'Jesteś pewien?' ], + 'reorder' => [ + 'default_title' => 'Zmień kolejność', + 'no_records' => 'Brak dostępnych rekordów do sortowania.' + ], 'model' => [ 'name' => 'Model', 'not_found' => "Model ':class' o ID :id nie został znaleziony", 'missing_id' => 'Nie istnieje sprecyzowane ID dla szukania rekordu modelu.', 'missing_relation' => "Model ':class' nie zawiera definicji dla ':relation'.", 'missing_method' => "Model ':class' nie zawiera metody ':method'.", - 'invalid_class' => "Model :model użyty w klasie :class jest nieprawidłowy i musi dziedziczyć klasę \Modelu.", + 'invalid_class' => 'Model :model użyty w klasie :class jest nieprawidłowy i musi dziedziczyć klasę \Model.', 'mass_assignment_failed' => "Masowe przydzielanie nie powiodło się dla atrybutu ':attribute'." ], 'warnings' => [ 'tips' => 'Konfiguracja Systemu - Porady', 'tips_description' => 'Istnieją pewne problemy, na które należy zwrócić uwagę, aby skonfigurować sytem poprawnie.', - 'permissions' => 'PHP nie może zapisać danych w katalogu :name lub jego podkatalogach. Prosimy o przydzielenie odpowiednich uprawnień na serwerze.', + 'permissions' => 'PHP nie może zapisać danych w katalogu :name lub jego podkatalogach. Prosimy o przydzielenie odpowiednich uprawnień na serwerze.', 'extension' => 'Rozszerzenie PHP :name nie jest zainstalowane. Prosimy o instalację i aktywację rozszerzenia.' ], 'editor' => [ @@ -257,12 +307,44 @@ return [ 'tab_size' => 'Wielkość karty', 'use_hard_tabs' => 'Wcięcie tabulaturą', 'code_folding' => 'Zawijanie kodu', + 'code_folding_begin' => 'Oznacz początek', + 'code_folding_begin_end' => 'Oznacz początek i koniec', + 'autocompletion' => 'Autouzupełnianie', 'word_wrap' => 'Zawijanie wierszy', 'highlight_active_line' => 'Podświetl aktywne linie', 'auto_closing' => 'Automatycznie zamykaj tagi i specjalne znaki', 'show_invisibles' => 'Pokaż niewidzialne znaki', 'show_gutter' => 'Pokaż gutter', - 'theme' => 'Schemat kolorów' + 'basic_autocompletion' => 'Podstawowe autouzupełnianie (Ctrl + Space)', + 'live_autocompletion' => 'Autouzupełnianie na żywo', + 'enable_snippets' => 'Włącz code snippets (Tab)', + 'display_indent_guides' => 'Pokaż wskazówki dla wcięcia', + 'show_print_margin' => 'Pokaż margines wydruku', + 'mode_off' => 'Off', + 'mode_fluid' => 'Fluid', + '40_characters' => '40 Znaków', + '80_characters' => '80 Znaków', + 'theme' => 'Schemat kolorów', + 'markup_styles' => 'Style znaczników', + 'custom_styles' => 'Niestandardowy arkusz stylów', + 'custom styles_comment' => 'Niestandardowe style do dołączenia w edytorze HTML.', + 'markup_classes' => 'Klasy znaczników', + 'paragraph' => 'Paragraf', + 'link' => 'Link', + 'table' => 'Tabela', + 'table_cell' => 'Komórka Tabeli', + 'image' => 'Obraz', + 'label' => 'Etykieta', + 'class_name' => 'Nazwa klasy', + 'markup_tags' => 'Znaczniki', + 'allowed_empty_tags' => 'Zezwól na puste znaczniki', + 'allowed_empty_tags_comment' => 'Lista znaczników, które nie będą usunięte w przypadku braku zawartości.', + 'allowed_tags' => 'Dozwolone znaczniki', + 'allowed_tags_comment' => 'Lista dozwolonych znaczników.', + 'no_wrap' => 'Nie zawijaj znaczników', + 'no_wrap_comment' => 'Lista znaczników, które nie powinny być zawinięte w znacznik blokowy.', + 'remove_tags' => 'Usuń znaczniki', + 'remove_tags_comment' => 'Lista znaczników, które zostaną usunięte wraz z zawartością.' ], 'tooltips' => [ 'preview_website' => 'Podgląd strony' @@ -287,21 +369,30 @@ return [ 'app_tagline' => 'Podpis aplikacji', 'app_tagline_description' => 'Ten podpis jest wyświetlany na ekranie logowania do back-endu', 'colors' => 'Kolory', - 'primary_color' => 'Podstawowy color', - 'secondary_color' => 'Dodatkowy color', - 'accent_color' => 'Accent color', + 'primary_color' => 'Podstawowy kolor', + 'secondary_color' => 'Dodatkowy kolor', + 'accent_color' => 'Akcentowany kolor', 'styles' => 'Style', - 'custom_stylesheet' => 'Własne style' + 'custom_stylesheet' => 'Własne style', + 'navigation' => 'Nawigacja', + 'menu_mode' => 'Styl menu', + 'menu_mode_inline' => 'W linii', + 'menu_mode_tile' => 'Kafelki', + 'menu_mode_collapsed' => 'Zwinięte' ], 'backend_preferences' => [ 'menu_label' => 'Ustawienia Back-end', 'menu_description' => 'Zarządzaj swoimi ustawieniami konta, jak język panelu.', + 'region' => 'Region', + 'code_editor' => 'Edytor kodu', + 'timezone' => 'Strefa czasowa', + 'timezone_comment' => 'Dopasuj wyświetlanie dat do tej strefy czasowej.', 'locale' => 'Język', 'locale_comment' => 'Wybierz język, którego chciałbyś używać.' ], 'access_log' => [ 'hint' => 'Ten log wyświetla listę udanych logowań administratorów. Dane są przechowywane przez :days dni.', - 'menu_label' => 'Access log', + 'menu_label' => 'Dziennik zdarzeń', 'menu_description' => 'Zobacz listę pomyślnych zalogowań do panelu administracyjnego.', 'created_at' => 'Data & Czas', 'login' => 'Login', @@ -311,7 +402,9 @@ return [ 'email' => 'Email' ], 'filter' => [ - 'all' => 'wszystkie' + 'all' => 'wszystkie', + 'options_method_not_exists' => "Klasa modelu :model musi definiować metodę :method() zwracającą listę opcji dla filtru ':filter'.", + 'date_all' => 'Cały okres' ], 'import_export' => [ 'upload_csv_file' => '1. Wgraj plik CSV', @@ -352,5 +445,37 @@ return [ 'export_progress' => 'Postęp eksportu', 'export_error' => 'Błąd eksportu', 'column_preview' => 'Podgląd kolumny', + 'file_not_found_error' => 'Nie znaleziono pliku', + 'empty_error' => 'Brak danych do wyeksportowania', + 'empty_import_columns_error' => 'Określ kolumny do importu.', + 'match_some_column_error' => 'Najpierw przypisz jakieś kolumny.', + 'required_match_column_error' => 'Przypisz kolumnę dla wymaganego pola :label.', + 'empty_export_columns_error' => 'Określ kolumny do eksportu.', + 'behavior_missing_uselist_error' => 'Musisz zaimplementować zachowanie ListController z włączoną opcją "useList".', + 'missing_model_class_error' => 'Określ klasę modelu dla typu :type', + 'missing_column_id_error' => 'Brak identyfikatora kolumny', + 'unknown_column_error' => 'Nieznana kolumna', + 'encoding_not_supported_error' => 'Nie rozpoznano kodowania pliku źródłowego. Proszę wybrać opcję niestandardowego formatu pliku z poprawnym kodowaniem, aby zaimportować plik.', + 'encoding_format' => 'Kodowanie', + 'encodings' => [ + 'utf_8' => 'UTF-8', + 'us_ascii' => 'US-ASCII', + 'iso_8859_1' => 'ISO-8859-1 (Latin-1, Europa Zachodnia)', + 'iso_8859_2' => 'ISO-8859-2 (Latin-2, Europa Centralna)', + 'iso_8859_3' => 'ISO-8859-3 (Latin-3, Europa Południowa)', + 'iso_8859_4' => 'ISO-8859-4 (Latin-4, Europa Północna)', + 'iso_8859_5' => 'ISO-8859-5 (Latin, Cyrylica)', + 'iso_8859_6' => 'ISO-8859-6 (Latin, Arabski)', + 'iso_8859_7' => 'ISO-8859-7 (Latin, Grecki)', + 'iso_8859_8' => 'ISO-8859-8 (Latin, Hebrajski)', + 'iso_8859_0' => 'ISO-8859-9 (Latin-5, Turecki)', + 'iso_8859_10' => 'ISO-8859-10 (Latin-6, Nordycki)', + 'iso_8859_11' => 'ISO-8859-11 (Latin, Tajski)', + 'iso_8859_13' => 'ISO-8859-13 (Latin-7, Kraje Nadbałtyckie)', + 'iso_8859_14' => 'ISO-8859-14 (Latin-8, Celtycki)', + 'iso_8859_15' => 'ISO-8859-15 (Latin-9, Europa Zachodnia wersja ze znakiem euro)', + 'windows_1251' => 'Windows-1251 (CP1251)', + 'windows_1252' => 'Windows-1252 (CP1252)' + ] ], ]; diff --git a/modules/cms/lang/pl/lang.php b/modules/cms/lang/pl/lang.php index a433a7158..942192498 100644 --- a/modules/cms/lang/pl/lang.php +++ b/modules/cms/lang/pl/lang.php @@ -8,14 +8,17 @@ return [ 'error_saving' => "Błąd przy zapisywaniu pliku ':name'. Proszę sprawdzić uprawnienia zapisu/modyfikacji.", 'error_creating_directory' => 'Błąd przy tworzeniu folderu :name. Proszę sprawdzić uprawnienia zapisu/modyfikacji.', 'invalid_file_extension' => 'Nieprawidłowe rozszerzenie pliku: :invalid. Dozwolone rozszerzenia to: :allowed.', - 'error_deleting' => "Błąd przy kasowaniu pliku szablonu ':name'. Proszę sprawdzić uprawnienia zapisu/modyfikacji.", + 'error_deleting' => "Błąd przy usuwaniu pliku szablonu ':name'. Proszę sprawdzić uprawnienia zapisu/modyfikacji.", 'delete_success' => 'Szablony zostały prawidłowo usunięte: :count.', - 'file_name_required' => 'Pole Nazwa Pliku jest wymagane.' + 'file_name_required' => 'Pole Nazwa Pliku jest wymagane.', + 'safe_mode_enabled' => 'Safe mode jest obecnie włączony.', ], 'dashboard' => [ 'active_theme' => [ - 'online' => 'online', - 'maintenance' => 'w konserwacji', + 'widget_title_default' => 'Strona', + 'online' => 'Online', + 'maintenance' => 'W konserwacji', + 'manage_themes' => 'Zarządzaj motywami', ] ], 'theme' => [ @@ -29,7 +32,7 @@ return [ 'not_found' => 'Edytowany motyw nie został znaleziony.', 'not_match' => "Obiekt który próbujesz edytować nie należy do wybranego motywu. Proszę przeładować stronę." ], - 'settings_menu' => 'Motyw strony (Front-end theme)', + 'settings_menu' => 'Motyw strony', 'settings_menu_description' => 'Zobacz listę zainstalowanych motywów i wybierz, który aktywować.', 'default_tab' => 'Właściwości', 'name_label' => 'Nazwa', @@ -48,6 +51,7 @@ return [ 'theme_title' => 'Motywy', 'activate_button' => 'Aktywuj', 'active_button' => 'Aktywuj', + 'customize_theme' => 'Personalizuj Motyw', 'customize_button' => 'Personalizuj', 'duplicate_button' => 'Duplikuj', 'duplicate_title' => 'Duplikuj motyw', @@ -87,10 +91,11 @@ return [ 'return' => 'Wróć do listy motywów', ], 'maintenance' => [ - 'settings_menu' => 'Tryb konserwacji (Maintenance mode)', + 'settings_menu' => 'Tryb konserwacji', 'settings_menu_description' => 'Konfiguruj oraz włącz tryb konserwacji strony.', 'is_enabled' => 'Włącz tryb konserwacji', - 'is_enabled_comment' => 'Kiedy włączony odwiedzający zamiast normalnej strony zobaczą stronę wybraną poniżej.' + 'is_enabled_comment' => 'Kiedy włączony odwiedzający zamiast normalnej strony zobaczą stronę wybraną poniżej.', + 'hint' => 'Tryb konserwacji wyświetli stronę konserwacji dla odwiedzających, którzy nie są zalogowani do panelu administracyjnego.', ], 'page' => [ 'not_found_name' => "Strona ':name' nie została znaleziona", @@ -106,9 +111,9 @@ return [ 'unsaved_label' => 'Niezapisane strony', 'no_list_records' => 'Nie znaleziono stron', 'new' => 'Nowa strona', - 'invalid_url' => 'Nieprawidłowy format URL. Powinien rozpoczynać się od slasha / może zawierać cyfry, znaki oraz symbole: ._-[]:?|/+*^$', - 'delete_confirm_multiple' => 'Czy na pewno chcesz chcesz skasować wszystkie wybrane strony?', - 'delete_confirm_single' => 'Czy na pewno chcesz chcesz skasować tą stronę?', + 'invalid_url' => 'Nieprawidłowy format URL. Powinien rozpoczynać się od ukośnika (/) i może zawierać cyfry, znaki oraz następujące symbole: ._-[]:?|/+*^$', + 'delete_confirm_multiple' => 'Czy na pewno chcesz usunąć zaznaczone strony?', + 'delete_confirm_single' => 'Czy na pewno chcesz usunąć tę stronę?', 'no_layout' => '-- brak układu --' ], 'layout' => [ @@ -117,8 +122,8 @@ return [ 'unsaved_label' => 'Niezapisane układy', 'no_list_records' => 'Nie znaleziono układów', 'new' => 'Nowy układ', - 'delete_confirm_multiple' => 'Czy na pewno chcesz skasować wszystkie wybrane układy?', - 'delete_confirm_single' => 'Czy na pewno chcesz skasować ten układ?' + 'delete_confirm_multiple' => 'Czy na pewno chcesz usunąć zaznaczone układy?', + 'delete_confirm_single' => 'Czy na pewno chcesz usunąć ten układ?' ], 'partial' => [ 'not_found_name' => "Fragment ':name' nie został znaleziony.", @@ -126,8 +131,8 @@ return [ 'menu_label' => 'Fragmenty', 'unsaved_label' => 'Niezapisane fragmenty', 'no_list_records' => 'Nie znaleziono fragmentów', - 'delete_confirm_multiple' => 'Czy na pewno chcesz skasować wszystkie wybrane fragmenty?', - 'delete_confirm_single' => 'Czy na pewno chcesz skasować ten fragment?', + 'delete_confirm_multiple' => 'Czy na pewno chcesz usunąć zaznaczone fragmenty?', + 'delete_confirm_single' => 'Czy na pewno chcesz usunąć ten fragment?', 'new' => 'Nowy fragment' ], 'content' => [ @@ -135,8 +140,8 @@ return [ 'menu_label' => 'Treść', 'unsaved_label' => 'Niezapisana treść', 'no_list_records' => 'Nie znaleziono plików treści', - 'delete_confirm_multiple' => 'Czy na pewno chcesz skasować wszystkie wybrane pliki treści?', - 'delete_confirm_single' => 'Czy na pewno chcesz skasować ten plik treści?', + 'delete_confirm_multiple' => 'Czy na pewno chcesz usunąć zaznaczone pliki treści?', + 'delete_confirm_single' => 'Czy na pewno chcesz usunąć ten plik treści?', 'new' => 'Nowy plik treści' ], 'ajax_handler' => [ @@ -160,15 +165,19 @@ return [ 'description' => 'Opis', 'preview' => 'Podgląd', 'meta' => 'Meta', - 'meta_title' => 'Tytuł Meta', - 'meta_description' => 'Opis Meta', + 'meta_title' => 'SEO Tytuł', + 'meta_description' => 'SEO Opis', 'markup' => 'Markup', 'code' => 'Kod', 'content' => 'Treść', 'hidden' => 'Ukryta', 'hidden_comment' => 'Ukryte strony są widoczne tylko dla użytkowników panelu administracyjnego, którzy są zalogowani.', 'enter_fullscreen' => 'Włącz tryb pełnoekranowy', - 'exit_fullscreen' => 'Wyłącz tryb pełnoekranowy' + 'exit_fullscreen' => 'Wyłącz tryb pełnoekranowy', + 'open_searchbox' => 'Otwórz wyszukiwanie', + 'close_searchbox' => 'Zamknij wyszukiwanie', + 'open_replacebox' => 'Otwórz zamienianie tekstu', + 'close_replacebox' => 'Zamknij zamienianie tekstu' ], 'asset' => [ 'menu_label' => 'Zasoby', @@ -181,7 +190,7 @@ return [ 'directory_popup_title' => 'Nowy folder', 'directory_name' => 'Nazwa folderu', 'rename' => 'Zmień nazwę', - 'delete' => 'Skasuj', + 'delete' => 'Usuń', 'move' => 'Przenieś', 'select' => 'Wybierz', 'new' => 'Nowy plik', @@ -222,11 +231,11 @@ return [ 'invalid_request' => 'The template cannot be saved because of invalid component data.', 'no_records' => 'Nie znaleziono komponentów', 'not_found' => "Komponent ':name' nie został znaleziony.", - 'method_not_found' => "Kompnent ':name' nie zawiera metody ':method'." + 'method_not_found' => "Komponent ':name' nie zawiera metody ':method'." ], 'template' => [ - 'invalid_type' => 'Nie znany typ szablonu.', - 'not_found' => 'Żądany szablon nie został znaleziony.', + 'invalid_type' => 'Nieznany typ szablonu.', + 'not_found' => 'Szablon nie został znaleziony.', 'saved'=> 'Szablon został zapisany pomyślnie.' ], 'permissions' => [ @@ -270,6 +279,8 @@ return [ 'multiple_selected' => 'Wybrano wiele elementów.', 'uploading_file_num' => 'Przesyłanie :number pliku(ów)...', 'uploading_complete' => 'Przesyłanie zakończone', + 'uploading_error' => 'Błąd przesyłania pliku', + 'type_blocked' => 'Typ pliku jest zablokowany ze względów bezpieczeństwa.', 'order_by' => 'Sortowanie', 'folder' => 'Folder', 'no_files_found' => 'Nie znaleziono żadnych pasujących elementów.', diff --git a/modules/system/lang/pl/client.php b/modules/system/lang/pl/client.php new file mode 100644 index 000000000..7d723a3c8 --- /dev/null +++ b/modules/system/lang/pl/client.php @@ -0,0 +1,92 @@ + [ + 'formatting' => 'Formaty', + 'quote' => 'Cytat', + 'code' => 'Widok kod', + 'header1' => 'Nagłówek 1', + 'header2' => 'Nagłówek 2', + 'header3' => 'Nagłówek 3', + 'header4' => 'Nagłówek 4', + 'header5' => 'Nagłówek 5', + 'header6' => 'Nagłówek 6', + 'bold' => 'Pogrubienie', + 'italic' => 'Kursywa', + 'unorderedlist' => '"Lista nieuporządkowana', + 'orderedlist' => 'Uporządkowana lista', + 'video' => 'Wideo', + 'image' => 'Obrazek', + 'link' => 'Link', + 'horizontalrule' => 'Wstaw linię poziomą', + 'fullscreen' => 'Pełny ekran', + 'preview' => 'Podgląd', + ], + + 'mediamanager' => [ + 'insert_link' => "Wstaw Link", + 'insert_image' => "Wstaw Obraz", + 'insert_video' => "Wstaw Wideo", + 'insert_audio' => "Wstaw Audio", + 'invalid_file_empty_insert' => "Prosimy wybrać plik do podlinkowania.", + 'invalid_file_single_insert' => "Prosimy wybrać pojedynczy plik.", + 'invalid_image_empty_insert' => "Prosimy wybrać obrazy do wstawienia.", + 'invalid_video_empty_insert' => "Prosimy wybrać wideo do wstawienia.", + 'invalid_audio_empty_insert' => "Prosimy wybrać audio do wstawienia.", + ], + + 'alert' => [ + 'confirm_button_text' => 'OK', + 'cancel_button_text' => 'Anuluj', + ], + + 'datepicker' => [ + 'previousMonth' => 'Poprzedni miesiąc', + 'nextMonth' => 'Następny miesiąc', + 'months' => ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], + 'weekdays' => ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'], + 'weekdaysShort' => ['Nie', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'] + ], + + 'filter' => [ + 'group' => [ + 'all' => 'wszystkie' + ], + 'dates' => [ + 'all' => 'wszystkie', + 'filter_button_text' => 'Filtruj', + 'reset_button_text' => 'Resetuj', + 'date_placeholder' => 'Data', + 'after_placeholder' => 'Po', + 'before_placeholder' => 'Przed' + ] + ], + + 'eventlog' => [ + 'show_stacktrace' => 'Pokaż stos wywołań', + 'hide_stacktrace' => 'Ukryj stos wywołań', + 'tabs' => [ + 'formatted' => 'Sformatowany', + 'raw' => 'Nieprzetworzony', + ], + 'editor' => [ + 'title' => 'Edytor kodu źródłowego', + 'description' => 'Twój system operacyjny powinien być skonfigurowany aby nasłuchiwać na jednym z podanych schematów URL.', + 'openWith' => 'Otwórz za pomocą', + 'remember_choice' => 'Zapamiętaj wybraną opcję dla tej sesji', + 'open' => 'Otwórz', + 'cancel' => 'Anuluj' + ] + ] +]; diff --git a/modules/system/lang/pl/lang.php b/modules/system/lang/pl/lang.php index e60149ba5..a43e8a810 100644 --- a/modules/system/lang/pl/lang.php +++ b/modules/system/lang/pl/lang.php @@ -6,29 +6,35 @@ return [ 'tagline' => 'Getting back to basics' ], 'locale' => [ - 'cs' => 'Czech', - 'da' => 'Danish', - 'en' => 'Angielski', + 'cs' => 'Czeski', + 'da' => 'Duński', + 'en' => 'Angielski (Stany Zjednoczone)', + 'en-au' => 'English (Australia)', + 'en-ca' => 'English (Kanada)', + 'en-gb' => 'English (Wielka Brytania)', 'de' => 'Niemiecki', + 'el' => 'Grecki', 'es' => 'Hiszpański', 'es-ar' => 'Hiszpański (Argentyna)', 'fa' => 'Perski', 'fr' => 'Francuski', + 'fr-ca' => 'Francuski (Kanada)', 'hu' => 'Węgierski', 'id' => 'Indonezyjski', 'it' => 'Włoski', 'ja' => 'Japoński', 'lv' => 'Łotewski', 'nb-no' => 'Norweski (Bokmål)', - 'nl' => 'Duński', + 'nl' => 'Holenderski', 'pl' => 'Polski', - 'pt-br' => 'Brazylisjki Portugalski', + 'pt-br' => 'Portugalski (Brazylia)', 'ro' => 'Rumuński', 'ru' => 'Rosyjski', 'sv' => 'Szwedzki', 'sk' => 'Słowacki (Słowacja)', 'tr' => 'Turecki', - 'zh-cn' => 'Chiński (Chiny)' + 'zh-cn' => 'Chiński (Chiny)', + 'zh-tw' => 'Chiński (Tajwan)', ], 'directory' => [ 'create_fail' => 'Nie można stworzyć katalogu: :name' @@ -37,7 +43,7 @@ return [ 'create_fail' => 'Nie można stworzyć pliku: :name' ], 'combiner' => [ - 'not_found' => "The combiner file ':name' is not found." + 'not_found' => "Połączony plik ':name' nie istnieje." ], 'system' => [ 'name' => 'System', @@ -52,9 +58,9 @@ return [ 'users' => 'Użytkownicy', 'system' => 'System', 'social' => 'Społecznościowe', - 'events' => 'Events', + 'events' => 'Wydarzenia', 'customers' => 'Klienci', - 'my_settings' => 'Moje ustawienia' + 'my_settings' => 'Moje Ustawienia' ] ], 'theme' => [ @@ -99,12 +105,12 @@ return [ 'frozen_help' => 'Zamrożone wtyczki będą pomijane w procesie aktualizacji.', 'selected_amount' => 'Zaznaczono wtyczek: :amount', 'remove_confirm' => 'Czy jesteś pewny?', - 'remove_success' => 'Skutecznie usunięto wtyczki z systemu.', + 'remove_success' => 'Pomyślnie usunięto wtyczki z systemu.', 'refresh_confirm' => 'Czy jesteś pewny?', - 'refresh_success' => 'Skutecznie odświeżono wtyczki przez system.', + 'refresh_success' => 'Pomyślnie odświeżono wtyczki przez system.', 'disable_confirm' => 'Czy jesteś pewny?', - 'disable_success' => 'Skutecznie wyłączono wtyczki.', - 'enable_success' => 'Skutecznie włączono wtyczki.', + 'disable_success' => 'Pomyślnie wyłączono wtyczki.', + 'enable_success' => 'Pomyślnie włączono wtyczki.', 'unknown_plugin' => 'Wtyczki zostały usunięte z systemu plików.' ], 'project' => [ @@ -112,20 +118,20 @@ return [ 'owner_label' => 'Właściciel', 'attach' => 'Podłącz Projekt', 'detach' => 'Odłącz Projekt', - 'none' => 'żaden', + 'none' => 'Żaden', 'id' => [ 'label' => 'ID Projektu', 'help' => 'Jak znaleźć ID Projektu', - 'missing' => 'Proszę sprecyzować ID projektu do użycia.' + 'missing' => 'Proszę podać ID projektu do użycia.' ], 'detach_confirm' => 'Czy jesteś pewny, że chcesz odłaczyć ten projekt?', - 'unbind_success' => 'Projekt został skutecznie odłączony.' + 'unbind_success' => 'Projekt został pomyślnie odłączony.' ], 'settings' => [ 'menu_label' => 'Ustawienia', 'not_found' => 'Nie można znaleźć określonych ustawień.', - 'missing_model' => 'The settings page is missing a Model definition.', - 'update_success' => 'Ustawienia dla :name zostały prawidłowo zaktualizowane.', + 'missing_model' => 'Na stronie ustawień brakuje definicji modelu.', + 'update_success' => 'Ustawienia dla :name zostały pomyślnie zaktualizowane.', 'return' => 'Wróc do ustawień systemu', 'search' => 'Szukaj' ], @@ -146,72 +152,91 @@ return [ 'smtp_password' => 'Hasło', 'smtp_port' => 'Port SMTP', 'smtp_ssl' => 'Połączenie SSL wymagane', + 'smtp_encryption' => 'Protokół szyfrowania SMTP', + 'smtp_encryption_none' => 'Bez szyfrowania', + 'smtp_encryption_tls' => 'TLS', + 'smtp_encryption_ssl' => 'SSL', 'sendmail' => 'Sendmail', 'sendmail_path' => 'Ścieżka Sendmail', - 'sendmail_path_comment' => 'Proszę sprecyzować ścieżkę programu sendmail.', + 'sendmail_path_comment' => 'Proszę podać ścieżkę programu sendmail.', 'mailgun' => 'Mailgun', 'mailgun_domain' => 'Domena Mailgun', - 'mailgun_domain_comment' => 'Proszę sprecyzować nazwę domeny Mailgun.', + 'mailgun_domain_comment' => 'Proszę podać nazwę domeny Mailgun.', 'mailgun_secret' => 'Mailgun Secret', - 'mailgun_secret_comment' => 'Podaj klucz API Mailgun (Mailgun API key).', + 'mailgun_secret_comment' => 'Podaj swój klucz API Mailgun.', 'mandrill' => 'Mandrill', 'mandrill_secret' => 'Mandrill secret', - 'mandrill_secret_comment' => 'Podaj klucz API Mandrill.', + 'mandrill_secret_comment' => 'Podaj swój klucz API Mandrill.', + 'ses' => 'SES', + 'ses_key' => 'SES key', + 'ses_key_comment' => 'Podaj swój klucz API SES', + 'ses_secret' => 'SES secret', + 'ses_secret_comment' => 'Podaj swój sekretny klucz API SES', + 'ses_region' => 'Region SES', + 'ses_region_comment' => 'Podaj swój region SES (e.g. us-east-1)', 'drivers_hint_header' => 'Nie zainstalowano sterowników', 'drivers_hint_content' => 'Ta opcja wysyłki wiadomości wymaga zainstalowania wtyczki ":plugin".' ], 'mail_templates' => [ 'menu_label' => 'Szablony wiadomości email', - 'menu_description' => 'Modyfikuj szablony wiadomości wysyłanych do użytkowników, administratorów. Zmieniaj układy wiadomości.', + 'menu_description' => 'Modyfikuj szablony wiadomości wysyłanych do użytkowników, administratorów. Zarządzaj układami wiadomości.', 'new_template' => 'Nowy Szablon', 'new_layout' => 'Nowy Układ', 'template' => 'Szablon', 'templates' => 'Szablony', - 'menu_layouts_label' => 'Układy wiadomości email', + 'menu_layouts_label' => 'Układy wiadomości', 'layout' => 'Układ', 'layouts' => 'Układy', + 'no_layout' => '-- Brak układu --', 'name' => 'Nazwa', 'name_comment' => 'Unikalna nazwa odwołująca się do tego szablonu', 'code' => 'Kod', 'code_comment' => 'Unikalny kod tego szablonu', 'subject' => 'Temat', - 'subject_comment' => 'Temat wiadomości Email', + 'subject_comment' => 'Temat wiadomości', 'description' => 'Opis', 'content_html' => 'HTML', 'content_css' => 'CSS', 'content_text' => 'Plaintext', 'test_send' => 'Wyślij wiadomość testową', - 'test_success' => 'Wiadomość testowa wysłana prawidłowo.', + 'test_success' => 'Wiadomość testowa została wysłana pomyślnie.', + 'test_confirm' => 'Wyślij wiadomość testową do :email. Kontynuować?', + 'creating' => 'Tworzenie Szablonu...', + 'creating_layout' => 'Tworzenie Układu...', + 'saving' => 'Zapisywanie Szablonu...', + 'saving_layout' => 'Zapisywanie Układu...', + 'delete_confirm' => 'Usunąć ten szablon?', + 'delete_layout_confirm' => 'Usunąć ten układ?', + 'deleting' => 'Usuwanie Szablonu...', + 'deleting_layout' => 'Usuwanie Układu...', + 'sending' => 'Wysyłanie testowej wiadomości...', 'return' => 'Wróć do listy szablonów' ], 'install' => [ 'project_label' => 'Podłącz do Projektu', 'plugin_label' => 'Zainstaluj Wtyczkę', 'theme_label' => 'Zainstaluj Motyw', - 'missing_plugin_name' => 'Proszę sprecyzować nazwę Wtyczki do zainstalowania.', - 'missing_theme_name' => 'Proszę sprecyzować nazwę Motywu do zainstalowania.', + 'missing_plugin_name' => 'Proszę podać nazwę Wtyczki do zainstalowania.', + 'missing_theme_name' => 'Proszę podać nazwę Motywu do zainstalowania.', 'install_completing' => 'Proces instalacji prawie zakończony.', - 'install_success' => 'Wtyczka została zainstalowana prawidłowo.' + 'install_success' => 'Wtyczka została zainstalowana pomyślnie.' ], 'updates' => [ 'title' => 'Zarządzaj Aktualizacjami', - 'name' => 'Software – aktualizacje', + 'name' => 'Aktualizacje', 'menu_label' => 'Aktualizacje', 'menu_description' => 'Aktualizacja systemu, zarządzaj i instaluj wtyczki oraz szablony.', 'return_link' => 'Wróć do aktualizacji systemu', 'check_label' => 'Sprawdź aktualizacje', 'retry_label' => 'Spróbuj ponownie', - 'plugin_name' => 'Nazwa wtyczki', + 'plugin_name' => 'Nazwa', 'plugin_code' => 'Kod', 'plugin_description' => 'Opis', 'plugin_version' => 'Wersja', 'plugin_author' => 'Autor', - 'core_build' => 'Aktualny build', - 'core_build_old' => 'Aktualny build :build', - 'core_current_build' => 'Aktualny build', - 'core_build_new' => 'Build :build', - 'core_build_new_help' => 'Najnowszy build jest dostępny.', - 'core_build_help' => 'Najnowszy build jest dostępny.', + 'core_current_build' => 'Aktualna wersja', + 'core_build' => 'Aktualna wersja :build', + 'core_build_help' => 'Jest dostępna nowa wersja systemu.', 'core_downloading' => 'Pobieranie plików aplikacji', 'core_extracting' => 'Rozpakowywanie plików aplikacji', 'plugins' => 'Wtyczki', @@ -224,15 +249,15 @@ return [ 'theme_new_install' => 'Zainstaluj nowy motyw.', 'theme_downloading' => 'Pobieranie nowego motywu: :name', 'theme_extracting' => 'Rozpakowywanie motywu: :name', - 'update_label' => 'Software – aktualizacja', + 'update_label' => 'Aktualizuj', 'update_completing' => 'Zakończenie procesu aktualizacji', 'update_loading' => 'Wczytywanie dostępnych aktualizacji...', - 'update_success' => 'Proces aktualizacji został skutecznie zakończony.', + 'update_success' => 'Proces aktualizacji został pomyślnie zakończony.', 'update_failed_label' => 'Aktualizacja nie powiodła się.', 'force_label' => 'Zmuś do aktualizacji', 'found' => [ 'label' => 'Znaleziono nowe aktualizacje!', - 'help' => 'Kliknij, aby rozpocząć proces aktualizacji.' + 'help' => 'Kliknij Aktualizuj, aby rozpocząć proces aktualizacji.' ], 'none' => [ 'label' => 'Brak aktualizacji', @@ -268,40 +293,42 @@ return [ 'missing_property' => 'Class :class must define property $:property used by :behavior behavior.' ], 'config' => [ - 'not_found' => 'Plik konfiguracyjny :file nie zostały znaleziony w :location.', - 'required' => "Konfiguracja użyta w :location musi spełniać wartość ':property'." + 'not_found' => 'Plik konfiguracyjny :file nie został znaleziony w :location.', + 'required' => "Konfiguracja użyta w :location musi definiować wartość ':property'." ], 'zip' => [ - 'extract_failed' => "Rozpakowywanie pliku jądra ':file' nie powiodło się." + 'extract_failed' => "Rozpakowywanie pliku ':file' nie powiodło się." ], 'event_log' => [ 'hint' => 'Ten log wyświetla listę potencjalnych błędów, które mogły wystąpić w aplikacji, takich jak wyjątki oraz informacje debugowania.', - 'menu_label' => 'Log wydarzenia', - 'menu_description' => 'Zobacz wiadomość logów systemu wraz z ich czasem oraz szczegółami.', - 'empty_link' => 'Pusty log zdarzeń', - 'empty_loading' => 'Opróżnianie logów zdarzeń...', - 'empty_success' => 'Prawidłowo opróżniono logi zdarzeń.', - 'return_link' => 'Powrót do logów zdarzeń', + 'menu_label' => 'Dziennik zdarzeń', + 'menu_description' => 'Zobacz wiadomości logów systemu wraz z ich zarejestrowanym czasem oraz szczegółami.', + 'empty_link' => 'Opróżnij dziennik zdarzeń', + 'empty_loading' => 'Opróżnianie dziennika zdarzeń...', + 'empty_success' => 'Prawidłowo opróżniono dziennik zdarzeń.', + 'return_link' => 'Powrót do dziennika zdarzeń', 'id' => 'ID', 'id_label' => 'ID Zdarzenia', 'created_at' => 'Data & Czas', 'message' => 'Wiadomośc', - 'level' => 'Poziom' + 'level' => 'Poziom', + 'preview_title' => 'Zdarzenie', ], 'request_log' => [ - 'hint' => 'Ten log wyświetla listę żądań przeglądarki, które mogą wymagać Twojej uwagi. Dla przykładu, jeżeli wizytor strony otworzony stronę CMS, której nie można odnaleźć, rekord zostanie stworzony z kodem błędu 404.', + 'hint' => 'Ten log wyświetla listę żądań przeglądarki, które mogą wymagać Twojej uwagi. Dla przykładu, jeżeli odwiedzający otworzy stronę CMS, której nie można odnaleźć, rekord zostanie stworzony z kodem błędu 404.', 'menu_label' => 'Log żądań', 'menu_description' => 'Zobacz złe lub przekierowane żądania, takie jak Strona nie została odnaleziona (404).', - 'empty_link' => 'Pusty log żądań', + 'empty_link' => 'Opróźnij log żądań', 'empty_loading' => 'Opróżnianie logu żądań...', - 'empty_success' => 'Prawidłowo opróżniono logi żądań.', + 'empty_success' => 'Prawidłowo opróżniono log żądań.', 'return_link' => 'Powrót do logu żądań', 'id' => 'ID', 'id_label' => 'Log ID', 'count' => 'Licznik', - 'referer' => 'Referers', + 'referer' => 'Odsyłający', 'url' => 'URL', - 'status_code' => 'Status' + 'status_code' => 'Status', + 'preview_title' => 'Żądanie', ], 'permissions' => [ 'name' => 'System', @@ -311,6 +338,8 @@ return [ 'manage_mail_templates' => 'Zarządzaj szablonami wiadomości', 'manage_mail_settings' => 'Zarządzaj ustawieniami wiadomości', 'manage_other_administrators' => 'Zarządzaj innymi administratorami', + 'manage_preferences' => 'Zarządzaj ustawieniami backend', + 'manage_editor' => 'Zarządzaj ustawieniami edytora kodu', 'view_the_dashboard' => 'Zobacz kokpit', 'manage_branding' => 'Personalizuj zaplecze' ] diff --git a/modules/system/lang/pl/validation.php b/modules/system/lang/pl/validation.php index 801cf7e60..32405860b 100644 --- a/modules/system/lang/pl/validation.php +++ b/modules/system/lang/pl/validation.php @@ -4,96 +4,108 @@ return [ /* |-------------------------------------------------------------------------- - | Tłumaczenia Walidacji + | Validation Language Lines |-------------------------------------------------------------------------- | - | Następujące tłumaczenia zawierają domyślne komunikaty błędów używane - | przez klasę walidatora. Niektóre z nich mają wiele wersji, np. zasady - | rozmiaru. Nie krępuj się modyfikować tych komunikatów. + | The following language lines contain the default error messages used by + | the validator class. Some of these rules have multiple versions such + | such as the size rules. Feel free to tweak each of these messages. | */ - "accepted" => ":attribute musi zostać zaakceptowany.", - "active_url" => ":attribute jest nieprawidłowym adresem URL.", - "after" => ":attribute musi być datą późniejszą od :date.", - "alpha" => ":attribute może zawierać jedynie litery.", - "alpha_dash" => ":attribute może zawierać jedynie litery, cyfry i myślniki.", - "alpha_num" => ":attribute może zawierać jedynie litery i cyfry.", - "array" => ":attribute musi być tablicą.", - "before" => ":attribute musi być datą wcześniejszą od :date.", - "between" => [ - "numeric" => ":attribute musi zawierać się w granicach :min - :max.", - "file" => ":attribute musi zawierać się w granicach :min - :max kilobajtów.", - "string" => ":attribute musi zawierać się w granicach :min - :max znaków.", - "array" => ":attribute musi składać się z :min - :max elementów.", + 'accepted' => ':attribute musi zostać zaakceptowany.', + 'active_url' => ':attribute jest nieprawidłowym adresem URL.', + 'after' => ':attribute musi być datą późniejszą od :date.', + 'alpha' => ':attribute może zawierać jedynie litery.', + 'alpha_dash' => ':attribute może zawierać jedynie litery, cyfry i myślniki.', + 'alpha_num' => ':attribute może zawierać jedynie litery i cyfry.', + 'array' => ':attribute musi być tablicą.', + 'before' => ':attribute musi być datą wcześniejszą od :date.', + 'between' => [ + 'numeric' => ':attribute musi zawierać się w granicach :min - :max.', + 'file' => ':attribute musi zawierać się w granicach :min - :max kilobajtów.', + 'string' => ':attribute musi zawierać się w granicach :min - :max znaków.', + 'array' => ':attribute musi składać się z :min - :max elementów.', ], - "confirmed" => "Potwierdzenie :attribute nie zgadza się.", - "date" => ":attribute nie jest prawidłową datą.", - "date_format" => ":attribute nie jest w formacie :format.", - "different" => ":attribute oraz :other muszą się różnić.", - "digits" => ":attribute musi składać się z :digits cyfr.", - "digits_between" => ":attribute musi mieć od :min do :max cyfr.", - "email" => "Format :attribute jest nieprawidłowy.", - "exists" => "Zaznaczony :attribute jest nieprawidłowy.", - "image" => ":attribute musi być obrazkiem.", - "in" => "Zaznaczony :attribute jest nieprawidłowy.", - "integer" => ":attribute musi być liczbą całkowitą.", - "ip" => ":attribute musi być prawidłowym adresem IP.", - "max" => [ - "numeric" => ":attribute nie może być większy niż :max.", - "file" => ":attribute nie może być większy niż :max kilobajtów.", - "string" => ":attribute nie może być dłuższy niż :max znaków.", - "array" => ":attribute nie może mieć więcej niż :max elementów.", + 'boolean' => ':attribute musi mieć wartość prawda albo fałsz', + 'confirmed' => 'Potwierdzenie :attribute nie zgadza się.', + 'date' => ':attribute nie jest prawidłową datą.', + 'date_format' => ':attribute nie jest w formacie :format.', + 'different' => ':attribute oraz :other muszą się różnić.', + 'digits' => ':attribute musi składać się z :digits cyfr.', + 'digits_between' => ':attribute musi mieć od :min do :max cyfr.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'Format :attribute jest nieprawidłowy.', + 'exists' => 'Zaznaczony :attribute jest nieprawidłowy.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'Pole :attribute jest wymagane.', + 'image' => ':attribute musi być obrazkiem.', + 'in' => 'Zaznaczony :attribute jest nieprawidłowy.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => ':attribute musi być liczbą całkowitą.', + 'ip' => ':attribute musi być prawidłowym adresem IP.', + 'json' => 'The :attribute must be a valid JSON string.', + 'max' => [ + 'numeric' => ':attribute nie może być większy niż :max.', + 'file' => ':attribute nie może być większy niż :max kilobajtów.', + 'string' => ':attribute nie może być dłuższy niż :max znaków.', + 'array' => ':attribute nie może mieć więcej niż :max elementów.', ], - "mimes" => ":attribute musi być plikiem typu :values.", - "extensions" => ":attribute musi być rozszerzeniem :values.", - "min" => [ - "numeric" => ":attribute musi być nie mniejszy od :min.", - "file" => ":attribute musi mieć przynajmniej :min kilobajtów.", - "string" => ":attribute musi mieć przynajmniej :min znaków.", - "array" => ":attribute musi mieć przynajmniej :min elementów.", + 'mimes' => ':attribute musi być plikiem typu :values.', + 'min' => [ + 'numeric' => ':attribute musi być nie mniejszy od :min.', + 'file' => ':attribute musi mieć przynajmniej :min kilobajtów.', + 'string' => ':attribute musi mieć przynajmniej :min znaków.', + 'array' => ':attribute musi mieć przynajmniej :min elementów.', ], - "not_in" => "Zaznaczony :attribute jest nieprawidłowy.", - "numeric" => ":attribute musi być liczbą.", - "regex" => "Format :attribute jest nieprawidłowy.", - "required" => "Pole :attribute jest wymagane.", - "required_if" => "Pole :attribute jest wymagane gdy :other jest :value.", - "required_with" => "Pole :attribute jest wymagane gdy :values jest obecny.", - "required_without" => "Pole :attribute jest wymagane gdy :values nie jest obecny.", - "same" => "Pole :attribute i :other muszą się zgadzać.", - "size" => [ - "numeric" => ":attribute musi mieć :size.", - "file" => ":attribute musi mieć :size kilobajtów.", - "string" => ":attribute musi mieć :size znaków.", - "array" => ":attribute musi zawierać :size elementów.", + 'not_in' => 'Zaznaczony :attribute jest nieprawidłowy.', + 'numeric' => ':attribute musi być liczbą.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'Format :attribute jest nieprawidłowy.', + 'required' => 'Pole :attribute jest wymagane.', + 'required_if' => 'Pole :attribute jest wymagane gdy :other jest :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'Pole :attribute jest wymagane gdy :values jest obecny.', + 'required_with_all' => 'Pole :attribute jest wymagane gdy :values jest obecny.', + 'required_without' => 'Pole :attribute jest wymagane gdy :values nie jest obecny.', + 'required_without_all' => 'Pole :attribute jest wymagane gdy żadne z :values nie są obecne.', + 'same' => 'Pole :attribute i :other muszą się zgadzać.', + 'size' => [ + 'numeric' => ':attribute musi mieć :size.', + 'file' => ':attribute musi mieć :size kilobajtów.', + 'string' => ':attribute musi mieć :size znaków.', + 'array' => ':attribute musi zawierać :size elementów.', ], - "unique" => "Taki :attribute już występuje.", - "url" => "Format :attribute jest nieprawidłowy.", + 'string' => 'The :attribute must be a string.', + 'timezone' => ':attribute musi być prawidłową strefą czasową.', + 'unique' => 'Taki :attribute już występuje.', + 'url' => 'Format :attribute jest nieprawidłowy.', /* |-------------------------------------------------------------------------- - | Własne Tłumaczenia Walidacji + | Custom Validation Language Lines |-------------------------------------------------------------------------- | - | Tutaj możesz sprecyzować własne komunikaty walidacji dla atrybutów - | używających konwencji "attribute.rule" do nazwania linii. To ułatwia - | ustalenie specyficznego tłumaczenia dla wybranej zasady atrybutu. + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. | */ - 'custom' => array(), + 'custom' => [], /* |-------------------------------------------------------------------------- - | Własne Atrybuty Walidacji + | Custom Validation Attributes |-------------------------------------------------------------------------- | - | Następujące tłumaczenia są używane do zamiany atrybutów zastępczych - | na coś bardziej przyjaznego czytelnikowi, np. "Adres email" zamiast - | "email". To pomaga nam stwarzać komunikaty czytelniejszymi. + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. | */ - 'attributes' => array(), + 'attributes' => [], ]; From bbf503f2127f88fb138a71e483c85e90c1b990e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20P=C5=82odowski?= Date: Mon, 11 Jul 2016 19:55:35 +0200 Subject: [PATCH 17/25] German datepicker translation --- modules/system/lang/de/client.php | 41 ++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/modules/system/lang/de/client.php b/modules/system/lang/de/client.php index 85f8ff66f..271d8fe72 100644 --- a/modules/system/lang/de/client.php +++ b/modules/system/lang/de/client.php @@ -51,7 +51,42 @@ return [ 'cancel_button_text' => 'Abbrechen', ], + 'datepicker' => [ + 'previousMonth' => 'Vorheriger Monat', + 'nextMonth' => 'Nächsten Monat', + 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], + 'weekdays' => ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], + 'weekdaysShort' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'] + ], + + 'filter' => [ + 'group' => [ + 'all' => 'all' + ], + 'dates' => [ + 'all' => 'all', + 'filter_button_text' => 'Filter', + 'reset_button_text' => 'Reset', + 'date_placeholder' => 'Date', + 'after_placeholder' => 'After', + 'before_placeholder' => 'Before' + ] + ], + + 'eventlog' => [ + 'show_stacktrace' => 'Show the stacktrace', + 'hide_stacktrace' => 'Hide the stacktrace', + 'tabs' => [ + 'formatted' => 'Formatted', + 'raw' => 'Raw', + ], + 'editor' => [ + 'title' => 'Source code editor', + 'description' => 'Your operating system should be configured to listen to one of these URL schemes.', + 'openWith' => 'Open with', + 'remember_choice' => 'Remember selected option for this session', + 'open' => 'Open', + 'cancel' => 'Cancel' + ] + ] ]; - - - From dcfc0897fe01ca8584f7ce2c9c5d11273d429c81 Mon Sep 17 00:00:00 2001 From: "Joel E. Svensson" Date: Wed, 13 Jul 2016 02:02:02 +0200 Subject: [PATCH 18/25] Only public folder should be mirrored --- modules/system/console/OctoberMirror.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/console/OctoberMirror.php b/modules/system/console/OctoberMirror.php index 01d1553dd..7857d696e 100644 --- a/modules/system/console/OctoberMirror.php +++ b/modules/system/console/OctoberMirror.php @@ -34,7 +34,7 @@ class OctoberMirror extends Command ]; protected $directories = [ - 'storage/app/uploads', + 'storage/app/uploads/public', 'storage/app/media', 'storage/temp/public', ]; From 958d4b93b640b0dcf7b946851bbbbfdda83a281a Mon Sep 17 00:00:00 2001 From: "Joel E. Svensson" Date: Wed, 13 Jul 2016 01:35:34 +0200 Subject: [PATCH 19/25] Commit folder structure to fix october:mirror --- storage/app/.gitignore | 4 +++- storage/app/media/.gitignore | 2 ++ storage/app/uploads/.gitignore | 3 +++ storage/app/uploads/public/.gitignore | 2 ++ storage/temp/.gitignore | 3 ++- storage/temp/public/.gitignore | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 storage/app/media/.gitignore create mode 100644 storage/app/uploads/.gitignore create mode 100644 storage/app/uploads/public/.gitignore create mode 100644 storage/temp/public/.gitignore diff --git a/storage/app/.gitignore b/storage/app/.gitignore index c96a04f00..97df60cdd 100644 --- a/storage/app/.gitignore +++ b/storage/app/.gitignore @@ -1,2 +1,4 @@ * -!.gitignore \ No newline at end of file +!.gitignore +!media +!uploads diff --git a/storage/app/media/.gitignore b/storage/app/media/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/storage/app/media/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/app/uploads/.gitignore b/storage/app/uploads/.gitignore new file mode 100644 index 000000000..3984efe5a --- /dev/null +++ b/storage/app/uploads/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!public diff --git a/storage/app/uploads/public/.gitignore b/storage/app/uploads/public/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/storage/app/uploads/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/temp/.gitignore b/storage/temp/.gitignore index c96a04f00..3984efe5a 100644 --- a/storage/temp/.gitignore +++ b/storage/temp/.gitignore @@ -1,2 +1,3 @@ * -!.gitignore \ No newline at end of file +!.gitignore +!public diff --git a/storage/temp/public/.gitignore b/storage/temp/public/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/storage/temp/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore From b73811fefcee179947b3ef2f3d4f43dc393e655b Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 13 Jul 2016 09:51:18 -0600 Subject: [PATCH 20/25] Moves AJAX handler response handling Fixes octobercms/october#2208 --- modules/backend/classes/Controller.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index bf100a1c9..ef97aa70d 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -418,17 +418,6 @@ class Controller extends Extendable throw new ApplicationException(Lang::get('cms::lang.ajax_handler.not_found', ['name'=>$handler])); } - /* - * If the handler returned an array, we should add it to output for rendering. - * If it is a string, add it to the array with the key "result". - */ - if (is_array($result)) { - $responseContents = array_merge($responseContents, $result); - } - elseif (is_string($result)) { - $responseContents['result'] = $result; - } - /* * Render partials and return the response as array that will be converted to JSON automatically. */ @@ -456,6 +445,17 @@ class Controller extends Extendable if ($this->hasAssetsDefined()) { $responseContents['X_OCTOBER_ASSETS'] = $this->getAssetPaths(); } + + /* + * If the handler returned an array, we should add it to output for rendering. + * If it is a string, add it to the array with the key "result". + */ + if (is_array($result)) { + $responseContents = array_merge($responseContents, $result); + } + elseif (is_string($result)) { + $responseContents['result'] = $result; + } return Response::make()->setContent($responseContents); } From 68deb5926562ba738194291200ee1b76b2595eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C5=BEe=20=C4=8Casar?= Date: Fri, 15 Jul 2016 17:05:25 +0200 Subject: [PATCH 21/25] Pass the router reference on beforeRoute event --- modules/cms/classes/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/classes/Router.php b/modules/cms/classes/Router.php index af87aa77e..44bfa6084 100644 --- a/modules/cms/classes/Router.php +++ b/modules/cms/classes/Router.php @@ -80,7 +80,7 @@ class Router $this->url = $url; $url = RouterHelper::normalizeUrl($url); - $apiResult = Event::fire('cms.router.beforeRoute', [$url], true); + $apiResult = Event::fire('cms.router.beforeRoute', [$url, $this], true); if ($apiResult !== null) { return $apiResult; } From e970d80443aae44a37497b183fa904e8cdd266a0 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 16 Jul 2016 13:11:10 +1000 Subject: [PATCH 22/25] Align AJAX logic: merge custom response last This is to allow overriding the standard values Refs #2209 --- modules/backend/classes/Controller.php | 2 +- modules/cms/classes/Controller.php | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index ef97aa70d..6117f1a1f 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -445,7 +445,7 @@ class Controller extends Extendable if ($this->hasAssetsDefined()) { $responseContents['X_OCTOBER_ASSETS'] = $this->getAssetPaths(); } - + /* * If the handler returned an array, we should add it to output for rendering. * If it is a string, add it to the array with the key "result". diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index 6cdcbdf73..e19040474 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -630,17 +630,6 @@ class Controller throw new CmsException(Lang::get('cms::lang.ajax_handler.not_found', ['name'=>$handler])); } - /* - * If the handler returned an array, we should add it to output for rendering. - * If it is a string, add it to the array with the key "result". - */ - if (is_array($result)) { - $responseContents = array_merge($responseContents, $result); - } - elseif (is_string($result)) { - $responseContents['result'] = $result; - } - /* * Render partials and return the response as array that will be converted to JSON automatically. */ @@ -656,6 +645,17 @@ class Controller $responseContents['X_OCTOBER_REDIRECT'] = $result->getTargetUrl(); } + /* + * If the handler returned an array, we should add it to output for rendering. + * If it is a string, add it to the array with the key "result". + */ + if (is_array($result)) { + $responseContents = array_merge($responseContents, $result); + } + elseif (is_string($result)) { + $responseContents['result'] = $result; + } + return Response::make($responseContents, $this->statusCode); } catch (ValidationException $ex) { From 9c12160f5dcd8e99a165ef9f2e0cffa49a132e8c Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 16 Jul 2016 13:14:59 +1000 Subject: [PATCH 23/25] october:mirror no longer experimental --- modules/system/console/OctoberMirror.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/console/OctoberMirror.php b/modules/system/console/OctoberMirror.php index 7857d696e..f45a952df 100644 --- a/modules/system/console/OctoberMirror.php +++ b/modules/system/console/OctoberMirror.php @@ -23,7 +23,7 @@ class OctoberMirror extends Command /** * The console command description. */ - protected $description = '(Experimental) Generates a mirrored public folder using symbolic links.'; + protected $description = 'Generates a mirrored public folder using symbolic links.'; protected $files = [ '.htaccess', From b606e331a0da2318ee68d2de368da2b58231480b Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 16 Jul 2016 14:43:44 +1000 Subject: [PATCH 24/25] Write tests for MorphMany models Refs https://github.com/octobercms/library/pull/217 --- .../plugins/database/MorphManyModelTest.php | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 tests/unit/plugins/database/MorphManyModelTest.php diff --git a/tests/unit/plugins/database/MorphManyModelTest.php b/tests/unit/plugins/database/MorphManyModelTest.php new file mode 100644 index 000000000..e9b77aced --- /dev/null +++ b/tests/unit/plugins/database/MorphManyModelTest.php @@ -0,0 +1,127 @@ +runPluginRefreshCommand('Database.Tester'); + } + + public function testSetRelationValue() + { + Model::unguard(); + $author = Author::create(['name' => 'Stevie', 'email' => 'stevie@email.tld']); + $event1 = EventLog::create(['action' => "user-created"]); + $event2 = EventLog::create(['action' => "user-updated"]); + $event3 = EventLog::create(['action' => "user-deleted"]); + $event4 = EventLog::make(['action' => "user-restored"]); + Model::reguard(); + + // Set by Model object + $author->event_log = new Collection([$event1, $event2]); + $author->save(); + $this->assertEquals($author->id, $event1->related_id); + $this->assertEquals($author->id, $event2->related_id); + $this->assertEquals('Database\Tester\Models\Author', $event1->related_type); + $this->assertEquals('Database\Tester\Models\Author', $event2->related_type); + $this->assertEquals([ + 'user-created', + 'user-updated' + ], $author->event_log->lists('action')); + + // Set by primary key + $eventId = $event3->id; + $author->event_log = $eventId; + $author->save(); + $event3 = EventLog::find($eventId); + $this->assertEquals($author->id, $event3->related_id); + $this->assertEquals('Database\Tester\Models\Author', $event3->related_type); + $this->assertEquals([ + 'user-deleted' + ], $author->event_log->lists('action')); + + // Nullify + $author->event_log = null; + $author->save(); + $event3 = EventLog::find($eventId); + $this->assertNull($event3->related_type); + $this->assertNull($event3->related_id); + $this->assertNull($event3->related); + + // Deferred in memory + $author->event_log = $event4; + $this->assertEquals($author->id, $event4->related_id); + $this->assertEquals('Database\Tester\Models\Author', $event4->related_type); + $this->assertEquals([ + 'user-restored' + ], $author->event_log->lists('action')); + } + + public function testGetRelationValue() + { + Model::unguard(); + $author = Author::create(['name' => 'Stevie']); + $event1 = EventLog::create(['action' => "user-created", 'related_id' => $author->id, 'related_type' => 'Database\Tester\Models\Author']); + $event2 = EventLog::create(['action' => "user-updated", 'related_id' => $author->id, 'related_type' => 'Database\Tester\Models\Author']); + Model::reguard(); + + $this->assertEquals([$event1->id, $event2->id], $author->getRelationValue('event_log')); + } + + public function testDeferredBinding() + { + $sessionKey = uniqid('session_key', true); + + Model::unguard(); + $author = Author::create(['name' => 'Stevie']); + $event = EventLog::create(['action' => "user-created"]); + Model::reguard(); + + $eventId = $event->id; + + // Deferred add + $author->event_log()->add($event, $sessionKey); + $this->assertNull($event->related_id); + $this->assertEmpty($author->event_log); + + $this->assertEquals(0, $author->event_log()->count()); + $this->assertEquals(1, $author->event_log()->withDeferred($sessionKey)->count()); + + // Commit deferred + $author->save(null, $sessionKey); + $event = EventLog::find($eventId); + $this->assertEquals(1, $author->event_log()->count()); + $this->assertEquals($author->id, $event->related_id); + $this->assertEquals([ + 'user-created' + ], $author->event_log->lists('action')); + + // New session + $sessionKey = uniqid('session_key', true); + + // Deferred remove + $author->event_log()->remove($event, $sessionKey); + $this->assertEquals(1, $author->event_log()->count()); + $this->assertEquals(0, $author->event_log()->withDeferred($sessionKey)->count()); + $this->assertEquals($author->id, $event->related_id); + $this->assertEquals([ + 'user-created' + ], $author->event_log->lists('action')); + + // Commit deferred (model is deleted as per definition) + $author->save(null, $sessionKey); + $event = EventLog::find($eventId); + $this->assertEquals(0, $author->event_log()->count()); + $this->assertNull($event); + $this->assertEmpty($author->event_log); + } +} From 676196d30437d25176388a441bca17c5dd575a71 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 16 Jul 2016 15:34:20 +1000 Subject: [PATCH 25/25] Use starts_with instead of regex --- modules/cms/classes/MediaLibrary.php | 2 +- modules/system/models/File.php | 2 +- modules/system/traits/AssetMaker.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cms/classes/MediaLibrary.php b/modules/cms/classes/MediaLibrary.php index b40a3a842..1626f8f12 100644 --- a/modules/cms/classes/MediaLibrary.php +++ b/modules/cms/classes/MediaLibrary.php @@ -60,7 +60,7 @@ class MediaLibrary $this->storageFolder = self::validatePath(Config::get('cms.storage.media.folder', 'media'), true); $this->storagePath = rtrim(Config::get('cms.storage.media.path', '/storage/app/media'), '/'); - if (!preg_match("/(\/\/|http|https)/", $this->storagePath)) { + if (!starts_with($this->storagePath, ['//', 'http://', 'https://'])) { $this->storagePath = Request::getBasePath() . $this->storagePath; } diff --git a/modules/system/models/File.php b/modules/system/models/File.php index aeb9e34c5..4815696d4 100644 --- a/modules/system/models/File.php +++ b/modules/system/models/File.php @@ -32,7 +32,7 @@ class File extends FileBase { $uploadsPath = Config::get('cms.storage.uploads.path', '/storage/app/uploads'); - if (!preg_match("/(\/\/|http|https)/", $uploadsPath)) { + if (!starts_with($uploadsPath, ['//', 'http://', 'https://'])) { $uploadsPath = Request::getBasePath() . $uploadsPath; } diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php index f5d9f251f..73510f9aa 100644 --- a/modules/system/traits/AssetMaker.php +++ b/modules/system/traits/AssetMaker.php @@ -208,7 +208,7 @@ trait AssetMaker */ public function getAssetPath($fileName, $assetPath = null) { - if (preg_match("/(\/\/|http|https)/", $fileName)) { + if (starts_with($fileName, ['//', 'http://', 'https://'])) { return $fileName; } @@ -263,7 +263,7 @@ trait AssetMaker */ protected function getAssetScheme($asset) { - if (preg_match("/(\/\/|http|https)/", $asset)) { + if (starts_with($asset, ['//', 'http://', 'https://'])) { return $asset; }