Skip to content

Commit

Permalink
rename cookies translation file
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Aug 24, 2024
1 parent 6073e14 commit 1f66c64
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ class RegisterCookiesConsent
// Register cookies related to the Facebook pixel
CookiesConsent::register(new CookieGroupDefinition(
key: 'marketing',
name: __('cookies-consent::translations.marketing.name'),
description: __('cookies-consent::translations.marketing.description'),
name: __('cookies-consent::cookies.marketing.name'),
description: __('cookies-consent::cookies.marketing.description'),
items: [
new CookieDefinition(
name: '_fbc',
lifetime: CarbonInterval::years(2),
description: __('cookies-consent::translations._fbc.description')
description: __('cookies-consent::cookies._fbc.description')
),
new CookieDefinition(
name: '_fbp',
lifetime: CarbonInterval::years(3),
description: __('cookies-consent::translations._fbp.description')
description: __('cookies-consent::cookies._fbp.description')
),
],
onAccepted: function () {
Expand Down Expand Up @@ -321,18 +321,18 @@ use Carbon\CarbonInterval;

CookiesConsent::register(new CookieGroupDefinition(
key: 'marketing', // customize this value if you want
name: __('cookies-consent::translations.marketing.name'), // customize this value if you want
description: __('cookies-consent::translations.marketing.description'), // customize this value if you want
name: __('cookies-consent::cookies.marketing.name'), // customize this value if you want
description: __('cookies-consent::cookies.marketing.description'), // customize this value if you want
items: [
new CookieDefinition(
name: '_fbc',
lifetime: CarbonInterval::years(2),
description: __('cookies-consent::translations._fbc.description')
description: __('cookies-consent::cookies._fbc.description')
),
new CookieDefinition(
name: '_fbp',
lifetime: CarbonInterval::years(3),
description: __('cookies-consent::translations._fbp.description')
description: __('cookies-consent::cookies._fbp.description')
),
],
onAccepted: function () {
Expand Down
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions resources/views/components/banner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,30 @@
<div class="min-h-0 overflow-auto rounded-md bg-white shadow-md">
<div class="p-4">
<h2 class="mb-1 text-lg font-bold">
{{ __('cookies-consent::translations.title') }}
{{ __('cookies-consent::cookies.title') }}
</h2>
<p class="mb-3 text-sm">
{{ __('cookies-consent::translations.intro') }} <br>
{!! __('cookies-consent::translations.link', ['url' => route('privacy', ['locale' => 'fr'])]) !!}
{{ __('cookies-consent::cookies.intro') }} <br>
{!! __('cookies-consent::cookies.link', ['url' => route('privacy', ['locale' => 'fr'])]) !!}
</p>
<div class="grid grid-cols-2 gap-1">
<x-cookies-consent::button class="justify-center rounded-md font-semibold" x-on:click="acceptEssentials">
{{ __('cookies-consent::translations.accept_required') }}
{{ __('cookies-consent::cookies.accept_required') }}
</x-cookies-consent::button>

<x-cookies-consent::button color="black" class="justify-center rounded-md font-semibold"
x-on:click="acceptAll">
{{ __('cookies-consent::translations.accept_all') }}
{{ __('cookies-consent::cookies.accept_all') }}
</x-cookies-consent::button>

<x-cookies-consent::button x-show="!expanded" class="col-span-2 justify-center rounded-md font-semibold"
x-on:click="expanded = !expanded">
{{ __('cookies-consent::translations.customize') }}
{{ __('cookies-consent::cookies.customize') }}
</x-cookies-consent::button>

<x-cookies-consent::button color="black" x-show="expanded" x-cloak
class="col-span-2 justify-center rounded-md font-semibold" x-on:click="save">
{{ __('cookies-consent::translations.save') }}
{{ __('cookies-consent::cookies.save') }}
</x-cookies-consent::button>
</div>
</div>
Expand All @@ -157,10 +157,10 @@ class="col-span-2 justify-center rounded-md font-semibold" x-on:click="save">

<button type="button" x-on:click="expanded = !expanded">
<span x-show="!expanded">
{{ __('cookies-consent::translations.details.more') }}
{{ __('cookies-consent::cookies.details.more') }}
</span>
<span x-show="expanded" x-cloak>
{{ __('cookies-consent::translations.details.less') }}
{{ __('cookies-consent::cookies.details.less') }}
</span>
</button>

Expand All @@ -182,7 +182,7 @@ class="col-span-2 justify-center rounded-md font-semibold" x-on:click="save">
<div class="border-t p-4">
<x-cookies-consent::button color="black" class="w-full justify-center rounded-md font-semibold"
x-on:click="save">
{{ __('cookies-consent::translations.save') }}
{{ __('cookies-consent::cookies.save') }}
</x-cookies-consent::button>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/CookiesConsent.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public function registerEssentials(): static
return $this->register(
new CookieGroupDefinition(
key: 'essentials',
name: __('cookies-consent::translations.essentials.name'),
description: __('cookies-consent::translations.essentials.description'),
name: __('cookies-consent::cookies.essentials.name'),
description: __('cookies-consent::cookies.essentials.description'),
required: true,
items: [
new CookieDefinition(
Expand Down

0 comments on commit 1f66c64

Please sign in to comment.