diff --git a/plugins/flex-objects/CHANGELOG.md b/plugins/flex-objects/CHANGELOG.md index 66dd8af..afb1214 100644 --- a/plugins/flex-objects/CHANGELOG.md +++ b/plugins/flex-objects/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.3.2 +## 12/02/2022 + +1. [](#improved) + * Various translation enhancements +1. [](#bugfix) + * Fixed frontend editing objects with urlencoded ids + # v1.3.1 ## 09/08/2022 diff --git a/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig b/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig index 4f90ad9..2200e53 100644 --- a/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig +++ b/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig @@ -54,7 +54,7 @@ {# FIXME: Search fields should be passed and individually customizable, right now defaulting to all fields selected #} {% set searchFields = searchFields|merge([key|replace({'.': '_'})]) %} {% endfor %} - {% set tableFields = tableFields|merge([{ name: '_actions_', title: 'Actions', titleClass: 'right' }]) %} + {% set tableFields = tableFields|merge([{ name: '_actions_', title: "PLUGIN_FLEX_OBJECTS.ACTION.ACTIONS"|tu, titleClass: 'right' }]) %} {% set list = table.jsonSerialize %} diff --git a/plugins/flex-objects/blueprints.yaml b/plugins/flex-objects/blueprints.yaml index d5e9261..dc93c2f 100644 --- a/plugins/flex-objects/blueprints.yaml +++ b/plugins/flex-objects/blueprints.yaml @@ -1,7 +1,7 @@ name: Flex Objects slug: flex-objects type: plugin -version: 1.3.1 +version: 1.3.2 description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin. icon: list-alt author: diff --git a/plugins/flex-objects/flex-objects.php b/plugins/flex-objects/flex-objects.php index 1c5dff4..1cb57b6 100644 --- a/plugins/flex-objects/flex-objects.php +++ b/plugins/flex-objects/flex-objects.php @@ -261,7 +261,7 @@ class FlexObjectsPlugin extends Plugin if (!isset($form['flex']['key']) && $edit === true) { /** @var Route $route */ $route = $this->grav['route']; - $id = $route->getGravParam('id'); + $id = rawurldecode($route->getGravParam('id')); if (null !== $id) { $form['flex']['key'] = $id; $event['form'] = $form; diff --git a/plugins/flex-objects/languages/de.yaml b/plugins/flex-objects/languages/de.yaml index eab9634..b353577 100644 --- a/plugins/flex-objects/languages/de.yaml +++ b/plugins/flex-objects/languages/de.yaml @@ -13,6 +13,7 @@ PLUGIN_FLEX_OBJECTS: DIRECTORIES: "Verzeichnisse" CSV: "CSV" PARENTS: "Eltern" + NEW: "Neu" CONTROLLER: TASK_DELETE_SUCCESS: 'Eintrag erfolgreich gelöscht' @@ -35,6 +36,7 @@ PLUGIN_FLEX_OBJECTS: ADVANCED_OPTIONS: "Erweiterte Optionen" APPLY_FILTERS: "Filter anwenden" RESET_FILTERS: "Filter zurücksetzen" + ACTIONS: "Aktionen" FILTER: PAGE_ATTRIBUTES: "Seitenattribute" diff --git a/plugins/flex-objects/languages/en.yaml b/plugins/flex-objects/languages/en.yaml index 1110b92..709bed0 100644 --- a/plugins/flex-objects/languages/en.yaml +++ b/plugins/flex-objects/languages/en.yaml @@ -30,13 +30,13 @@ PLUGIN_FLEX_OBJECTS: CREATE_NEW: Create New Item EDIT_ITEM: Edit Item LIST_ITEMS: "List Items" - LIST_ITEM: List Items DELETE_N: "Delete" # In some languages 'delete OBJECT' may need a special declination REALLY_DELETE: "Are you sure you want to permanently delete the %s?" SEARCH_PLACEHOLDER: "Search…" ADVANCED_OPTIONS: "Advanced Options" APPLY_FILTERS: "Apply Filters" RESET_FILTERS: "Reset to Defaults" + ACTIONS: "Actions" FILTER: PAGE_ATTRIBUTES: "Page Attributes" diff --git a/plugins/flex-objects/languages/es.yaml b/plugins/flex-objects/languages/es.yaml index df62fd6..a1cde17 100644 --- a/plugins/flex-objects/languages/es.yaml +++ b/plugins/flex-objects/languages/es.yaml @@ -30,13 +30,13 @@ PLUGIN_FLEX_OBJECTS: CREATE_NEW: "Crear nuevo ítem" EDIT_ITEM: "Editar ítem" LIST_ITEMS: "Listar ítems" - LIST_ITEM: "Listar ítem" DELETE_N: "Eliminar" REALLY_DELETE: "¿Realmente quieres eliminar %s permanentemente?" SEARCH_PLACEHOLDER: "Buscar…" ADVANCED_OPTIONS: "Opciones avazadas" APPLY_FILTERS: "Aplicar filtros" RESET_FILTERS: "Restablecer filtros" + ACTIONS: "Acciones" FILTER: PAGE_ATTRIBUTES: "Atributos de página" diff --git a/plugins/flex-objects/languages/ja.yaml b/plugins/flex-objects/languages/ja.yaml index 468f260..efe8861 100644 --- a/plugins/flex-objects/languages/ja.yaml +++ b/plugins/flex-objects/languages/ja.yaml @@ -30,13 +30,13 @@ PLUGIN_FLEX_OBJECTS: CREATE_NEW: 新しいデータを作成 EDIT_ITEM: "データの編集" LIST_ITEMS: "データの一覧表示" - LIST_ITEM: データの一覧 DELETE_N: "削除" # In some languages 'delete OBJECT' may need a special declination REALLY_DELETE: "%s を削除します。復元はできませんがよろしいですか?" SEARCH_PLACEHOLDER: "検索…" ADVANCED_OPTIONS: "詳細設定" APPLY_FILTERS: "フィルターを適用" RESET_FILTERS: "標準にリセットする" + ACTIONS: "アクション" FILTER: PAGE_ATTRIBUTES: "ページ属性" diff --git a/plugins/flex-objects/languages/nl.yaml b/plugins/flex-objects/languages/nl.yaml new file mode 100644 index 0000000..75b630e --- /dev/null +++ b/plugins/flex-objects/languages/nl.yaml @@ -0,0 +1,71 @@ +PLUGIN_FLEX_OBJECTS: + PLUGIN_NAME: "Flex Objects" + PLUGIN_DESCRIPTION: "De Flex Objects plugin maakt het mogelijk om flexibele objecten te maken en te beheren." + + TITLE: Flex Objects + TYPES_TITLE: Mappen + AFTER_SAVE: Na opslaan… + LIST_INFO: '{from} tot {to} van {total} items weergegeven' + EMPTY_RESULT: Deze zoekopdracht geeft geen resultaat + + USE_BUILT_IN_CSS: "Gebruik ingebouwde CSS" + EXTRA_ADMIN_TWIG_PATH: "Extra Admin Twig pad" + DIRECTORIES: "Mappen" + CSV: "CSV" + PARENTS: "Ouders" + + CONTROLLER: + TASK_DELETE_SUCCESS: 'Item succesvol verwijderd' + TASK_DELETE_FAILURE: 'Item verwijderen mislukt: %s' + TASK_NEW_FOLDER_SUCCESS: 'Map succesvol aangemaakt' + TASK_COPY_SUCCESS: 'Kopie succesvol aangemaakt' + TASK_COPY_FAILURE: 'Kopie aanmaken mislukt: %s' + TASK_SAVE_SUCCESS: 'Item succesvol opgeslagen' + TASK_SAVE_FAILURE: 'Item opslaan mislukt: %s' + TASK_CONFIGURE_SUCCESS: 'Configuratie succesvol opgeslagen' + TASK_CONFIGURE_FAILURE: 'Configuratie opslaan mislukt: %s' + + ACTION: + CREATE_NEW: Nieuw item aanmaken + EDIT_ITEM: Item bewerken + LIST_ITEMS: Items weergeven + DELETE_N: "Verwijderen" + REALLY_DELETE: "Weet je zeker dat je %s permanent wilt verwijderen?" + SEARCH_PLACEHOLDER: "Zoeken…" + ADVANCED_OPTIONS: "Geavanceerde opties" + APPLY_FILTERS: "Filters toepassen" + RESET_FILTERS: "Filters resetten" + + FILTER: + PAGE_ATTRIBUTES: "Pagina attributen" + PAGE_TYPES: "Pagina types" + MODULAR_TYPES: "Modulaire types" + + LANGUAGE: + USING_DEFAULT: "Standaard taalbestand in gebruik." + UNUSED_DEFAULT: "Ongebruikt standaard taalbestand aanwezig." + USING_OVERRIDE: "%s taalbestand in gebruik." + NOT_TRANSLATED_YET: "Deze pagina is nog niet vertaald naar %s!" + NO_FALLBACK_FOUND: "Geen fallback taalbestand gevonden." + FALLING_BACK: "Terugvallen op %s taalbestand." + + STATE: + LOADING: "Laden…" + CREATED_SUCCESSFULLY: "Succesvol aangemaakt" + UPDATED_SUCCESSFULLY: "Succesvol bijgewerkt" + DELETED_SUCCESSFULLY: "Succesvol verwijderd" + EDITING_DRAFT: "Je bewerkt een concept." + NOT_CREATED_YET: "Deze pagina bestaat niet, totdat je hem opslaat." + + ERROR: + BAD_DIRECTORY: "Niet bestaande map" + PAGE_NOT_FOUND: "Pagina niet gevonden" + PAGE_NOT_EXIST: "Oeps! Deze pagina bestaat niet." + PAGE_FORBIDDEN: "Oeps! Je hebt geen toegang tot deze pagina." + LAYOUT_NOT_FOUND: "Object layout '%s' niet gevonden." + BLUEPRINT_NO_LIST: "De blueprint van %s bevat geen velddata of lijst pagina overschrijving." + BLUEPRINT_NO_LIST_ADVISE: "Voeg een list sectie toe aan de blueprint of overschrijf de list pagina in de configuratie." + BLUEPRINT_NO_LIST_TEMPLATE: "Maak een template bestand voor dit type aan in flex-objects/types/%s/list.html.twig" + LIST_EMPTY: "Er zijn geen items gevonden." + LIST_EMPTY_ADD: "Er zijn geen items op dit moment. Klik op de knop Toevoegen om een nieuw item aan te maken." + NO_FLEX_DIRECTORIES: "Geen Flex Object mappen gedefinieerd." diff --git a/plugins/form/CHANGELOG.md b/plugins/form/CHANGELOG.md index 7e3a478..2d9c678 100644 --- a/plugins/form/CHANGELOG.md +++ b/plugins/form/CHANGELOG.md @@ -1,3 +1,9 @@ +# v7.1.1 +## 11/29/2022 + +1. [](#bugfix) + * Fix missing blueprint entries for Turnstile configuration [#583](https://github.com/getgrav/grav-plugin-form/issues/583) + # v7.1.0 ## 11/16/2022 diff --git a/plugins/form/blueprints.yaml b/plugins/form/blueprints.yaml index 776ee88..721487a 100644 --- a/plugins/form/blueprints.yaml +++ b/plugins/form/blueprints.yaml @@ -1,7 +1,7 @@ name: Form slug: form type: plugin -version: 7.1.0 +version: 7.1.1 description: Enables forms handling and processing icon: check-square author: @@ -197,6 +197,29 @@ form: help: PLUGIN_FORM.RECAPTCHA_SECRET_KEY_HELP default: '' + turnstile_captcha: + type: section + title: PLUGIN_FORM.TURNSTILE_CAPTCHA + + fields: + turnstile.theme: + type: select + label: PLUGIN_FORM.RECAPTCHA_THEME + default: light + options: + light: PLUGIN_FORM.RECAPTCHA_THEME_LIGHT + dark: PLUGIN_FORM.RECAPTCHA_THEME_DARK + turnstile.site_key: + type: text + label: PLUGIN_FORM.RECAPTCHA_SITE_KEY + help: PLUGIN_FORM.RECAPTCHA_SITE_KEY_HELP + default: '' + turnstile.secret_key: + type: text + label: PLUGIN_FORM.RECAPTCHA_SECRET_KEY + help: PLUGIN_FORM.RECAPTCHA_SECRET_KEY_HELP + default: '' + basic_captcha: type: section title: PLUGIN_FORM.BASIC_CAPTCHA diff --git a/plugins/form/form.yaml b/plugins/form/form.yaml index ae8cecf..29793ca 100644 --- a/plugins/form/form.yaml +++ b/plugins/form/form.yaml @@ -19,7 +19,6 @@ recaptcha: site_key: secret_key: turnstile: - widget: managed # options: [managed | non-interactive | invisible] theme: light # options: [light | dark] site_key: secret_key: diff --git a/plugins/form/languages.yaml b/plugins/form/languages.yaml index 84c73ff..c6a288f 100644 --- a/plugins/form/languages.yaml +++ b/plugins/form/languages.yaml @@ -87,6 +87,7 @@ en: BASIC_CAPTCHA_MATH_MIN: "Minimum number" BASIC_CAPTCHA_MATH_MAX: "Maximum number" BASIC_CAPTCHA_MATH_OPERATORS: "Mathematical operators (randomized)" + TURNSTILE_CAPTCHA: "Cloudflare Turnstile Captcha" eu: PLUGIN_FORM: diff --git a/plugins/langswitcher/CHANGELOG.md b/plugins/langswitcher/CHANGELOG.md index 165780c..d7f252c 100644 --- a/plugins/langswitcher/CHANGELOG.md +++ b/plugins/langswitcher/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.1.0 +## 12/12/2022 + +1. [](#new) + * Using blocks in `partials/langswitcher.html.twig` to make it easier to extend without having to copy the logic + # v3.0.2 ## 10/05/2022 diff --git a/plugins/langswitcher/blueprints.yaml b/plugins/langswitcher/blueprints.yaml index 910baee..cdd755c 100644 --- a/plugins/langswitcher/blueprints.yaml +++ b/plugins/langswitcher/blueprints.yaml @@ -1,5 +1,5 @@ name: LangSwitcher -version: 3.0.2 +version: 3.1.0 description: LangSwitcher is a [Grav](https://github.com/getgrav/grav) plugin that provides native language text links to switch between [multiple languages](http://learn.getgrav.org/content/multi-language) in Grav **v0.9.30** or greater. icon: globe author: diff --git a/plugins/langswitcher/templates/partials/langswitcher-logic.html.twig b/plugins/langswitcher/templates/partials/langswitcher-logic.html.twig new file mode 100644 index 0000000..6c9ad4b --- /dev/null +++ b/plugins/langswitcher/templates/partials/langswitcher-logic.html.twig @@ -0,0 +1,29 @@ +{{ block('language_block_start') }} + {% set display_format = display_format ?? config.get('plugins.langswitcher.language_display', 'long') %} + + {% for language in langswitcher.languages %} + {% set active_class = '' %} + {% set show_language = true %} + {% if language == langswitcher.current %} + {% set active_class = 'active' %} + {% endif %} + {% if langswitcher.translated_routes[language] %} + {% set lang_url = langswitcher.translated_routes[language] ~ page.urlExtension %} + {% else %} + {% set base_lang_url = base_url_simple ~ grav.language.getLanguageURLPrefix(language) %} + {% set lang_url = base_lang_url ~ langswitcher.page_route ~ page.urlExtension %} + {% endif %} + {% set untranslated_pages_behavior = grav.config.plugins.langswitcher.untranslated_pages_behavior %} + {% if untranslated_pages_behavior != 'none' %} + {% set translated_page = langswitcher.translated_pages[language] %} + {% if (not translated_page) or (not translated_page.published) %} + {% if untranslated_pages_behavior == 'redirect' %} + {% set lang_url = url('/') %} + {% elseif untranslated_pages_behavior == 'hide' %} + {% set show_language = false %} + {% endif %} + {% endif %} + {% endif %} + {{ block('language_item') }} + {% endfor %} +{{ block('language_block_end') }} \ No newline at end of file diff --git a/plugins/langswitcher/templates/partials/langswitcher.html.twig b/plugins/langswitcher/templates/partials/langswitcher.html.twig index 3b44b1f..699f29d 100644 --- a/plugins/langswitcher/templates/partials/langswitcher.html.twig +++ b/plugins/langswitcher/templates/partials/langswitcher.html.twig @@ -1,33 +1,15 @@ +{% extends 'partials/langswitcher-logic.html.twig' %} + +{% block language_block_start %}