From aa1c813f51111ddc78d78b9ba9ac566855b7a612 Mon Sep 17 00:00:00 2001 From: Richard Korthuis Date: Thu, 5 Oct 2023 09:49:38 +0200 Subject: [PATCH 1/2] Add districts with zipcodes, so the REST API can be filtered using a zipcode. --- config/cmb2_metaboxes.php | 33 + config/taxonomies.php | 13 + languages/openpub-base-nl_NL.mo | Bin 11477 -> 11164 bytes languages/openpub-base-nl_NL.po | 606 ++++++++++-------- languages/openpub-base.pot | 486 ++++++++------ src/Base/Metabox/MetaboxServiceProvider.php | 19 + src/Base/Repositories/Item.php | 21 + .../RestAPI/Controllers/ItemController.php | 11 + 8 files changed, 747 insertions(+), 442 deletions(-) diff --git a/config/cmb2_metaboxes.php b/config/cmb2_metaboxes.php index 4873cf9..54acb58 100644 --- a/config/cmb2_metaboxes.php +++ b/config/cmb2_metaboxes.php @@ -128,4 +128,37 @@ ] ] ], + 'district_zipcodes' => [ + 'id' => 'openpub_metadata_district_zipcodes', + 'title' => __('Zipcodes', 'openpub-base'), + 'object_types' => ['term'], + 'taxonomies' => ['openpub-district'], + 'context' => 'normal', + 'priority' => 'high', + 'autosave' => true, + 'fields' => [ + 'zipcodes' => [ + 'heading' => [ + 'type' => 'heading', + 'name' => __('Zipcodes', 'openpub-base'), + ], + 'zipcodes' => [ + 'id' => 'openpub_zipcodes_group', + 'type' => 'group', + 'options' => [ + 'add_button' => __('Add new zipcode', 'openpub-base'), + 'remove_button' => __('Remove zipcode', 'openpub-base'), + ], + 'fields' => [ + [ + 'id' => 'openpub_zipcode', + 'name' => __('Zipcode', 'openpub-base'), + 'desc' => __('A zipcode that is part of this district. (Only numbers, no letters)', 'openpub-base'), + 'type' => 'number', + ], + ], + ], + ], + ] + ] ]; diff --git a/config/taxonomies.php b/config/taxonomies.php index 2c086e2..dc36695 100644 --- a/config/taxonomies.php +++ b/config/taxonomies.php @@ -62,4 +62,17 @@ 'plural' => __('Show on', 'openpub-base') ] ], + 'openpub-district' => [ + 'object_types' => ['openpub-item'], + 'args' => [ + 'show_in_rest' => true, + 'show_admin_column' => true, + 'capabilities' => [] + ], + 'names' => [ + 'singular' => _x('District', 'Taxonomy definition', 'openpub-base'), + 'plural' => _x('Districts', 'Taxonomy definition', 'openpub-base'), + 'slug' => 'openpub-kern' + ] + ] ]; diff --git a/languages/openpub-base-nl_NL.mo b/languages/openpub-base-nl_NL.mo index d82cbb16bd067161d01e1fda15e607bd5ac2232c..e066cadefba24dad60c4aa47f75474f1c266d080 100644 GIT binary patch delta 3175 zcmX}uYiv|S7{>8gDA0C+mOE|19w<<5#g?|*tU$}X<$kAtcIlqBTeiFH?s5@`t0AHg zz?dT#f*1lp)F4sTPY?r$hNvj`!2pVQ3m*)SpcoBC!2h#*>ZI@a&CH%XGxN@zO}}0B z=8E{uo@x6GWh*g&__L!i$MI4ZE|jKBV~Q|<)9?+go$733<#_m{$8ZeCf znZ0iRLCm22p4d!{4I3LwtjGEX))WqiF zW~_5Rzm8hKFW3q1q9$@5^_++3Wqi|}r!$txMcq({9k2u~EW>`d4EZxHT$IXf*b5I} z4!)0i@I};s*HF*BiHv1#W0l942dMihxWskiJSxh-64Xip$USB&_QzeQl^k{3Cs6}l zL`~#p)SfiPS7kbkA{7#)1qoJP&`OVlB|j^pt+?1_W8 zXz$BVTeK3hSy3H!#WvD$h5qMxsJ3VUt5SwmBDa_zsy~jJ_$z(Lzh-*O?YMwy|Abok zBh(7|ainDlY9%!|4jXVM9ztcZkbTlZim)?IMlECpmf|whb9Z6`9*I-oyC#EP3oWd{ zO032`I3KT}_Og&!C_`na6jq_OW)bqjm^E&H6Y?gTO{h$5MXh{0YUR7}6AoGYT`H64 z2-2&8kE2p`9~skhCLJWf-`@{MJpVF`r;(iz}2X|T!Kou9|IV1Kfi%m=`GaW-*fx_LVfQsYU0^eDsu&> zaVk(-vlvIlsVt|WRK18Cbn_M#;s?m?m}@u$|3ICUexyeOj6tn%3TlFLvCd;mE$Xd0 zGdOh!ub|pjQP01F%G@K2YfroJPH82>Pi*@Z`+TVT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a6>v1APTOg!mAbukSvn|1A%r z`;l&Nq*6M$t@z5%y+EJs7%x&eKF<*!Ck#3Yli_vm4 z+%^ZDHNz9I72O$(RcGr^C(586)P>Yk!`t@q7(yLL*Le$4(Pz;BqV`QcQk#ixMJnp8 zNHw|>Z9qGaS|9S!-KeQ(s~62nCLPZXIU6$8>&_?4s$iT<4|%C{Jb85@<$Ak{f2nRN zHH-|frUc(!k#_;%#bTrcOxy*}$?vUZ2N*Q^~L=LTGxO8$SG&!$SfV-JPu zSzuFa+HXB4mrrEk{jL`ecc-&{JXKuLSYP`0xXq#7id9a|`aVl@!Acum9nV=4*!;z} zoAQZ4*Z<;sKb{D;Uu$})t7cuO^x}kt;nKuOkB5qpIa5lKUYD`m)6a*hD!D1GXgnIKBmQoV0OMKQGoL@@!p$d3-)R~V zE\n" +"POT-Creation-Date: 2023-10-04 15:58+0200\n" +"PO-Revision-Date: 2023-10-04 15:59+0200\n" +"Last-Translator: Richard Korthuis \n" "Language-Team: Yard Digital \n" "Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.4\n" "X-Poedit-Basepath: ..\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" -"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" "X-Poedit-SearchPath-0: config\n" "X-Poedit-SearchPath-1: src\n" "X-Poedit-SearchPathExcluded-0: vendor\n" -#: config/escape_element_metabox.php:6 config/settings.php:30 -msgid "Escape element" -msgstr "Ontsnap element" - -#: config/settings.php:36 config/show_on_metabox.php:14 config/taxonomies.php:61 config/taxonomies.php:62 -msgid "Show on" -msgstr "Tonen op" - -#: config/escape_element_metabox.php:14 -msgid "Enable escape element" -msgstr "Gebruik ontsnap element" - -#: config/escape_element_metabox.php:15 -msgid "Show escape element on portal page." -msgstr "Ontsnap element weergeven op portaal pagina." - -#: config/escape_element_metabox.php:19 -msgid "Yes" -msgstr "Ja" - -#: config/escape_element_metabox.php:20 -msgid "No" -msgstr "Nee" - -#: config/show_on_metabox.php:6 -msgid "External" -msgstr "Extern" - -#: config/show_on_metabox.php:15 -msgid "Select websites where this item should be displayed on." -msgstr "Selecteer websites waarop dit item getoond moet worden." - -#: config/metaboxes.php:6 +#: config/cmb2_metaboxes.php:6 msgid "Data" msgstr "Gegevens" -#: config/metaboxes.php:14 +#: config/cmb2_metaboxes.php:14 msgid "Highlighted item" msgstr "Uitgelicht item" -#: config/metaboxes.php:15 -msgid "Use this option to select current item to be a highlighted (featured) item" -msgstr "Gebruik deze optie om het huidige item te selecteren als een uitgelicht (gekenmerkt) item" +#: config/cmb2_metaboxes.php:15 +msgid "" +"Use this option to select current item to be a highlighted (featured) item" +msgstr "" +"Gebruik deze optie om het huidige item te selecteren als een uitgelicht " +"(gekenmerkt) item" -#: config/metaboxes.php:20 +#: config/cmb2_metaboxes.php:20 msgid "Synonyms" msgstr "Synoniemen" -#: config/metaboxes.php:21 -msgid "Use this option to add an comma separated list of synonyms or related terms" -msgstr "Gebruik deze mogelijkheid om een komma gescheiden lijst van synoniemen of gerelateerde termen mee te geven" +#: config/cmb2_metaboxes.php:21 +msgid "" +"Use this option to add an comma separated list of synonyms or related terms" +msgstr "" +"Gebruik deze mogelijkheid om een komma gescheiden lijst van synoniemen of " +"gerelateerde termen mee te geven" -#: config/metaboxes.php:27 +#: config/cmb2_metaboxes.php:27 msgid "Select end date" msgstr "Selecteer een einddatum" -#: config/metaboxes.php:35 +#: config/cmb2_metaboxes.php:37 msgid "Links" msgstr "Links" -#: config/metaboxes.php:42 -msgid "Add new link" +#: config/cmb2_metaboxes.php:48 +#, fuzzy +#| msgid "Add new link" +msgid "Add new link group" msgstr "Voeg nieuwe link toe" -#: config/metaboxes.php:46 +#: config/cmb2_metaboxes.php:49 +msgid "Remove link group" +msgstr "" + +#: config/cmb2_metaboxes.php:54 msgid "Link title" msgstr "Link titel" -#: config/metaboxes.php:47 config/metaboxes.php:74 +#: config/cmb2_metaboxes.php:55 config/cmb2_metaboxes.php:93 msgid "Use the title to replace the URL" msgstr "Wordt gebruikt om de link te tonen ipv de URL" -#: config/metaboxes.php:52 +#: config/cmb2_metaboxes.php:60 msgid "Link URL" msgstr "Link URL" -#: config/metaboxes.php:53 config/metaboxes.php:80 config/settings.php:13 +#: config/cmb2_metaboxes.php:61 config/cmb2_metaboxes.php:99 +#: config/cmb2_settings_pages.php:16 msgid "URL including http(s)://" msgstr "URL inclusief http(s)://" -#: config/metaboxes.php:62 +#: config/cmb2_metaboxes.php:71 config/cmb2_metaboxes.php:80 msgid "Downloads" msgstr "Downloads" -#: config/metaboxes.php:69 -msgid "Add new download" +#: config/cmb2_metaboxes.php:86 +#, fuzzy +#| msgid "Add new download" +msgid "Add new download group" msgstr "Voeg nieuwe download toe" -#: config/metaboxes.php:73 +#: config/cmb2_metaboxes.php:87 +msgid "Remove download group" +msgstr "" + +#: config/cmb2_metaboxes.php:92 msgid "Download title" msgstr "Download titel" -#: config/metaboxes.php:79 +#: config/cmb2_metaboxes.php:98 msgid "Download URL" msgstr "Download URL" -#: config/metaboxes.php:89 +#: config/cmb2_metaboxes.php:109 config/cmb2_metaboxes.php:118 msgid "Other" msgstr "Overig" -#: config/metaboxes.php:92 +#: config/cmb2_metaboxes.php:121 msgid "Notes" msgstr "Vrij notitieveld" -#: config/metaboxes.php:93 +#: config/cmb2_metaboxes.php:122 msgid "(the law, authority, local regulations, etc.)" msgstr "(wetgeving, bevoegd gezag, uitvoerder, lokale regelgeving)" +#: config/cmb2_metaboxes.php:133 config/cmb2_metaboxes.php:143 +msgid "Zipcodes" +msgstr "Postcodes" + +#: config/cmb2_metaboxes.php:149 +msgid "Add new zipcode" +msgstr "Voeg nieuwe postcode toe" + +#: config/cmb2_metaboxes.php:150 +msgid "Remove zipcode" +msgstr "Verwijder postcode" + +#: config/cmb2_metaboxes.php:155 +msgid "Zipcode" +msgstr "Postcode" + +#: config/cmb2_metaboxes.php:156 +msgid "A zipcode that is part of this district. (Only numbers, no letters)" +msgstr "" +"Een postcode die onderdeel is van deze kern. (Alleen cijfers, geen letters)" + +#: config/cmb2_settings_pages.php:6 +msgid "OpenPub settings" +msgstr "OpenPub instellingen" + +#: config/cmb2_settings_pages.php:10 +#, fuzzy +#| msgctxt "OpenPub settings tab" +#| msgid "General" +msgid "General" +msgstr "Algemeen" + +#: config/cmb2_settings_pages.php:15 +msgid "Portal URL" +msgstr "Portal URL" + +#: config/cmb2_settings_pages.php:21 +msgid "Portal OpenPub item slug" +msgstr "Portal OpenPub item slug" + +#: config/cmb2_settings_pages.php:22 +msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" +msgstr "URL voor OpenPub items in de portal, bv \"onderwerp\"" + +#: config/cmb2_settings_pages.php:27 +#, fuzzy +#| msgctxt "OpenPub instellingen subpagina" +#| msgid "Portal" +msgid "Portal url" +msgstr "Portal" + +#: config/cmb2_settings_pages.php:28 +msgid "Use portal url in api." +msgstr "Gebruik portal url in de api." + +#: config/cmb2_settings_pages.php:33 config/escape_element_metabox.php:6 +msgid "Escape element" +msgstr "Ontsnap element" + +#: config/cmb2_settings_pages.php:34 +msgid "" +"Use an element to leave the website without being able to navigate back via " +"the browser 'Back' button." +msgstr "" +"Gebruik een element waarmee de website verlaten kan worden zonder dat er " +"terug genavigeerd kan worden via de 'Vorige' knop in de browser." + +#: config/cmb2_settings_pages.php:39 config/show_on_metabox.php:14 +#: config/taxonomies.php:61 config/taxonomies.php:62 +msgid "Show on" +msgstr "Tonen op" + +#: config/cmb2_settings_pages.php:40 +msgid "" +"Used for configuring on which websites an OpenPub item should be displayed " +"on." +msgstr "" +"Wordt gebruikt voor het instellen van de websites waarop een OpenPub item " +"weergegeven moet worden." + +#: config/cmb2_settings_pages.php:46 config/posttypes.php:39 +#: config/posttypes.php:47 +msgid "Expired" +msgstr "Verlopen" + +#: config/cmb2_settings_pages.php:47 +msgid "" +"OpenPub items without an expiration date expire automatically when the field " +"below has a value bigger than 0. Existing OpenPub items without an " +"expiration date will be assigned a value of the published date plus the " +"value given in days. New OpenPub items will have a value of the current date " +"plus the value given in days." +msgstr "" +"Items zonder een einddatum verlopen automatisch als het veld hieronder een " +"waarde heeft die groter is dan 0. Bestaande OpenPub items zonder een " +"einddatum krijgen een waarde toegewezen van de publicatie datum plus de " +"waarde die is opgegeven in dagen. Nieuwe OpenPub items krijgen een waarde " +"van de huidige datum plus de waarde die is opgegeven in dagen." + +#: config/cmb2_settings_pages.php:50 +msgid "Days to expire" +msgstr "Dagen tot verlopen" + +#: config/cmb2_settings_pages.php:51 +msgid "After how many days should an item expire?" +msgstr "Na hoeveel dagen moet een item verlopen?" + +#: config/cmb2_settings_pages.php:56 +msgid "Admin notices" +msgstr "Administratieve mededelingen" + +#: config/cmb2_settings_pages.php:57 +msgid "Disable upgrade admin notices." +msgstr "Schakel administratieve mededelingen over upgraden uit." + +#: config/escape_element_metabox.php:14 +msgid "Enable escape element" +msgstr "Gebruik ontsnap element" + +#: config/escape_element_metabox.php:15 +msgid "Show escape element on portal page." +msgstr "Ontsnap element weergeven op portaal pagina." + +#: config/escape_element_metabox.php:19 +msgid "Yes" +msgstr "Ja" + +#: config/escape_element_metabox.php:20 +msgid "No" +msgstr "Nee" + #: config/p2p_connections.php:9 msgid "Connected item(s)" msgstr "Gekoppelde item(s)" -#: config/p2p_connections.php:14 config/posttypes.php:108 -#: config/posttypes.php:109 +#: config/p2p_connections.php:14 config/posttypes.php:113 +#: config/posttypes.php:114 msgid "Theme" msgstr "Thema" -#: config/p2p_connections.php:19 config/posttypes.php:147 -#: config/posttypes.php:148 config/posttypes.php:164 config/posttypes.php:165 +#: config/p2p_connections.php:19 config/posttypes.php:154 +#: config/posttypes.php:155 config/posttypes.php:171 config/posttypes.php:172 msgid "Subtheme" msgstr "Subthema" @@ -147,338 +265,254 @@ msgstr "Subthema" msgid "Locations" msgstr "Locaties" -#: config/posttypes.php:25 config/posttypes.php:65 +#: config/posttypes.php:24 +msgid "Author" +msgstr "" + +#: config/posttypes.php:27 config/posttypes.php:68 msgctxt "Admin Filter definition" msgid "Type" msgstr "Type" -#: config/posttypes.php:29 config/posttypes.php:69 +#: config/posttypes.php:31 config/posttypes.php:72 msgctxt "Admin Filter definition" msgid "Audience" msgstr "Doelgroep" -#: config/posttypes.php:33 config/posttypes.php:73 +#: config/posttypes.php:35 config/posttypes.php:76 msgctxt "Admin Filter definition" msgid "Usage" msgstr "Toepassing" -#: config/posttypes.php:37 config/posttypes.php:45 config/settings.php:43 -msgid "Expired" -msgstr "Verlopen" - -#: config/posttypes.php:49 +#: config/posttypes.php:51 msgid "No expire date" msgstr "Geen verloopdatum" -#: config/posttypes.php:51 +#: config/posttypes.php:53 msgid "Will expire on" msgstr "Verloopt op" -#: config/posttypes.php:57 +#: config/posttypes.php:59 msgid "Published" msgstr "Gepubliceerd" -#: config/posttypes.php:77 +#: config/posttypes.php:80 msgctxt "Admin Filter definition" msgid "Aspect" msgstr "Kenmerk" -#: config/posttypes.php:82 config/posttypes.php:84 +#: config/posttypes.php:85 config/posttypes.php:87 msgid "OpenPub item" msgstr "OpenPub item" -#: config/posttypes.php:83 +#: config/posttypes.php:86 msgid "OpenPub items" msgstr "OpenPub items" -#: config/posttypes.php:85 config/posttypes.php:86 +#: config/posttypes.php:88 config/posttypes.php:89 msgid "Add new OpenPub" msgstr "Nieuw OpenPub item" -#: config/posttypes.php:87 +#: config/posttypes.php:90 msgid "New OpenPub" msgstr "Nieuw OpenPub item" -#: config/posttypes.php:88 +#: config/posttypes.php:91 msgid "Edit OpenPub" msgstr "Bewerk OpenPub item" -#: config/posttypes.php:89 +#: config/posttypes.php:92 msgid "View OpenPub" msgstr "Bekijk OpenPub item" -#: config/posttypes.php:90 +#: config/posttypes.php:93 msgid "All OpenPub items" msgstr "Alle OpenPub items" -#: config/posttypes.php:91 +#: config/posttypes.php:94 msgid "Search OpenPub items" msgstr "Zoek OpenPub items" -#: config/posttypes.php:92 +#: config/posttypes.php:95 msgid "Parent OpenPub items:" msgstr "Hoofd OpenPub items:" -#: config/posttypes.php:93 +#: config/posttypes.php:96 msgid "No OpenPub items found." msgstr "Geen OpenPub items gevonden." -#: config/posttypes.php:94 +#: config/posttypes.php:97 msgid "No OpenPub items found in trash." msgstr "Geen OpenPub items gevonden in prullenbak." -#: config/posttypes.php:100 +#: config/posttypes.php:103 msgctxt "Posttype definition" msgid "Item" msgstr "Item" -#: config/posttypes.php:101 +#: config/posttypes.php:104 msgctxt "Posttype definition" msgid "Items" msgstr "Items" -#: config/posttypes.php:102 +#: config/posttypes.php:105 msgctxt "post type general name" msgid "Items" msgstr "Items" -#: config/posttypes.php:110 config/posttypes.php:111 +#: config/posttypes.php:115 config/posttypes.php:116 msgid "Add new theme" msgstr "Voeg nieuwe thema toe" -#: config/posttypes.php:112 +#: config/posttypes.php:117 msgid "Edit theme" msgstr "Bewerk thema" -#: config/posttypes.php:113 +#: config/posttypes.php:118 msgid "New theme" msgstr "Voeg nieuwe thema toe" -#: config/posttypes.php:114 +#: config/posttypes.php:119 msgid "View theme" msgstr "Bekijk thema" -#: config/posttypes.php:115 +#: config/posttypes.php:120 msgid "View themes" msgstr "Bekijk thema's" -#: config/posttypes.php:116 +#: config/posttypes.php:121 msgid "Search themes" msgstr "Zoek thema's" -#: config/posttypes.php:117 +#: config/posttypes.php:122 msgid "No themes found." msgstr "Geen thema's gevonden." -#: config/posttypes.php:118 +#: config/posttypes.php:123 msgid "No themes found in Trash." msgstr "Geen thema's gevonden in prullenbak." -#: config/posttypes.php:119 +#: config/posttypes.php:124 msgid "All themes" msgstr "Alle thema's" -#: config/posttypes.php:120 +#: config/posttypes.php:125 msgid "Themes archives" msgstr "Thema's archieven" -#: config/posttypes.php:121 +#: config/posttypes.php:126 msgid "Theme attributes" msgstr "Thema attributen" -#: config/posttypes.php:122 +#: config/posttypes.php:127 msgid "Insert into theme" msgstr "Voeg in thema" -#: config/posttypes.php:123 config/posttypes.php:162 +#: config/posttypes.php:128 config/posttypes.php:169 msgid "Featured image" msgstr "Aanbevolen afbeelding" -#: config/posttypes.php:124 config/posttypes.php:163 +#: config/posttypes.php:129 config/posttypes.php:170 msgid "Set featured image" msgstr "Stel aanbevolen afbeelding in" -#: config/posttypes.php:125 config/posttypes.php:126 +#: config/posttypes.php:130 config/posttypes.php:131 msgid "Themes" msgstr "Thema's" -#: config/posttypes.php:127 +#: config/posttypes.php:132 msgid "Parent themes:" msgstr "Hoofd thema's:" -#: config/posttypes.php:139 +#: config/posttypes.php:144 msgctxt "Posttype definition" msgid "Theme" msgstr "Thema" -#: config/posttypes.php:140 +#: config/posttypes.php:145 msgctxt "Posttype definition" msgid "Themes" msgstr "Thema's" -#: config/posttypes.php:149 config/posttypes.php:150 +#: config/posttypes.php:156 config/posttypes.php:157 msgid "Add new subtheme" msgstr "Voeg nieuwe subthema toe" -#: config/posttypes.php:151 +#: config/posttypes.php:158 msgid "Edit subtheme" msgstr "Bewerk subthema" -#: config/posttypes.php:152 +#: config/posttypes.php:159 msgid "New subtheme" msgstr "Voeg nieuwe subthema toe" -#: config/posttypes.php:153 +#: config/posttypes.php:160 msgid "View subtheme" msgstr "Bekijk subthema" -#: config/posttypes.php:154 +#: config/posttypes.php:161 msgid "View subthemes" msgstr "Bekijk subthema's" -#: config/posttypes.php:155 +#: config/posttypes.php:162 msgid "Search subthemes" msgstr "Zoek subthema's" -#: config/posttypes.php:156 +#: config/posttypes.php:163 msgid "No subthemes found." msgstr "Geen subthema's gevonden." -#: config/posttypes.php:157 +#: config/posttypes.php:164 msgid "No subthemes found in Trash." msgstr "Geen subthema's gevonden in prullenbak." -#: config/posttypes.php:158 +#: config/posttypes.php:165 msgid "All subthemes" msgstr "Alle subthema's" -#: config/posttypes.php:159 +#: config/posttypes.php:166 msgid "Subthemes archives" msgstr "Subthema's archieven" -#: config/posttypes.php:160 +#: config/posttypes.php:167 msgid "Subtheme attributes" msgstr "Subthema attributen" -#: config/posttypes.php:161 +#: config/posttypes.php:168 msgid "Insert into subtheme" msgstr "Voeg in subthema" -#: config/posttypes.php:166 +#: config/posttypes.php:173 msgid "Parent subthemes:" msgstr "Hoofd subthema's:" -#: config/posttypes.php:182 +#: config/posttypes.php:188 msgctxt "Posttype definition" msgid "Subtheme" msgstr "Subthema" -#: config/posttypes.php:183 +#: config/posttypes.php:189 msgctxt "Posttype definition" msgid "Subthemes" msgstr "Subthema's" -#: config/posttypes.php:205 +#: config/posttypes.php:211 msgctxt "Posttype definition" msgid "Location" msgstr "Locatie" -#: config/posttypes.php:206 +#: config/posttypes.php:212 msgctxt "Posttype definition" msgid "Locations" msgstr "Locaties" -#: config/settings.php:7 -msgctxt "OpenPub instellingen subpagina" -msgid "Portal" -msgstr "Portal" - -#: config/settings.php:12 config/settings.php:24 -msgid "Portal URL" -msgstr "Portal URL" - -#: config/settings.php:18 -msgid "Portal OpenPub item slug" -msgstr "Portal OpenPub item slug" - -#: config/settings.php:19 -msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" -msgstr "URL voor OpenPub items in de portal, bv \"onderwerp\"" - -#: config/settings.php:25 -msgid "Use portal url in api." -msgstr "Gebruik portal url in de api." - -#: config/settings.php:31 -msgid "Use an element to leave the website without being able to navigate back via the browser 'Back' button." -msgstr "Gebruik een element waarmee de website verlaten kan worden zonder dat er terug genavigeerd kan worden via de 'Vorige' knop in de browser." - -#: config/settings.php:37 -msgid "Used for configuring on which websites an OpenPub item should be displayed on." -msgstr "Wordt gebruikt voor het instellen van de websites waarop een OpenPub item weergegeven moet worden." - -#: config/settings.php:44 -msgid "OpenPub items without an expiration date expire automatically when the field below has a value bigger than 0. Existing OpenPub items without an expiration date will be assigned a value of the published date plus the value given in days. New OpenPub items will have a value of the current date plus the value given in days." -msgstr "Items zonder een einddatum verlopen automatisch als het veld hieronder een waarde heeft die groter is dan 0. Bestaande OpenPub items zonder een einddatum krijgen een waarde toegewezen van de publicatie datum plus de waarde die is opgegeven in dagen. Nieuwe OpenPub items krijgen een waarde van de huidige datum plus de waarde die is opgegeven in dagen." - -#: config/settings.php:47 -msgid "Days to expire" -msgstr "Dagen tot verlopen" - -#: config/settings.php:48 -msgid "After how many days should an item expire?" -msgstr "Na hoeveel dagen moet een item verlopen?" - -#: config/settings.php:53 -msgid "Admin notices" -msgstr "Administratieve mededelingen" - -#: config/settings.php:54 -msgid "Disable upgrade admin notices." -msgstr "Schakel administratieve mededelingen over upgraden uit." - -#: config/settings.php:57 -msgid "Elasticsearch" -msgstr "Elasticsearch" - -#: config/settings.php:64 -msgid "Instance url" -msgstr "Instance url" - -#: config/settings.php:65 config/settings.php:71 -msgid "URL inclusief http(s)://" -msgstr "URL inclusief http(s)://" - -#: config/settings.php:70 -msgid "Instance shield" -msgstr "Instance user/wachtwoord" - -#: config/settings.php:76 -msgid "Instance prefix" -msgstr "Instance prefix" - -#: config/settings.php:77 -msgid "Use this prefix to group multiple instances" -msgstr "Dit voorvoegsel wordt gebruikt om meerdere bronnen in ElasticSearch te groeperen" - -#: config/settings_pages.php:7 -msgid "OpenPub settings" -msgstr "OpenPub instellingen" - -#: config/settings_pages.php:9 -msgctxt "OpenPub settings subpage" -msgid "Base" -msgstr "Basis" - -#: config/settings_pages.php:12 -msgctxt "OpenPub settings subpage" -msgid "Submit" -msgstr "Opslaan" +#: config/show_on_metabox.php:6 +msgid "External" +msgstr "Extern" -#: config/settings_pages.php:14 -msgctxt "OpenPub settings tab" -msgid "Elasticsearch" -msgstr "Elasticsearch" +#: config/show_on_metabox.php:15 +msgid "Select websites where this item should be displayed on." +msgstr "Selecteer websites waarop dit item getoond moet worden." #: config/taxonomies.php:16 msgctxt "Taxonomy definition" @@ -510,27 +544,125 @@ msgctxt "Taxonomy definition" msgid "Usages" msgstr "Toepassingen" -#: src/Base/Foundation/DependencyChecker.php:62 +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "District" +msgstr "Kern" + +#: config/taxonomies.php:74 +msgctxt "Taxonomy definition" +msgid "Districts" +msgstr "Kernen" + +#: src/Base/Foundation/DependencyChecker.php:59 msgid "The following plugins are required to use the OpenPub:" msgstr "De volgende plugins zijn vereist om gebruik te maken van de OpenPub:" -#: src/Base/Foundation/DependencyChecker.php:98 +#: src/Base/Foundation/DependencyChecker.php:90 msgid "Class does not exist" msgstr "Class bestaat niet" -#: src/Base/Foundation/DependencyChecker.php:112 +#: src/Base/Foundation/DependencyChecker.php:106 msgid "Inactive" msgstr "Inactief" -#: src/Base/Foundation/DependencyChecker.php:120 +#: src/Base/Foundation/DependencyChecker.php:114 msgid "Minimal version:" msgstr "Minimale versie:" -#: src/Base/RestAPI/ItemFields/ConnectedField.php:48 +#: src/Base/Metabox/AdminNotice.php:19 +msgid "" +"Since the major release of v3.0.0 of the Yard | OpenPub Base plugin two manual actions are required. You're urgently requested to read the README.md inside the plugin folder." +msgstr "" +"Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin zijn er twee handmatige acties vereist. Je wordt " +"dringend verzocht om de README.md van de plugin te lezen." + +#: src/Base/Metabox/AdminNotice.php:26 +msgid "" +"Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're " +"urgently requested to read the README.md inside the plugin " +"folder and look for the part about 'convert:highlighted'." +msgstr "" +"Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin is er nog één handmatige actie vereist. Je wordt " +"dringend verzocht om de README.md van de plugin te lezen en " +"met name het deel over 'convert:highlighted'." + +#: src/Base/Metabox/AdminNotice.php:33 +msgid "" +"Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're " +"urgently requested to read the README.md inside the plugin " +"folder and look for the part about 'convert:expiration-date'." +msgstr "" +"Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin is er nog één handmatige actie vereist. Je wordt " +"dringend verzocht om de README.md van de plugin te lezen en " +"met name het deel over 'convert:expiration-date'." + +#: src/Base/Metabox/MetaboxServiceProvider.php:99 +msgid "" +"Items with an expiration date will be excluded from the search results and " +"on news overview page from this date forward." +msgstr "" +"Items met een einddatum worden uitgesloten van de zoekresultaten en op de " +"nieuws pagina vanaf deze datum." + +#: src/Base/RestAPI/ItemFields/ConnectedField.php:42 +#: src/Base/RestAPI/ItemFields/ConnectedThemeItemField.php:38 #, php-format msgid "Connection type \"%s\" does not exist" msgstr "Verbindingstype \"%s\" bestaat niet" +#: src/Base/Taxonomy/TaxonomyController.php:17 +msgid "Additional explanation" +msgstr "Aanvullende uitleg" + +#: src/Base/Taxonomy/TaxonomyController.php:18 +msgid "" +"The slug value must be the ID of the blog you want to add as term. The ID is " +"used for displaying the correct openpub-items on every blog." +msgstr "" +"De waarde van de slug moet het ID zijn van de blog die je wilt toevoegen als " +"term. Het ID wordt gebruikt om de juiste openpub-items weer te geven op alle " +"blogs." + +#~ msgid "Elasticsearch" +#~ msgstr "Elasticsearch" + +#~ msgid "Instance url" +#~ msgstr "Instance url" + +#~ msgid "URL inclusief http(s)://" +#~ msgstr "URL inclusief http(s)://" + +#~ msgid "Instance shield" +#~ msgstr "Instance user/wachtwoord" + +#~ msgid "Instance prefix" +#~ msgstr "Instance prefix" + +#~ msgid "Use this prefix to group multiple instances" +#~ msgstr "" +#~ "Dit voorvoegsel wordt gebruikt om meerdere bronnen in ElasticSearch te " +#~ "groeperen" + +#~ msgctxt "OpenPub settings subpage" +#~ msgid "Base" +#~ msgstr "Basis" + +#~ msgctxt "OpenPub settings subpage" +#~ msgid "Submit" +#~ msgstr "Opslaan" + +#~ msgctxt "OpenPub settings tab" +#~ msgid "Elasticsearch" +#~ msgstr "Elasticsearch" + #~ msgctxt "P2P titel" #~ msgid "Theme" #~ msgstr "Thema" @@ -575,10 +707,6 @@ msgstr "Verbindingstype \"%s\" bestaat niet" #~ msgid "Add new OpenPub" #~ msgstr "Add new OpenPub" -#~ msgctxt "OpenPub settings tab" -#~ msgid "General" -#~ msgstr "Algemeen" - #, fuzzy #~| msgid "OpenPub settings" #~ msgid "Settings" @@ -650,27 +778,3 @@ msgstr "Verbindingstype \"%s\" bestaat niet" #~ msgid "This link does not work, go to our website: %s" #~ msgstr "Deze link werkt niet, bekijk onze website: %s" - -#: src/Base/Taxonomy/TaxonomyController.php:21 -msgid "Additional explanation" -msgstr "Aanvullende uitleg" - -#: src/Base/Taxonomy/TaxonomyController.php:22 -msgid "The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog." -msgstr "De waarde van de slug moet het ID zijn van de blog die je wilt toevoegen als term. Het ID wordt gebruikt om de juiste openpub-items weer te geven op alle blogs." - -#: src/Base/Metabox/MetaboxServiceProvider.php:50 -msgid "Items with an expiration date will be excluded from the search results and on news overview page from this date forward." -msgstr "Items met een einddatum worden uitgesloten van de zoekresultaten en op de nieuws pagina vanaf deze datum." - -#: src/Base/Metabox/AdminNotice.php:18 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin two manual actions are required. You're urgently requested to read the README.md inside the plugin folder." -msgstr "Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin zijn er twee handmatige acties vereist. Je wordt dringend verzocht om de README.md van de plugin te lezen." - -#: src/Base/Metabox/AdminNotice.php:24 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:highlighted'." -msgstr "Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin is er nog één handmatige actie vereist. Je wordt dringend verzocht om de README.md van de plugin te lezen en met name het deel over 'convert:highlighted'." - -#: src/Base/Metabox/AdminNotice.php:30 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:expiration-date'." -msgstr "Sinds de major release van v3.0.0 van de Yard | OpenPub Base plugin is er nog één handmatige actie vereist. Je wordt dringend verzocht om de README.md van de plugin te lezen en met name het deel over 'convert:expiration-date'." diff --git a/languages/openpub-base.pot b/languages/openpub-base.pot index 65b714b..cec16f3 100644 --- a/languages/openpub-base.pot +++ b/languages/openpub-base.pot @@ -4,388 +4,481 @@ msgid "" msgstr "" "Project-Id-Version: OWC OpenPub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-01 14:03+0100\n" -"POT-Revision-Date: Fri Nov 27 2015 13:26:26 GMT+0100 (W. Europe Standard Time)\n" +"POT-Creation-Date: 2023-10-04 15:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: \n" "Language-Team: Yard Digital \n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" +"POT-Revision-Date: Fri Nov 27 2015 13:26:26 GMT+0100 (W. Europe Standard Time)\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-Basepath: ..\n" -"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;" -"_e:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;" -"_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;" -"esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c\n" -"X-Generator: Poedit 2.0.6\n" +"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;_e:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c\n" +"X-Generator: Poedit 3.4\n" "X-Poedit-SearchPath-0: src\n" "X-Poedit-SearchPath-1: config\n" "X-Poedit-SearchPathExcluded-0: assets\n" "X-Poedit-SearchPathExcluded-1: node_modules\n" "X-Poedit-SearchPathExcluded-2: vendor\n" -#: config/escape_element_metabox.php:6 config/settings.php:30 -msgid "Escape element" -msgstr "" - -#: config/settings.php:36 config/show_on_metabox.php:14 config/taxonomies.php:61 config/taxonomies.php:62 -msgid "Show on" -msgstr "" - -#: config/escape_element_metabox.php:14 -msgid "Enable escape element" -msgstr "" - -#: config/escape_element_metabox.php:15 -msgid "Show escape element on portal page." -msgstr "" - -#: config/escape_element_metabox.php:19 -msgid "Yes" -msgstr "" - -#: config/escape_element_metabox.php:20 -msgid "No" -msgstr "" - -#: config/show_on_metabox.php:6 -msgid "External" -msgstr "" - -#: config/show_on_metabox.php:15 -msgid "Select websites where this item should be displayed on." -msgstr "" - -#: config/metaboxes.php:6 +#: config/cmb2_metaboxes.php:6 msgid "Data" msgstr "" -#: config/metaboxes.php:14 +#: config/cmb2_metaboxes.php:14 msgid "Highlighted item" msgstr "" -#: config/metaboxes.php:15 +#: config/cmb2_metaboxes.php:15 msgid "Use this option to select current item to be a highlighted (featured) item" msgstr "" -#: config/metaboxes.php:20 +#: config/cmb2_metaboxes.php:20 msgid "Synonyms" msgstr "" -#: config/metaboxes.php:21 +#: config/cmb2_metaboxes.php:21 msgid "Use this option to add an comma separated list of synonyms or related terms" msgstr "" -#: config/metaboxes.php:27 +#: config/cmb2_metaboxes.php:27 msgid "Select end date" -msgstr " +msgstr "" -#: config/metaboxes.php:35 +#: config/cmb2_metaboxes.php:37 msgid "Links" msgstr "" -#: config/metaboxes.php:42 -msgid "Add new link" +#: config/cmb2_metaboxes.php:48 +msgid "Add new link group" +msgstr "" + +#: config/cmb2_metaboxes.php:49 +msgid "Remove link group" msgstr "" -#: config/metaboxes.php:46 +#: config/cmb2_metaboxes.php:54 msgid "Link title" msgstr "" -#: config/metaboxes.php:47 config/metaboxes.php:74 +#: config/cmb2_metaboxes.php:55 config/cmb2_metaboxes.php:93 msgid "Use the title to replace the URL" msgstr "" -#: config/metaboxes.php:52 +#: config/cmb2_metaboxes.php:60 msgid "Link URL" msgstr "" -#: config/metaboxes.php:53 config/metaboxes.php:80 config/settings.php:13 +#: config/cmb2_metaboxes.php:61 config/cmb2_metaboxes.php:99 +#: config/cmb2_settings_pages.php:16 msgid "URL including http(s)://" msgstr "" -#: config/metaboxes.php:62 +#: config/cmb2_metaboxes.php:71 config/cmb2_metaboxes.php:80 msgid "Downloads" msgstr "" -#: config/metaboxes.php:69 -msgid "Add new download" +#: config/cmb2_metaboxes.php:86 +msgid "Add new download group" +msgstr "" + +#: config/cmb2_metaboxes.php:87 +msgid "Remove download group" msgstr "" -#: config/metaboxes.php:73 +#: config/cmb2_metaboxes.php:92 msgid "Download title" msgstr "" -#: config/metaboxes.php:79 +#: config/cmb2_metaboxes.php:98 msgid "Download URL" msgstr "" -#: config/metaboxes.php:89 +#: config/cmb2_metaboxes.php:109 config/cmb2_metaboxes.php:118 msgid "Other" msgstr "" -#: config/metaboxes.php:92 +#: config/cmb2_metaboxes.php:121 msgid "Notes" -msgstr " +msgstr "" -#: config/metaboxes.php:93 +#: config/cmb2_metaboxes.php:122 msgid "(the law, authority, local regulations, etc.)" msgstr "" +#: config/cmb2_metaboxes.php:133 config/cmb2_metaboxes.php:143 +msgid "Zipcodes" +msgstr "" + +#: config/cmb2_metaboxes.php:149 +msgid "Add new zipcode" +msgstr "" + +#: config/cmb2_metaboxes.php:150 +msgid "Remove zipcode" +msgstr "" + +#: config/cmb2_metaboxes.php:155 +msgid "Zipcode" +msgstr "" + +#: config/cmb2_metaboxes.php:156 +msgid "A zipcode that is part of this district. (Only numbers, no letters)" +msgstr "" + +#: config/cmb2_settings_pages.php:6 +msgid "OpenPub settings" +msgstr "" + +#: config/cmb2_settings_pages.php:10 +msgid "General" +msgstr "" + +#: config/cmb2_settings_pages.php:15 +msgid "Portal URL" +msgstr "" + +#: config/cmb2_settings_pages.php:21 +msgid "Portal OpenPub item slug" +msgstr "" + +#: config/cmb2_settings_pages.php:22 +msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" +msgstr "" + +#: config/cmb2_settings_pages.php:27 +msgid "Portal url" +msgstr "" + +#: config/cmb2_settings_pages.php:28 +msgid "Use portal url in api." +msgstr "" + +#: config/cmb2_settings_pages.php:33 config/escape_element_metabox.php:6 +msgid "Escape element" +msgstr "" + +#: config/cmb2_settings_pages.php:34 +msgid "Use an element to leave the website without being able to navigate back via the browser 'Back' button." +msgstr "" + +#: config/cmb2_settings_pages.php:39 config/show_on_metabox.php:14 +#: config/taxonomies.php:61 config/taxonomies.php:62 +msgid "Show on" +msgstr "" + +#: config/cmb2_settings_pages.php:40 +msgid "Used for configuring on which websites an OpenPub item should be displayed on." +msgstr "" + +#: config/cmb2_settings_pages.php:46 config/posttypes.php:39 +#: config/posttypes.php:47 +msgid "Expired" +msgstr "" + +#: config/cmb2_settings_pages.php:47 +msgid "OpenPub items without an expiration date expire automatically when the field below has a value bigger than 0. Existing OpenPub items without an expiration date will be assigned a value of the published date plus the value given in days. New OpenPub items will have a value of the current date plus the value given in days." +msgstr "" + +#: config/cmb2_settings_pages.php:50 +msgid "Days to expire" +msgstr "" + +#: config/cmb2_settings_pages.php:51 +msgid "After how many days should an item expire?" +msgstr "" + +#: config/cmb2_settings_pages.php:56 +msgid "Admin notices" +msgstr "" + +#: config/cmb2_settings_pages.php:57 +msgid "Disable upgrade admin notices." +msgstr "" + +#: config/escape_element_metabox.php:14 +msgid "Enable escape element" +msgstr "" + +#: config/escape_element_metabox.php:15 +msgid "Show escape element on portal page." +msgstr "" + +#: config/escape_element_metabox.php:19 +msgid "Yes" +msgstr "" + +#: config/escape_element_metabox.php:20 +msgid "No" +msgstr "" + #: config/p2p_connections.php:9 -msgctxt "P2P titel" msgid "Connected item(s)" msgstr "" -#: config/p2p_connections.php:14 -msgctxt "P2P titel" +#: config/p2p_connections.php:14 config/posttypes.php:113 +#: config/posttypes.php:114 msgid "Theme" msgstr "" -#: config/p2p_connections.php:19 -msgctxt "P2P titel" +#: config/p2p_connections.php:19 config/posttypes.php:154 +#: config/posttypes.php:155 config/posttypes.php:171 config/posttypes.php:172 msgid "Subtheme" msgstr "" #: config/p2p_connections.php:24 -msgctxt "P2P titel" msgid "Locations" msgstr "" -#: config/posttypes.php:25 config/posttypes.php:65 +#: config/posttypes.php:24 +msgid "Author" +msgstr "" + +#: config/posttypes.php:27 config/posttypes.php:68 msgctxt "Admin Filter definition" msgid "Type" msgstr "" -#: config/posttypes.php:29 config/posttypes.php:69 +#: config/posttypes.php:31 config/posttypes.php:72 msgctxt "Admin Filter definition" msgid "Audience" msgstr "" -#: config/posttypes.php:33 config/posttypes.php:73 +#: config/posttypes.php:35 config/posttypes.php:76 msgctxt "Admin Filter definition" msgid "Usage" msgstr "" -#: config/posttypes.php:37 config/posttypes.php:45 config/settings.php:43 -msgid "Expired" -msgstr "" - -#: config/posttypes.php:49 +#: config/posttypes.php:51 msgid "No expire date" msgstr "" -#: config/posttypes.php:51 +#: config/posttypes.php:53 msgid "Will expire on" msgstr "" -#: config/posttypes.php:57 +#: config/posttypes.php:59 msgid "Published" msgstr "" -#: config/posttypes.php:77 +#: config/posttypes.php:80 msgctxt "Admin Filter definition" msgid "Aspect" msgstr "" -#: config/posttypes.php:82 -msgctxt "post type singular name" +#: config/posttypes.php:85 config/posttypes.php:87 msgid "OpenPub item" msgstr "" -#: config/posttypes.php:83 -msgctxt "admin menu" +#: config/posttypes.php:86 msgid "OpenPub items" msgstr "" -#: config/posttypes.php:84 -msgctxt "add new on admin bar" -msgid "OpenPub item" -msgstr "" - -#: config/posttypes.php:85 -msgctxt "" +#: config/posttypes.php:88 config/posttypes.php:89 msgid "Add new OpenPub" msgstr "" -#: config/posttypes.php:86 -msgid "Add new OpenPub" -msgstr "" - -#: config/posttypes.php:87 +#: config/posttypes.php:90 msgid "New OpenPub" msgstr "" -#: config/posttypes.php:88 +#: config/posttypes.php:91 msgid "Edit OpenPub" msgstr "" -#: config/posttypes.php:89 +#: config/posttypes.php:92 msgid "View OpenPub" msgstr "" -#: config/posttypes.php:90 +#: config/posttypes.php:93 msgid "All OpenPub items" msgstr "" -#: config/posttypes.php:91 +#: config/posttypes.php:94 msgid "Search OpenPub items" msgstr "" -#: config/posttypes.php:92 +#: config/posttypes.php:95 msgid "Parent OpenPub items:" msgstr "" -#: config/posttypes.php:93 +#: config/posttypes.php:96 msgid "No OpenPub items found." msgstr "" -#: config/posttypes.php:94 +#: config/posttypes.php:97 msgid "No OpenPub items found in trash." msgstr "" -#: config/posttypes.php:100 +#: config/posttypes.php:103 msgctxt "Posttype definition" msgid "Item" msgstr "" -#: config/posttypes.php:101 +#: config/posttypes.php:104 msgctxt "Posttype definition" msgid "Items" msgstr "" -#: config/posttypes.php:102 +#: config/posttypes.php:105 msgctxt "post type general name" msgid "Items" msgstr "" +#: config/posttypes.php:115 config/posttypes.php:116 +msgid "Add new theme" +msgstr "" + +#: config/posttypes.php:117 +msgid "Edit theme" +msgstr "" + +#: config/posttypes.php:118 +msgid "New theme" +msgstr "" + +#: config/posttypes.php:119 +msgid "View theme" +msgstr "" + +#: config/posttypes.php:120 +msgid "View themes" +msgstr "" + +#: config/posttypes.php:121 +msgid "Search themes" +msgstr "" + #: config/posttypes.php:122 -msgctxt "Posttype definition" -msgid "Theme" +msgid "No themes found." msgstr "" #: config/posttypes.php:123 -msgctxt "Posttype definition" -msgid "Themes" +msgid "No themes found in Trash." msgstr "" -#: config/posttypes.php:144 -msgctxt "Posttype definition" -msgid "Subtheme" +#: config/posttypes.php:124 +msgid "All themes" msgstr "" -#: config/posttypes.php:145 -msgctxt "Posttype definition" -msgid "Subthemes" +#: config/posttypes.php:125 +msgid "Themes archives" msgstr "" -#: config/posttypes.php:167 -msgctxt "Posttype definition" -msgid "Location" +#: config/posttypes.php:126 +msgid "Theme attributes" msgstr "" -#: config/posttypes.php:168 -msgctxt "Posttype definition" -msgid "Locations" +#: config/posttypes.php:127 +msgid "Insert into theme" msgstr "" -#: config/settings.php:7 -msgctxt "OpenPub instellingen subpagina" -msgid "Portal" +#: config/posttypes.php:128 config/posttypes.php:169 +msgid "Featured image" msgstr "" -#: config/settings.php:12 config/settings.php:24 -msgid "Portal URL" +#: config/posttypes.php:129 config/posttypes.php:170 +msgid "Set featured image" msgstr "" -#: config/settings.php:18 -msgid "Portal OpenPub item slug" +#: config/posttypes.php:130 config/posttypes.php:131 +msgid "Themes" msgstr "" -#: config/settings.php:19 -msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" +#: config/posttypes.php:132 +msgid "Parent themes:" msgstr "" -#: config/settings.php:25 -msgid "Use portal url in api." +#: config/posttypes.php:144 +msgctxt "Posttype definition" +msgid "Theme" msgstr "" -#: config/settings.php:31 -msgid "Use an element to leave the website without being able to navigate back via the browser 'Back' button." +#: config/posttypes.php:145 +msgctxt "Posttype definition" +msgid "Themes" msgstr "" -#: config/settings.php:37 -msgid "Used for configuring on which websites an OpenPub item should be displayed on." +#: config/posttypes.php:156 config/posttypes.php:157 +msgid "Add new subtheme" msgstr "" -#: config/settings.php:44 -msgid "OpenPub items without an expiration date expire automatically when the field below has a value bigger than 0. Existing OpenPub items without an expiration date will be assigned a value of the published date plus the value given in days. New OpenPub items will have a value of the current date plus the value given in days." +#: config/posttypes.php:158 +msgid "Edit subtheme" msgstr "" -#: config/settings.php:47 -msgid "Days to expire" +#: config/posttypes.php:159 +msgid "New subtheme" msgstr "" -#: config/settings.php:48 -msgid "After how many days should an item expire?" +#: config/posttypes.php:160 +msgid "View subtheme" msgstr "" -#: config/settings.php:53 -msgid "Admin notices" +#: config/posttypes.php:161 +msgid "View subthemes" msgstr "" -#: config/settings.php:54 -msgid "Disable upgrade admin notices." +#: config/posttypes.php:162 +msgid "Search subthemes" msgstr "" -#: config/settings.php:57 -msgid "Elasticsearch" +#: config/posttypes.php:163 +msgid "No subthemes found." msgstr "" -#: config/settings.php:64 -msgid "Instance url" +#: config/posttypes.php:164 +msgid "No subthemes found in Trash." msgstr "" -#: config/settings.php:65 config/settings.php:71 -msgid "URL inclusief http(s)://" +#: config/posttypes.php:165 +msgid "All subthemes" msgstr "" -#: config/settings.php:70 -msgid "Instance shield" +#: config/posttypes.php:166 +msgid "Subthemes archives" msgstr "" -#: config/settings.php:76 -msgid "Instance prefix" +#: config/posttypes.php:167 +msgid "Subtheme attributes" msgstr "" -#: config/settings.php:77 -msgid "Use this prefix to group multiple instances" +#: config/posttypes.php:168 +msgid "Insert into subtheme" msgstr "" -#: config/settings_pages.php:7 -msgid "OpenPub settings" +#: config/posttypes.php:173 +msgid "Parent subthemes:" +msgstr "" + +#: config/posttypes.php:188 +msgctxt "Posttype definition" +msgid "Subtheme" msgstr "" -#: config/settings_pages.php:9 -msgctxt "OpenPub settings subpage" -msgid "Base" +#: config/posttypes.php:189 +msgctxt "Posttype definition" +msgid "Subthemes" msgstr "" -#: config/settings_pages.php:12 -msgctxt "OpenPub settings subpage" -msgid "Submit" +#: config/posttypes.php:211 +msgctxt "Posttype definition" +msgid "Location" msgstr "" -#: config/settings_pages.php:14 -msgctxt "OpenPub settings tab" -msgid "General" +#: config/posttypes.php:212 +msgctxt "Posttype definition" +msgid "Locations" msgstr "" -#: config/settings_pages.php:15 -msgctxt "OpenPub settings tab" -msgid "Elasticsearch" +#: config/show_on_metabox.php:6 +msgid "External" +msgstr "" + +#: config/show_on_metabox.php:15 +msgid "Select websites where this item should be displayed on." msgstr "" #: config/taxonomies.php:16 @@ -418,47 +511,58 @@ msgctxt "Taxonomy definition" msgid "Usages" msgstr "" -#: src/Base/Foundation/DependencyChecker.php:62 +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "District" +msgstr "" + +#: config/taxonomies.php:74 +msgctxt "Taxonomy definition" +msgid "Districts" +msgstr "" + +#: src/Base/Foundation/DependencyChecker.php:59 msgid "The following plugins are required to use the OpenPub:" msgstr "" -#: src/Base/Foundation/DependencyChecker.php:98 +#: src/Base/Foundation/DependencyChecker.php:90 msgid "Class does not exist" msgstr "" -#: src/Base/Foundation/DependencyChecker.php:112 +#: src/Base/Foundation/DependencyChecker.php:106 msgid "Inactive" msgstr "" -#: src/Base/Foundation/DependencyChecker.php:120 +#: src/Base/Foundation/DependencyChecker.php:114 msgid "Minimal version:" msgstr "" -#: src/Base/RestAPI/ItemFields/ConnectedField.php:48 -#, php-format -msgid "Connection type \"%s\" does not exist" +#: src/Base/Metabox/AdminNotice.php:19 +msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin two manual actions are required. You're urgently requested to read the README.md inside the plugin folder." msgstr "" -#: src/Base/Taxonomy/TaxonomyController.php:21 -msgid "Additional explanation" +#: src/Base/Metabox/AdminNotice.php:26 +msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:highlighted'." msgstr "" -#: src/Base/Taxonomy/TaxonomyController.php:22 -msgid "The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog." +#: src/Base/Metabox/AdminNotice.php:33 +msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:expiration-date'." msgstr "" -#: src/Base/Metabox/MetaboxServiceProvider.php:50 +#: src/Base/Metabox/MetaboxServiceProvider.php:99 msgid "Items with an expiration date will be excluded from the search results and on news overview page from this date forward." msgstr "" -#: src/Base/Metabox/AdminNotice.php:18 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin two manual actions are required. You're urgently requested to read the README.md inside the plugin folder." +#: src/Base/RestAPI/ItemFields/ConnectedField.php:42 +#: src/Base/RestAPI/ItemFields/ConnectedThemeItemField.php:38 +#, php-format +msgid "Connection type \"%s\" does not exist" msgstr "" -#: src/Base/Metabox/AdminNotice.php:24 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:highlighted'." +#: src/Base/Taxonomy/TaxonomyController.php:17 +msgid "Additional explanation" msgstr "" -#: src/Base/Metabox/AdminNotice.php:30 -msgid "Since the major release of v3.0.0 of the Yard | OpenPub Base plugin there is still one manual action required. You're urgently requested to read the README.md inside the plugin folder and look for the part about 'convert:expiration-date'." +#: src/Base/Taxonomy/TaxonomyController.php:18 +msgid "The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog." msgstr "" diff --git a/src/Base/Metabox/MetaboxServiceProvider.php b/src/Base/Metabox/MetaboxServiceProvider.php index ccd36aa..3a3ccaa 100644 --- a/src/Base/Metabox/MetaboxServiceProvider.php +++ b/src/Base/Metabox/MetaboxServiceProvider.php @@ -14,6 +14,7 @@ class MetaboxServiceProvider extends ServiceProvider public function register() { $this->plugin->loader->addAction('cmb2_admin_init', $this, 'registerMetaboxes', 10, 0); + $this->plugin->loader->addAction('cmb2_save_term_fields', $this, 'saveGroupUnserialized', 10, 1); $this->plugin->loader->addAction('admin_notices', new AdminNotice, 'upgradeAdminNotice', 10, 0); if (class_exists('\WP_CLI')) { @@ -109,4 +110,22 @@ protected function getShowOnMetabox(array $configMetaboxes): array { return array_merge($configMetaboxes, $this->plugin->config->get('show_on_metabox')); } + + /** + * Save group unserialized so it can be used in the search query. + * + * @param int $termId The current term ID. + * + * @return void + */ + public function saveGroupUnserialized(int $termId): void + { + delete_term_meta($termId, self::PREFIX . 'openpub_zipcode'); + $zipcodes = get_term_meta($termId, self::PREFIX . 'openpub_zipcodes_group'); + if ($zipcodes) { + foreach ( $zipcodes[0] as $zipcode ) { + add_term_meta( $termId, self::PREFIX . 'openpub_zipcode', $zipcode['openpub_zipcode'] ); + } + } + } } diff --git a/src/Base/Repositories/Item.php b/src/Base/Repositories/Item.php index 0443c57..8e07efc 100644 --- a/src/Base/Repositories/Item.php +++ b/src/Base/Repositories/Item.php @@ -107,4 +107,25 @@ public static function addTypeParameter(string $type): array ] ]; } + + public static function addZipcodeParameter(string $zipcode): array + { + global $wpdb; + $sql = "SELECT term_id FROM {$wpdb->termmeta} WHERE meta_key = '_owc_openpub_zipcode' AND meta_value = %s"; + $results = $wpdb->get_col($wpdb->prepare($sql, (int)$zipcode)); + + if ($results) { + return [ + 'tax_query' => [ + [ + 'taxonomy' => 'openpub-district', + 'terms' => $results, + 'field' => 'term_id', + 'operator' => 'IN' + ] + ] + ]; + } + return []; + } } diff --git a/src/Base/RestAPI/Controllers/ItemController.php b/src/Base/RestAPI/Controllers/ItemController.php index 69a7f1e..180724c 100644 --- a/src/Base/RestAPI/Controllers/ItemController.php +++ b/src/Base/RestAPI/Controllers/ItemController.php @@ -51,6 +51,10 @@ protected function itemQueryBuilder(WP_REST_Request $request = null): Item $items->query(Item::addShowOnParameter($request->get_param('source'))); } + if ($this->getZipcodeParam($request)) { + $items->query(Item::addZipcodeParameter($this->getZipcodeParam($request))); + } + return $items; } @@ -191,6 +195,13 @@ protected function getTypeParam(WP_REST_Request $request): string return ! empty($typeParam) && is_string($typeParam) ? $typeParam : ''; } + protected function getZipcodeParam(WP_REST_Request $request): string + { + $typeParam = $request->get_param('zipcode'); + + return ! empty($typeParam) && is_string($typeParam) ? $typeParam : ''; + } + protected function validateBoolean(string $value): bool { $value = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); From c20dfe4ced8a815b196c0dc6844f020cc1655231 Mon Sep 17 00:00:00 2001 From: Richard Korthuis Date: Mon, 29 Apr 2024 13:36:42 +0200 Subject: [PATCH 2/2] Version bump --- CHANGELOG.md | 4 +++ languages/openpub-base-nl_NL.mo | Bin 11507 -> 11969 bytes languages/openpub-base-nl_NL.po | 30 ++++++++++++++++++++ languages/openpub-base.pot | 30 ++++++++++++++++++++ openpub-base.php | 2 +- src/Base/Foundation/Plugin.php | 2 +- src/Base/Metabox/MetaboxServiceProvider.php | 14 +++++---- src/Base/Repositories/Item.php | 21 ++++++-------- 8 files changed, 83 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 412c184..1c3d62c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v3.5.0 + +- Feat: Add districts with zipcodes, so the REST API can be filtered using a zipcode. + ## v3.4.4 - Refactor: CMB2 'show on' taxonomy field type from 'select_advanced' to 'taxonomy_multicheck' diff --git a/languages/openpub-base-nl_NL.mo b/languages/openpub-base-nl_NL.mo index 17fe3517043f1af0fc82ff778f0c4617ef481c17..eb922ec29759c86d364b984e6f21b4e10b596f13 100644 GIT binary patch delta 3269 zcmYM$YfzL`9LMn^ARr(L28oG2f*6Xo!Z1w@5JB;-c>^f~9%K<%Tvl#oYn0cr3+Om1 zmAz=PY;=sYDW@5Gk;C}HoU*Z*M$^d`S?T0BQ`ywi_qThtp7Fn*bDn+nT>j^r2k))> zydrQdIqHDn+D(ik)<+q08hc~;;A)OHW)g13x%d_i!5?ra-opfp;zRW$9E=&L=cZyR z=Hn<_gATSL{RPZH3hCVV2=&9SZ~|V(B#h^#?x*t+hdCIHdH4X%Mm@IzGqDDlgV~LV zxDVBFFVdtrYw!2tAo@2~>=!qXf94J!>gX?9kD-+m>M5uObNGnCnW!Wc+WQMp87Q;& zH=zdTM-6ZfDkDd%$1#Ea%~=ZV*pF(kfTuKoQXGh@a1fTGI&hJ!n^x3}y6pF_Vg&U= z=wL5Ch@T-%n{QA{d=rP^02&LVQAnYnhNtkM4)ZY!i%}gkpfb~eg#(P)h5R!Yn3k6A zI~fpAm$1`lzvr*3# z;|Q!oWoRp^gB_^U??(;vJ=6p~MJ8|haXNlGjQrEK8OqbzJejD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ZZls1*%i8eYQ3Fp`%*8Scj-9K~u(VbwbH*3(p!s^h4E-a!|BirTBMP%9ck z2VO?4=ochGHw)|V^`i?eLW@vo^J6-&$F5JqGL_R>I>jpS#Qj7Iv64{HtSbm*MJ0n! ziZcnVRAoJ({SPISUY-}SjA>G&b|4S*<>NgPEi4a1CMf=jM z`dXry*hp+6RH}$oM4%d!VB$XF5h9=9Fy+Sy7v?1gdRneyZrdx1=`9ILR+|mu-f_BL^Kf(5_)cRvUd-$kXASVySv+BSQMJwzU% zQ@VxF8>^LQBs@d|p~4etvWOZ&C*46jPUy7P6Dp4qyNN==O_=1ihT8b1s*cqD&alM( z$*}d_Rj!?kHozk(v B{0sm9 diff --git a/languages/openpub-base-nl_NL.po b/languages/openpub-base-nl_NL.po index 14bc66b..ad86a6b 100644 --- a/languages/openpub-base-nl_NL.po +++ b/languages/openpub-base-nl_NL.po @@ -129,6 +129,26 @@ msgstr "Vrij notitieveld" msgid "(the law, authority, local regulations, etc.)" msgstr "(wetgeving, bevoegd gezag, uitvoerder, lokale regelgeving)" +#: config/metaboxes.php:133 config/metaboxes.php:143 +msgid "Zipcodes" +msgstr "Postcodes" + +#: config/metaboxes.php:149 +msgid "Add new zipcode" +msgstr "Voeg nieuwe postcode toe" + +#: config/metaboxes.php:150 +msgid "Remove zipcode" +msgstr "Verwijder postcode" + +#: config/metaboxes.php:155 +msgid "Zipcode" +msgstr "Postcode" + +#: config/metaboxes.php:156 +msgid "A zipcode that is part of this district. (Only numbers, no letters)" +msgstr "Een postcode die bij deze wijk hoort. (Alleen cijfer, geen letters)" + #: config/p2p_connections.php:9 msgid "Connected item(s)" msgstr "Gekoppelde item(s)" @@ -514,6 +534,16 @@ msgctxt "Taxonomy definition" msgid "Usages" msgstr "Toepassingen" +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "District" +msgstr "Wijk" + +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "Districts" +msgstr "Wijken" + #: src/Base/Foundation/DependencyChecker.php:62 msgid "The following plugins are required to use the OpenPub:" msgstr "De volgende plugins zijn vereist om gebruik te maken van de OpenPub:" diff --git a/languages/openpub-base.pot b/languages/openpub-base.pot index 07186d5..c410fd6 100644 --- a/languages/openpub-base.pot +++ b/languages/openpub-base.pot @@ -134,6 +134,26 @@ msgstr " msgid "(the law, authority, local regulations, etc.)" msgstr "" +#: config/metaboxes.php:133 config/metaboxes.php:143 +msgid "Zipcodes" +msgstr "" + +#: config/metaboxes.php:149 +msgid "Add new zipcode" +msgstr "" + +#: config/metaboxes.php:150 +msgid "Remove zipcode" +msgstr "" + +#: config/metaboxes.php:155 +msgid "Zipcode" +msgstr "" + +#: config/metaboxes.php:156 +msgid "A zipcode that is part of this district. (Only numbers, no letters)" +msgstr "" + #: config/p2p_connections.php:9 msgctxt "P2P titel" msgid "Connected item(s)" @@ -422,6 +442,16 @@ msgctxt "Taxonomy definition" msgid "Usages" msgstr "" +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "District" +msgstr "" + +#: config/taxonomies.php:73 +msgctxt "Taxonomy definition" +msgid "Districts" +msgstr "" + #: src/Base/Foundation/DependencyChecker.php:62 msgid "The following plugins are required to use the OpenPub:" msgstr "" diff --git a/openpub-base.php b/openpub-base.php index 5ca75c1..3338239 100644 --- a/openpub-base.php +++ b/openpub-base.php @@ -4,7 +4,7 @@ * Plugin Name: Yard | OpenPub Base * Plugin URI: https://www.openwebconcept.nl/ * Description: Acts as foundation for other OpenPub related content plugins. This plugin implements actions to allow for other plugins to add and/or change Custom Posttypes, Metaboxes, Taxonomies, en Posts 2 posts relations. - * Version: 3.4.4 + * Version: 3.5 * Author: Yard | Digital Agency * Author URI: https://www.yard.nl/ * License: GPL-3.0 diff --git a/src/Base/Foundation/Plugin.php b/src/Base/Foundation/Plugin.php index 8cca70d..f0cee31 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -19,7 +19,7 @@ class Plugin * Version of the plugin. * Used for setting versions of enqueue scripts and styles. */ - public const VERSION = '3.4.4'; + public const VERSION = '3.5'; /** * Path to the root of the plugin. diff --git a/src/Base/Metabox/MetaboxServiceProvider.php b/src/Base/Metabox/MetaboxServiceProvider.php index 8d86038..6ee9b57 100644 --- a/src/Base/Metabox/MetaboxServiceProvider.php +++ b/src/Base/Metabox/MetaboxServiceProvider.php @@ -115,17 +115,19 @@ protected function getShowOnMetabox(array $configMetaboxes): array * Save group unserialized so it can be used in the search query. * * @param int $termId The current term ID. - * - * @return void */ public function saveGroupUnserialized(int $termId): void { delete_term_meta($termId, self::PREFIX . 'openpub_zipcode'); + $zipcodes = get_term_meta($termId, self::PREFIX . 'openpub_zipcodes_group'); - if ($zipcodes) { - foreach ( $zipcodes[0] as $zipcode ) { - add_term_meta( $termId, self::PREFIX . 'openpub_zipcode', $zipcode['openpub_zipcode'] ); - } + + if (! $zipcodes || empty($zipcodes[0])) { + return; + } + + foreach ( $zipcodes[0] as $zipcode ) { + add_term_meta( $termId, self::PREFIX . 'openpub_zipcode', $zipcode['openpub_zipcode'] ); } } } diff --git a/src/Base/Repositories/Item.php b/src/Base/Repositories/Item.php index 55827dd..63baf8f 100644 --- a/src/Base/Repositories/Item.php +++ b/src/Base/Repositories/Item.php @@ -141,18 +141,15 @@ public static function addZipcodeParameter(string $zipcode): array $sql = "SELECT term_id FROM {$wpdb->termmeta} WHERE meta_key = '_owc_openpub_zipcode' AND meta_value = %s"; $results = $wpdb->get_col($wpdb->prepare($sql, (int)$zipcode)); - if ($results) { - return [ - 'tax_query' => [ - [ - 'taxonomy' => 'openpub-district', - 'terms' => $results, - 'field' => 'term_id', - 'operator' => 'IN' - ] + return [ + 'tax_query' => [ + [ + 'taxonomy' => 'openpub-district', + 'terms' => $results, + 'field' => 'term_id', + 'operator' => 'IN' ] - ]; - } - return []; + ] + ]; } }