Skip to content

Commit

Permalink
Make all fields localizable by default (#46)
Browse files Browse the repository at this point in the history
* Localizable google site verification

* Localizable analytics

* Localizable consent

* Localizable sitemap

* Make collection_defaults localizable

* Make fields localizable

* Make hreflang_auto localizable

* Remove localizable from nested fields

Not supported.

* Localizable fields

* Add missing localizable attributes

* Add localizable to fields

* Add localizable to fields

* Add localizable to seo_description

* Add localizable to field schema_jsonld

* Add localizable for clarity

Fields are based on localizable fields, but this makes it explicit.

* Add localizable to fields
  • Loading branch information
carstenjaksch authored Aug 31, 2024
1 parent 95643ac commit 3ab0bb6
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/fieldsets/globals_seo_page_descriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ fields:
icon: grid
instructions: 'Set fallback meta descriptions for each collection.'
listable: hidden
localizable: true
3 changes: 3 additions & 0 deletions resources/fieldsets/globals_seo_page_environments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fields:
listable: false
display: Local
width: 33
localizable: true
-
handle: noindex_staging
field:
Expand All @@ -16,6 +17,7 @@ fields:
listable: false
display: Staging
width: 33
localizable: true
-
handle: noindex_production
field:
Expand All @@ -24,3 +26,4 @@ fields:
listable: false
display: Production
width: 33
localizable: true
1 change: 1 addition & 0 deletions resources/fieldsets/globals_seo_page_hreflang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ fields:
listable: hidden
instructions_position: above
width: 50
localizable: true
4 changes: 4 additions & 0 deletions resources/fieldsets/globals_seo_sitemap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fields:
instructions: 'Enable the Peak Sitemap.'
instructions_position: below
listable: hidden
localizable: true
-
handle: sitemap_collections
field:
Expand All @@ -21,6 +22,7 @@ fields:
display: Collections
width: 50
always_save: true
localizable: true
if:
use_sitemap: 'equals true'
-
Expand All @@ -36,6 +38,7 @@ fields:
visibility: visible
hide_display: false
always_save: true
localizable: true
if:
use_sitemap: 'equals true'
-
Expand Down Expand Up @@ -73,5 +76,6 @@ fields:
instructions: 'Select which collection term urls to include in the sitemap.xml. For example: _/blog/tags/retrowave_.'
listable: hidden
always_save: true
localizable: true
if:
use_sitemap: 'equals true'
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fields:
instructions_position: below
listable: hidden
width: 50
localizable: true
-
handle: social_images_collections
field:
Expand All @@ -21,6 +22,7 @@ fields:
instructions_position: below
listable: hidden
width: 50
localizable: true
if:
use_social_image_generation: 'equals true'
-
Expand All @@ -33,5 +35,6 @@ fields:
instructions_position: below
listable: hidden
width: 100
localizable: true
if:
use_social_image_generation: 'equals true'
10 changes: 10 additions & 0 deletions resources/fieldsets/globals_seo_trackers_analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fields:
instructions: 'Add Fathom tracking code to your head.'
listable: false
display: Fathom
localizable: true
-
handle: fathom
field:
Expand All @@ -16,6 +17,7 @@ fields:
type: text
listable: hidden
width: 50
localizable: true
validate:
- 'required_if:use_fathom,true'
if:
Expand All @@ -27,6 +29,7 @@ fields:
instructions: 'Add the Matomo self hosted tag manager to your head.'
listable: false
display: Matomo
localizable: true
-
handle: matomo_script_url
field:
Expand All @@ -36,6 +39,7 @@ fields:
type: text
listable: hidden
width: 50
localizable: true
validate:
- 'required_if:use_matomo,true'
if:
Expand All @@ -47,6 +51,7 @@ fields:
instructions: 'Add Plausible tracking code to your head.'
listable: false
display: Plausible
localizable: true
-
handle: plausible_use_custom_script
field:
Expand All @@ -56,6 +61,7 @@ fields:
display: 'Custom script'
instructions_position: above
default: false
localizable: true
if:
use_plausible: 'equals true'
-
Expand All @@ -67,6 +73,7 @@ fields:
type: text
listable: hidden
width: 50
localizable: true
validate:
- 'required_if:use_plausible,true'
if:
Expand All @@ -80,6 +87,7 @@ fields:
type: text
listable: hidden
width: 50
localizable: true
validate:
- 'required_if:plausible_use_custom_domain,true'
if:
Expand All @@ -94,6 +102,7 @@ fields:
instructions: 'Add Cloudflare tracking code to your head.'
listable: false
display: 'Cloudflare Web Analytics'
localizable: true
-
handle: cloudflare_web_analytics
field:
Expand All @@ -102,6 +111,7 @@ fields:
width: 50
type: text
listable: hidden
localizable: true
validate:
- 'required_if:use_cloudflare_web_analytics,true'
if:
Expand Down
14 changes: 14 additions & 0 deletions resources/fieldsets/globals_seo_trackers_consent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ fields:
instructions_position: above
visibility: visible
always_save: false
localizable: true
-
handle: scripts
field:
Expand Down Expand Up @@ -253,6 +254,7 @@ fields:
input_type: text
type: text
listable: hidden
localizable: true
validate:
- 'required_if:tracker_type,gtag'
if:
Expand All @@ -267,6 +269,7 @@ fields:
display: "Anonymize IP's"
instructions: "Even if you anonymize IP's you need consent according to the GDPR."
instructions_position: below
localizable: true
if:
tracker_type: 'equals gtag'
-
Expand All @@ -278,6 +281,7 @@ fields:
width: 50
display: 'Tracking ID'
instructions_position: below
localizable: true
validate:
- 'required_if:tracker_type,gtm'
if:
Expand All @@ -290,6 +294,7 @@ fields:
instructions_position: below
listable: false
display: 'Consent banner'
localizable: true
-
handle: embeds
field:
Expand All @@ -302,6 +307,7 @@ fields:
visibility: visible
always_save: false
width: 50
localizable: true
if:
use_consent_banner: 'equals true'
-
Expand All @@ -316,6 +322,7 @@ fields:
visibility: visible
replicator_preview: true
hide_display: false
localizable: true
if:
embeds: 'equals true'
-
Expand All @@ -329,6 +336,7 @@ fields:
instructions_position: below
visibility: visible
always_save: false
localizable: true
if:
use_consent_banner: 'equals true'
embeds: 'equals true'
Expand All @@ -351,6 +359,7 @@ fields:
width: 66
listable: hidden
use_consent_banner: 'equals true'
localizable: true
-
handle: display_style
field:
Expand All @@ -376,6 +385,7 @@ fields:
visibility: visible
replicator_preview: false
hide_display: false
localizable: true
if:
tracker_type: 'equals gtm'
use_consent_banner: 'equals true'
Expand All @@ -390,6 +400,7 @@ fields:
visibility: visible
replicator_preview: true
hide_display: false
localizable: true
if:
tracker_type: 'equals gtm'
use_consent_banner: 'equals true'
Expand All @@ -404,6 +415,7 @@ fields:
visibility: visible
replicator_preview: true
hide_display: false
localizable: true
if:
tracker_type: 'equals gtm'
use_consent_banner: 'equals true'
Expand All @@ -418,6 +430,7 @@ fields:
visibility: visible
replicator_preview: true
hide_display: false
localizable: true
if:
tracker_type: 'equals gtm'
use_consent_banner: 'equals true'
Expand All @@ -432,6 +445,7 @@ fields:
visibility: visible
replicator_preview: true
hide_display: false
localizable: true
if:
tracker_type: 'equals gtm'
use_consent_banner: 'equals true'
3 changes: 3 additions & 0 deletions resources/fieldsets/globals_seo_trackers_environments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ fields:
listable: false
display: Local
width: 33
localizable: true
-
handle: trackers_staging
field:
type: toggle
listable: false
display: Staging
width: 33
localizable: true
-
handle: trackers_production
field:
type: toggle
listable: false
display: Production
width: 33
localizable: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fields:
instructions: 'Add a google-site-verification meta tag to your head.'
listable: false
display: 'Google site verification'
localizable: true
-
handle: google_site_verification
field:
Expand All @@ -15,6 +16,7 @@ fields:
listable: hidden
width: 66
display: 'Verification key'
localizable: true
validate:
- 'required_if:use_google_site_verification,true'
if:
Expand Down
4 changes: 4 additions & 0 deletions resources/fieldsets/seo_advanced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fields:
listable: hidden
width: 50
display: No-index
localizable: true
-
handle: seo_nofollow
field:
Expand All @@ -18,6 +19,7 @@ fields:
listable: hidden
width: 50
display: No-follow
localizable: true
-
handle: seo_canonical_type
field:
Expand All @@ -31,6 +33,7 @@ fields:
icon: button_group
instructions: 'Where should the canonical URL for this entry point to.'
listable: hidden
localizable: true
-
handle: seo_canonical_current
field: common.entry
Expand All @@ -52,6 +55,7 @@ fields:
type: text
icon: text
listable: hidden
localizable: true
validate:
- 'required_if:seo_canonical_type,external'
if:
Expand Down
1 change: 1 addition & 0 deletions resources/fieldsets/seo_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ fields:
display: 'Meta description'
character_limit: '160'
instructions: "This entry's meta description. Max 160 characters."
localizable: true
1 change: 1 addition & 0 deletions resources/fieldsets/seo_jsonld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ fields:
display: 'JSON-ld schema'
instructions: 'Custom JSON-ld objects. Will be wrapped in the appropriate script tag.'
width: 100
localizable: true
2 changes: 2 additions & 0 deletions resources/fieldsets/seo_open_graph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fields:
display: 'Social description'
instructions: "This entry's OG description, defaults to meta description."
width: 100
localizable: true
-
handle: og_image
field: common.image
Expand All @@ -28,3 +29,4 @@ fields:
instructions: "This entry's OG image. Defaults to global site OG image. The recommended size is 1200px x 630px. The image will be focal cropped to this dimension."
instructions_position: below
width: 50
localizable: true
2 changes: 2 additions & 0 deletions resources/fieldsets/seo_sitemap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fields:
default: weekly
listable: hidden
display: 'Change frequency'
localizable: true
-
handle: sitemap_priority
field:
Expand All @@ -34,3 +35,4 @@ fields:
instructions_position: below
width: 50
listable: hidden
localizable: true

0 comments on commit 3ab0bb6

Please sign in to comment.