Upgrade to 3.6.2

This commit is contained in:
Bastian Allgeier
2022-02-01 11:42:39 +01:00
parent f62d1a39ca
commit 848ea36dcf
108 changed files with 2887 additions and 2622 deletions

View File

@@ -1,15 +1,14 @@
{
"name": "getkirby/cms",
"type": "kirby-cms",
"description": "The Kirby 3 core",
"license": "proprietary",
"type": "kirby-cms",
"version": "3.6.2",
"keywords": [
"kirby",
"cms",
"core"
],
"homepage": "https://getkirby.com",
"version": "3.6.1.1",
"license": "proprietary",
"authors": [
{
"name": "Kirby Team",
@@ -17,33 +16,31 @@
"homepage": "https://getkirby.com"
}
],
"homepage": "https://getkirby.com",
"support": {
"email": "support@getkirby.com",
"issues": "https://github.com/getkirby/kirby/issues",
"forum": "https://forum.getkirby.com",
"source": "https://github.com/getkirby/kirby"
},
"_comment": "TODO: psr/log is not used by Kirby; drop pinned version when Kirby no longer supports PHP 7",
"require": {
"php": ">=7.4.0 <8.2.0",
"ext-ctype": "*",
"ext-mbstring": "*",
"claviska/simpleimage": "3.6.5",
"filp/whoops": "2.14.4",
"filp/whoops": "2.14.5",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.9.0",
"michelf/php-smartypants": "1.8.1",
"mustangostang/spyc": "0.6.3",
"phpmailer/phpmailer": "6.5.3",
"psr/log": "1.1.4",
"symfony/polyfill-intl-idn": "1.23.0",
"symfony/polyfill-mbstring": "1.23.1"
"symfony/polyfill-intl-idn": "1.24.0",
"symfony/polyfill-mbstring": "1.24.0"
},
"replace": {
"symfony/polyfill-php72": "*"
},
"config": {
"optimize-autoloader": true,
"platform-check": false
},
"extra": {
"unused": [
"symfony/polyfill-intl-idn"
]
},
"autoload": {
"psr-4": {
"Kirby\\": "src/"
@@ -56,6 +53,18 @@
"config/helpers.php"
]
},
"config": {
"allow-plugins": {
"getkirby/composer-installer": true
},
"optimize-autoloader": true,
"platform-check": false
},
"extra": {
"unused": [
"symfony/polyfill-intl-idn"
]
},
"scripts": {
"post-update-cmd": "curl -o cacert.pem https://curl.se/ca/cacert.pem",
"analyze": [
@@ -77,12 +86,5 @@
"fix": "php-cs-fixer fix",
"test": "phpunit --stderr --coverage-html=tests/coverage",
"zip": "composer archive --format=zip --file=dist"
},
"support": {
"email": "support@getkirby.com",
"issues": "https://github.com/getkirby/kirby/issues",
"forum": "https://forum.getkirby.com",
"source": "https://github.com/getkirby/kirby"
},
"_comment": "TODO: psr/log is not used by Kirby; drop pinned version when Kirby no longer supports PHP 7"
}
}

95
kirby/composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "91690f81e4bb00d2c845dbb43ef3d04d",
"content-hash": "14602437d78db71d4bba50467b607075",
"packages": [
{
"name": "claviska/simpleimage",
@@ -57,16 +57,16 @@
},
{
"name": "filp/whoops",
"version": "2.14.4",
"version": "2.14.5",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "f056f1fe935d9ed86e698905a957334029899895"
"reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895",
"reference": "f056f1fe935d9ed86e698905a957334029899895",
"url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc",
"reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc",
"shasum": ""
},
"require": {
@@ -116,7 +116,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.14.4"
"source": "https://github.com/filp/whoops/tree/2.14.5"
},
"funding": [
{
@@ -124,7 +124,7 @@
"type": "github"
}
],
"time": "2021-10-03T12:00:00+00:00"
"time": "2022-01-07T12:00:00+00:00"
},
{
"name": "getkirby/composer-installer",
@@ -347,56 +347,6 @@
},
"time": "2016-12-13T01:01:17+00:00"
},
{
"name": "mustangostang/spyc",
"version": "0.6.3",
"source": {
"type": "git",
"url": "git@github.com:mustangostang/spyc.git",
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0",
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0",
"shasum": ""
},
"require": {
"php": ">=5.3.1"
},
"require-dev": {
"phpunit/phpunit": "4.3.*@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.5.x-dev"
}
},
"autoload": {
"files": [
"Spyc.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "mustangostang",
"email": "vlad.andersen@gmail.com"
}
],
"description": "A simple YAML loader/dumper class for PHP",
"homepage": "https://github.com/mustangostang/spyc/",
"keywords": [
"spyc",
"yaml",
"yml"
],
"time": "2019-09-10T13:16:29+00:00"
},
{
"name": "phpmailer/phpmailer",
"version": "v6.5.3",
@@ -527,16 +477,16 @@
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.23.0",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
"reference": "749045c69efb97c70d25d7463abba812e91f3a44"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44",
"reference": "749045c69efb97c70d25d7463abba812e91f3a44",
"shasum": ""
},
"require": {
@@ -594,7 +544,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
},
"funding": [
{
@@ -610,11 +560,11 @@
"type": "tidelift"
}
],
"time": "2021-05-27T09:27:20+00:00"
"time": "2021-09-14T14:02:44+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.23.0",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@@ -678,7 +628,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0"
},
"funding": [
{
@@ -698,21 +648,24 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.23.1",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
@@ -758,7 +711,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
},
"funding": [
{
@@ -774,7 +727,7 @@
"type": "tidelift"
}
],
"time": "2021-05-27T12:26:48+00:00"
"time": "2021-11-30T18:21:41+00:00"
}
],
"packages-dev": [],

View File

@@ -61,9 +61,7 @@ return [
* Users
*/
'users' => [
'default' => function () {
return $this->users();
},
'default' => fn () => $this->users(),
'model' => 'user',
'type' => 'Kirby\Cms\Users',
'view' => 'compact'

View File

@@ -8,57 +8,27 @@ use Kirby\Form\Form;
*/
return [
'fields' => [
'blueprint' => function (File $file) {
return $file->blueprint();
},
'content' => function (File $file) {
return Form::for($file)->values();
},
'dimensions' => function (File $file) {
return $file->dimensions()->toArray();
},
'dragText' => function (File $file) {
return $file->panel()->dragText();
},
'exists' => function (File $file) {
return $file->exists();
},
'extension' => function (File $file) {
return $file->extension();
},
'filename' => function (File $file) {
return $file->filename();
},
'id' => function (File $file) {
return $file->id();
},
'link' => function (File $file) {
return $file->panel()->url(true);
},
'mime' => function (File $file) {
return $file->mime();
},
'modified' => function (File $file) {
return $file->modified('c');
},
'name' => function (File $file) {
return $file->name();
},
'next' => function (File $file) {
return $file->next();
},
'blueprint' => fn (File $file) => $file->blueprint(),
'content' => fn (File $file) => Form::for($file)->values(),
'dimensions' => fn (File $file) => $file->dimensions()->toArray(),
'dragText' => fn (File $file) => $file->panel()->dragText(),
'exists' => fn (File $file) => $file->exists(),
'extension' => fn (File $file) => $file->extension(),
'filename' => fn (File $file) => $file->filename(),
'id' => fn (File $file) => $file->id(),
'link' => fn (File $file) => $file->panel()->url(true),
'mime' => fn (File $file) => $file->mime(),
'modified' => fn (File $file) => $file->modified('c'),
'name' => fn (File $file) => $file->name(),
'next' => fn (File $file) => $file->next(),
'nextWithTemplate' => function (File $file) {
$files = $file->templateSiblings()->sorted();
$index = $files->indexOf($file);
return $files->nth($index + 1);
},
'niceSize' => function (File $file) {
return $file->niceSize();
},
'options' => function (File $file) {
return $file->panel()->options();
},
'niceSize' => fn (File $file) => $file->niceSize(),
'options' => fn (File $file) => $file->panel()->options(),
'panelIcon' => function (File $file) {
// TODO: remove in 3.7.0
// @codeCoverageIgnoreStart
@@ -66,33 +36,19 @@ return [
return $file->panel()->image();
// @codeCoverageIgnoreEnd
},
'panelImage' => function (File $file) {
return $file->panel()->image();
},
'panelUrl' => function (File $file) {
return $file->panel()->url(true);
},
'prev' => function (File $file) {
return $file->prev();
},
'panelImage' => fn (File $file) => $file->panel()->image(),
'panelUrl' => fn (File $file) => $file->panel()->url(true),
'prev' => fn (File $file) => $file->prev(),
'prevWithTemplate' => function (File $file) {
$files = $file->templateSiblings()->sorted();
$index = $files->indexOf($file);
return $files->nth($index - 1);
},
'parent' => function (File $file) {
return $file->parent();
},
'parents' => function (File $file) {
return $file->parents()->flip();
},
'size' => function (File $file) {
return $file->size();
},
'template' => function (File $file) {
return $file->template();
},
'parent' => fn (File $file) => $file->parent(),
'parents' => fn (File $file) => $file->parents()->flip(),
'size' => fn (File $file) => $file->size(),
'template' => fn (File $file) => $file->template(),
'thumbs' => function ($file) {
if ($file->isResizable() === false) {
return null;
@@ -106,12 +62,8 @@ return [
'huge' => $file->resize(1024)->url(),
];
},
'type' => function (File $file) {
return $file->type();
},
'url' => function (File $file) {
return $file->url();
},
'type' => fn (File $file) => $file->type(),
'url' => fn (File $file) => $file->url(),
],
'type' => 'Kirby\Cms\File',
'views' => [

View File

@@ -7,18 +7,10 @@ use Kirby\Cms\FileBlueprint;
*/
return [
'fields' => [
'name' => function (FileBlueprint $blueprint) {
return $blueprint->name();
},
'options' => function (FileBlueprint $blueprint) {
return $blueprint->options();
},
'tabs' => function (FileBlueprint $blueprint) {
return $blueprint->tabs();
},
'title' => function (FileBlueprint $blueprint) {
return $blueprint->title();
},
'name' => fn (FileBlueprint $blueprint) => $blueprint->name(),
'options' => fn (FileBlueprint $blueprint) => $blueprint->options(),
'tabs' => fn (FileBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (FileBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\FileBlueprint',
'views' => [

View File

@@ -7,42 +7,18 @@ use Kirby\Cms\FileVersion;
*/
return [
'fields' => [
'dimensions' => function (FileVersion $file) {
return $file->dimensions()->toArray();
},
'exists' => function (FileVersion $file) {
return $file->exists();
},
'extension' => function (FileVersion $file) {
return $file->extension();
},
'filename' => function (FileVersion $file) {
return $file->filename();
},
'id' => function (FileVersion $file) {
return $file->id();
},
'mime' => function (FileVersion $file) {
return $file->mime();
},
'modified' => function (FileVersion $file) {
return $file->modified('c');
},
'name' => function (FileVersion $file) {
return $file->name();
},
'niceSize' => function (FileVersion $file) {
return $file->niceSize();
},
'size' => function (FileVersion $file) {
return $file->size();
},
'type' => function (FileVersion $file) {
return $file->type();
},
'url' => function (FileVersion $file) {
return $file->url();
},
'dimensions' => fn (FileVersion $file) => $file->dimensions()->toArray(),
'exists' => fn (FileVersion $file) => $file->exists(),
'extension' => fn (FileVersion $file) => $file->extension(),
'filename' => fn (FileVersion $file) => $file->filename(),
'id' => fn (FileVersion $file) => $file->id(),
'mime' => fn (FileVersion $file) => $file->mime(),
'modified' => fn (FileVersion $file) => $file->modified('c'),
'name' => fn (FileVersion $file) => $file->name(),
'niceSize' => fn (FileVersion $file) => $file->niceSize(),
'size' => fn (FileVersion $file) => $file->size(),
'type' => fn (FileVersion $file) => $file->type(),
'url' => fn (FileVersion $file) => $file->url(),
],
'type' => 'Kirby\Cms\FileVersion',
'views' => [

View File

@@ -7,27 +7,13 @@ use Kirby\Cms\Language;
*/
return [
'fields' => [
'code' => function (Language $language) {
return $language->code();
},
'default' => function (Language $language) {
return $language->isDefault();
},
'direction' => function (Language $language) {
return $language->direction();
},
'locale' => function (Language $language) {
return $language->locale();
},
'name' => function (Language $language) {
return $language->name();
},
'rules' => function (Language $language) {
return $language->rules();
},
'url' => function (Language $language) {
return $language->url();
},
'code' => fn (Language $language) => $language->code(),
'default' => fn (Language $language) => $language->isDefault(),
'direction' => fn (Language $language) => $language->direction(),
'locale' => fn (Language $language) => $language->locale(),
'name' => fn (Language $language) => $language->name(),
'rules' => fn (Language $language) => $language->rules(),
'url' => fn (Language $language) => $language->url(),
],
'type' => 'Kirby\Cms\Language',
'views' => [

View File

@@ -8,42 +8,18 @@ use Kirby\Form\Form;
*/
return [
'fields' => [
'blueprint' => function (Page $page) {
return $page->blueprint();
},
'blueprints' => function (Page $page) {
return $page->blueprints();
},
'children' => function (Page $page) {
return $page->children();
},
'content' => function (Page $page) {
return Form::for($page)->values();
},
'drafts' => function (Page $page) {
return $page->drafts();
},
'errors' => function (Page $page) {
return $page->errors();
},
'files' => function (Page $page) {
return $page->files()->sorted();
},
'hasChildren' => function (Page $page) {
return $page->hasChildren();
},
'hasDrafts' => function (Page $page) {
return $page->hasDrafts();
},
'hasFiles' => function (Page $page) {
return $page->hasFiles();
},
'id' => function (Page $page) {
return $page->id();
},
'isSortable' => function (Page $page) {
return $page->isSortable();
},
'blueprint' => fn (Page $page) => $page->blueprint(),
'blueprints' => fn (Page $page) => $page->blueprints(),
'children' => fn (Page $page) => $page->children(),
'content' => fn (Page $page) => Form::for($page)->values(),
'drafts' => fn (Page $page) => $page->drafts(),
'errors' => fn (Page $page) => $page->errors(),
'files' => fn (Page $page) => $page->files()->sorted(),
'hasChildren' => fn (Page $page) => $page->hasChildren(),
'hasDrafts' => fn (Page $page) => $page->hasDrafts(),
'hasFiles' => fn (Page $page) => $page->hasFiles(),
'id' => fn (Page $page) => $page->id(),
'isSortable' => fn (Page $page) => $page->isSortable(),
/**
* @deprecated 3.6.0
* @todo Throw deprecated warning in 3.7.0
@@ -58,12 +34,8 @@ return [
->filter('isReadable', true)
->first();
},
'num' => function (Page $page) {
return $page->num();
},
'options' => function (Page $page) {
return $page->panel()->options(['preview']);
},
'num' => fn (Page $page) => $page->num(),
'options' => fn (Page $page) => $page->panel()->options(['preview']),
/**
* @todo Remove in 3.7.0
* @codeCoverageIgnore
@@ -72,15 +44,9 @@ return [
deprecated('The API field page.panelIcon has been deprecated and will be removed in 3.7.0. Use page.panelImage instead');
return $page->panel()->image();
},
'panelImage' => function (Page $page) {
return $page->panel()->image();
},
'parent' => function (Page $page) {
return $page->parent();
},
'parents' => function (Page $page) {
return $page->parents()->flip();
},
'panelImage' => fn (Page $page) => $page->panel()->image(),
'parent' => fn (Page $page) => $page->parent(),
'parents' => fn (Page $page) => $page->parents()->flip(),
/**
* @deprecated 3.6.0
* @todo Throw deprecated warning in 3.7.0
@@ -95,9 +61,7 @@ return [
->filter('isReadable', true)
->last();
},
'previewUrl' => function (Page $page) {
return $page->previewUrl();
},
'previewUrl' => fn (Page $page) => $page->previewUrl(),
'siblings' => function (Page $page) {
if ($page->isDraft() === true) {
return $page->parentModel()->children()->not($page);
@@ -105,21 +69,11 @@ return [
return $page->siblings();
}
},
'slug' => function (Page $page) {
return $page->slug();
},
'status' => function (Page $page) {
return $page->status();
},
'template' => function (Page $page) {
return $page->intendedTemplate()->name();
},
'title' => function (Page $page) {
return $page->title()->value();
},
'url' => function (Page $page) {
return $page->url();
},
'slug' => fn (Page $page) => $page->slug(),
'status' => fn (Page $page) => $page->status(),
'template' => fn (Page $page) => $page->intendedTemplate()->name(),
'title' => fn (Page $page) => $page->title()->value(),
'url' => fn (Page $page) => $page->url(),
],
'type' => 'Kirby\Cms\Page',
'views' => [

View File

@@ -7,27 +7,13 @@ use Kirby\Cms\PageBlueprint;
*/
return [
'fields' => [
'name' => function (PageBlueprint $blueprint) {
return $blueprint->name();
},
'num' => function (PageBlueprint $blueprint) {
return $blueprint->num();
},
'options' => function (PageBlueprint $blueprint) {
return $blueprint->options();
},
'preview' => function (PageBlueprint $blueprint) {
return $blueprint->preview();
},
'status' => function (PageBlueprint $blueprint) {
return $blueprint->status();
},
'tabs' => function (PageBlueprint $blueprint) {
return $blueprint->tabs();
},
'title' => function (PageBlueprint $blueprint) {
return $blueprint->title();
},
'name' => fn (PageBlueprint $blueprint) => $blueprint->name(),
'num' => fn (PageBlueprint $blueprint) => $blueprint->num(),
'options' => fn (PageBlueprint $blueprint) => $blueprint->options(),
'preview' => fn (PageBlueprint $blueprint) => $blueprint->preview(),
'status' => fn (PageBlueprint $blueprint) => $blueprint->status(),
'tabs' => fn (PageBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (PageBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\PageBlueprint',
'views' => [

View File

@@ -7,18 +7,10 @@ use Kirby\Cms\Role;
*/
return [
'fields' => [
'description' => function (Role $role) {
return $role->description();
},
'name' => function (Role $role) {
return $role->name();
},
'permissions' => function (Role $role) {
return $role->permissions()->toArray();
},
'title' => function (Role $role) {
return $role->title();
},
'description' => fn (Role $role) => $role->description(),
'name' => fn (Role $role) => $role->name(),
'permissions' => fn (Role $role) => $role->permissions()->toArray(),
'title' => fn (Role $role) => $role->title(),
],
'type' => 'Kirby\Cms\Role',
'views' => [

View File

@@ -7,37 +7,17 @@ use Kirby\Form\Form;
* Site
*/
return [
'default' => function () {
return $this->site();
},
'default' => fn () => $this->site(),
'fields' => [
'blueprint' => function (Site $site) {
return $site->blueprint();
},
'children' => function (Site $site) {
return $site->children();
},
'content' => function (Site $site) {
return Form::for($site)->values();
},
'drafts' => function (Site $site) {
return $site->drafts();
},
'files' => function (Site $site) {
return $site->files()->sorted();
},
'options' => function (Site $site) {
return $site->permissions()->toArray();
},
'previewUrl' => function (Site $site) {
return $site->previewUrl();
},
'title' => function (Site $site) {
return $site->title()->value();
},
'url' => function (Site $site) {
return $site->url();
},
'blueprint' => fn (Site $site) => $site->blueprint(),
'children' => fn (Site $site) => $site->children(),
'content' => fn (Site $site) => Form::for($site)->values(),
'drafts' => fn (Site $site) => $site->drafts(),
'files' => fn (Site $site) => $site->files()->sorted(),
'options' => fn (Site $site) => $site->permissions()->toArray(),
'previewUrl' => fn (Site $site) => $site->previewUrl(),
'title' => fn (Site $site) => $site->title()->value(),
'url' => fn (Site $site) => $site->url(),
],
'type' => 'Kirby\Cms\Site',
'views' => [

View File

@@ -7,20 +7,11 @@ use Kirby\Cms\SiteBlueprint;
*/
return [
'fields' => [
'name' => function (SiteBlueprint $blueprint) {
return $blueprint->name();
},
'options' => function (SiteBlueprint $blueprint) {
return $blueprint->options();
},
'tabs' => function (SiteBlueprint $blueprint) {
return $blueprint->tabs();
},
'title' => function (SiteBlueprint $blueprint) {
return $blueprint->title();
},
'name' => fn (SiteBlueprint $blueprint) => $blueprint->name(),
'options' => fn (SiteBlueprint $blueprint) => $blueprint->options(),
'tabs' => fn (SiteBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (SiteBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\SiteBlueprint',
'views' => [
],
'views' => [],
];

View File

@@ -8,36 +8,16 @@ use Kirby\Toolkit\Str;
*/
return [
'fields' => [
'ascii' => function () {
return Str::$ascii;
},
'authStatus' => function () {
return $this->kirby()->auth()->status()->toArray();
},
'defaultLanguage' => function () {
return $this->kirby()->panelLanguage();
},
'isOk' => function (System $system) {
return $system->isOk();
},
'isInstallable' => function (System $system) {
return $system->isInstallable();
},
'isInstalled' => function (System $system) {
return $system->isInstalled();
},
'isLocal' => function (System $system) {
return $system->isLocal();
},
'multilang' => function () {
return $this->kirby()->option('languages', false) !== false;
},
'languages' => function () {
return $this->kirby()->languages();
},
'license' => function (System $system) {
return $system->license();
},
'ascii' => fn () => Str::$ascii,
'authStatus' => fn () => $this->kirby()->auth()->status()->toArray(),
'defaultLanguage' => fn () => $this->kirby()->panelLanguage(),
'isOk' => fn (System $system) => $system->isOk(),
'isInstallable' => fn (System $system) => $system->isInstallable(),
'isInstalled' => fn (System $system) => $system->isInstalled(),
'isLocal' => fn (System $system) => $system->isLocal(),
'multilang' => fn () => $this->kirby()->option('languages', false) !== false,
'languages' => fn () => $this->kirby()->languages(),
'license' => fn (System $system) => $system->license(),
'locales' => function () {
$locales = [];
$translations = $this->kirby()->translations();
@@ -46,21 +26,11 @@ return [
}
return $locales;
},
'loginMethods' => function (System $system) {
return array_keys($system->loginMethods());
},
'requirements' => function (System $system) {
return $system->toArray();
},
'site' => function (System $system) {
return $system->title();
},
'slugs' => function () {
return Str::$language;
},
'title' => function () {
return $this->site()->title()->value();
},
'loginMethods' => fn (System $system) => array_keys($system->loginMethods()),
'requirements' => fn (System $system) => $system->toArray(),
'site' => fn (System $system) => $system->title(),
'slugs' => fn () => Str::$language,
'title' => fn () => $this->site()->title()->value(),
'translation' => function () {
if ($user = $this->user()) {
$translationCode = $user->language();
@@ -74,12 +44,8 @@ return [
return $this->kirby()->translation('en');
}
},
'kirbytext' => function () {
return $this->kirby()->option('panel.kirbytext') ?? true;
},
'user' => function () {
return $this->user();
},
'kirbytext' => fn () => $this->kirby()->option('panel.kirbytext') ?? true,
'user' => fn () => $this->user(),
'version' => function () {
$user = $this->user();

View File

@@ -7,21 +7,11 @@ use Kirby\Cms\Translation;
*/
return [
'fields' => [
'author' => function (Translation $translation) {
return $translation->author();
},
'data' => function (Translation $translation) {
return $translation->dataWithFallback();
},
'direction' => function (Translation $translation) {
return $translation->direction();
},
'id' => function (Translation $translation) {
return $translation->id();
},
'name' => function (Translation $translation) {
return $translation->name();
},
'author' => fn (Translation $translation) => $translation->author(),
'data' => fn (Translation $translation) => $translation->dataWithFallback(),
'direction' => fn (Translation $translation) => $translation->direction(),
'id' => fn (Translation $translation) => $translation->id(),
'name' => fn (Translation $translation) => $translation->name(),
],
'type' => 'Kirby\Cms\Translation',
'views' => [

View File

@@ -7,58 +7,24 @@ use Kirby\Form\Form;
* User
*/
return [
'default' => function () {
return $this->user();
},
'default' => fn () => $this->user(),
'fields' => [
'avatar' => function (User $user) {
return $user->avatar() ? $user->avatar()->crop(512) : null;
},
'blueprint' => function (User $user) {
return $user->blueprint();
},
'content' => function (User $user) {
return Form::for($user)->values();
},
'email' => function (User $user) {
return $user->email();
},
'files' => function (User $user) {
return $user->files()->sorted();
},
'id' => function (User $user) {
return $user->id();
},
'language' => function (User $user) {
return $user->language();
},
'name' => function (User $user) {
return $user->name()->value();
},
'next' => function (User $user) {
return $user->next();
},
'options' => function (User $user) {
return $user->panel()->options();
},
'panelImage' => function (User $user) {
return $user->panel()->image();
},
'permissions' => function (User $user) {
return $user->role()->permissions()->toArray();
},
'prev' => function (User $user) {
return $user->prev();
},
'role' => function (User $user) {
return $user->role();
},
'roles' => function (User $user) {
return $user->roles();
},
'username' => function (User $user) {
return $user->username();
}
'avatar' => fn (User $user) => $user->avatar() ? $user->avatar()->crop(512) : null,
'blueprint' => fn (User $user) => $user->blueprint(),
'content' => fn (User $user) => Form::for($user)->values(),
'email' => fn (User $user) => $user->email(),
'files' => fn (User $user) => $user->files()->sorted(),
'id' => fn (User $user) => $user->id(),
'language' => fn (User $user) => $user->language(),
'name' => fn (User $user) => $user->name()->value(),
'next' => fn (User $user) => $user->next(),
'options' => fn (User $user) => $user->panel()->options(),
'panelImage' => fn (User $user) => $user->panel()->image(),
'permissions' => fn (User $user) => $user->role()->permissions()->toArray(),
'prev' => fn (User $user) => $user->prev(),
'role' => fn (User $user) => $user->role(),
'roles' => fn (User $user) => $user->roles(),
'username' => fn (User $user) => $user->username()
],
'type' => 'Kirby\Cms\User',
'views' => [

View File

@@ -7,18 +7,10 @@ use Kirby\Cms\UserBlueprint;
*/
return [
'fields' => [
'name' => function (UserBlueprint $blueprint) {
return $blueprint->name();
},
'options' => function (UserBlueprint $blueprint) {
return $blueprint->options();
},
'tabs' => function (UserBlueprint $blueprint) {
return $blueprint->tabs();
},
'title' => function (UserBlueprint $blueprint) {
return $blueprint->title();
},
'name' => fn (UserBlueprint $blueprint) => $blueprint->name(),
'options' => fn (UserBlueprint $blueprint) => $blueprint->options(),
'tabs' => fn (UserBlueprint $blueprint) => $blueprint->tabs(),
'title' => fn (UserBlueprint $blueprint) => $blueprint->title(),
],
'type' => 'Kirby\Cms\UserBlueprint',
'views' => [

View File

@@ -6,12 +6,10 @@ use Kirby\Panel\Panel;
return [
'account' => [
'pattern' => 'account',
'action' => function () {
return [
'action' => fn () => [
'component' => 'k-account-view',
'props' => kirby()->user()->panel()->props(),
];
},
],
],
'account.file' => [
'pattern' => 'account/files/(:any)',
@@ -31,10 +29,6 @@ return [
],
'account.password' => [
'pattern' => 'reset-password',
'action' => function () {
return [
'component' => 'k-reset-password-view',
];
}
'action' => fn () => ['component' => 'k-reset-password-view']
]
];

View File

@@ -32,9 +32,7 @@ return function ($kirby) {
'installation.fallback' => [
'pattern' => '(:all)',
'auth' => false,
'action' => function () {
Panel::go('installation');
}
'action' => fn () => Panel::go('installation')
]
]
];

View File

@@ -11,14 +11,12 @@ return [
return [
'component' => 'k-languages-view',
'props' => [
'languages' => $kirby->languages()->values(function ($language) {
return [
'languages' => $kirby->languages()->values(fn ($language) => [
'default' => $language->isDefault(),
'id' => $language->code(),
'info' => Escape::html($language->code()),
'text' => Escape::html($language->name()),
];
})
])
]
];
}

View File

@@ -7,9 +7,7 @@ $files = require __DIR__ . '/../files/dropdowns.php';
return [
'changes' => [
'pattern' => 'changes',
'options' => function () {
return Dropdown::changes();
}
'options' => fn () => Dropdown::changes()
],
'page' => [
'pattern' => 'pages/(:any)',

View File

@@ -5,9 +5,7 @@ use Kirby\Cms\Find;
return [
'page' => [
'pattern' => 'pages/(:any)',
'action' => function (string $path) {
return Find::page($path)->panel()->view();
}
'action' => fn (string $path) => Find::page($path)->panel()->view()
],
'page.file' => [
'pattern' => 'pages/(:any)/files/(:any)',
@@ -17,9 +15,7 @@ return [
],
'site' => [
'pattern' => 'site',
'action' => function () {
return site()->panel()->view();
}
'action' => fn () => site()->panel()->view()
],
'site.file' => [
'pattern' => 'site/files/(:any)',

View File

@@ -26,7 +26,7 @@ return [
'required' => true
]),
'password' => Field::password(),
'language' => Field::translation([
'translation' => Field::translation([
'required' => true
]),
'role' => Field::role([
@@ -38,7 +38,7 @@ return [
'name' => '',
'email' => '',
'password' => '',
'language' => $kirby->panelLanguage(),
'translation' => $kirby->panelLanguage(),
'role' => $kirby->user()->role()->name()
]
]
@@ -49,7 +49,7 @@ return [
'name' => get('name'),
'email' => get('email'),
'password' => get('password'),
'language' => get('language'),
'language' => get('translation'),
'role' => get('role')
]);
return [

View File

@@ -9,12 +9,10 @@ return [
'action' => function () {
$kirby = kirby();
$role = get('role');
$roles = $kirby->roles()->toArray(function ($role) {
return [
$roles = $kirby->roles()->toArray(fn ($role) => [
'id' => $role->id(),
'title' => $role->title(),
];
});
]);
return [
'component' => 'k-users-view',
@@ -38,15 +36,13 @@ return [
]);
return [
'data' => $users->values(function ($user) {
return [
'data' => $users->values(fn ($user) => [
'id' => $user->id(),
'image' => $user->panel()->image(),
'info' => Escape::html($user->role()->title()),
'link' => $user->panel()->url(true),
'text' => Escape::html($user->username())
];
}),
]),
'pagination' => $users->pagination()->toArray()
];
},

View File

@@ -136,13 +136,18 @@ return [
* @param \Kirby\Cms\App $kirby Kirby instance
* @param string $text Text to parse
* @param array $options Markdown options
* @param bool $inline Whether to wrap the text in `<p>` tags
* @param bool $inline Whether to wrap the text in `<p>` tags (deprecated: set via $options['inline'] instead)
* @return string
* @todo add deprecation warning for $inline parameter in 3.7.0
* @todo remove $inline parameter in in 3.8.0
*/
'markdown' => function (App $kirby, string $text = null, array $options = [], bool $inline = false): string {
static $markdown;
static $config;
// support for the deprecated fourth argument
$options['inline'] ??= $inline;
// if the config options have changed or the component is called for the first time,
// (re-)initialize the parser object
if ($config !== $options) {
@@ -150,7 +155,7 @@ return [
$config = $options;
}
return $markdown->parse($text, $inline);
return $markdown->parse($text, $options['inline']);
},
/**
@@ -343,7 +348,7 @@ return [
* Modify all URLs
*
* @param \Kirby\Cms\App $kirby Kirby instance
* @param string $path URL path
* @param string|null $path URL path
* @param array|string|null $options Array of options for the Uri class
* @return string
*/
@@ -376,7 +381,10 @@ return [
}
// keep relative urls
if (substr($path, 0, 2) === './' || substr($path, 0, 3) === '../') {
if (
$path !== null &&
(substr($path, 0, 2) === './' || substr($path, 0, 3) === '../')
) {
return $path;
}

View File

@@ -2,6 +2,7 @@
use Kirby\Exception\Exception;
use Kirby\Form\Field;
use Kirby\Toolkit\Date;
use Kirby\Toolkit\I18n;
use Kirby\Toolkit\Str;
@@ -20,12 +21,11 @@ return [
return $calendar;
},
/**
* Default date when a new page/file/user gets created
*/
'default' => function (string $default = null) {
return $default;
'default' => function (string $default = null): string {
return $this->toDatetime($default) ?? '';
},
/**
@@ -46,42 +46,21 @@ return [
/**
* Latest date, which can be selected/saved (Y-m-d)
*/
'max' => function (string $max = null) {
return $this->toDatetime($max);
'max' => function (string $max = null): ?string {
return Date::optional($max);
},
/**
* Earliest date, which can be selected/saved (Y-m-d)
*/
'min' => function (string $min = null) {
return $this->toDatetime($min);
'min' => function (string $min = null): ?string {
return Date::optional($min);
},
/**
* Round to the nearest: sub-options for `unit` (day) and `size` (1)
*/
'step' => function ($step = null) {
$default = [
'size' => 1,
'unit' => 'day'
];
if ($step === null) {
return $default;
}
if (is_array($step) === true) {
$step = array_merge($default, $step);
$step['unit'] = strtolower($step['unit']);
return $step;
}
if (is_int($step) === true) {
return array_merge($default, ['size' => $step]);
}
if (is_string($step) === true) {
return array_merge($default, ['unit' => strtolower($step)]);
}
},
/**
@@ -95,12 +74,9 @@ return [
*/
'value' => function ($value = null) {
return $value;
},
}
],
'computed' => [
'default' => function () {
return $this->toDatetime($this->default);
},
'display' => function () {
if ($this->display) {
return Str::upper($this->display);
@@ -120,58 +96,57 @@ return [
return $field->toArray();
},
'step' => function () {
if ($this->time === false) {
return $this->step;
if ($this->time === false || empty($this->time['step']) === true) {
return Date::stepConfig($this->step, [
'size' => 1,
'unit' => 'day'
]);
}
return $this->time['step'];
return Date::stepConfig($this->time['step'], [
'size' => 5,
'unit' => 'minute'
]);
},
'value' => function () {
return $this->toDatetime($this->value);
'value' => function (): string {
return $this->toDatetime($this->value) ?? '';
},
],
'validations' => [
'date',
'minMax' => function ($value) {
$min = $this->min ? strtotime($this->min) : null;
$max = $this->max ? strtotime($this->max) : null;
$value = strtotime($this->value());
if (!$value = Date::optional($value)) {
return true;
}
$min = Date::optional($this->min);
$max = Date::optional($this->max);
$format = $this->time === false ? 'd.m.Y' : 'd.m.Y H:i';
$errors = [];
if ($value && $min && $value < $min) {
$errors['min'] = $min;
}
if ($value && $max && $value > $max) {
$errors['max'] = $max;
}
if (empty($errors) === false) {
if ($min && $max) {
if ($min && $max && $value->isBetween($min, $max) === false) {
throw new Exception([
'key' => 'validation.date.between',
'data' => [
'min' => date($format, $min),
'max' => date($format, $max)
'min' => $min->format($format),
'max' => $min->format($format)
]
]);
} elseif ($min) {
} elseif ($min && $value->isMin($min) === false) {
throw new Exception([
'key' => 'validation.date.after',
'data' => [
'date' => date($format, $min),
'date' => $min->format($format),
]
]);
} else {
} elseif ($max && $value->isMax($max) === false) {
throw new Exception([
'key' => 'validation.date.before',
'data' => [
'date' => date($format, $max),
'date' => $max->format($format),
]
]);
}
}
return true;
},

View File

@@ -1,5 +1,7 @@
<?php
use Kirby\Toolkit\Date;
return [
'props' => [
/**
@@ -11,16 +13,21 @@ return [
],
'methods' => [
'toDatetime' => function ($value, string $format = 'Y-m-d H:i:s') {
if ($timestamp = timestamp($value, $this->step)) {
return date($format, $timestamp);
if ($date = Date::optional($value)) {
if ($this->step) {
$step = Date::stepConfig($this->step);
$date->round($step['unit'], $step['size']);
}
return $date->format($format);
}
return null;
}
],
'save' => function ($value) {
if ($value !== null && $timestamp = strtotime($value)) {
return date($this->format, $timestamp);
if ($date = Date::optional($value)) {
return $date->format($this->format);
}
return '';

View File

@@ -1,6 +1,7 @@
<?php
use Kirby\Exception\Exception;
use Kirby\Toolkit\Date;
use Kirby\Toolkit\I18n;
return [
@@ -11,11 +12,10 @@ return [
*/
'placeholder' => null,
/**
* Sets the default time when a new page/file/user is created
*/
'default' => function ($default = null) {
'default' => function ($default = null): ?string {
return $default;
},
@@ -36,14 +36,14 @@ return [
/**
* Latest time, which can be selected/saved (H:i or H:i:s)
*/
'max' => function (string $max = null) {
return $max ? $this->toDatetime(date('Y-m-d ') . $max) : null;
'max' => function (string $max = null): ?string {
return Date::optional($max);
},
/**
* Earliest time, which can be selected/saved (H:i or H:i:s)
*/
'min' => function (string $min = null) {
return $min ? $this->toDatetime(date('Y-m-d ') . $min) : null;
'min' => function (string $min = null): ?string {
return Date::optional($min);
},
/**
@@ -57,93 +57,68 @@ return [
* Round to the nearest: sub-options for `unit` (minute) and `size` (5)
*/
'step' => function ($step = null) {
$default = [
return Date::stepConfig($step, [
'size' => 5,
'unit' => 'minute'
];
if ($step === null) {
return $default;
}
if (is_array($step) === true) {
$step = array_merge($default, $step);
$step['unit'] = strtolower($step['unit']);
return $step;
}
if (is_int($step) === true) {
return array_merge($default, ['size' => $step]);
}
if (is_string($step) === true) {
return array_merge($default, ['unit' => strtolower($step)]);
}
'unit' => 'minute',
]);
},
'value' => function ($value = null) {
'value' => function ($value = null): ?string {
return $value;
}
],
'computed' => [
'default' => function () {
return $this->toDatetime($this->default, 'H:i:s');
},
'display' => function () {
if ($this->display) {
return $this->display;
}
return $this->notation === 24 ? 'HH:mm' : 'h:mm a';
return $this->notation === 24 ? 'HH:mm' : 'hh:mm a';
},
'default' => function (): string {
return $this->toDatetime($this->default, 'H:i:s') ?? '';
},
'format' => function () {
return $this->props['format'] ?? 'H:i:s';
},
'value' => function () {
return $this->toDatetime($this->value, 'H:i:s');
'value' => function (): ?string {
return $this->toDatetime($this->value, 'H:i:s') ?? '';
}
],
'validations' => [
'time',
'minMax' => function ($value) {
$min = $this->min ? strtotime($this->min) : null;
$max = $this->max ? strtotime($this->max) : null;
$value = strtotime($this->value());
if (!$value = Date::optional($value)) {
return true;
}
$min = Date::optional($this->min);
$max = Date::optional($this->max);
$format = 'H:i:s';
$errors = [];
if ($value && $min && $value < $min) {
$errors['min'] = $min;
}
if ($value && $max && $value > $max) {
$errors['max'] = $max;
}
if (empty($errors) === false) {
if ($min && $max) {
if ($min && $max && $value->isBetween($min, $max) === false) {
throw new Exception([
'key' => 'validation.time.between',
'data' => [
'min' => date($format, $min),
'max' => date($format, $max)
'min' => $min->format($format),
'max' => $min->format($format)
]
]);
} elseif ($min) {
} elseif ($min && $value->isMin($min) === false) {
throw new Exception([
'key' => 'validation.time.after',
'data' => [
'time' => date($format, $min),
'time' => $min->format($format),
]
]);
} else {
} elseif ($max && $value->isMax($max) === false) {
throw new Exception([
'key' => 'validation.time.before',
'data' => [
'time' => date($format, $max),
'time' => $max->format($format),
]
]);
}
}
return true;
},

View File

@@ -8,6 +8,7 @@ use Kirby\Exception\InvalidArgumentException;
use Kirby\Filesystem\Asset;
use Kirby\Filesystem\F;
use Kirby\Http\Router;
use Kirby\Toolkit\Date;
use Kirby\Toolkit\Escape;
use Kirby\Toolkit\I18n;
use Kirby\Toolkit\Str;
@@ -114,11 +115,18 @@ function css($url, $options = null): ?string
}
}
// only valid value for 'rel' is 'alternate stylesheet', if 'title' is given as well
if (
($options['rel'] ?? '') !== 'alternate stylesheet' ||
($options['title'] ?? '') === ''
) {
$options['rel'] = 'stylesheet';
}
$url = ($kirby->component('css'))($kirby, $url, $options);
$url = Url::to($url);
$attr = array_merge((array)$options, [
'href' => $url,
'rel' => 'stylesheet'
'href' => $url
]);
return '<link ' . attr($attr) . '>';
@@ -527,11 +535,12 @@ function load(array $classmap, ?string $base = null)
* `$kirby->markdown($text)`
*
* @param string|null $text
* @param array $options
* @return string
*/
function markdown(?string $text = null): string
function markdown(?string $text = null, array $options = []): string
{
return App::instance()->markdown($text);
return App::instance()->markdown($text, $options);
}
/**
@@ -785,60 +794,19 @@ function tc(string $key, int $count)
*/
function timestamp(?string $date = null, $step = null): ?int
{
if (V::date($date) === false) {
return null;
}
$date = strtotime($date);
if ($step === null) {
return $date;
}
// fallback for pre-3.5.0 usage
if (is_int($step) === true) {
$step = [
if ($date = Date::optional($date)) {
if ($step !== null) {
$step = Date::stepConfig($step, [
'unit' => 'minute',
'size' => $step
];
'size' => 1
]);
$date->round($step['unit'], $step['size']);
}
if (is_array($step) === false) {
return $date;
return $date->timestamp();
}
$parts = [
'second' => date('s', $date),
'minute' => date('i', $date),
'hour' => date('H', $date),
'day' => date('d', $date),
'month' => date('m', $date),
'year' => date('Y', $date),
];
$current = $parts[$step['unit']];
$nearest = round($current / $step['size']) * $step['size'];
$parts[$step['unit']] = $nearest;
foreach ($parts as $part => $value) {
if ($part === $step['unit']) {
break;
}
$parts[$part] = 0;
}
$timestamp = strtotime(
$parts['year'] . '-' .
str_pad($parts['month'], 2, 0, STR_PAD_LEFT) . '-' .
str_pad($parts['day'], 2, 0, STR_PAD_LEFT) . ' ' .
str_pad($parts['hour'], 2, 0, STR_PAD_LEFT) . ':' .
str_pad($parts['minute'], 2, 0, STR_PAD_LEFT) . ':' .
str_pad($parts['second'], 2, 0, STR_PAD_LEFT)
);
// on error, convert `false` into `null`
return $timestamp ?? null;
return null;
}
/**

View File

@@ -393,13 +393,14 @@ return function (App $app) {
* Converts the field content from Markdown/Kirbytext to valid HTML
*
* @param \Kirby\Cms\Field $field
* @param array $options
* @return \Kirby\Cms\Field
*/
'kirbytext' => function (Field $field) use ($app) {
$field->value = $app->kirbytext($field->value, [
'kirbytext' => function (Field $field, array $options = []) use ($app) {
$field->value = $app->kirbytext($field->value, A::merge($options, [
'parent' => $field->parent(),
'field' => $field
]);
]));
return $field;
},
@@ -410,13 +411,17 @@ return function (App $app) {
* @since 3.1.0
*
* @param \Kirby\Cms\Field $field
* @param array $options
* @return \Kirby\Cms\Field
*/
'kirbytextinline' => function (Field $field) use ($app) {
$field->value = $app->kirbytext($field->value, [
'kirbytextinline' => function (Field $field, array $options = []) use ($app) {
$field->value = $app->kirbytext($field->value, A::merge($options, [
'parent' => $field->parent(),
'field' => $field
], true);
'field' => $field,
'markdown' => [
'inline' => true
]
]));
return $field;
},
@@ -451,10 +456,11 @@ return function (App $app) {
* Converts markdown to valid HTML
*
* @param \Kirby\Cms\Field $field
* @param array $options
* @return \Kirby\Cms\Field
*/
'markdown' => function (Field $field) use ($app) {
$field->value = $app->markdown($field->value);
'markdown' => function (Field $field, array $options = []) use ($app) {
$field->value = $app->markdown($field->value, $options);
return $field;
},

1198
kirby/dependencies/spyc/Spyc.php Executable file

File diff suppressed because it is too large Load Diff

163
kirby/i18n/rules/iu.json Executable file
View File

@@ -0,0 +1,163 @@
{
"ᐁ": "ai",
"ᐃ": "i",
"ᐄ": "ii",
"ᐅ": "u",
"ᐆ": "uu",
"ᐊ": "a",
"ᐋ": "aa",
"": "pai",
"ᐱ": "pi",
"ᐲ": "pii",
"": "pu",
"ᐴ": "puu",
"": "pa",
"ᐹ": "paa",
"": "tai",
"ᑎ": "ti",
"ᑏ": "tii",
"ᑐ": "tu",
"ᑑ": "tuu",
"ᑕ": "ta",
"ᑖ": "taa",
"ᕴ": "hai",
"ᕵ": "hi",
"ᕶ": "hii",
"ᕷ": "hu",
"ᕸ": "huu",
"ᕹ": "ha",
"ᕺ": "haa",
"ᒉ": "gai",
"ᒋ": "gi",
"ᒌ": "gii",
"": "gu",
"ᒎ": "guu",
"ᒐ": "ga",
"ᒑ": "gaa",
"ᒣ": "mai",
"ᒥ": "mi",
"ᒦ": "mii",
"ᒧ": "mu",
"ᒨ": "muu",
"": "ma",
"ᒫ": "maa",
"ᓀ": "nai",
"ᓂ": "ni",
"ᓃ": "nii",
"ᓄ": "nu",
"ᓅ": "nuu",
"ᓇ": "na",
"ᓈ": "naa",
"ᓭ": "sai",
"ᓯ": "si",
"ᓰ": "sii",
"ᓱ": "su",
"ᓲ": "suu",
"ᓴ": "sa",
"ᓵ": "saa",
"ᓓ": "lai",
"ᓕ": "li",
"ᓖ": "lii",
"ᓗ": "lu",
"ᓘ": "luu",
"ᓚ": "la",
"ᓛ": "laa",
"ᔦ": "jai",
"ᔨ": "ji",
"ᔩ": "jii",
"ᔪ": "ju",
"ᔫ": "juu",
"ᔭ": "ja",
"ᔮ": "jaa",
"ᕓ": "vai",
"ᕕ": "vi",
"ᕖ": "vii",
"ᕗ": "vu",
"ᕘ": "vuu",
"ᕙ": "va",
"ᕚ": "vaa",
"ᕃ": "rai",
"ᕆ": "ri",
"ᕇ": "rii",
"ᕈ": "ru",
"ᕉ": "ruu",
"ᕋ": "ra",
"ᕌ": "raa",
"ᖅᑫ": "qqai",
"ᖅᑭ": "qqi",
"ᖅᑮ": "qqii",
"ᖅᑯ": "qqu",
"ᖅᑰ": "qquu",
"ᖅᑲ": "qqa",
"ᖅᑳ": "qqaa",
"ᖅᒃ": "qq",
"ᙯ": "qai",
"ᕿ": "qi",
"ᖀ": "qii",
"ᖁ": "qu",
"ᖂ": "quu",
"ᖃ": "qa",
"ᖄ": "qaa",
"ᑫ": "kai",
"": "ki",
"ᑮ": "kii",
"": "ku",
"ᑰ": "kuu",
"": "ka",
"ᑳ": "kaa",
"ᙰ": "ngai",
"ᖏ": "ngi",
"ᖐ": "ngii",
"ᖑ": "ngu",
"ᖒ": "nguu",
"ᖓ": "nga",
"ᖔ": "ngaa",
"ᙱ": "nngi",
"ᙲ": "nngii",
"ᙳ": "nngu",
"ᙴ": "nnguu",
"ᙵ": "nnga",
"ᙶ": "nngaa",
"ᖠ": "lhi",
"ᖡ": "lhii",
"ᖢ": "lhu",
"ᖣ": "lhuu",
"ᖤ": "lha",
"ᖥ": "lhaa",
"ᑉ": "p",
"ᑦ": "t",
"ᒃ": "k",
"ᒡ": "g",
"ᒻ": "m",
"ᓐ": "n",
"ᔅ": "s",
"ᓪ": "l",
"ᔾ": "j",
"ᕝ": "v",
"ᕐ": "r",
"ᖅ": "q",
"ᖕ": "ng",
"ᖖ": "nng",
"ᖦ": "lh",
"": "b",
"": "h"
}

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Стандартният шаблон не съществува",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Нямате права да промените имейла на този потребител \"{name}\"",
"error.user.changeLanguage.permission": "Нямате права да промените езика за този потребител \"{name}\"",
"error.user.changeName.permission": "Нямате права да промените името на този потребител \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "La plantilla predeterminada no existeix",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "No tens permís per canviar el correu electrònic per a l'usuari \"{name}\"",
"error.user.changeLanguage.permission": "No tens permís per canviar l'idioma de l'usuari \"{name}\"",
"error.user.changeName.permission": "No tens permís per canviar el nom de l'usuari \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Výchozí šablona neexistuje",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Nemáte dovoleno měnit email uživatele \"{name}\"",
"error.user.changeLanguage.permission": "Nemáte dovoleno změnit jazyk uživatele \"{name}\"",
"error.user.changeName.permission": "Nemáte dovoleno změnit jméno uživatele \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Standardskabelonen eksisterer ikke",
"error.unexpected": "En uventet fejl opstod! Aktiver debug mode for mere info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Du har ikke tilladelse til at ændre emailen for brugeren \"{name}\"",
"error.user.changeLanguage.permission": "Du har ikke tilladelse til at ændre sproget for brugeren \"{name}\"",
"error.user.changeName.permission": "Du har ikke tilladelse til at ændre navn på brugeren \"{name}\"",

View File

@@ -88,7 +88,7 @@
"error.file.mime.missing": "Der Medientyp für \"{filename}\" konnte nicht erkannt werden",
"error.file.minheight": "Die Bildhöhe muss mindestens {height} Pixel betragen",
"error.file.minsize": "Die Datei ist zu klein",
"error.file.minwidth": "Die Bildbreite muss mindestens {height} Pixel betragen",
"error.file.minwidth": "Die Bildbreite muss mindestens {width} Pixel betragen",
"error.file.name.missing": "Bitte gib einen Dateinamen an",
"error.file.notFound": "Die Datei \"{filename}\" konnte nicht gefunden werden",
"error.file.orientation": "Das Bildformat ist ungültig. Erwartetes Format: \"{orientation}\"",
@@ -157,6 +157,8 @@
"error.template.default.notFound": "Die \"Default\"-Vorlage existiert nicht",
"error.unexpected": "Ein unerwarteter Fehler ist aufgetreten. Aktiviere den Debug Modus für weitere Informationen: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Du kannst die E-Mailadresse für den Account \"{name}\" nicht ändern",
"error.user.changeLanguage.permission": "Du kannst die Sprache für den Account \"{name}\" nicht ändern",
"error.user.changeName.permission": "Du kannst den Namen für den Account \"{name}\" nicht ändern",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Το προεπιλεγμένο πρότυπο δεν υπάρχει",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Δεν επιτρέπεται να αλλάξετε τη διεύθινση ηλεκτρονικού ταχυδρομείου για τον χρήστη \"{name}\"",
"error.user.changeLanguage.permission": "Δεν επιτρέπεται να αλλάξετε τη γλώσσα για τον χρήστη \"{name}\"",
"error.user.changeName.permission": "Δεν επιτρέπεται να αλλάξετε το όνομα του χρήστη \"{name}",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "The default template does not exist",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "You are not allowed to change the email for the user \"{name}\"",
"error.user.changeLanguage.permission": "You are not allowed to change the language for the user \"{name}\"",
"error.user.changeName.permission": "You are not allowed to change the name for the user \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "La defaŭlta ŝablono ne ekzistas",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Vi ne rajtas ŝanĝi la retpoŝtadreson de la uzanto \"{name}\"",
"error.user.changeLanguage.permission": "Vi ne rajtas ŝanĝi la lingvon de la uzanto \"{name}\"",
"error.user.changeName.permission": "Vi ne rajtas ŝanĝi la nomon de la uzanto \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "La plantilla predeterminada no existe",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "No tienes permiso para cambiar el email del usuario \"{name}\"",
"error.user.changeLanguage.permission": "No tienes permiso para cambiar el idioma del usuario \"{name}\"",
"error.user.changeName.permission": "No tienes permiso para cambiar el nombre del usuario \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "La plantilla por defecto no existe",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "No tienes permitido cambiar el correo electrónico para el usuario \"{name}\"",
"error.user.changeLanguage.permission": "No tienes permitido cambiar el idioma para el usuario \"{name}\"",
"error.user.changeName.permission": "No tienes permitido cambiar el nombre del usuario \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "قالب پیش فرض موجود نیست",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "شما اجازه تغییر ایمیل کاربر «{name}» را ندارید",
"error.user.changeLanguage.permission": "شما اجازه تغییر زبان برای کاربر «{name}» را ندارید",
"error.user.changeName.permission": "شما اجازه تنغییر نام کاربر «{name}» را ندارید",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Oletussivupohjaa ei ole määritetty",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Sinulla ei ole oikeutta vaihtaa käyttäjän \"{name}\" sähköpostiosoitetta",
"error.user.changeLanguage.permission": "Sinulla ei ole oikeutta vaihtaa käyttäjän \"{name}\" kieltä",
"error.user.changeName.permission": "Sinulla ei ole oikeutta vaihtaa käyttäjän \"{name}\" nimeä",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Le modèle par défaut nexiste pas",
"error.unexpected": "Une erreur inattendue est survenue ! Activez le mode de débogage pour plus d'informations : https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Vous nêtes pas autorisé à modifier le courriel de lutilisateur « {name} »",
"error.user.changeLanguage.permission": "Vous nêtes pas autorisé à changer la langue de lutilisateur « {name} »",
"error.user.changeName.permission": "Vous nêtes pas autorisé à modifier le nom de lutilisateur « {name} »",

View File

@@ -1,20 +1,20 @@
{
"account.changeName": "Change your name",
"account.delete": "Delete your account",
"account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.",
"account.changeName": "Név megváltoztatása",
"account.delete": "Fiók törlése",
"account.delete.confirm": "Tényleg törölni szeretnéd a fiókodat? Azonnal kijelentkeztetünk és ez a folyamat visszavonhatatlan.",
"add": "Hozz\u00e1ad",
"author": "Author",
"author": "Szerző",
"avatar": "Profilkép",
"back": "Vissza",
"cancel": "M\u00e9gsem",
"change": "M\u00f3dos\u00edt\u00e1s",
"close": "Bez\u00e1r",
"confirm": "Mentés",
"collapse": "Collapse",
"collapse.all": "Collapse All",
"collapse": "Bezárás",
"collapse.all": "Összes bezárása",
"copy": "Másol",
"copy.all": "Copy all",
"copy.all": "Összes másolása",
"create": "Létrehoz",
"date": "Dátum",
@@ -29,17 +29,17 @@
"days.tue": "ke",
"days.wed": "sze",
"debugging": "Debugging",
"debugging": "Hibakeresés",
"delete": "T\u00f6rl\u00e9s",
"delete.all": "Delete all",
"delete.all": "Összes törlése",
"dialog.files.empty": "Nincsenek fájlok kiválasztva",
"dialog.pages.empty": "Nincsenek oldalak kiválasztva",
"dialog.users.empty": "Nincsenek felhasználók kiválasztva",
"dimensions": "Méretek",
"disabled": "Disabled",
"disabled": "Inaktív",
"discard": "Visszavon\u00e1s",
"download": "Letöltés",
"duplicate": "Másolat",
@@ -49,12 +49,12 @@
"email": "Email",
"email.placeholder": "mail@pelda.hu",
"environment": "Environment",
"environment": "Környezet",
"error.access.code": "Invalid code",
"error.access.code": "Érvénytelen kód",
"error.access.login": "Érvénytelen bejelentkezés",
"error.access.panel": "Nincs jogosultságod megnyitni a panelt",
"error.access.view": "You are not allowed to access this part of the panel",
"error.access.view": "Nincs hozzáférésed a panel ezen részéhez",
"error.avatar.create.fail": "A profilkép feltöltése nem sikerült",
"error.avatar.delete.fail": "A profilkép nem törölhető",
@@ -63,37 +63,37 @@
"error.blueprint.notFound": "A \"{name}\" oldalsablon nem tölthető be",
"error.blocks.max.plural": "You must not add more than {max} blocks",
"error.blocks.max.singular": "You must not add more than one block",
"error.blocks.min.plural": "You must add at least {min} blocks",
"error.blocks.min.singular": "You must add at least one block",
"error.blocks.validation": "There's an error in block {index}",
"error.blocks.max.plural": "Legfeljebb {max} blokk adható hozzá",
"error.blocks.max.singular": "Csak egyetlen blokk adható hozzá",
"error.blocks.min.plural": "Legalább {min} blokkot hozzá kell adnod",
"error.blocks.min.singular": "Legalább egy blokkot hozzá kell adnod",
"error.blocks.validation": "Hiba van az alábbi blokkban: {index}",
"error.email.preset.notFound": "A \"{name}\" email-beállítás nem található",
"error.field.converter.invalid": "Érvénytelen konverter: \"{converter}\"",
"error.file.changeName.empty": "The name must not be empty",
"error.file.changeName.empty": "A név nem lehet üres",
"error.file.changeName.permission": "Nincs jogosultságod megváltoztatni a \"{filename}\" fájl nevét",
"error.file.duplicate": "Már létezik \"{filename}\" nevű fájl",
"error.file.extension.forbidden": "Tiltott kiterjeszt\u00e9s\u0171 f\u00e1jl",
"error.file.extension.invalid": "Invalid extension: {extension}",
"error.file.extension.invalid": "Érvénytelen kiterjesztés: {extension}",
"error.file.extension.missing": "Kiterjeszt\u00e9s n\u00e9lk\u00fcli f\u00e1jl nem t\u00f6lthet\u0151 fel",
"error.file.maxheight": "The height of the image must not exceed {height} pixels",
"error.file.maxsize": "The file is too large",
"error.file.maxwidth": "The width of the image must not exceed {width} pixels",
"error.file.maxheight": "A kép nem lehet magasabb {height} pixelnél",
"error.file.maxsize": "A fájl túl nagy",
"error.file.maxwidth": "A kép nem lehet szélesebb {width} pixelnél",
"error.file.mime.differs": "A feltöltött fájlnak azonos \"{mime}\" típusúnak kell lennie",
"error.file.mime.forbidden": "A \"{mime}\" típusú médiafájlok nem engedélyezettek",
"error.file.mime.invalid": "Invalid mime type: {mime}",
"error.file.mime.invalid": "Érvénytelen mime-típus: {mime}",
"error.file.mime.missing": "A \"{filename}\" fájl típusa nem állapítható meg",
"error.file.minheight": "The height of the image must be at least {height} pixels",
"error.file.minsize": "The file is too small",
"error.file.minwidth": "The width of the image must be at least {width} pixels",
"error.file.minheight": "A képnek legalább {height} pixel magasnak kell lennie",
"error.file.minsize": "A fájl túl kicsi",
"error.file.minwidth": "A képnek legalább {width} pixel szélesnek kell lennie",
"error.file.name.missing": "A fálj neve nem lehet üres",
"error.file.notFound": "A \"{filename}\" fájl nem található",
"error.file.orientation": "The orientation of the image must be \"{orientation}\"",
"error.file.orientation": "A képnek \"{orientation}\" tájolásúnak kell lennie",
"error.file.type.forbidden": "Nem tölthetsz fel \"{type}\" típusú fájlokat",
"error.file.type.invalid": "Invalid file type: {type}",
"error.file.type.invalid": "Érvénytelen fájltípus: {type}",
"error.file.undefined": "A f\u00e1jl nem tal\u00e1lhat\u00f3",
"error.form.incomplete": "Kérlek javítsd ki az összes hibát az űrlapon",
@@ -102,16 +102,16 @@
"error.language.code": "Kérlek, add meg a nyelv érvényes kódját",
"error.language.duplicate": "A nyelv már létezik",
"error.language.name": "Kérlek, add meg a nyelv érvényes nevét",
"error.language.notFound": "The language could not be found",
"error.language.notFound": "A nyelv nem található",
"error.layout.validation.block": "There's an error in block {blockIndex} in layout {layoutIndex}",
"error.layout.validation.settings": "There's an error in layout {index} settings",
"error.layout.validation.block": "Hibát találtunk az alábbi blokkban: {blockIndex} az alábbi elrendezésben: {layoutIndex}",
"error.layout.validation.settings": "Hibát találtunk a(z) {index} elrendezés beállításaiban",
"error.license.format": "Kérlek, add meg az évényes lincensz kulcsot",
"error.license.email": "Kérlek adj meg egy valós email-címet",
"error.license.verification": "A licensz nem ellenőrizhető",
"error.offline": "The Panel is currently offline",
"error.offline": "A Panel jelenleg nem elérhető",
"error.page.changeSlug.permission": "Nem változtathatod meg az URL-előtagot: \"{slug}\"",
"error.page.changeStatus.incomplete": "Az oldal hibákat tartalmaz és nem publikálható",
@@ -131,8 +131,8 @@
"error.page.duplicate.permission": "Nincs engedélyed a(z) \"{slug}\" másolat keszítéséhez",
"error.page.notFound": "Az oldal nem tal\u00e1lhat\u00f3",
"error.page.num.invalid": "Kérlek megfelelő oldalszámozást adj meg. Negatív szám itt nem használható.",
"error.page.slug.invalid": "Please enter a valid URL appendix",
"error.page.slug.maxlength": "Slug length must be less than \"{length}\" characters",
"error.page.slug.invalid": "Kérlek érvényes URL-kiterjesztést adj meg",
"error.page.slug.maxlength": "Az URL maximum \"{length}\" karakter hosszúságú lehet",
"error.page.sort.permission": "A(z) \"{slug}\" oldal nem illeszthető a sorrendbe",
"error.page.status.invalid": "Kérlek add meg a megfelelő oldalstátuszt",
"error.page.undefined": "Az oldal nem tal\u00e1lhat\u00f3",
@@ -157,13 +157,15 @@
"error.template.default.notFound": "Az alapértelmezett sablon nem létezik",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Nincs jogosultságod megváltoztatni \"{name}\" felhasználó email-címét",
"error.user.changeLanguage.permission": "Nincs jogosultságod megváltoztatni \"{name}\" felhasználó nyelvi beállításait",
"error.user.changeName.permission": "Nincs jogosultságod megváltoztatni \"{name}\" felhasználó nevét",
"error.user.changePassword.permission": "Nincs jogosultságod megváltoztatni \"{name}\" felhasználó jelszavát",
"error.user.changeRole.lastAdmin": "Az egyedüli adminisztrátor szerepkörét nem lehet megváltoztatni",
"error.user.changeRole.permission": "Nincs jogosultságod megváltoztatni \"{name}\" felhasználó szerepkörét",
"error.user.changeRole.toAdmin": "You are not allowed to promote someone to the admin role",
"error.user.changeRole.toAdmin": "Nincs jogosultságod előléptetni a felhasználót adminisztrátorrá",
"error.user.create.permission": "Nincs jogosultságod létrehozni ezt a felhasználót",
"error.user.delete": "A felhaszn\u00e1l\u00f3 nem t\u00f6r\u00f6lhet\u0151",
"error.user.delete.lastAdmin": "Nem t\u00f6r\u00f6lheted az egyetlen adminisztr\u00e1tort",
@@ -176,7 +178,7 @@
"error.user.password.invalid": "Kérlek adj meg egy megfelelő jelszót. A jelszónak legalább 8 karakter hosszúságúnak kell lennie.",
"error.user.password.notSame": "K\u00e9rlek er\u0151s\u00edtsd meg a jelsz\u00f3t",
"error.user.password.undefined": "A felhasználónak nincs jelszó megadva",
"error.user.password.wrong": "Wrong password",
"error.user.password.wrong": "Hibás jelszó",
"error.user.role.invalid": "Kérlek adj meg egy megfelelő szerepkört",
"error.user.undefined": "A felhasználó nem található",
"error.user.update.permission": "Nincs jogosultságod frissíteni \"{name}\" felhasználó adatait",
@@ -188,9 +190,9 @@
"error.validation.boolean": "Kérlek erősítsd meg vagy vesd el",
"error.validation.contains": "Kérlek olyan értéket adj meg, amely tartalmazza ezt: \"{needle}\"",
"error.validation.date": "Kérlek megfelelő dátumot adj meg",
"error.validation.date.after": "Please enter a date after {date}",
"error.validation.date.before": "Please enter a date before {date}",
"error.validation.date.between": "Please enter a date between {min} and {max}",
"error.validation.date.after": "Kérlek olyan dátumot adj meg, amely későbbi ennél: {date}",
"error.validation.date.before": "Kérlek olyan dátumot adj meg, amely korábbi ennél: {date}",
"error.validation.date.between": "Kérlek {min} és {max} közötti dátumot adj meg",
"error.validation.denied": "Kérlek vesd el",
"error.validation.different": "Az érték nem lehet \"{other}\"",
"error.validation.email": "Kérlek adj meg egy valós email-címet",
@@ -217,84 +219,84 @@
"error.validation.size": "Az értéknek az alábbi méretűnek kell lennie: \"{size}\"",
"error.validation.startswith": "Az értéknek ezzel kell kezdődnie: \"{start}\"",
"error.validation.time": "Kérlek megfelelő időt adj meg",
"error.validation.time.after": "Please enter a time after {time}",
"error.validation.time.before": "Please enter a time before {time}",
"error.validation.time.between": "Please enter a time between {min} and {max}",
"error.validation.time.after": "Kérlek olyan időpontot adj meg, amely későbbi ennél: {time}",
"error.validation.time.before": "Kérlek olyan időpontot adj meg, amely korábbi ennél: {time}",
"error.validation.time.between": "Kérlek {min} és {max} közötti időpontot adj meg",
"error.validation.url": "Kérlek megfelelő URL-t adj meg",
"expand": "Expand",
"expand.all": "Expand All",
"expand": "Kinyitás",
"expand.all": "Összes kinyitása",
"field.required": "The field is required",
"field.blocks.changeType": "Change type",
"field.required": "Kötelező mező",
"field.blocks.changeType": "Típus megváltoztatása",
"field.blocks.code.name": "Kód",
"field.blocks.code.language": "Nyelv",
"field.blocks.code.placeholder": "Your code …",
"field.blocks.delete.confirm": "Do you really want to delete this block?",
"field.blocks.delete.confirm.all": "Do you really want to delete all blocks?",
"field.blocks.delete.confirm.selected": "Do you really want to delete the selected blocks?",
"field.blocks.empty": "No blocks yet",
"field.blocks.fieldsets.label": "Please select a block type …",
"field.blocks.fieldsets.paste": "Press <kbd>{{ shortcut }}</kbd> to paste/import blocks from your clipboard",
"field.blocks.gallery.name": "Gallery",
"field.blocks.gallery.images.empty": "No images yet",
"field.blocks.gallery.images.label": "Images",
"field.blocks.heading.level": "Level",
"field.blocks.heading.name": "Heading",
"field.blocks.heading.text": "Text",
"field.blocks.heading.placeholder": "Heading …",
"field.blocks.image.alt": "Alternative text",
"field.blocks.image.caption": "Caption",
"field.blocks.image.crop": "Crop",
"field.blocks.code.placeholder": "A megjelenítendő kód …",
"field.blocks.delete.confirm": "Tényleg törölni szeretnéd ezt a blokkot?",
"field.blocks.delete.confirm.all": "Tényleg minden blokkot törölni szeretnél?",
"field.blocks.delete.confirm.selected": "Tényleg törölni szeretnéd a kijelölt blokkokat?",
"field.blocks.empty": "Még nincsenek blokkok",
"field.blocks.fieldsets.label": "Kérlek válassz blokktípust …",
"field.blocks.fieldsets.paste": "Blokk beszúrásához a vágólapról használd a <kbd>{{ shortcut }}</kbd> billentyűkombinációt",
"field.blocks.gallery.name": "Galéria",
"field.blocks.gallery.images.empty": "Még nincsenek képek",
"field.blocks.gallery.images.label": "Képek",
"field.blocks.heading.level": "Szint",
"field.blocks.heading.name": "Címsor",
"field.blocks.heading.text": "Szöveg",
"field.blocks.heading.placeholder": "Címsor …",
"field.blocks.image.alt": "Alternatív szöveg",
"field.blocks.image.caption": "Képaláírás",
"field.blocks.image.crop": "Körülvágás",
"field.blocks.image.link": "Link",
"field.blocks.image.location": "Location",
"field.blocks.image.location": "A kép helye",
"field.blocks.image.name": "Kép",
"field.blocks.image.placeholder": "Select an image",
"field.blocks.image.ratio": "Ratio",
"field.blocks.image.url": "Image URL",
"field.blocks.line.name": "Line",
"field.blocks.list.name": "List",
"field.blocks.image.placeholder": "Kép kiválasztása",
"field.blocks.image.ratio": "Képarány",
"field.blocks.image.url": "Kép URL-je",
"field.blocks.line.name": "Vonal",
"field.blocks.list.name": "Lista",
"field.blocks.markdown.name": "Markdown",
"field.blocks.markdown.label": "Text",
"field.blocks.markdown.label": "Szöveg",
"field.blocks.markdown.placeholder": "Markdown …",
"field.blocks.quote.name": "Quote",
"field.blocks.quote.text.label": "Text",
"field.blocks.quote.text.placeholder": "Quote …",
"field.blocks.quote.citation.label": "Citation",
"field.blocks.quote.citation.placeholder": "by …",
"field.blocks.text.name": "Text",
"field.blocks.text.placeholder": "Text …",
"field.blocks.video.caption": "Caption",
"field.blocks.video.name": "Video",
"field.blocks.video.placeholder": "Enter a video URL",
"field.blocks.video.url.label": "Video-URL",
"field.blocks.quote.name": "Idézet",
"field.blocks.quote.text.label": "Szöveg",
"field.blocks.quote.text.placeholder": "Idézet szövege …",
"field.blocks.quote.citation.label": "Idézet szerzője",
"field.blocks.quote.citation.placeholder": "Szerző …",
"field.blocks.text.name": "Szöveg",
"field.blocks.text.placeholder": "Szöveg …",
"field.blocks.video.caption": "Képaláírás",
"field.blocks.video.name": "Videó",
"field.blocks.video.placeholder": "Videó URL-jének megadása",
"field.blocks.video.url.label": "Videó URL",
"field.blocks.video.url.placeholder": "https://youtube.com/?v=",
"field.files.empty": "Nincs fálj kiválasztva",
"field.layout.delete": "Delete layout",
"field.layout.delete.confirm": "Do you really want to delete this layout?",
"field.layout.empty": "No rows yet",
"field.layout.select": "Select a layout",
"field.layout.delete": "Elrendezés törlése",
"field.layout.delete.confirm": "Tényleg törölni szeretnéd ezt az elrendezést?",
"field.layout.empty": "Még nincsenek sorok",
"field.layout.select": "Válassz elrendezést",
"field.pages.empty": "Nincs oldal kiválasztva",
"field.structure.delete.confirm": "Biztos t\u00f6r\u00f6lni szeretn\u00e9d ezt a bejegyz\u00e9st?",
"field.structure.empty": "Nincs m\u00e9g bejegyz\u00e9s",
"field.users.empty": "Nincs felhasználó kiválasztva",
"file.blueprint": "This file has no blueprint yet. You can define the setup in <strong>/site/blueprints/files/{blueprint}.yml</strong>",
"file.blueprint": "Ehhez a fájlhoz még nem tartozik oldalsablon. Itt hozhatod létre: <strong>/site/blueprints/files/{blueprint}.yml</strong>",
"file.delete.confirm": "Biztos törölni akarod ezt a fájlt: <br><strong>{filename}</strong>?",
"file.sort": "Change position",
"file.sort": "Sorrend megváltoztatása",
"files": "Fájlok",
"files.empty": "Még nincsenek fájlok",
"hide": "Hide",
"hide": "Elrejtés",
"hour": "Óra",
"import": "Import",
"import": "Importálás",
"insert": "Beilleszt",
"insert.after": "Insert after",
"insert.before": "Insert before",
"insert.after": "Beszúrás mögé",
"insert.before": "Beszúrás elé",
"install": "Telepítés",
"installation": "Telepítés",
@@ -321,7 +323,7 @@
"language.direction.ltr": "Balról jobbra",
"language.direction.rtl": "Jobbról balra",
"language.locale": "PHP locale sztring",
"language.locale.warning": "You are using a custom locale set up. Please modify it in the language file in /site/languages",
"language.locale.warning": "Egyedi nyelvi készletet használsz. Kérlek módosítsd a nyelvhez tartozó fájlt az alábbi mappában: /site/languages",
"language.name": "Név",
"language.updated": "A nyelv frissítve lett",
@@ -345,7 +347,7 @@
"loading": "Betöltés",
"lock.unsaved": "Nem mentett változások",
"lock.unsaved.empty": "There are no more unsaved changes",
"lock.unsaved.empty": "Nincsenek nem mentett változások",
"lock.isLocked": "Nem mentett <strong>{email}</strong> változások",
"lock.file.isLocked": "A fájlt jelenleg {email} szerkeszti és nem módosítható.",
"lock.page.isLocked": "Az oldalt jelenleg {email} szerkeszti és nem módosítható.",
@@ -353,20 +355,20 @@
"lock.isUnlocked": "A nem mentett módosításokat egy másik felhasználó felülírta. A módosításokat manuálisan egyesítheted.",
"login": "Bejelentkezés",
"login.code.label.login": "Login code",
"login.code.label.password-reset": "Password reset code",
"login.code.label.login": "Bejelentkezéshez szükséges kód",
"login.code.label.password-reset": "Jelszóvisszaállításhoz szükséges kód",
"login.code.placeholder.email": "000 000",
"login.code.text.email": "If your email address is registered, the requested code was sent via email.",
"login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.",
"login.email.login.subject": "Your login code",
"login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.",
"login.email.password-reset.subject": "Your password reset code",
"login.code.text.email": "Amennyiben az email-címed létezik a rendszerben, a kódot oda küldjük el.",
"login.email.login.body": "Helló {user.nameOrEmail},\n\nNemrégiben bejelentkezési kódot igényeltél a(z) {site} Paneljéhez.\nAz alábbi kód {timeout} percig lesz érvényes:\n\n{code}\n\nHa nem te igényelted a kódot, kérlek hagyd figyelmen kívül ezt az emailt, kérdések esetén pedig vedd fel a kapcsolatot az oldal Adminisztrátorával.\nBiztonsági okokból kérjük NE továbbítsd ezt az emailt.",
"login.email.login.subject": "Bejelentkezési kódod",
"login.email.password-reset.body": "Helló {user.nameOrEmail},\n\nNemrégiben jelszóvisszaállítási kódot igényeltél a(z) {site} Paneljéhez.\nAz alábbi jelszóvisszaállítási kód {timeout} percig lesz érvényes:\n\n{code}\n\nHa nem te igényelted a jelszóvisszaállítási kódot, kérlek hagyd figyelmen kívül ezt az emailt, kérdések esetén pedig vedd fel a kapcsolatot az oldal Adminisztrátorával.\nBiztonsági okokból kérjük NE továbbítsd ezt az emailt.",
"login.email.password-reset.subject": "Jelszóvisszaállítási kódod",
"login.remember": "Maradjak bejelentkezve",
"login.reset": "Reset password",
"login.toggleText.code.email": "Login via email",
"login.toggleText.code.email-password": "Login with password",
"login.toggleText.password-reset.email": "Forgot your password?",
"login.toggleText.password-reset.email-password": "← Back to login",
"login.reset": "Jelszó visszaállítása",
"login.toggleText.code.email": "Bejelentkezés emaillel",
"login.toggleText.code.email-password": "Bejelentkezés jelszóval",
"login.toggleText.password-reset.email": "Elfelejtetted a jelszavad?",
"login.toggleText.password-reset.email-password": "← Vissza a bejelentkezéshez",
"logout": "Kijelentkezés",
@@ -392,20 +394,20 @@
"more": "Több",
"name": "Név",
"next": "Következő",
"no": "no",
"no": "nem",
"off": "ki",
"on": "be",
"open": "Megnyitás",
"open.newWindow": "Open in new window",
"open.newWindow": "Megnyitás új ablakban",
"options": "Beállítások",
"options.none": "No options",
"options.none": "Nincsnek beállítások",
"orientation": "Tájolás",
"orientation.landscape": "Fekvő",
"orientation.portrait": "Álló",
"orientation.square": "Négyzetes",
"page.blueprint": "This page has no blueprint yet. You can define the setup in <strong>/site/blueprints/pages/{blueprint}.yml</strong>",
"page.blueprint": "Ehhez az oldalhoz még nem tartozik oldalsablon. Itt hozhatod létre: <strong>/site/blueprints/pages/{blueprint}.yml</strong>",
"page.changeSlug": "URL v\u00e1ltoztat\u00e1sa",
"page.changeSlug.fromTitle": "L\u00e9trehoz\u00e1s c\u00edmb\u0151l",
"page.changeStatus": "Állapot módosítása",
@@ -419,10 +421,10 @@
"page.duplicate.appendix": "Másol",
"page.duplicate.files": "Fájlok másolása",
"page.duplicate.pages": "Oldalak másolása",
"page.sort": "Change position",
"page.sort": "Sorrend megváltoztatása",
"page.status": "Állapot",
"page.status.draft": "Piszkozat",
"page.status.draft.description": "The page is in draft mode and only visible for logged in editors or via secret link",
"page.status.draft.description": "Ez az oldal jelenleg piszkozat és csak bejelentkezett szerkesztők számára, vagy egy titkos linken keresztül érhető el",
"page.status.listed": "Publikus",
"page.status.listed.description": "Az oldal mindenki számára elérhető",
"page.status.unlisted": "Nem listázott",
@@ -437,18 +439,18 @@
"pagination.page": "Oldal",
"password": "Jelsz\u00f3",
"paste": "Paste",
"paste.after": "Paste after",
"paste": "Beillesztés",
"paste.after": "Beillesztés utána",
"pixel": "Pixel",
"plugins": "Plugins",
"plugins": "Pluginek",
"prev": "Előző",
"preview": "Preview",
"preview": "Előnézet",
"remove": "Eltávolítás",
"rename": "Átnevezés",
"replace": "Cser\u00e9l",
"retry": "Próbáld újra",
"revert": "Visszavon\u00e1s",
"revert.confirm": "Do you really want to <strong>delete all unsaved changes</strong>?",
"revert.confirm": "Tényleg <strong>törölni szeretnél minden nem mentett változtatást</strong>?",
"role": "Szerepkör",
"role.admin.description": "Az adminisztrátornak minden joga van",
@@ -461,15 +463,15 @@
"save": "Ment\u00e9s",
"search": "Keresés",
"search.min": "Enter {min} characters to search",
"search.all": "Show all",
"search.results.none": "No results",
"search.min": "A kereséshez írj be minimum {min} karaktert",
"search.all": "Összes mutatása",
"search.results.none": "Nincs találat",
"section.required": "The section is required",
"section.required": "Ez a szakasz kötelező",
"select": "Kiválasztás",
"settings": "Beállítások",
"show": "Show",
"show": "Mutat",
"size": "Méret",
"slug": "URL n\u00e9v",
"sort": "Rendezés",
@@ -477,29 +479,29 @@
"template": "Sablon",
"today": "Ma",
"server": "Server",
"server": "Szerver",
"site.blueprint": "The site has no blueprint yet. You can define the setup in <strong>/site/blueprints/site.yml</strong>",
"site.blueprint": "Ehhez a weblaphoz még nem tartozik oldalsablon. Itt hozhatod létre: <strong>/site/blueprints/site.yml</strong>",
"toolbar.button.code": "Kód",
"toolbar.button.bold": "F\u00e9lk\u00f6v\u00e9r sz\u00f6veg",
"toolbar.button.email": "Email",
"toolbar.button.headings": "Cím",
"toolbar.button.heading.1": "Cím 1",
"toolbar.button.heading.2": "Cím 2",
"toolbar.button.heading.3": "Cím 3",
"toolbar.button.heading.4": "Heading 4",
"toolbar.button.heading.5": "Heading 5",
"toolbar.button.heading.6": "Heading 6",
"toolbar.button.headings": "Címsor",
"toolbar.button.heading.1": "Címsor 1",
"toolbar.button.heading.2": "Címsor 2",
"toolbar.button.heading.3": "Címsor 3",
"toolbar.button.heading.4": "Címsor 4",
"toolbar.button.heading.5": "Címsor 5",
"toolbar.button.heading.6": "Címsor 6",
"toolbar.button.italic": "Dőlt szöveg",
"toolbar.button.file": "Fájl",
"toolbar.button.file.select": "Válassz egy fájlt",
"toolbar.button.file.upload": "Fájl feltöltése",
"toolbar.button.link": "Link",
"toolbar.button.paragraph": "Paragraph",
"toolbar.button.strike": "Strike-through",
"toolbar.button.paragraph": "Bekezdés",
"toolbar.button.strike": "Áthúzott szöveg",
"toolbar.button.ol": "Rendezett lista",
"toolbar.button.underline": "Underline",
"toolbar.button.underline": "Aláhúzott szöveg",
"toolbar.button.ul": "Rendezetlen lista",
"translation.author": "A Kirby csapata",
@@ -508,17 +510,17 @@
"translation.locale": "hu_HU",
"upload": "Feltöltés",
"upload.error.cantMove": "The uploaded file could not be moved",
"upload.error.cantWrite": "Failed to write file to disk",
"upload.error.default": "The file could not be uploaded",
"upload.error.extension": "File upload stopped by extension",
"upload.error.formSize": "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the form",
"upload.error.iniPostSize": "The uploaded file exceeds the post_max_size directive in php.ini",
"upload.error.iniSize": "The uploaded file exceeds the upload_max_filesize directive in php.ini",
"upload.error.noFile": "No file was uploaded",
"upload.error.noFiles": "No files were uploaded",
"upload.error.partial": "The uploaded file was only partially uploaded",
"upload.error.tmpDir": "Missing a temporary folder",
"upload.error.cantMove": "A feltöltött fájlt nem sikerült áthelyezni",
"upload.error.cantWrite": "Hiba a fájl lemezre írása közben",
"upload.error.default": "A fájlt nem sikerült feltölteni",
"upload.error.extension": "A fájlfeltöltés egy kiterjesztés miatt megszakadt",
"upload.error.formSize": "A feltöltendő fájl mérete nagyobb, mint az űrlap MAX_FILE_SIZE szabályában beállított érték",
"upload.error.iniPostSize": "A feltöltendő fájl mérete nagyobb, mint a php.ini post_max_size szabályában beállított érték",
"upload.error.iniSize": "A feltöltendő fájl mérete nagyobb, mint a php.ini upload_max_filesize szabályában beállított érték",
"upload.error.noFile": "Nem lett fájl feltöltve",
"upload.error.noFiles": "Nem lettek fájlok feltöltve",
"upload.error.partial": "A fájl feltöltése csak részben sikerült",
"upload.error.tmpDir": "Hiányzik egy átmeneti mappa",
"upload.errors": "Hiba",
"upload.progress": "Feltöltés...",
@@ -526,7 +528,7 @@
"url.placeholder": "https://pelda.hu",
"user": "Felhasználó",
"user.blueprint": "You can define additional sections and form fields for this user role in <strong>/site/blueprints/users/{blueprint}.yml</strong>",
"user.blueprint": "További szakaszokat és mezőket adhatsz meg ehhez a felhasználói szerepkörhöz itt: <strong>/site/blueprints/users/{blueprint}.yml</strong>",
"user.changeEmail": "Email módosítása",
"user.changeLanguage": "Nyelv módosítása",
"user.changeName": "Felhasználó átnevezése",
@@ -546,12 +548,12 @@
"view.account": "Fi\u00f3kod",
"view.installation": "Telep\u00edt\u00e9s",
"view.languages": "Nyelvek",
"view.resetPassword": "Reset password",
"view.resetPassword": "Jelszó visszaállítása",
"view.site": "Weboldal",
"view.system": "System",
"view.system": "Rendszer",
"view.users": "Felhaszn\u00e1l\u00f3k",
"welcome": "Üdvözlünk",
"year": "Év",
"yes": "yes"
"yes": "igen"
}

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Templat bawaan tidak ada",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Anda tidak diizinkan mengubah surel dari pengguna \"{name}\"",
"error.user.changeLanguage.permission": "Anda tidak diizinkan mengubah bahasa dari pengguna \"{name}\"",
"error.user.changeName.permission": "Anda tidak diizinkan mengubah nama dari pengguna \"{name}\"",

View File

@@ -116,7 +116,7 @@
"error.page.changeSlug.permission": "Þú hefur ekkert leyfi til þess að breyta slóðarforskeytinu fyrir \"{slug}\"",
"error.page.changeStatus.incomplete": "Það eru villur á síðunni og við getum ekki gefið hana út",
"error.page.changeStatus.permission": "Stöðu síðunnar var ekki hægt að breyta",
"error.page.changeStatus.toDraft.invalid": "Síðunn \"{slug}\" er ekki hægt að breyta í uppkast",
"error.page.changeStatus.toDraft.invalid": "Síðunni \"{slug}\" er ekki hægt að breyta í uppkast",
"error.page.changeTemplate.invalid": "Sniðmáti fyrir síðuna \"{slug}\" er ekki hægt að breyta",
"error.page.changeTemplate.permission": "Þú hefur engan veginn leyfi til að breyta sniðmáti fyrir síðuna \"{slug}\"",
"error.page.changeTitle.empty": "Titillinn getur ekki verið óskilgreindur",
@@ -157,6 +157,8 @@
"error.template.default.notFound": "Ekkert sjálfgefið sniðmát fannst",
"error.unexpected": "Það átti sér stað óvænt villa. Notaðu lúsarleitarhaminn (e. debug mode) til að skilja þetta betur. \nFyrir nánari upplýsingar: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Þú mátt ekkert breyta netfangi notandans \"{name}\"",
"error.user.changeLanguage.permission": "Þú hefur ekki leyfi til að breyta tungumáli notandans \"{name}\"",
"error.user.changeName.permission": "Þú mátt alls ekki breyta nafni notandans \"{name}\"",
@@ -201,7 +203,7 @@
"error.validation.ip": "Skráðu ákjósanlega IP tölu",
"error.validation.less": "Skráðu gildi lægra en {max}",
"error.validation.match": "Gildið er ekki eftir væntingum",
"error.validation.max": "Skráð gildi sem er ekki hærra en {max}",
"error.validation.max": "Skráðu gildi sem er ekki hærra en {max}",
"error.validation.maxlength": "Veldu eitthvað styttra. (hámark {max} stafir)",
"error.validation.maxwords": "Ekki skrá fleiri en {max}. orð",
"error.validation.min": "Skráðu gildi ekki lægra en {min}",
@@ -211,7 +213,7 @@
"error.validation.notcontains": "Skráðu eitthvað sem inniheldur ekki \"{needle}\"",
"error.validation.notin": "Ekki skrá neitt af þessu: ({notIn})",
"error.validation.option": "Veldu ákjósanlegan kost",
"error.validation.num": "Skráðu ákjósanlega tölu",
"error.validation.num": "Notaðu tölugildi",
"error.validation.required": "Skráðu eitthvað",
"error.validation.same": "Skráðu \"{other}\"",
"error.validation.size": "Gildið þarf að vera \"{size}\"",

View File

@@ -88,7 +88,7 @@
"error.file.mime.missing": "Il MIME type per \"{filename}\" non può essere rilevato",
"error.file.minheight": "L'immagine dev'essere alta almeno {height} pixel",
"error.file.minsize": "Il file è troppo leggero",
"error.file.minwidth": "L'immagine dev'essere larga almeno {height} pixel",
"error.file.minwidth": "L'immagine dev'essere larga almeno {width} pixel",
"error.file.name.missing": "Il nome del file non può essere vuoto",
"error.file.notFound": "Il file non \u00e8 stato trovato",
"error.file.orientation": "L'imaggine dev'essere orientata in \"{orientation}\"",
@@ -157,6 +157,8 @@
"error.template.default.notFound": "Il template \"default\" non esiste",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Non ti è permesso modificare l'indirizzo email di \"{name}\"",
"error.user.changeLanguage.permission": "Non ti è permesso modificare la lingua per l'utente \"{name}\"",
"error.user.changeName.permission": "Non ti è permesso modificare il nome dell'utente \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "기본 템플릿이 없습니다.",
"error.unexpected": "오류가 발생했습니다. 디버그 모드를 활성화해 오류를 확인하세요. https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "사용자({name})의 이메일 주소를 변경할 권한이 없습니다.",
"error.user.changeLanguage.permission": "사용자({name})의 언어를 변경할 권한이 없습니다.",
"error.user.changeName.permission": "사용자명({name})을 변경할 권한이 없습니다.",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Nėra šablono pagal nutylėjimą",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Neturite leidimo keisti vartotojo \"{name}\" el. paštą",
"error.user.changeLanguage.permission": "Neturite leidimo keisti vartotojo \"{name}\" kalbą",
"error.user.changeName.permission": "Neturite leidimo keisti vartotojo \"{name}\" vardą",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Standardmalen eksisterer ikke",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Du har ikke tillatelse til å endre e-post for brukeren \"{name}\"",
"error.user.changeLanguage.permission": "Du har ikke tillatelse til å endre språk for brukeren \"{name}\"",
"error.user.changeName.permission": "Du har ikke tillatelse til å endre navn for brukeren \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Het standaard template bestaat niet",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Je hebt geen rechten om het e-mailadres van gebruiker \"{name}\" te wijzigen",
"error.user.changeLanguage.permission": "Je hebt geen rechten om de taal voor gebruiker \"{name}\" te wijzigen",
"error.user.changeName.permission": "Je hebt geen rechten om de naam van gebruiker \"{name}\" te wijzigen",

View File

@@ -1,10 +1,10 @@
{
"account.changeName": "Change your name",
"account.delete": "Delete your account",
"account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.",
"account.changeName": "Zmień swoje imię",
"account.delete": "Usuń swoje konto",
"account.delete.confirm": "Czy na pewno chcesz usunąć swoje konto? Zostaniesz natychmiast wylogowany. Twojego konta nie da się odzyskać.",
"add": "Dodaj",
"author": "Author",
"author": "Autor",
"avatar": "Zdj\u0119cie profilowe",
"back": "Wróć",
"cancel": "Anuluj",
@@ -14,7 +14,7 @@
"collapse": "Zwiń",
"collapse.all": "Zwiń wszystkie",
"copy": "Kopiuj",
"copy.all": "Copy all",
"copy.all": "Skopiuj wszystko",
"create": "Utwórz",
"date": "Data",
@@ -29,7 +29,7 @@
"days.tue": "Wt",
"days.wed": "\u015ar",
"debugging": "Debugging",
"debugging": "Debugowanie",
"delete": "Usu\u0144",
"delete.all": "Usuń wszystkie",
@@ -49,7 +49,7 @@
"email": "Email",
"email.placeholder": "mail@example.com",
"environment": "Environment",
"environment": "Środowisko",
"error.access.code": "Nieprawidłowy kod",
"error.access.login": "Nieprawidłowy login",
@@ -102,7 +102,7 @@
"error.language.code": "Wprowadź poprawny kod języka.",
"error.language.duplicate": "Język już istnieje.",
"error.language.name": "Wprowadź poprawną nazwę języka.",
"error.language.notFound": "The language could not be found",
"error.language.notFound": "Język nie został odnaleziony",
"error.layout.validation.block": "W bloku {blockIndex} w układzie {layoutIndex} jest błąd",
"error.layout.validation.settings": "W ustawieniach układu {index} jest błąd",
@@ -111,7 +111,7 @@
"error.license.email": "Wprowadź poprawny adres email",
"error.license.verification": "Nie udało się zweryfikować licencji",
"error.offline": "The Panel is currently offline",
"error.offline": "Panel jest obecnie offline",
"error.page.changeSlug.permission": "Nie możesz zmienić końcówki adresu URL w \"{slug}\"",
"error.page.changeStatus.incomplete": "Strona zawiera błędy i nie można jej opublikować",
@@ -157,6 +157,8 @@
"error.template.default.notFound": "Domyślny szablon nie istnieje",
"error.unexpected": "Wystąpił nieoczekiwany błąd! Włącz tryb debugowania, aby uzyskać więcej informacji: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Nie masz uprawnień, by zmienić adres e-mail użytkownika \"{name}\"",
"error.user.changeLanguage.permission": "Nie masz uprawnień, by zmienić język użytkownika \"{name}\"",
"error.user.changeName.permission": "Nie masz uprawnień, by zmienić nazwę użytkownika \"{name}\"",
@@ -235,7 +237,7 @@
"field.blocks.delete.confirm.selected": "Czy na pewno chcesz usunąć wszystkie wybrane bloki?",
"field.blocks.empty": "Nie ma jeszcze żadnych bloków",
"field.blocks.fieldsets.label": "Wybierz typ bloku …",
"field.blocks.fieldsets.paste": "Press <kbd>{{ shortcut }}</kbd> to paste/import blocks from your clipboard",
"field.blocks.fieldsets.paste": "Wciśnij <kbd>{{ shortcut }}</kbd> by wkleić/zaimportować bloki ze schowka",
"field.blocks.gallery.name": "Galeria",
"field.blocks.gallery.images.empty": "Nie ma jeszcze żadnych obrazków",
"field.blocks.gallery.images.label": "Obrazki",
@@ -252,7 +254,7 @@
"field.blocks.image.placeholder": "Wybierz obrazek",
"field.blocks.image.ratio": "Proporcje",
"field.blocks.image.url": "URL obrazka",
"field.blocks.line.name": "Line",
"field.blocks.line.name": "Linijka",
"field.blocks.list.name": "Lista",
"field.blocks.markdown.name": "Markdown",
"field.blocks.markdown.label": "Tekst",
@@ -282,7 +284,7 @@
"field.structure.empty": "Nie ma jeszcze \u017cadnych wpis\u00f3w.",
"field.users.empty": "Nie wybrano jeszcze żadnych użytkowników",
"file.blueprint": "This file has no blueprint yet. You can define the setup in <strong>/site/blueprints/files/{blueprint}.yml</strong>",
"file.blueprint": "Ten plik nie ma jeszcze wzorca. Możesz go zdefiniować w <strong>/site/blueprints/files/{blueprint}.yml</strong>",
"file.delete.confirm": "Czy na pewno chcesz usunąć <br><strong>{filename}</strong>?",
"file.sort": "Zmień pozycję",
@@ -291,7 +293,7 @@
"hide": "Ukryj",
"hour": "Godzina",
"import": "Import",
"import": "Importuj",
"insert": "Wstaw",
"insert.after": "Wstaw po",
"insert.before": "Wstaw przed",
@@ -357,9 +359,9 @@
"login.code.label.password-reset": "Kod resetowania hasła",
"login.code.placeholder.email": "000 000",
"login.code.text.email": "Jeśli Twój adres email jest zarejestrowany, żądany kod został wysłany na Twoją skrzynkę.",
"login.email.login.body": "Hi {user.nameOrEmail},\n\nYou recently requested a login code for the Panel of {site}.\nThe following login code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a login code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.",
"login.email.login.body": "Cześć {user.nameOrEmail},\n\nNiedawno poprosiłaś/-eś o kod do zalogowania się do panelu strony {site}.\nPoniższy kod do zalogowania się będzie ważny przez {timeout} minut:\n\n{code}\n\nJeżeli nie zażądałaś/-eś kodu do logowania się, zignoruj tę wiadomość e-mail lub skontaktuj się z administratorem, jeśli masz pytania.\nZe względów bezpieczeństwa NIE przesyłaj dalej tego e-maila.",
"login.email.login.subject": "Twój kod logowania się",
"login.email.password-reset.body": "Hi {user.nameOrEmail},\n\nYou recently requested a password reset code for the Panel of {site}.\nThe following password reset code will be valid for {timeout} minutes:\n\n{code}\n\nIf you did not request a password reset code, please ignore this email or contact your administrator if you have questions.\nFor security, please DO NOT forward this email.",
"login.email.password-reset.body": "Cześć {user.nameOrEmail},\n\nNiedawno poprosiłaś/-eś o kod resetowania hasła do panelu strony {site}.\nPoniższy kod resetowania hasła będzie ważny przez {timeout} minut:\n\n{code}\n\nJeżeli nie zażądałaś/-eś kodu resetowania hasła, zignoruj tę wiadomość e-mail lub skontaktuj się z administratorem, jeśli masz pytania. \nZe względów bezpieczeństwa NIE przesyłaj dalej tego e-maila. ",
"login.email.password-reset.subject": "Twój kod resetujący hasło",
"login.remember": "Nie wylogowuj mnie",
"login.reset": "Zresetuj hasło",
@@ -405,7 +407,7 @@
"orientation.portrait": "Pionowa",
"orientation.square": "Kwadrat",
"page.blueprint": "This page has no blueprint yet. You can define the setup in <strong>/site/blueprints/pages/{blueprint}.yml</strong>",
"page.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w <strong>/site/blueprints/pages/{blueprint}.yml</strong>",
"page.changeSlug": "Zmie\u0144 URL",
"page.changeSlug.fromTitle": "Utw\u00f3rz na podstawie tytu\u0142u",
"page.changeStatus": "Zmień status",
@@ -437,10 +439,10 @@
"pagination.page": "Strona",
"password": "Has\u0142o",
"paste": "Paste",
"paste.after": "Paste after",
"paste": "Wklej",
"paste.after": "Wklej po",
"pixel": "Piksel",
"plugins": "Plugins",
"plugins": "Wtyczki",
"prev": "Poprzednie",
"preview": "Podgląd",
"remove": "Usuń",
@@ -477,7 +479,7 @@
"template": "Szablon",
"today": "Dzisiaj",
"server": "Server",
"server": "Serwer",
"site.blueprint": "Ta strona nie ma jeszcze wzorca. Możesz go zdefiniować w <strong>/site/blueprints/site.yml</strong>",
@@ -488,15 +490,15 @@
"toolbar.button.heading.1": "Nagłówek 1",
"toolbar.button.heading.2": "Nagłówek 2",
"toolbar.button.heading.3": "Nagłówek 3",
"toolbar.button.heading.4": "Heading 4",
"toolbar.button.heading.5": "Heading 5",
"toolbar.button.heading.6": "Heading 6",
"toolbar.button.heading.4": "Nagłówek 4",
"toolbar.button.heading.5": "Nagłówek 5",
"toolbar.button.heading.6": "Nagłówek 6",
"toolbar.button.italic": "Kursywa",
"toolbar.button.file": "Plik",
"toolbar.button.file.select": "Wybierz plik",
"toolbar.button.file.upload": "Prześlij plik",
"toolbar.button.link": "Link",
"toolbar.button.paragraph": "Paragraph",
"toolbar.button.paragraph": "Akapit",
"toolbar.button.strike": "Przekreślenie",
"toolbar.button.ol": "Lista numerowana",
"toolbar.button.underline": "Podkreślenie",
@@ -526,7 +528,7 @@
"url.placeholder": "https://example.com",
"user": "Użytkownik",
"user.blueprint": "You can define additional sections and form fields for this user role in <strong>/site/blueprints/users/{blueprint}.yml</strong>",
"user.blueprint": "Możesz zdefiniować dodatkowe sekcje i pola dla użytkownika o takiej roli w <strong>/site/blueprints/users/{blueprint}.yml</strong>",
"user.changeEmail": "Zmień email",
"user.changeLanguage": "Zmień język",
"user.changeName": "Zmień nazwę tego użytkownika",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "O tema padrão não existe",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Você não tem permissão para alterar o email do usuário \"{name}\"",
"error.user.changeLanguage.permission": "Você não tem permissão para alterar o idioma do usuário \"{name}\"",
"error.user.changeName.permission": "Você não tem permissão para alterar o nome do usuário \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "O tema padrão não existe",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Não tem permissões para alterar o email do utilizador \"{name}\"",
"error.user.changeLanguage.permission": "Não tem permissões para alterar o idioma do utilizador \"{name}\"",
"error.user.changeName.permission": "Não tem permissões para alterar o nome do utilizador \"{name}\"",

View File

@@ -1,7 +1,7 @@
{
"account.changeName": "Change your name",
"account.delete": "Delete your account",
"account.delete.confirm": "Do you really want to delete your account? You will be logged out immediately. Your account cannot be recovered.",
"account.changeName": "Изменить имя",
"account.delete": "Удалить аккаунт",
"account.delete.confirm": "Вы действительно хотите удалить свой аккаунт? Вы сразу покинете панель управления, а аккаунт нельзя будет восстановить.",
"add": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c",
"author": "Автор",
@@ -74,7 +74,7 @@
"error.field.converter.invalid": "Неверный конвертер \"{converter}\"",
"error.file.changeName.empty": "Название не может быть пустым",
"error.file.changeName.permission": "У вас нет права поменять название \"{filename}\"",
"error.file.changeName.permission": "У вас нет права изменить название \"{filename}\"",
"error.file.duplicate": "Файл с названием \"{filename}\" уже есть",
"error.file.extension.forbidden": "Расширение файла \"{extension}\" неразрешено",
"error.file.extension.invalid": "Неверное разрешение: {extension}",
@@ -111,16 +111,16 @@
"error.license.email": "Пожалуйста, введите правильный Email",
"error.license.verification": "Лицензия не подтверждена",
"error.offline": "The Panel is currently offline",
"error.offline": "Панель управления не в сети",
"error.page.changeSlug.permission": "\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c URL \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b",
"error.page.changeStatus.incomplete": "На странице есть ошибки и поэтому ее нельзя опубликовать",
"error.page.changeStatus.permission": "Невозможно поменять статус для этой страницы",
"error.page.changeStatus.permission": "Невозможно изменить статус для этой страницы",
"error.page.changeStatus.toDraft.invalid": "Невозможно конвертировать в черновик страницу \"{slug}\"",
"error.page.changeTemplate.invalid": "Невозможно поменять шаблон страницы \"{slug}\"",
"error.page.changeTemplate.permission": "У вас нет права поменять шаблон для \"{slug}\"",
"error.page.changeTemplate.invalid": "Невозможно изменить шаблон страницы \"{slug}\"",
"error.page.changeTemplate.permission": "У вас нет права изменять шаблон для \"{slug}\"",
"error.page.changeTitle.empty": "Название не может быть пустым",
"error.page.changeTitle.permission": "у вас нет права поменять название \"{slug}\"",
"error.page.changeTitle.permission": "у вас нет права изменять название \"{slug}\"",
"error.page.create.permission": "У вас нет права создать \"{slug}\"",
"error.page.delete": "Невозможно удалить страницу \"{slug}\"",
"error.page.delete.confirm": "Впишите название страницы чтобы подтвердить",
@@ -152,17 +152,19 @@
"error.section.type.invalid": "Тип секции {type} неверный",
"error.site.changeTitle.empty": "Название не может быть пустым",
"error.site.changeTitle.permission": "У вас нет права поменять название сайта",
"error.site.changeTitle.permission": "У вас нет права изменять название сайта",
"error.site.update.permission": "У вас нет права обновить сайт",
"error.template.default.notFound": "Нет шаблона по умолчанию",
"error.user.changeEmail.permission": "У вас нет права поменять эл. почту пользователя \"{name}\"",
"error.user.changeLanguage.permission": "У вас нет права поменять язык для пользователя \"{name}\"",
"error.user.changeName.permission": "У вас нет права поменять имя пользователя \"{name}\"",
"error.user.changePassword.permission": "У вас нет права поменять пароль для пользователя \"{name}\"",
"error.user.changeRole.lastAdmin": "Роль единственного администратора нельзя поменять",
"error.user.changeRole.permission": "У вас нет права поменять поль для пользователя \"{name}\"",
"error.unexpected": "Произошла непредвиденная ошибка! Включите режим отладки для получения дополнительной информации: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "У вас нет права изменять Email пользователя \"{name}\"",
"error.user.changeLanguage.permission": "У вас нет права изменять язык для пользователя \"{name}\"",
"error.user.changeName.permission": "У вас нет права изменять имя пользователя \"{name}\"",
"error.user.changePassword.permission": "У вас нет права изменять пароль для пользователя \"{name}\"",
"error.user.changeRole.lastAdmin": "Роль единственного администратора нельзя изменить",
"error.user.changeRole.permission": "У вас нет права изменять роль пользователя \"{name}\"",
"error.user.changeRole.toAdmin": "У вас нет прав предоставить роль администратора",
"error.user.create.permission": "У вас нет права создать этого пользователя",
"error.user.delete": "\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d",
@@ -411,7 +413,7 @@
"page.changeStatus": "Изменить статус",
"page.changeStatus.position": "Пожалуйста, выберите позицию",
"page.changeStatus.select": "Выбрать новый статус",
"page.changeTemplate": "Поменять шаблон",
"page.changeTemplate": "Изменить шаблон",
"page.delete.confirm": "Вы точно хотите удалить страницу <strong>{title}</strong>?",
"page.delete.confirm.subpages": "<strong>У этой страницы есть внутренние страницы</strong>.<br>Все внутренние страницы так же будут удалены.",
"page.delete.confirm.title": "Напишите название страницы, чтобы подтвердить",
@@ -527,13 +529,13 @@
"user": "Пользователь",
"user.blueprint": "Вы можете определить новые секции и поля разметки для пользователя в <strong>/site/blueprints/users/{blueprint}.yml</strong>",
"user.changeEmail": "Поменять Email",
"user.changeLanguage": "Поменять язык",
"user.changeEmail": "Изменить Email",
"user.changeLanguage": "Изменить язык",
"user.changeName": "Переназвать этого пользователя",
"user.changePassword": "Поменять пароль",
"user.changePassword": "Изменить пароль",
"user.changePassword.new": "Новый пароль",
"user.changePassword.new.confirm": "Подтвердить новый пароль…",
"user.changeRole": "Поменять роль",
"user.changeRole": "Изменить роль",
"user.changeRole.select": "Выбрать новую роль",
"user.create": "Добавить нового пользователя",
"user.delete": "Удалить этого пользователя",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Predvolená šablóna neexistuje",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Nemáte povolenie na zmenu e-mailu pre užívateľa \"{name}\"",
"error.user.changeLanguage.permission": "Nemáte povolenie na zmenu jazyka pre užívateľa \"{name}\"",
"error.user.changeName.permission": "Nemáte povolenie na zmenu mena pre užívateľa \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Standardmallen existerar inte",
"error.unexpected": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "Du har inte behörighet att ändra e-postadressen för användaren \"{name}\"",
"error.user.changeLanguage.permission": "Du har inte behörighet att ändra språket för användaren \"{name}\"",
"error.user.changeName.permission": "Du har inte behörighet att ändra namnet för användaren \"{name}\"",

View File

@@ -157,6 +157,8 @@
"error.template.default.notFound": "Varsayılan şablon yok",
"error.unexpected": "Beklenmeyen bir hata oluştu! Daha fazla bilgi için hata ayıklama modunu etkinleştirin: https://getkirby.com/docs/reference/system/options/debug",
"error.user.changeEmail.permission": "\"{name}\" kullanıcısı için e-postayı değiştiremezsiniz",
"error.user.changeLanguage.permission": "\"{name}\" kullanıcısının dilini değiştiremezsin",
"error.user.changeName.permission": "\"{name}\" kullanıcısının adını değiştiremezsiniz",

File diff suppressed because one or more lines are too long

View File

@@ -422,6 +422,12 @@
<symbol id="icon-mobile" viewBox="0 0 16 16">
<path d="M12,0H4C2.897,0,2,0.897,2,2v12c0,1.103,0.897,2,2,2h8c1.103,0,2-0.897,2-2V2C14,0.897,13.103,0,12,0z M8,14 c-0.552,0-1-0.448-1-1s0.448-1,1-1s1,0.448,1,1S8.552,14,8,14z M12,10H4V2h8V10z" />
</symbol>
<symbol id="icon-moon" viewBox="0 0 16 16">
<path d="M5.2,2C2.2,2.8,0,5.6,0,8.9C0,12.8,3.2,16,7.1,16c3.3,0,6-2.2,6.9-5.2C8.7,12.2,3.8,7.3,5.2,2z" />
<circle cx="10" cy="1" r="1" />
<circle cx="15" cy="7" r="1" />
<circle cx="10" cy="6" r="1" />
</symbol>
<symbol id="icon-open" viewBox="0 0 16 16">
<path d="M8 7l-4 4h3v5h2v-5h3z" />
<path d="M0 1v12a1 1 0 0 0 1 1h4v-2H2V6h12v6h-3v2h4a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1zm2 3V2h12v2H2z" />

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -55,7 +55,7 @@ export default defineConfig(({ command }) => {
minify: "terser",
cssCodeSplit: false,
rollupOptions: {
input: "/src/index.js",
input: "./src/index.js",
output: {
entryFileNames: "js/[name].js",
chunkFileNames: "js/[name].js",
@@ -95,6 +95,18 @@ export default defineConfig(({ command }) => {
"/media": proxy
},
...custom
},
test: {
environment: "jsdom",
include: ["**/*.test.js"],
coverage: {
all: true,
exclude: ["**/*.e2e.js", "**/*.test.js"],
extension: ["js", "vue"],
src: "src",
reporter: ["text", "lcov"]
},
setupFiles: ["vitest.setup.js"]
}
};
});

4
kirby/panel/vitest.setup.js Executable file
View File

@@ -0,0 +1,4 @@
import Vue from "vue";
Vue.config.productionTip = false;
Vue.config.devtools = false;

View File

@@ -771,9 +771,10 @@ class App
*/
public function kirbytags(string $text = null, array $data = []): string
{
$data['kirby'] = $data['kirby'] ?? $this;
$data['site'] = $data['site'] ?? $data['kirby']->site();
$data['parent'] = $data['parent'] ?? $data['site']->page();
$data['kirby'] ??= $this;
$data['site'] ??= $data['kirby']->site();
$data['parent'] ??= $data['site']->page();
$options = $this->options;
$text = $this->apply('kirbytags:before', compact('text', 'data', 'options'), 'text');
@@ -789,14 +790,23 @@ class App
* @internal
* @param string|null $text
* @param array $data
* @param bool $inline
* @param bool $inline (deprecated: use $data['markdown']['inline'] instead)
* @return string
* @todo add deprecation warning for $inline parameter in 3.7.0
* @todo rename $data parameter to $options in 3.7.0
* @todo remove $inline parameter in in 3.8.0
*/
public function kirbytext(string $text = null, array $data = [], bool $inline = false): string
{
$options = A::merge([
'markdown' => [
'inline' => $inline
]
], $data);
$text = $this->apply('kirbytext:before', compact('text'), 'text');
$text = $this->kirbytags($text, $data);
$text = $this->markdown($text, $inline);
$text = $this->kirbytags($text, $options);
$text = $this->markdown($text, $options['markdown']);
if ($this->option('smartypants', false) !== false) {
$text = $this->smartypants($text);
@@ -890,12 +900,31 @@ class App
*
* @internal
* @param string|null $text
* @param bool $inline
* @param bool|array $options
* @return string
* @todo rename $inline parameter to $options in 3.7.0
* @todo add deprecation warning for boolean $options in 3.7.0
* @todo remove boolean $options in in 3.8.0
*/
public function markdown(string $text = null, bool $inline = false): string
public function markdown(string $text = null, $inline = null): string
{
return ($this->component('markdown'))($this, $text, $this->options['markdown'] ?? [], $inline);
// TODO: remove after renaming parameter
$options = $inline;
// support for the old syntax to enable inline mode as second argument
if (is_bool($options) === true) {
$options = [
'inline' => $options
];
}
// merge global options with local options
$options = array_merge(
$this->options['markdown'] ?? [],
(array)$options
);
return ($this->component('markdown'))($this, $text, $options);
}
/**

View File

@@ -3,6 +3,7 @@
namespace Kirby\Cms;
use Kirby\Http\Response;
use Kirby\Toolkit\I18n;
use Whoops\Handler\CallbackHandler;
use Whoops\Handler\Handler;
use Whoops\Handler\PlainTextHandler;
@@ -136,7 +137,7 @@ trait AppErrors
'status' => 'error',
'code' => $code,
'details' => $details,
'message' => 'An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug',
'message' => I18n::translate('error.unexpected'),
], $httpCode);
}

View File

@@ -333,8 +333,6 @@ class Collection extends BaseCollection
*/
public function toArray(Closure $map = null): array
{
return parent::toArray($map ?? function ($object) {
return $object->toArray();
});
return parent::toArray($map ?? fn ($object) => $object->toArray());
}
}

View File

@@ -322,98 +322,32 @@ class Core
public function roots(): array
{
return $this->cache['roots'] ??= [
// kirby
'kirby' => function (array $roots) {
return dirname(__DIR__, 2);
},
'kirby' => fn (array $roots) => dirname(__DIR__, 2),
'i18n' => fn (array $roots) => $roots['kirby'] . '/i18n',
'i18n:translations' => fn (array $roots) => $roots['i18n'] . '/translations',
'i18n:rules' => fn (array $roots) => $roots['i18n'] . '/rules',
// i18n
'i18n' => function (array $roots) {
return $roots['kirby'] . '/i18n';
},
'i18n:translations' => function (array $roots) {
return $roots['i18n'] . '/translations';
},
'i18n:rules' => function (array $roots) {
return $roots['i18n'] . '/rules';
},
// index
'index' => function (array $roots) {
return dirname(__DIR__, 3);
},
// assets
'assets' => function (array $roots) {
return $roots['index'] . '/assets';
},
// content
'content' => function (array $roots) {
return $roots['index'] . '/content';
},
// media
'media' => function (array $roots) {
return $roots['index'] . '/media';
},
// panel
'panel' => function (array $roots) {
return $roots['kirby'] . '/panel';
},
// site
'site' => function (array $roots) {
return $roots['index'] . '/site';
},
'accounts' => function (array $roots) {
return $roots['site'] . '/accounts';
},
'blueprints' => function (array $roots) {
return $roots['site'] . '/blueprints';
},
'cache' => function (array $roots) {
return $roots['site'] . '/cache';
},
'collections' => function (array $roots) {
return $roots['site'] . '/collections';
},
'config' => function (array $roots) {
return $roots['site'] . '/config';
},
'controllers' => function (array $roots) {
return $roots['site'] . '/controllers';
},
'languages' => function (array $roots) {
return $roots['site'] . '/languages';
},
'license' => function (array $roots) {
return $roots['config'] . '/.license';
},
'logs' => function (array $roots) {
return $roots['site'] . '/logs';
},
'models' => function (array $roots) {
return $roots['site'] . '/models';
},
'plugins' => function (array $roots) {
return $roots['site'] . '/plugins';
},
'sessions' => function (array $roots) {
return $roots['site'] . '/sessions';
},
'snippets' => function (array $roots) {
return $roots['site'] . '/snippets';
},
'templates' => function (array $roots) {
return $roots['site'] . '/templates';
},
// blueprints
'roles' => function (array $roots) {
return $roots['blueprints'] . '/users';
},
'index' => fn (array $roots) => dirname(__DIR__, 3),
'assets' => fn (array $roots) => $roots['index'] . '/assets',
'content' => fn (array $roots) => $roots['index'] . '/content',
'media' => fn (array $roots) => $roots['index'] . '/media',
'panel' => fn (array $roots) => $roots['kirby'] . '/panel',
'site' => fn (array $roots) => $roots['index'] . '/site',
'accounts' => fn (array $roots) => $roots['site'] . '/accounts',
'blueprints' => fn (array $roots) => $roots['site'] . '/blueprints',
'cache' => fn (array $roots) => $roots['site'] . '/cache',
'collections' => fn (array $roots) => $roots['site'] . '/collections',
'config' => fn (array $roots) => $roots['site'] . '/config',
'controllers' => fn (array $roots) => $roots['site'] . '/controllers',
'languages' => fn (array $roots) => $roots['site'] . '/languages',
'license' => fn (array $roots) => $roots['config'] . '/.license',
'logs' => fn (array $roots) => $roots['site'] . '/logs',
'models' => fn (array $roots) => $roots['site'] . '/models',
'plugins' => fn (array $roots) => $roots['site'] . '/plugins',
'sessions' => fn (array $roots) => $roots['site'] . '/sessions',
'snippets' => fn (array $roots) => $roots['site'] . '/snippets',
'templates' => fn (array $roots) => $roots['site'] . '/templates',
'roles' => fn (array $roots) => $roots['blueprints'] . '/users',
];
}
@@ -518,12 +452,8 @@ class Core
public function urls(): array
{
return $this->cache['urls'] ??= [
'index' => function () {
return Url::index();
},
'base' => function (array $urls) {
return rtrim($urls['index'], '/');
},
'index' => fn () => Url::index(),
'base' => fn (array $urls) => rtrim($urls['index'], '/'),
'current' => function (array $urls) {
$path = trim($this->kirby->path(), '/');
@@ -533,18 +463,10 @@ class Core
return $urls['base'] . '/' . $path;
}
},
'assets' => function (array $urls) {
return $urls['base'] . '/assets';
},
'api' => function (array $urls) {
return $urls['base'] . '/' . $this->kirby->option('api.slug', 'api');
},
'media' => function (array $urls) {
return $urls['base'] . '/media';
},
'panel' => function (array $urls) {
return $urls['base'] . '/' . $this->kirby->option('panel.slug', 'panel');
}
'assets' => fn (array $urls) => $urls['base'] . '/assets',
'api' => fn (array $urls) => $urls['base'] . '/' . $this->kirby->option('api.slug', 'api'),
'media' => fn (array $urls) => $urls['base'] . '/media',
'panel' => fn (array $urls) => $urls['base'] . '/' . $this->kirby->option('panel.slug', 'panel')
];
}
}

View File

@@ -90,9 +90,11 @@ trait FileActions
*/
public function changeSort(int $sort)
{
return $this->commit('changeSort', ['file' => $this, 'position' => $sort], function ($file, $sort) {
return $file->save(['sort' => $sort]);
});
return $this->commit(
'changeSort',
['file' => $this, 'position' => $sort],
fn ($file, $sort) => $file->save(['sort' => $sort])
);
}
/**

View File

@@ -135,11 +135,14 @@ class Files extends Collection
* human-readable format
* @since 3.6.0
*
* @param string|null|false $locale Locale for number formatting,
* `null` for the current locale,
* `false` to disable number formatting
* @return string
*/
public function niceSize(): string
public function niceSize($locale = null): string
{
return F::niceSize($this->size());
return F::niceSize($this->size(), $locale);
}
/**
@@ -151,9 +154,7 @@ class Files extends Collection
*/
public function size(): int
{
return F::size($this->values(function ($file) {
return $file->root();
}));
return F::size($this->values(fn ($file) => $file->root()));
}
/**

View File

@@ -26,8 +26,6 @@ class NestCollection extends BaseCollection
*/
public function toArray(Closure $map = null): array
{
return parent::toArray($map ?? function ($object) {
return $object->toArray();
});
return parent::toArray($map ?? fn ($object) => $object->toArray());
}
}

View File

@@ -201,9 +201,11 @@ trait PageActions
protected function changeStatusToDraft()
{
$arguments = ['page' => $this, 'status' => 'draft', 'position' => null];
$page = $this->commit('changeStatus', $arguments, function ($page) {
return $page->unpublish();
});
$page = $this->commit(
'changeStatus',
$arguments,
fn ($page) => $page->unpublish()
);
return $page;
}
@@ -755,9 +757,7 @@ trait PageActions
->children()
->listed()
->append($this)
->filter(function ($page) {
return $page->blueprint()->num() === 'default';
});
->filter(fn ($page) => $page->blueprint()->num() === 'default');
// get a non-associative array of ids
$keys = $siblings->keys();
@@ -804,9 +804,7 @@ trait PageActions
->children()
->listed()
->not($this)
->filter(function ($page) {
return $page->blueprint()->num() === 'default';
});
->filter(fn ($page) => $page->blueprint()->num() === 'default');
if ($siblings->count() > 0) {
foreach ($siblings as $sibling) {

View File

@@ -110,7 +110,7 @@ trait PageSiblings
*/
public function prevUnlisted($collection = null)
{
return $this->prevAll($collection)->unlisted()->first();
return $this->prevAll($collection)->unlisted()->last();
}
/**

View File

@@ -205,6 +205,10 @@ class Pages extends Collection
*/
public function findById(string $id = null)
{
if ($id === null) {
return null;
}
// remove trailing or leading slashes
$id = trim($id, '/');

View File

@@ -482,11 +482,14 @@ class Dir
* Returns a nicely formatted size of all the contents of the folder
*
* @param string $dir The path of the directory
* @param string|null|false $locale Locale for number formatting,
* `null` for the current locale,
* `false` to disable number formatting
* @return mixed
*/
public static function niceSize(string $dir)
public static function niceSize(string $dir, $locale = null)
{
return F::niceSize(static::size($dir));
return F::niceSize(static::size($dir), $locale);
}
/**
@@ -513,9 +516,7 @@ class Dir
// add absolute paths
if ($absolute === true) {
$result = array_map(function ($item) use ($dir) {
return $dir . '/' . $item;
}, $result);
$result = array_map(fn ($item) => $dir . '/' . $item, $result);
}
return $result;

View File

@@ -756,9 +756,11 @@ class F
public static function size($file): int
{
if (is_array($file) === true) {
return array_reduce($file, function ($total, $file) {
return $total + F::size($file);
}, 0);
return array_reduce(
$file,
fn ($total, $file) => $total + F::size($file),
0
);
}
try {

View File

@@ -306,9 +306,11 @@ class File
// determine if any pattern matches the MIME type;
// once any pattern matches, `$carry` is `true` and the rest is skipped
$matches = array_reduce($rules['mime'], function ($carry, $pattern) use ($mime) {
return $carry || Mime::matches($mime, $pattern);
}, false);
$matches = array_reduce(
$rules['mime'],
fn ($carry, $pattern) => $carry || Mime::matches($mime, $pattern),
false
);
if ($matches !== true) {
throw new Exception([
@@ -416,11 +418,14 @@ class File
* Returns the file size in a
* human-readable format
*
* @param string|null|false $locale Locale for number formatting,
* `null` for the current locale,
* `false` to disable number formatting
* @return string
*/
public function niceSize(): string
public function niceSize($locale = null): string
{
return F::niceSize($this->root);
return F::niceSize($this->root, $locale);
}
/**

View File

@@ -142,9 +142,7 @@ class BlocksField extends FieldClass
return [
[
'pattern' => 'uuid',
'action' => function () {
return ['uuid' => uuid()];
}
'action' => fn () => ['uuid' => uuid()]
],
[
'pattern' => 'paste',

View File

@@ -84,13 +84,11 @@ class LayoutField extends BlocksField
return Layout::factory([
'attrs' => $attrs,
'columns' => array_map(function ($width) {
return [
'columns' => array_map(fn ($width) => [
'blocks' => [],
'id' => uuid(),
'width' => $width,
];
}, $columns)
], $columns)
])->toArray();
},
];

View File

@@ -376,9 +376,7 @@ class Form
{
$array = [
'errors' => $this->errors(),
'fields' => $this->fields->toArray(function ($item) {
return $item->toArray();
}),
'fields' => $this->fields->toArray(fn ($item) => $item->toArray()),
'invalid' => $this->isInvalid()
];

View File

@@ -77,13 +77,13 @@ class Url
/**
* Tries to fix a broken url without protocol
*
* @param string $url
* @param string|null $url
* @return string
*/
public static function fix(string $url = null): string
{
// make sure to not touch absolute urls
return (!preg_match('!^(https|http|ftp)\:\/\/!i', $url)) ? 'http://' . $url : $url;
return (!preg_match('!^(https|http|ftp)\:\/\/!i', $url ?? '')) ? 'http://' . $url : $url;
}
/**
@@ -111,7 +111,7 @@ class Url
/**
* Checks if an URL is absolute
*
* @param string $url
* @param string|null $url
* @return bool
*/
public static function isAbsolute(string $url = null): bool
@@ -120,14 +120,14 @@ class Url
// //example.com/uri
// http://example.com/uri, https://example.com/uri, ftp://example.com/uri
// mailto:example@example.com, geo:49.0158,8.3239?z=11
return preg_match('!^(//|[a-z0-9+-.]+://|mailto:|tel:|geo:)!i', $url) === 1;
return $url !== null && preg_match('!^(//|[a-z0-9+-.]+://|mailto:|tel:|geo:)!i', $url) === 1;
}
/**
* Convert a relative path into an absolute URL
*
* @param string $path
* @param string $home
* @param string|null $path
* @param string|null $home
* @return string
*/
public static function makeAbsolute(string $path = null, string $home = null): string

View File

@@ -42,7 +42,7 @@ class ImageMagick extends Darkroom
protected function blur(string $file, array $options)
{
if ($options['blur'] !== false) {
return '-blur 0x' . $options['blur'];
return '-blur ' . escapeshellarg('0x' . $options['blur']);
}
}
@@ -69,7 +69,13 @@ class ImageMagick extends Darkroom
*/
protected function convert(string $file, array $options): string
{
return sprintf($options['bin'] . ' "%s"', $file);
$command = escapeshellarg($options['bin']);
// limit to single-threading to keep CPU usage sane
$command .= ' -limit thread 1';
// append input file
return $command . ' ' . escapeshellarg($file);
}
/**
@@ -162,7 +168,7 @@ class ImageMagick extends Darkroom
*/
protected function quality(string $file, array $options): string
{
return '-quality ' . $options['quality'];
return '-quality ' . escapeshellarg($options['quality']);
}
/**
@@ -177,7 +183,7 @@ class ImageMagick extends Darkroom
{
// simple resize
if ($options['crop'] === false) {
return sprintf('-thumbnail %sx%s!', $options['width'], $options['height']);
return '-thumbnail ' . escapeshellarg(sprintf('%sx%s!', $options['width'], $options['height']));
}
$gravities = [
@@ -195,15 +201,15 @@ class ImageMagick extends Darkroom
// translate the gravity option into something imagemagick understands
$gravity = $gravities[$options['crop']] ?? 'Center';
$command = sprintf('-thumbnail %sx%s^', $options['width'], $options['height']);
$command .= sprintf(' -gravity %s -crop %sx%s+0+0', $gravity, $options['width'], $options['height']);
$command = '-thumbnail ' . escapeshellarg(sprintf('%sx%s^', $options['width'], $options['height']));
$command .= ' -gravity ' . escapeshellarg($gravity);
$command .= ' -crop ' . escapeshellarg(sprintf('%sx%s+0+0', $options['width'], $options['height']));
return $command;
}
/**
* Makes sure to not process too many images at once
* which could crash the server
* Creates the option for the output file
*
* @param string $file
* @param array $options
@@ -215,7 +221,7 @@ class ImageMagick extends Darkroom
$file = pathinfo($file, PATHINFO_DIRNAME) . '/' . pathinfo($file, PATHINFO_FILENAME) . '.' . $options['format'];
}
return sprintf('-limit thread 1 "%s"', $file);
return escapeshellarg($file);
}
/**

View File

@@ -285,12 +285,12 @@ class Dimensions
if ($xml !== false) {
$attr = $xml->attributes();
$width = (float)($attr->width);
$height = (float)($attr->height);
if (($width === 0.0 || $height === 0.0) && empty($attr->viewBox) === false) {
$width = (int)($attr->width);
$height = (int)($attr->height);
if (($width === 0 || $height === 0) && empty($attr->viewBox) === false) {
$box = explode(' ', $attr->viewBox);
$width = (float)($box[2] ?? 0);
$height = (float)($box[3] ?? 0);
$width = (int)($box[2] ?? 0);
$height = (int)($box[3] ?? 0);
}
}

View File

@@ -3,6 +3,7 @@
namespace Kirby\Panel;
use Kirby\Exception\Exception;
use Kirby\Exception\InvalidArgumentException;
use Kirby\Filesystem\Dir;
use Kirby\Filesystem\F;
use Kirby\Http\Response;
@@ -65,22 +66,9 @@ class Document
'css' => [
'index' => $url . '/css/style.css',
'plugins' => $plugins->url('css'),
'custom' => static::customCss(),
'custom' => static::customAsset('panel.css'),
],
'icons' => $kirby->option('panel.favicon', [
'apple-touch-icon' => [
'type' => 'image/png',
'url' => $url . '/apple-touch-icon.png',
],
'shortcut icon' => [
'type' => 'image/svg+xml',
'url' => $url . '/favicon.svg',
],
'alternate icon' => [
'type' => 'image/png',
'url' => $url . '/favicon.png',
]
]),
'icons' => static::favicon($url),
'js' => [
'vendor' => [
'nonce' => $nonce,
@@ -99,7 +87,7 @@ class Document
],
'custom' => [
'nonce' => $nonce,
'src' => static::customJs(),
'src' => static::customAsset('panel.js'),
'type' => 'module'
],
'index' => [
@@ -139,15 +127,17 @@ class Document
}
/**
* Check for a custom css file from the
* config (panel.css)
* Check for a custom asset file from the
* config (e.g. panel.css or panel.js)
* @since 3.6.2
*
* @param string $option asset option name
* @return string|null
*/
public static function customCss(): ?string
public static function customAsset(string $option): ?string
{
if ($css = kirby()->option('panel.css')) {
$asset = asset($css);
if ($path = kirby()->option($option)) {
$asset = asset($path);
if ($asset->exists() === true) {
return $asset->url() . '?' . $asset->modified();
@@ -158,22 +148,64 @@ class Document
}
/**
* Check for a custom js file from the
* config (panel.js)
*
* @return string|null
* @deprecated 3.7.0 Use `Document::customAsset('panel.css)` instead
* @todo add deprecation warning in 3.7.0, remove in 3.8.0
*/
public static function customCss(): ?string
{
return static::customAsset('panel.css');
}
/**
* @deprecated 3.7.0 Use `Document::customAsset('panel.js)` instead
* @todo add deprecation warning in 3.7.0, remove in 3.8.0
*/
public static function customJs(): ?string
{
if ($js = kirby()->option('panel.js')) {
$asset = asset($js);
if ($asset->exists() === true) {
return $asset->url() . '?' . $asset->modified();
}
return static::customAsset('panel.js');
}
return null;
/**
* Returns array of favion icons
* based on config option
* @since 3.6.2
*
* @param string $url URL prefix for default icons
* @return array
*/
public static function favicon(string $url = ''): array
{
$kirby = kirby();
$icons = $kirby->option('panel.favicon', [
'apple-touch-icon' => [
'type' => 'image/png',
'url' => $url . '/apple-touch-icon.png',
],
'shortcut icon' => [
'type' => 'image/svg+xml',
'url' => $url . '/favicon.svg',
],
'alternate icon' => [
'type' => 'image/png',
'url' => $url . '/favicon.png',
]
]);
if (is_array($icons) === true) {
return $icons;
}
// make sure to convert favicon string to array
if (is_string($icons) === true) {
return [
'shortcut icon' => [
'type' => F::mime($icons),
'url' => $icons,
]
];
}
throw new InvalidArgumentException('Invalid panel.favicon option');
}
/**

View File

@@ -38,12 +38,10 @@ class File extends Model
}
break;
case 'page':
$breadcrumb = $this->model->parents()->flip()->values(function ($parent) {
return [
$breadcrumb = $this->model->parents()->flip()->values(fn ($parent) => [
'label' => $parent->title()->toString(),
'link' => $parent->panel()->url(true),
];
});
]);
}
// add the file
@@ -459,9 +457,7 @@ class File extends Model
$file = $this->model;
return [
'breadcrumb' => function () use ($file): array {
return $file->panel()->breadcrumb();
},
'breadcrumb' => fn (): array => $file->panel()->breadcrumb(),
'component' => 'k-file-view',
'props' => $this->props(),
'search' => 'files',

View File

@@ -22,12 +22,10 @@ class Page extends Model
public function breadcrumb(): array
{
$parents = $this->model->parents()->flip()->merge($this->model);
return $parents->values(function ($parent) {
return [
return $parents->values(fn ($parent) => [
'label' => $parent->title()->toString(),
'link' => $parent->panel()->url(true),
];
});
]);
}
/**

View File

@@ -353,11 +353,9 @@ class Panel
[
'pattern' => 'browser',
'auth' => false,
'action' => function () use ($kirby) {
return new Response(
'action' => fn () => new Response(
Tpl::load($kirby->root('kirby') . '/views/browser.php')
);
},
),
]
];
@@ -382,17 +380,14 @@ class Panel
'installation',
'login',
],
'action' => function () {
Panel::go(Home::url());
}
'action' => fn () => Panel::go(Home::url()),
'auth' => false
];
// catch all route
$routes[] = [
'pattern' => '(:all)',
'action' => function () {
return 'The view could not be found';
}
'action' => fn () => 'The view could not be found'
];
return $routes;
@@ -420,9 +415,7 @@ class Panel
'pattern' => $pattern,
'type' => 'dialog',
'area' => $areaId,
'action' => $dialog['load'] ?? function () {
return 'The load handler for your dialog is missing';
},
'action' => $dialog['load'] ?? fn () => 'The load handler for your dialog is missing'
];
// submit event
@@ -431,9 +424,7 @@ class Panel
'type' => 'dialog',
'area' => $areaId,
'method' => 'POST',
'action' => $dialog['submit'] ?? function () {
return 'Your dialog does not define a submit handler';
}
'action' => $dialog['submit'] ?? fn () => 'Your dialog does not define a submit handler'
];
}

View File

@@ -178,15 +178,13 @@ class View
},
'$languages' => function () use ($kirby, $multilang): array {
if ($multilang === true) {
return $kirby->languages()->values(function ($language) {
return [
return $kirby->languages()->values(fn ($language) => [
'code' => $language->code(),
'default' => $language->isDefault(),
'direction' => $language->direction(),
'name' => $language->name(),
'rules' => $language->rules(),
];
});
]);
}
return [];
@@ -315,12 +313,10 @@ class View
'name' => $translation->name(),
];
},
'$urls' => function () use ($kirby) {
return [
'$urls' => fn () => [
'api' => $kirby->url('api'),
'site' => $kirby->url('index')
];
}
]
];
}
@@ -401,10 +397,6 @@ class View
*/
public static function response($data, array $options = [])
{
$kirby = kirby();
$area = $options['area'] ?? [];
$areas = $options['areas'] ?? [];
// handle redirects
if (is_a($data, 'Kirby\Panel\Redirect') === true) {
return Response::redirect($data->location(), $data->code());

View File

@@ -49,6 +49,6 @@ class KirbyTags
return $match[0];
}
}, $text);
}, $text ?? '');
}
}

View File

@@ -37,8 +37,9 @@ class Markdown
public function defaults(): array
{
return [
'breaks' => true,
'extra' => false,
'breaks' => true
'safe' => false
];
}
@@ -69,6 +70,7 @@ class Markdown
}
$parser->setBreaksEnabled($this->options['breaks']);
$parser->setSafeMode($this->options['safe']);
if ($inline === true) {
return @$parser->line($text);

View File

@@ -121,7 +121,7 @@ class SmartyPants
public function parse(string $text = null): string
{
// prepare the text
$text = str_replace('&quot;', '"', $text);
$text = str_replace('&quot;', '"', $text ?? '');
// parse the text
return $this->parser->transform($text);

531
kirby/src/Toolkit/Date.php Executable file
View File

@@ -0,0 +1,531 @@
<?php
namespace Kirby\Toolkit;
use DateTime;
use DateTimeZone;
use Exception;
use Kirby\Exception\InvalidArgumentException;
/**
* Extension for PHP's `DateTime` class
* @since 3.6.2
*
* @package Kirby Toolkit
* @author Bastian Allgeier <bastian@getkirby.com>,
* Lukas Bestle <lukas@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
class Date extends DateTime
{
/**
* Class constructor
*
* @param string|int|\DateTimeInterface $datetime Datetime string, UNIX timestamp or object
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
*/
public function __construct($datetime = 'now', ?DateTimeZone $timezone = null)
{
if (is_int($datetime) === true) {
$datetime = date('r', $datetime);
}
if (is_a($datetime, 'DateTimeInterface') === true) {
$datetime = $datetime->format('r');
}
parent::__construct($datetime, $timezone);
}
/**
* Returns the datetime in `YYYY-MM-DD hh:mm:ss` format with timezone
*
* @return string
*/
public function __toString(): string
{
return $this->toString('datetime');
}
/**
* Rounds the datetime value up to next value of the specified unit
*
* @param string $unit `year`, `month`, `day`, `hour`, `minute` or `second`
* @return $this
*
* @throws \Kirby\Exception\InvalidArgumentException If the unit name is invalid
*/
public function ceil(string $unit)
{
static::validateUnit($unit);
$this->floor($unit);
$this->modify('+1 ' . $unit);
return $this;
}
/**
* Returns the interval between the provided and the object's datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return \DateInterval
*/
public function compare($datetime = 'now', ?DateTimeZone $timezone = null)
{
return $this->diff(new static($datetime, $timezone));
}
/**
* Gets or sets the day value
*
* @param int|null $day
* @return int
*/
public function day(?int $day = null): int
{
if ($day === null) {
return (int)$this->format('d');
}
$this->setDate($this->year(), $this->month(), $day);
return $this->day();
}
/**
* Rounds the datetime value down to the specified unit
*
* @param string $unit `year`, `month`, `day`, `hour`, `minute` or `second`
* @return $this
*
* @throws \Kirby\Exception\InvalidArgumentException If the unit name is invalid
*/
public function floor(string $unit)
{
static::validateUnit($unit);
$formats = [
'year' => 'Y-01-01P',
'month' => 'Y-m-01P',
'day' => 'Y-m-dP',
'hour' => 'Y-m-d H:00:00P',
'minute' => 'Y-m-d H:i:00P',
'second' => 'Y-m-d H:i:sP'
];
$flooredDate = date($formats[$unit], $this->timestamp());
$this->set($flooredDate);
return $this;
}
/**
* Gets or sets the hour value
*
* @param int|null $hour
* @return int
*/
public function hour(?int $hour = null): int
{
if ($hour === null) {
return (int)$this->format('H');
}
$this->setTime($hour, $this->minute());
return $this->hour();
}
/**
* Checks if the object's datetime is the same as the given datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return bool
*/
public function is($datetime = 'now', ?DateTimeZone $timezone = null): bool
{
return $this == new static($datetime, $timezone);
}
/**
* Checks if the object's datetime is after the given datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return bool
*/
public function isAfter($datetime = 'now', ?DateTimeZone $timezone = null): bool
{
return $this > new static($datetime, $timezone);
}
/**
* Checks if the object's datetime is before the given datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return bool
*/
public function isBefore($datetime = 'now', ?DateTimeZone $timezone = null): bool
{
return $this < new static($datetime, $timezone);
}
/**
* Checks if the object's datetime is between the given datetimes
*
* @param string|int|\DateTimeInterface $min
* @param string|int|\DateTimeInterface $max
* @return bool
*/
public function isBetween($min, $max): bool
{
return $this->isMin($min) === true && $this->isMax($max) === true;
}
/**
* Checks if the object's datetime is at or before the given datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return bool
*/
public function isMax($datetime = 'now', ?DateTimeZone $timezone = null): bool
{
return $this <= new static($datetime, $timezone);
}
/**
* Checks if the object's datetime is at or after the given datetime
*
* @param string|int|\DateTimeInterface $datetime
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
* @return bool
*/
public function isMin($datetime = 'now', ?DateTimeZone $timezone = null): bool
{
return $this >= new static($datetime, $timezone);
}
/**
* Gets the microsecond value
*
* @return int
*/
public function microsecond(): int
{
return $this->format('u');
}
/**
* Gets the millisecond value
*
* @return int
*/
public function millisecond(): int
{
return $this->format('v');
}
/**
* Gets or sets the minute value
*
* @param int|null $minute
* @return int
*/
public function minute(?int $minute = null): int
{
if ($minute === null) {
return (int)$this->format('i');
}
$this->setTime($this->hour(), $minute);
return $this->minute();
}
/**
* Gets or sets the month value
*
* @param int|null $month
* @return int
*/
public function month(?int $month = null): int
{
if ($month === null) {
return (int)$this->format('m');
}
$this->setDate($this->year(), $month, $this->day());
return $this->month();
}
/**
* Returns the datetime which is nearest to the object's datetime
*
* @param string|int|\DateTimeInterface ...$datetime Datetime strings, UNIX timestamps or objects
* @return string|int|\DateTimeInterface
*/
public function nearest(...$datetime)
{
$timestamp = $this->timestamp();
$minDiff = PHP_INT_MAX;
$nearest = null;
foreach ($datetime as $item) {
$itemObject = new static($item, $this->timezone());
$itemTimestamp = $itemObject->timestamp();
$diff = abs($timestamp - $itemTimestamp);
if ($diff < $minDiff) {
$minDiff = $diff;
$nearest = $item;
}
}
return $nearest;
}
/**
* Returns an instance of the current datetime
*
* @param \DateTimeZone|null $timezone
* @return static
*/
public static function now(?DateTimeZone $timezone = null)
{
return new static('now', $timezone);
}
/**
* Tries to create an instance from the given string
* or fails silently by returning `null` on error
*
* @param string|null $datetime
* @param \DateTimeZone|null $timezone
* @return static|null
*/
public static function optional(?string $datetime = null, ?DateTimeZone $timezone = null)
{
if (empty($datetime) === true) {
return null;
}
try {
return new static($datetime, $timezone);
} catch (Exception $e) {
return null;
}
}
/**
* Rounds the date to the nearest value of the given unit
*
* @param string $unit `year`, `month`, `day`, `hour`, `minute` or `second`
* @param int $size Rounding step starting at `0` of the specified unit
* @return $this
*
* @throws \Kirby\Exception\InvalidArgumentException If the unit name or size is invalid
*/
public function round(string $unit, int $size = 1)
{
static::validateUnit($unit);
// round to a step of 1 first
$floor = (clone $this)->floor($unit);
$ceil = (clone $this)->ceil($unit);
$nearest = $this->nearest($floor, $ceil);
$this->set($nearest);
if ($size === 1) {
// we are already done
return $this;
}
// validate step size
if (
in_array($unit, ['day', 'month', 'year']) && $size !== 1 ||
$unit === 'hour' && 24 % $size !== 0 ||
in_array($unit, ['second', 'minute']) && 60 % $size !== 0
) {
throw new InvalidArgumentException('Invalid rounding size for ' . $unit);
}
// round to other rounding steps
$value = $this->{$unit}();
$value = round($value / $size) * $size;
$this->{$unit}($value);
return $this;
}
/**
* Gets or sets the second value
*
* @param int|null $second
* @return int
*/
public function second(?int $second = null): int
{
if ($second === null) {
return (int)$this->format('s');
}
$this->setTime($this->hour(), $this->minute(), $second);
return $this->second();
}
/**
* Overwrites the datetime value with a different one
*
* @param string|int|\DateTimeInterface $datetime Datetime string, UNIX timestamp or object
* @param \DateTimeZone|null $timezone Optional default timezone if `$datetime` is string
*/
public function set($datetime, ?DateTimeZone $timezone = null)
{
$datetime = new static($datetime, $timezone);
$this->setTimestamp($datetime->timestamp());
}
/**
* Normalizes the step configuration array for rounding
*
* @param array|string|int|null $input Full array with `size` and/or `unit` keys, `unit`
* string, `size` int or `null` for the default
* @param array|null $default Default values to use if one or both values are not provided
* @return array
*/
public static function stepConfig($input = null, ?array $default = null): array
{
$default ??= [
'size' => 1,
'unit' => 'day'
];
if ($input === null) {
return $default;
}
if (is_array($input) === true) {
$input = array_merge($default, $input);
$input['unit'] = strtolower($input['unit']);
return $input;
}
if (is_int($input) === true) {
return array_merge($default, ['size' => $input]);
}
if (is_string($input) === true) {
return array_merge($default, ['unit' => strtolower($input)]);
}
throw new InvalidArgumentException('Invalid input');
}
/**
* Returns the time in `hh:mm:ss` format
*
* @return string
*/
public function time(): string
{
return $this->format('H:i:s');
}
/**
* Returns the UNIX timestamp
*
* @return int
*/
public function timestamp(): int
{
return $this->getTimestamp();
}
/**
* Returns the timezone object
*
* @return \DateTimeZone
*/
public function timezone()
{
return $this->getTimezone();
}
/**
* Returns an instance of the beginning of the current day
*
* @param \DateTimeZone|null $timezone
* @return static
*/
public static function today(?DateTimeZone $timezone = null)
{
return new static('today', $timezone);
}
/**
* Returns the date, time or datetime in `YYYY-MM-DD hh:mm:ss` format
* with optional timezone
*
* @param string $mode `date`, `time` or `datetime`
* @param bool $timezone Whether the timezone is printed as well
* @return string
*
* @throws \Kirby\Exception\InvalidArgumentException If the mode is invalid
*/
public function toString(string $mode = 'datetime', bool $timezone = true): string
{
switch ($mode) {
case 'date':
$format = 'Y-m-d';
break;
case 'time':
$format = 'H:i:s';
break;
case 'datetime':
$format = 'Y-m-d H:i:s';
break;
default:
throw new InvalidArgumentException('Invalid mode');
}
if ($timezone === true) {
$format .= 'P';
}
return $this->format($format);
}
/**
* Gets or sets the year value
*
* @param int|null $year
* @return int
*/
public function year(?int $year = null): int
{
if ($year === null) {
return (int)$this->format('Y');
}
$this->setDate($year, $this->month(), $this->day());
return $this->year();
}
/**
* Ensures that the provided string is a valid unit name
*
* @param string $unit
* @return void
*
* @throws \Kirby\Exception\InvalidArgumentException
*/
protected static function validateUnit(string $unit): void
{
$units = ['year', 'month', 'day', 'hour', 'minute', 'second'];
if (in_array($unit, $units) === false) {
throw new InvalidArgumentException('Invalid rounding unit');
}
}
}

View File

@@ -247,9 +247,7 @@ class Dom
$options['allowedAttrPrefixes'],
$attr,
$options,
function ($expected, $real): bool {
return Str::startsWith($real, $expected);
}
fn ($expected, $real): bool => Str::startsWith($real, $expected)
) !== false
) {
return true;
@@ -450,9 +448,7 @@ class Dom
$localName = $node->localName;
if ($compare === null) {
$compare = function ($expected, $real): bool {
return $expected === $real;
};
$compare = fn ($expected, $real): bool => $expected === $real;
}
// if the configuration does not define namespace URIs or if the
@@ -831,9 +827,7 @@ class Dom
$options['disallowedTags'],
$element,
$options,
function ($expected, $real): bool {
return Str::lower($expected) === Str::lower($real);
}
fn ($expected, $real): bool => Str::lower($expected) === Str::lower($real)
) !== false
) {
$errors[] = new InvalidArgumentException(

View File

@@ -256,7 +256,7 @@ class Str
}
$method = $caseInsensitive === true ? 'stripos' : 'strpos';
return call_user_func($method, $string, $needle) !== false;
return call_user_func($method, $string ?? '', $needle) !== false;
}
/**
@@ -484,7 +484,7 @@ class Str
*/
public static function lower(string $string = null): string
{
return mb_strtolower($string, 'UTF-8');
return mb_strtolower($string ?? '', 'UTF-8');
}
/**
@@ -558,7 +558,7 @@ class Str
$needle = static::lower($needle);
}
return mb_strpos($string, $needle, 0, 'UTF-8');
return mb_strpos($string ?? '', $needle, 0, 'UTF-8');
}
/**
@@ -640,7 +640,7 @@ class Str
// without a limit we might as well use the built-in function
if ($limit === -1) {
return str_replace($search, $replace, $string);
return str_replace($search, $replace, $string ?? '');
}
// if the limit is zero, the result will be no replacements at all
@@ -1042,7 +1042,7 @@ class Str
*/
public static function substr(string $string = null, int $start = 0, int $length = null): string
{
return mb_substr($string, $start, $length, 'UTF-8');
return mb_substr($string ?? '', $start, $length, 'UTF-8');
}
/**
@@ -1214,7 +1214,7 @@ class Str
*/
public static function ucwords(string $string = null): string
{
return mb_convert_case($string, MB_CASE_TITLE, 'UTF-8');
return mb_convert_case($string ?? '', MB_CASE_TITLE, 'UTF-8');
}
/**
@@ -1262,7 +1262,7 @@ class Str
*/
public static function upper(string $string = null): string
{
return mb_strtoupper($string, 'UTF-8');
return mb_strtoupper($string ?? '', 'UTF-8');
}
/**

View File

@@ -19,13 +19,14 @@ class Tpl
/**
* Renders the template
*
* @param string $file
* @param string|null $file
* @param array $data
* @return string
* @throws Throwable
*/
public static function load(string $file = null, array $data = []): string
public static function load(?string $file = null, array $data = []): string
{
if (is_file($file) === false) {
if ($file === null || is_file($file) === false) {
return '';
}

View File

@@ -238,6 +238,7 @@ return array(
'Kirby\\Toolkit\\Component' => $baseDir . '/src/Toolkit/Component.php',
'Kirby\\Toolkit\\Config' => $baseDir . '/src/Toolkit/Config.php',
'Kirby\\Toolkit\\Controller' => $baseDir . '/src/Toolkit/Controller.php',
'Kirby\\Toolkit\\Date' => $baseDir . '/src/Toolkit/Date.php',
'Kirby\\Toolkit\\Dom' => $baseDir . '/src/Toolkit/Dom.php',
'Kirby\\Toolkit\\Escape' => $baseDir . '/src/Toolkit/Escape.php',
'Kirby\\Toolkit\\Facade' => $baseDir . '/src/Toolkit/Facade.php',
@@ -280,6 +281,7 @@ return array(
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
'Spyc' => $baseDir . '/dependencies/spyc/Spyc.php',
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php',
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',

View File

@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/config/setup.php',

View File

@@ -8,7 +8,6 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
{
public static $files = array (
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/config/setup.php',
@@ -331,6 +330,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Toolkit\\Component' => __DIR__ . '/../..' . '/src/Toolkit/Component.php',
'Kirby\\Toolkit\\Config' => __DIR__ . '/../..' . '/src/Toolkit/Config.php',
'Kirby\\Toolkit\\Controller' => __DIR__ . '/../..' . '/src/Toolkit/Controller.php',
'Kirby\\Toolkit\\Date' => __DIR__ . '/../..' . '/src/Toolkit/Date.php',
'Kirby\\Toolkit\\Dom' => __DIR__ . '/../..' . '/src/Toolkit/Dom.php',
'Kirby\\Toolkit\\Escape' => __DIR__ . '/../..' . '/src/Toolkit/Escape.php',
'Kirby\\Toolkit\\Facade' => __DIR__ . '/../..' . '/src/Toolkit/Facade.php',
@@ -373,6 +373,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
'Spyc' => __DIR__ . '/../..' . '/dependencies/spyc/Spyc.php',
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php',
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',

Some files were not shown because too many files have changed in this diff Show More