Skip to content

Commit d0f505e

Browse files
Merge pull request #5980 from getkirby/release/4.0.0-rc.2
4.0.0-rc.2
2 parents da7346e + 8c35abd commit d0f505e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1974
-617
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "The Kirby core",
44
"license": "proprietary",
55
"type": "kirby-cms",
6-
"version": "4.0.0-rc.1",
6+
"version": "4.0.0-rc.2",
77
"keywords": [
88
"kirby",
99
"cms",
@@ -46,7 +46,7 @@
4646
"phpmailer/phpmailer": "6.8.1",
4747
"symfony/polyfill-intl-idn": "1.28.0",
4848
"symfony/polyfill-mbstring": "1.28.0",
49-
"symfony/yaml": "6.3.7"
49+
"symfony/yaml": "6.3.8"
5050
},
5151
"replace": {
5252
"symfony/polyfill-php72": "*"

composer.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/methods.php

+39
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
use Kirby\Exception\InvalidArgumentException;
2020
use Kirby\Exception\NotFoundException;
2121
use Kirby\Image\QrCode;
22+
use Kirby\Toolkit\A;
23+
use Kirby\Toolkit\Dom;
2224
use Kirby\Toolkit\Str;
2325
use Kirby\Toolkit\V;
2426
use Kirby\Toolkit\Xml;
27+
use Kirby\Uuid\Uuid;
2528

2629
/**
2730
* Field method setup
@@ -461,6 +464,42 @@
461464
return $field;
462465
},
463466

467+
/**
468+
* Parses the field value as DOM and replaces
469+
* any permalinks in href/src attributes with
470+
* the regular url
471+
*
472+
* This method is still experimental! You can use
473+
* it to solve potential problems with permalinks
474+
* already, but it might change in the future.
475+
*/
476+
'permalinksToUrls' => function (Field $field): Field {
477+
if ($field->isNotEmpty() === true) {
478+
$dom = new Dom($field->value);
479+
$attributes = ['href', 'src'];
480+
$elements = $dom->query('//*[' . implode(' | ', A::map($attributes, fn ($attribute) => '@' . $attribute)) . ']');
481+
482+
foreach ($elements as $element) {
483+
foreach ($attributes as $attribute) {
484+
if ($element->hasAttribute($attribute) && $url = $element->getAttribute($attribute)) {
485+
try {
486+
if ($uuid = Uuid::for($url)) {
487+
$url = $uuid->model()?->url();
488+
$element->setAttribute($attribute, $url);
489+
}
490+
} catch (InvalidArgumentException) {
491+
// ignore anything else than permalinks
492+
}
493+
}
494+
}
495+
}
496+
497+
$field->value = $dom->toString();
498+
}
499+
500+
return $field;
501+
},
502+
464503
/**
465504
* Uses the field value as Kirby query
466505
*/

i18n/translations/bg.json

+24-4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
"drawer.fields.empty": "This drawer has no fields",
5656

57+
"domain": "Domain",
5758
"download": "Download",
5859
"duplicate": "Duplicate",
5960

@@ -132,8 +133,9 @@
132133
"error.layout.validation.block": "There's an error on the \"{field}\" field in block {blockIndex} using the \"{fieldset}\" block type in layout {layoutIndex}",
133134
"error.layout.validation.settings": "There's an error in layout {index} settings",
134135

135-
"error.license.format": "Please enter a valid license key",
136+
"error.license.domain": "The domain for the license is missing",
136137
"error.license.email": "Моля въведете валиден email адрес",
138+
"error.license.format": "Please enter a valid license key",
137139
"error.license.verification": "The license could not be verified",
138140

139141
"error.login.totp.confirm.invalid": "Invalid code",
@@ -416,13 +418,26 @@
416418
"license.activate.label": "Please activate your license",
417419
"license.activate.domain": "Your license will be activated for <strong>{host}</strong>.",
418420
"license.activate.local": "You are about to activate your Kirby license for your local domain <strong>{host}</strong>. If this site will be deployed to a public domain, please activate it there instead. If {host} is the domain you want to use your license for, please continue.",
421+
"license.activated": "Activated",
419422
"license.buy": "Купи лиценз",
423+
"license.code": "Код",
420424
"license.code.help": "You received your license code after the purchase via email. Please copy and paste it here.",
421425
"license.code.label": "Please enter your license code",
426+
"license.status.active.info": "Includes new major versions until {date}",
427+
"license.status.active.label": "Valid license",
428+
"license.status.inactive.info": "Renew license to update to new major versions",
429+
"license.status.inactive.label": "No new major versions",
430+
"license.status.legacy.bubble": "Ready to renew your license?",
431+
"license.status.legacy.info": "Your license does not cover this version",
432+
"license.status.legacy.label": "Please renew your license",
433+
"license.status.missing.bubble": "Ready to launch your site?",
434+
"license.status.missing.info": "No valid license",
435+
"license.status.missing.label": "Please activate your license",
422436
"license.manage": "Manage your licenses",
423-
"license.ready": "Ready to launch your site?",
437+
"license.purchased": "Purchased",
424438
"license.success": "Thank you for supporting Kirby",
425439
"license.unregistered.label": "Unregistered",
440+
"license.updates": "Includes free updates until",
426441

427442
"link": "\u0412\u0440\u044a\u0437\u043a\u0430",
428443
"link.text": "Текстова връзка",
@@ -461,12 +476,12 @@
461476
"login.totp.enable.confirm.text": "Your app generates a new one‑time code every 30 seconds. Enter the current code to complete the setup:",
462477
"login.totp.enable.confirm.label": "Current code",
463478
"login.totp.enable.confirm.help": "After this setup, we will ask you for a one‑time code every time you log in.",
464-
"login.totp.enable.success": "Activated one‑time codes",
479+
"login.totp.enable.success": "One‑time codes enabled",
465480
"login.totp.disable.option": "Disable one‑time codes",
466481
"login.totp.disable.label": "Enter your password to disable one‑time codes",
467482
"login.totp.disable.help": "In the future, a different second factor like a login code sent via email will be requested when you log in. You can always set up one‑time codes again later.",
468483
"login.totp.disable.admin": "<p>This will disable one‑time codes for <strong>{user}</strong>.</p><p>In the future, a different second factor like a login code sent via email will be requested when they log in. {user} can set up one‑time codes again after their next login.</p>",
469-
"login.totp.disable.success": "Disabled one‑time codes",
484+
"login.totp.disable.success": "One‑time codes disabled",
470485

471486
"logout": "Изход",
472487

@@ -555,6 +570,7 @@
555570
"preview": "Preview",
556571
"remove": "Премахни",
557572
"rename": "Преименувай",
573+
"renew": "Renew",
558574
"replace": "\u0417\u0430\u043c\u0435\u0441\u0442\u0438",
559575
"replace.with": "Replace with",
560576
"retry": "\u041e\u043f\u0438\u0442\u0430\u0439 \u043f\u0430\u043a",
@@ -592,6 +608,8 @@
592608
"split": "Split",
593609

594610
"stats.empty": "No reports",
611+
"status": "Status",
612+
595613
"system.issues.content": "The content folder seems to be exposed",
596614
"system.issues.eol.kirby": "Your installed Kirby version has reached end-of-life and will not receive further security updates",
597615
"system.issues.eol.plugin": "Your installed version of the { plugin } plugin is has reached end-of-life and will not receive further security updates",
@@ -648,6 +666,8 @@
648666
"translation.name": "Български",
649667
"translation.locale": "bg_BG",
650668

669+
"type": "Type",
670+
651671
"upload": "Прикачи",
652672
"upload.error.cantMove": "The uploaded file could not be moved",
653673
"upload.error.cantWrite": "Failed to write file to disk",

i18n/translations/ca.json

+24-4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
"drawer.fields.empty": "This drawer has no fields",
5656

57+
"domain": "Domain",
5758
"download": "Descarregar",
5859
"duplicate": "Duplicar",
5960

@@ -132,8 +133,9 @@
132133
"error.layout.validation.block": "There's an error on the \"{field}\" field in block {blockIndex} using the \"{fieldset}\" block type in layout {layoutIndex}",
133134
"error.layout.validation.settings": "There's an error in layout {index} settings",
134135

135-
"error.license.format": "Introduïu una clau de llicència vàlida",
136+
"error.license.domain": "The domain for the license is missing",
136137
"error.license.email": "Si us plau, introdueix una adreça de correu electrònic vàlida",
138+
"error.license.format": "Introduïu una clau de llicència vàlida",
137139
"error.license.verification": "No s’ha pogut verificar la llicència",
138140

139141
"error.login.totp.confirm.invalid": "Codi invàlid",
@@ -416,13 +418,26 @@
416418
"license.activate.label": "Please activate your license",
417419
"license.activate.domain": "Your license will be activated for <strong>{host}</strong>.",
418420
"license.activate.local": "You are about to activate your Kirby license for your local domain <strong>{host}</strong>. If this site will be deployed to a public domain, please activate it there instead. If {host} is the domain you want to use your license for, please continue.",
421+
"license.activated": "Activated",
419422
"license.buy": "Comprar una llicència",
423+
"license.code": "Codi",
420424
"license.code.help": "You received your license code after the purchase via email. Please copy and paste it here.",
421425
"license.code.label": "Si us plau, introdueixi el seu codi de llicència",
426+
"license.status.active.info": "Includes new major versions until {date}",
427+
"license.status.active.label": "Valid license",
428+
"license.status.inactive.info": "Renew license to update to new major versions",
429+
"license.status.inactive.label": "No new major versions",
430+
"license.status.legacy.bubble": "Ready to renew your license?",
431+
"license.status.legacy.info": "Your license does not cover this version",
432+
"license.status.legacy.label": "Please renew your license",
433+
"license.status.missing.bubble": "Ready to launch your site?",
434+
"license.status.missing.info": "No valid license",
435+
"license.status.missing.label": "Please activate your license",
422436
"license.manage": "Manage your licenses",
423-
"license.ready": "Ready to launch your site?",
437+
"license.purchased": "Purchased",
424438
"license.success": "Gràcies per donar suport a Kirby",
425439
"license.unregistered.label": "Unregistered",
440+
"license.updates": "Includes free updates until",
426441

427442
"link": "Enlla\u00e7",
428443
"link.text": "Enllaç de text",
@@ -461,12 +476,12 @@
461476
"login.totp.enable.confirm.text": "Your app generates a new one‑time code every 30 seconds. Enter the current code to complete the setup:",
462477
"login.totp.enable.confirm.label": "Current code",
463478
"login.totp.enable.confirm.help": "After this setup, we will ask you for a one‑time code every time you log in.",
464-
"login.totp.enable.success": "Activated one‑time codes",
479+
"login.totp.enable.success": "One‑time codes enabled",
465480
"login.totp.disable.option": "Disable one‑time codes",
466481
"login.totp.disable.label": "Enter your password to disable one‑time codes",
467482
"login.totp.disable.help": "In the future, a different second factor like a login code sent via email will be requested when you log in. You can always set up one‑time codes again later.",
468483
"login.totp.disable.admin": "<p>This will disable one‑time codes for <strong>{user}</strong>.</p><p>In the future, a different second factor like a login code sent via email will be requested when they log in. {user} can set up one‑time codes again after their next login.</p>",
469-
"login.totp.disable.success": "Disabled one‑time codes",
484+
"login.totp.disable.success": "One‑time codes disabled",
470485

471486
"logout": "Tancar sessió",
472487

@@ -555,6 +570,7 @@
555570
"preview": "Preview",
556571
"remove": "Eliminar",
557572
"rename": "Canviar el nom",
573+
"renew": "Renew",
558574
"replace": "Reempla\u00e7ar",
559575
"replace.with": "Replace with",
560576
"retry": "Reintentar",
@@ -592,6 +608,8 @@
592608
"split": "Split",
593609

594610
"stats.empty": "No reports",
611+
"status": "Estat",
612+
595613
"system.issues.content": "The content folder seems to be exposed",
596614
"system.issues.eol.kirby": "Your installed Kirby version has reached end-of-life and will not receive further security updates",
597615
"system.issues.eol.plugin": "Your installed version of the { plugin } plugin is has reached end-of-life and will not receive further security updates",
@@ -648,6 +666,8 @@
648666
"translation.name": "Catalan",
649667
"translation.locale": "ca_ES",
650668

669+
"type": "Type",
670+
651671
"upload": "Carregar",
652672
"upload.error.cantMove": "El fitxer carregat no s'ha pogut moure",
653673
"upload.error.cantWrite": "No s'ha pogut escriure el fitxer al disc",

0 commit comments

Comments
 (0)