diff --git a/formwork/src/Schemes/Scheme.php b/formwork/src/Schemes/Scheme.php index 08d2c00b..53d812c4 100644 --- a/formwork/src/Schemes/Scheme.php +++ b/formwork/src/Schemes/Scheme.php @@ -7,8 +7,10 @@ use Formwork\Fields\FieldCollection; use Formwork\Fields\FieldFactory; use Formwork\Fields\Layout\Layout; +use Formwork\Translations\Translation; use Formwork\Translations\Translations; use Formwork\Utils\Arr; +use Formwork\Utils\Str; use InvalidArgumentException; class Scheme implements Arrayable @@ -20,6 +22,8 @@ class Scheme implements Arrayable */ protected string $path; + protected string $title; + protected SchemeOptions $options; /** @@ -33,8 +37,6 @@ public function __construct(protected string $id, array $data, protected Transla $this->extend($this->schemes->get($this->data['extend'])); } - $this->data['title'] ??= $this->id; - $this->options = new SchemeOptions($this->data['options'] ?? []); } @@ -56,7 +58,20 @@ public function id(): string */ public function title(): string { - return $this->data['title']; + if (isset($this->title)) { + return $this->title; + } + + $title = $this->data['title'] ?? $this->id; + + if (isset($this->data['title'])) { + try { + $title = $this->translate($title, $this->translations->getCurrent()); + } catch (InvalidArgumentException) { + } + } + + return $this->title = $title; } /** @@ -83,4 +98,25 @@ protected function extend(Scheme $scheme): void $this->data = array_replace_recursive($scheme->data, $this->data); } + + protected function translate(mixed $value, Translation $translation): mixed + { + $language = $translation->code(); + + if (is_array($value)) { + if (isset($value[$language])) { + $value = $value[$language]; + } + } elseif (!is_string($value)) { + return $value; + } + + $interpolate = fn ($value) => is_string($value) ? Str::interpolate($value, fn ($key) => $translation->translate($key)) : $value; + + if (is_array($value)) { + return Arr::map($value, $interpolate); + } + + return $interpolate($value); + } } diff --git a/formwork/src/Templates/Template.php b/formwork/src/Templates/Template.php index c0a3a9af..347546af 100644 --- a/formwork/src/Templates/Template.php +++ b/formwork/src/Templates/Template.php @@ -5,6 +5,7 @@ use Closure; use Formwork\App; use Formwork\Assets; +use Formwork\Schemes\Scheme; use Formwork\Site; use Formwork\Utils\Constraint; use Formwork\Utils\FileSystem; @@ -25,7 +26,7 @@ class Template implements Stringable /** * Create a new Template instance */ - public function __construct(protected string $name, protected App $app, protected Site $site, protected ViewFactory $viewFactory) + public function __construct(protected string $name, protected Scheme $scheme, protected App $app, protected Site $site, protected ViewFactory $viewFactory) { $this->path = $this->app->config()->get('system.templates.path'); } @@ -40,6 +41,16 @@ public function name(): string return $this->name; } + public function scheme(): Scheme + { + return $this->scheme; + } + + public function title(): string + { + return $this->scheme->title(); + } + public function path(): string { return $this->path; diff --git a/formwork/src/Templates/TemplateFactory.php b/formwork/src/Templates/TemplateFactory.php index feb43405..677c5fb0 100644 --- a/formwork/src/Templates/TemplateFactory.php +++ b/formwork/src/Templates/TemplateFactory.php @@ -2,16 +2,20 @@ namespace Formwork\Templates; +use Formwork\Schemes\Schemes; use Formwork\Services\Container; class TemplateFactory { - public function __construct(protected Container $container) + public function __construct(protected Container $container, protected Schemes $schemes) { } public function make(string $name): Template { - return $this->container->build(Template::class, compact('name')); + return $this->container->build(Template::class, [ + 'name' => $name, + 'scheme' => $this->schemes->get('pages.' . $name), + ]); } } diff --git a/formwork/translations/de.yaml b/formwork/translations/de.yaml index 47a3818f..6461c5dd 100644 --- a/formwork/translations/de.yaml +++ b/formwork/translations/de.yaml @@ -18,7 +18,30 @@ fields.array.add: Hinzufügen fields.array.remove: Entfernen fields.file.uploadLabel: Klicken, um eine Datei auszuwählen oder ziehen, um sie hier abzulegen fields.select.empty: Keine passenden Optionen +page.attributes: Attribute +page.cacheable: Im Cache speichern +page.content: Inhalt +page.files: Dateien +page.image: Bild +page.listed: Im Menü sichtbar +page.noImage: Kein Bild page.none: (Keine) +page.noTags: Keine Tags +page.options: Optionen +page.page: Seite +page.parent: Übergeordnete Seite +page.postsPerPage: Beiträge pro Seite +page.publishDate: Veröffentlichungsdatum +page.routable: Routbar +page.status.notPublished: Nicht veröffentlicht +page.status.notRoutable: Nicht routbar +page.status.published: Veröffentlicht +page.summary: Zusammenfassung +page.tags: Tags +page.template: Vorlage +page.text: Text +page.title: Titel +page.unpublishDate: Veröffentlichungsdatum aufheben upload.error: Datei kann nicht hochgeladen werden. %s. upload.error.alreadyExists: Eine Datei mit demselben Namen existiert bereits upload.error.cannotMoveToDestination: Hochgeladene Datei kann nicht an das Ziel verschoben werden diff --git a/formwork/translations/en.yaml b/formwork/translations/en.yaml index d884ad82..e3fd7a4a 100644 --- a/formwork/translations/en.yaml +++ b/formwork/translations/en.yaml @@ -18,7 +18,30 @@ fields.array.add: Add fields.array.remove: Remove fields.file.uploadLabel: Click to choose a file to upload or drag it here fields.select.empty: No matching options +page.attributes: Attributes +page.cacheable: Cacheable +page.content: Content +page.files: Files +page.image: Image +page.listed: Visible in the menu +page.noImage: No image page.none: (None) +page.noTags: No tags +page.options: Options +page.page: Page +page.parent: Parent page +page.postsPerPage: Posts per page +page.publishDate: Publish date +page.routable: Routable +page.status.notPublished: Not published +page.status.notRoutable: Not routable +page.status.published: Published +page.summary: Summary +page.tags: Tags +page.template: Template +page.text: Text +page.title: Title +page.unpublishDate: Unpublish date upload.error: Cannot upload file. %s. upload.error.alreadyExists: A file with the same name already exists upload.error.cannotMoveToDestination: Failed to move uploaded file to destination diff --git a/formwork/translations/es.yaml b/formwork/translations/es.yaml index a2a849c3..358d8f4b 100644 --- a/formwork/translations/es.yaml +++ b/formwork/translations/es.yaml @@ -18,7 +18,30 @@ fields.array.add: Agregar fields.array.remove: Quitar fields.file.uploadLabel: Haz clic para elegir un archivo para cargar o arrástralo aquí fields.select.empty: No hay opciones coincidentes +page.attributes: Atributos +page.cacheable: En caché +page.content: Contenido +page.files: Archivos +page.image: Imagen +page.listed: Visible en el menú +page.noImage: Sin imagen page.none: (Ninguno) +page.noTags: Sin etiquetas +page.options: Opciones +page.page: Página +page.parent: Página principal +page.postsPerPage: Publicaciones por página +page.publishDate: Fecha de publicación +page.routable: Enrutable +page.status.notPublished: No publicado +page.status.notRoutable: No enrutable +page.status.published: Publicado +page.summary: Resumen +page.tags: Etiquetas +page.template: Plantilla +page.text: Texto +page.title: Título +page.unpublishDate: Fecha de despublicación upload.error: No se puede cargar el archivo. %s. upload.error.alreadyExists: Ya existe un archivo con el mismo nombre upload.error.cannotMoveToDestination: Error al mover el archivo cargado al destino diff --git a/formwork/translations/fr.yaml b/formwork/translations/fr.yaml index a9e5e43e..7b6a414a 100644 --- a/formwork/translations/fr.yaml +++ b/formwork/translations/fr.yaml @@ -18,7 +18,30 @@ fields.array.add: Ajouter fields.array.remove: Supprimer fields.file.uploadLabel: Glisser-déposer dans la zone ou cliquer-ici pour sélectionner un fichier à envoyer. fields.select.empty: Aucune option correspondante +page.attributes: Attributs +page.cacheable: Activer le cache +page.content: Contenu +page.files: Fichiers +page.image: Image d’accroche +page.listed: Visible dans le menu +page.noImage: Aucune image page.none: (Aucun) +page.noTags: Aucun tag +page.options: Options +page.page: Page +page.parent: Parent +page.postsPerPage: Articles par page +page.publishDate: Date de publication +page.routable: Accessible +page.status.notPublished: Brouillon +page.status.notRoutable: Inaccessible +page.status.published: Publié +page.summary: Résumé +page.tags: Tags +page.template: Modèle +page.text: Texte +page.title: Titre +page.unpublishDate: Date de péremption upload.error: Impossible de télécharger le fichier. %s. upload.error.alreadyExists: Un fichier du même nom existe déjà upload.error.cannotMoveToDestination: Impossible de déplacer le fichier téléchargé vers la destination diff --git a/formwork/translations/it.yaml b/formwork/translations/it.yaml index d9f62710..981de172 100644 --- a/formwork/translations/it.yaml +++ b/formwork/translations/it.yaml @@ -18,7 +18,30 @@ fields.array.add: Aggiungi fields.array.remove: Rimuovi fields.file.uploadLabel: Fare click per selezionare un file da caricare o trascinarlo qui fields.select.empty: Nessuna opzione corrispondente +page.attributes: Attributi +page.cacheable: Abilita cache +page.content: Contenuto +page.files: File +page.image: Immagine +page.listed: Visibile nel menu +page.noImage: Nessuna immagine page.none: (Nessuna) +page.noTags: Nessun tag +page.options: Opzioni +page.page: Pagina +page.parent: Pagina superiore +page.postsPerPage: Post per pagina +page.publishDate: Data di pubblicazione +page.routable: Raggiungibile +page.status.notPublished: Non pubblicato +page.status.notRoutable: Non raggiungibile +page.status.published: Pubblicato +page.summary: Riassunto +page.tags: Tag +page.template: Template +page.text: Testo +page.title: Titolo +page.unpublishDate: Data di rimozione upload.error: Impossibile caricare il file. %s. upload.error.alreadyExists: Un file con lo stesso nome esiste già upload.error.cannotMoveToDestination: Impossibile spostare il file caricato alla destinazione diff --git a/formwork/translations/pt.yaml b/formwork/translations/pt.yaml index b9b42f96..a10dd764 100644 --- a/formwork/translations/pt.yaml +++ b/formwork/translations/pt.yaml @@ -18,7 +18,30 @@ fields.array.add: Adicionar fields.array.remove: Remover fields.file.uploadLabel: Clique aqui para escolher um ficheiro para enviar ou arrastar para aqui. fields.select.empty: Sem opções correspondentes +page.attributes: Atributos +page.cacheable: Cache +page.content: Conteúdo +page.files: Ficheiros +page.image: Imagem +page.listed: Visível no menu +page.noImage: Sem imagem page.none: (Nenhum) +page.noTags: Sem tags +page.options: Opções +page.page: Página +page.parent: Página parente +page.postsPerPage: Items por página +page.publishDate: Data de publicação +page.routable: Roteável +page.status.notPublished: Não publicado +page.status.notRoutable: Não roteável +page.status.published: Publicado +page.summary: Resumo +page.tags: Tags +page.template: Template +page.text: Texto +page.title: Titulo +page.unpublishDate: Data de cancelamento da publicação upload.error: Não é possível fazer upload do ficheiro. %s. upload.error.alreadyExists: Já existe um ficheiro com o mesmo nome upload.error.cannotMoveToDestination: Falha ao mover o ficheiro enviado para o destino diff --git a/formwork/translations/ru.yaml b/formwork/translations/ru.yaml index e6891835..0f7f34bb 100644 --- a/formwork/translations/ru.yaml +++ b/formwork/translations/ru.yaml @@ -18,7 +18,30 @@ fields.array.add: Добавлять fields.array.remove: Удалить fields.file.uploadLabel: Нажмите чтобы выбрать файл для загрузки или тянуть это здесь fields.select.empty: Нет подходящих вариантов +page.attributes: Атрибуты +page.cacheable: Кешируемый +page.content: Содержание +page.files: Файлы +page.image: Изображение +page.listed: Видимо в меню +page.noImage: Нет изображения page.none: (Нет) +page.noTags: Нет тегов +page.options: Параметры +page.page: Страница +page.parent: Родитель страницы +page.postsPerPage: Сообщения на странице +page.publishDate: Дата публикации +page.routable: Маршрутизируемый +page.status.notPublished: Не Опубликовано +page.status.notRoutable: Не маршрутизируемый +page.status.published: Опубликованный +page.summary: Сводка +page.tags: Теги +page.template: Шаблон +page.text: Текст +page.title: Заглавие +page.unpublishDate: Дата Отменить публикацию upload.error: Невозможно загрузить файл. %s. upload.error.alreadyExists: Файл с таким именем уже существует upload.error.cannotMoveToDestination: Не удалось переместить загруженный файл в папку назначения diff --git a/panel/translations/de.yaml b/panel/translations/de.yaml index 3a4b6063..b88a9494 100644 --- a/panel/translations/de.yaml +++ b/panel/translations/de.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Hochgeladene Bilder verarbeiten (opt panel.options.system.uploads.processImages.disabled: Deaktiviert panel.options.system.uploads.processImages.enabled: Aktiviert panel.options.updated: Optionen aktualisiert -panel.pages.attributes: Attribute panel.pages.changes.continue: Ohne Speichern fortfahren panel.pages.changes.detected: Änderungen erkannt panel.pages.changes.detected.prompt: Es gibt einige ungespeicherte Änderungen. Möchten Sie diese Seite wirklich verlassen? panel.pages.changeSlug: Slug bearbeiten panel.pages.changeSlug.generate: Aus Titel generieren -panel.pages.content: Inhalt panel.pages.deleteFile: Datei löschen panel.pages.deleteFile.prompt: Möchten Sie diese Datei wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden. panel.pages.deletePage: Seite löschen @@ -187,7 +185,6 @@ panel.pages.file.info.size: Größe panel.pages.file.info.uri: URI panel.pages.file.position: Position panel.pages.file.preview: Vorschau -panel.pages.files: Dateien panel.pages.history.event.created: Seite erstellt von %s %s. panel.pages.history.event.edited: Seite bearbeitet von %s %s. panel.pages.languages: Sprachen @@ -202,10 +199,8 @@ panel.pages.newPage.template: Vorlage panel.pages.newPage.title: Titel panel.pages.next: Nächste Seite panel.pages.nextFile: Nächste Datei -panel.pages.options: Optionen panel.pages.page: Seite panel.pages.page.actions: Aktionen -panel.pages.page.cacheable: Im Cache speichern panel.pages.page.cannotChangeNum: Seitennummer kann nicht geändert werden panel.pages.page.cannotCreate: Seite kann nicht erstellt werden panel.pages.page.cannotCreate.alreadyExists: Seite kann nicht erstellt werden, eine Seite mit demselben URI existiert bereits @@ -243,26 +238,16 @@ panel.pages.page.deleted: Seite gelöscht panel.pages.page.edited: Seite bearbeitet panel.pages.page.fileDeleted: Datei gelöscht panel.pages.page.fileRenamed: Datei umbenannt -panel.pages.page.image: Bild panel.pages.page.lastModified: Zuletzt geändert -panel.pages.page.listed: Im Menü sichtbar panel.pages.page.moved: Seite verschoben! panel.pages.page.noDate: Kein Datum -panel.pages.page.noImage: Kein Bild -panel.pages.page.noTags: Keine Tags panel.pages.page.notFound: Seite nicht gefunden -panel.pages.page.postsPerPage: Beiträge pro Seite -panel.pages.page.publishDate: Veröffentlichungsdatum panel.pages.page.status: Status -panel.pages.page.tags: Tags -panel.pages.page.title: Titel -panel.pages.page.unpublishDate: Veröffentlichungsdatum aufheben panel.pages.pages: Seiten panel.pages.pages.collapseAll: Alle einklappen panel.pages.pages.expandAll: Alle ausklappen panel.pages.pages.reorder: Neu anordnen panel.pages.pages.search: Seiten durchsuchen... -panel.pages.parent: Übergeordnete Seite panel.pages.preview: Vorschau panel.pages.previewFile: Vorschau panel.pages.previous: Vorherige Seite @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Name panel.pages.replaceFile: Datei ersetzen panel.pages.save: Speichern panel.pages.saveOnly: Speichern ohne zu veröffentlichen -panel.pages.status.notPublished: Nicht veröffentlicht -panel.pages.status.notRoutable: Nicht routbar -panel.pages.status.published: Veröffentlicht -panel.pages.status.routable: Routbar -panel.pages.summary: Zusammenfassung -panel.pages.template: Vorlage -panel.pages.text: Text panel.pages.toggleChildren: Untergeordnete Seiten umschalten panel.pages.viewPage: Seite anzeigen panel.panel: Administrationspanel diff --git a/panel/translations/en.yaml b/panel/translations/en.yaml index 4d6bc292..d2476db9 100644 --- a/panel/translations/en.yaml +++ b/panel/translations/en.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Process (optimize) uploaded images panel.options.system.uploads.processImages.disabled: Disabled panel.options.system.uploads.processImages.enabled: Enabled panel.options.updated: Options updated -panel.pages.attributes: Attributes panel.pages.changes.continue: Continue without saving panel.pages.changes.detected: Changes detected panel.pages.changes.detected.prompt: You have some changes that have not been saved. Are you sure you want to leave this page? panel.pages.changeSlug: Edit slug panel.pages.changeSlug.generate: Generate from title -panel.pages.content: Content panel.pages.deleteFile: Delete file panel.pages.deleteFile.prompt: Are you sure you want to delete this file? This action can’t be undone. panel.pages.deletePage: Delete page @@ -187,7 +185,6 @@ panel.pages.file.info.size: Size panel.pages.file.info.uri: URI panel.pages.file.position: Position panel.pages.file.preview: Preview -panel.pages.files: Files panel.pages.history.event.created: Page created by %s %s. panel.pages.history.event.edited: Page edited by %s %s. panel.pages.languages: Languages @@ -202,10 +199,8 @@ panel.pages.newPage.template: Template panel.pages.newPage.title: Title panel.pages.next: Next page panel.pages.nextFile: Next file -panel.pages.options: Options panel.pages.page: Page panel.pages.page.actions: Actions -panel.pages.page.cacheable: Cacheable panel.pages.page.cannotChangeNum: Cannot change page number panel.pages.page.cannotCreate: Cannot create page panel.pages.page.cannotCreate.alreadyExists: Cannot create page, a page with the same uri already exists @@ -243,26 +238,16 @@ panel.pages.page.deleted: Page deleted panel.pages.page.edited: Page edited panel.pages.page.fileDeleted: File deleted panel.pages.page.fileRenamed: File renamed -panel.pages.page.image: Image panel.pages.page.lastModified: Last modified -panel.pages.page.listed: Visible in the menu panel.pages.page.moved: Page moved! panel.pages.page.noDate: No date -panel.pages.page.noImage: No image -panel.pages.page.noTags: No tags panel.pages.page.notFound: Page not found -panel.pages.page.postsPerPage: Posts per page -panel.pages.page.publishDate: Publish date panel.pages.page.status: Status -panel.pages.page.tags: Tags -panel.pages.page.title: Title -panel.pages.page.unpublishDate: Unpublish date panel.pages.pages: Pages panel.pages.pages.collapseAll: Collapse all panel.pages.pages.expandAll: Expand all panel.pages.pages.reorder: Reorder panel.pages.pages.search: Search pages... -panel.pages.parent: Parent page panel.pages.preview: Preview panel.pages.previewFile: Preview panel.pages.previous: Previous page @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Name panel.pages.replaceFile: Replace file panel.pages.save: Save panel.pages.saveOnly: Save without publishing -panel.pages.status.notPublished: Not published -panel.pages.status.notRoutable: Not routable -panel.pages.status.published: Published -panel.pages.status.routable: Routable -panel.pages.summary: Summary -panel.pages.template: Template -panel.pages.text: Text panel.pages.toggleChildren: Toggle children pages panel.pages.viewPage: View page panel.panel: Administration panel diff --git a/panel/translations/es.yaml b/panel/translations/es.yaml index c3f01126..6cb3a0aa 100644 --- a/panel/translations/es.yaml +++ b/panel/translations/es.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Procesar (optimizar) imágenes carga panel.options.system.uploads.processImages.disabled: Desactivado panel.options.system.uploads.processImages.enabled: Activado panel.options.updated: Opciones actualizadas -panel.pages.attributes: Atributos panel.pages.changes.continue: Continuar sin guardar panel.pages.changes.detected: Cambios detectados panel.pages.changes.detected.prompt: Tienes algunos cambios que no se han guardado. ¿Estás seguro de que quieres salir de esta página? panel.pages.changeSlug: Editar slug panel.pages.changeSlug.generate: Generar a partir del título -panel.pages.content: Contenido panel.pages.deleteFile: Borrar archivo panel.pages.deleteFile.prompt: ¿Estás seguro de que quieres borrar este archivo? Esta acción no se puede deshacer. panel.pages.deletePage: Borrar página @@ -187,7 +185,6 @@ panel.pages.file.info.size: Tamaño panel.pages.file.info.uri: URI panel.pages.file.position: Posición panel.pages.file.preview: Vista previa -panel.pages.files: Archivos panel.pages.history.event.created: Página creada por %s %s. panel.pages.history.event.edited: Página editada por %s %s. panel.pages.languages: Idiomas @@ -202,10 +199,8 @@ panel.pages.newPage.template: Plantilla panel.pages.newPage.title: Título panel.pages.next: Página siguiente panel.pages.nextFile: Archivo siguiente -panel.pages.options: Opciones panel.pages.page: Página panel.pages.page.actions: Acciones -panel.pages.page.cacheable: En caché panel.pages.page.cannotChangeNum: No se puede cambiar el número de página panel.pages.page.cannotCreate: No se puede crear la página panel.pages.page.cannotCreate.alreadyExists: No se puede crear la página, ya existe una página con la misma URI @@ -243,26 +238,16 @@ panel.pages.page.deleted: Página eliminada panel.pages.page.edited: Página editada panel.pages.page.fileDeleted: Archivo eliminado panel.pages.page.fileRenamed: Archivo renombrado -panel.pages.page.image: Imagen panel.pages.page.lastModified: Última modificación -panel.pages.page.listed: Visible en el menú panel.pages.page.moved: ¡Página movida! panel.pages.page.noDate: Sin fecha -panel.pages.page.noImage: Sin imagen -panel.pages.page.noTags: Sin etiquetas panel.pages.page.notFound: Página no encontrada -panel.pages.page.postsPerPage: Publicaciones por página -panel.pages.page.publishDate: Fecha de publicación panel.pages.page.status: Estado -panel.pages.page.tags: Etiquetas -panel.pages.page.title: Título -panel.pages.page.unpublishDate: Fecha de despublicación panel.pages.pages: Páginas panel.pages.pages.collapseAll: Contraer todo panel.pages.pages.expandAll: Expandir todo panel.pages.pages.reorder: Reordenar panel.pages.pages.search: Buscar páginas... -panel.pages.parent: Página principal panel.pages.preview: Vista previa panel.pages.previewFile: Vista previa panel.pages.previous: Página anterior @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Nombre panel.pages.replaceFile: Reemplazar archivo panel.pages.save: Guardar panel.pages.saveOnly: Guardar sin publicar -panel.pages.status.notPublished: No publicado -panel.pages.status.notRoutable: No enrutable -panel.pages.status.published: Publicado -panel.pages.status.routable: Enrutable -panel.pages.summary: Resumen -panel.pages.template: Plantilla -panel.pages.text: Texto panel.pages.toggleChildren: Alternar páginas secundarias panel.pages.viewPage: Ver página panel.panel: Panel de administración diff --git a/panel/translations/fr.yaml b/panel/translations/fr.yaml index 4ff46a2a..a34ff5f4 100644 --- a/panel/translations/fr.yaml +++ b/panel/translations/fr.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Traitement (optimisé) des images en panel.options.system.uploads.processImages.disabled: Désactivé panel.options.system.uploads.processImages.enabled: Activé panel.options.updated: Options mises à jour -panel.pages.attributes: Attributs panel.pages.changes.continue: Continuer sans sauvegarder panel.pages.changes.detected: Changements détectés panel.pages.changes.detected.prompt: Vous avez des modifications qui n’ont pas été enregistrées. Êtes-vous sûr de vouloir quitter cette page ? panel.pages.changeSlug: Modifier le permalien panel.pages.changeSlug.generate: Générer automatiquement à partir du titre -panel.pages.content: Contenu panel.pages.deleteFile: Supprimer le fichier panel.pages.deleteFile.prompt: ÊtesVous sûr de vouloir supprimer ce fichier ? Cette action est irréversible. panel.pages.deletePage: Supprimer la page @@ -187,7 +185,6 @@ panel.pages.file.info.size: Taille panel.pages.file.info.uri: URI panel.pages.file.position: Position panel.pages.file.preview: Aperçu -panel.pages.files: Fichiers panel.pages.history.event.created: Page créée par %s %s. panel.pages.history.event.edited: Page modifiée par %s %s. panel.pages.languages: Langues @@ -202,10 +199,8 @@ panel.pages.newPage.template: Modèle (template) panel.pages.newPage.title: Titre panel.pages.next: Page suivante panel.pages.nextFile: Fichier suivant -panel.pages.options: Options panel.pages.page: Page panel.pages.page.actions: Actions -panel.pages.page.cacheable: Activer le cache panel.pages.page.cannotChangeNum: Impossible de changer le numéro de page panel.pages.page.cannotCreate: Impossible de créer une page panel.pages.page.cannotCreate.alreadyExists: Impossible de créer une page, une page avec le même uri existe déjà @@ -243,26 +238,16 @@ panel.pages.page.deleted: Page supprimée panel.pages.page.edited: Page éditée panel.pages.page.fileDeleted: Fichier supprimé panel.pages.page.fileRenamed: Fichier renommé -panel.pages.page.image: Image d’accroche panel.pages.page.lastModified: Dernière modification -panel.pages.page.listed: Visible dans le menu panel.pages.page.moved: Page déplacée ! panel.pages.page.noDate: Aucune date -panel.pages.page.noImage: Aucune image -panel.pages.page.noTags: Aucun tag panel.pages.page.notFound: Page non trouvée -panel.pages.page.postsPerPage: Articles par page -panel.pages.page.publishDate: Date de publication panel.pages.page.status: Statut -panel.pages.page.tags: Tags -panel.pages.page.title: Titre -panel.pages.page.unpublishDate: Date de péremption panel.pages.pages: Pages panel.pages.pages.collapseAll: Tout réduire panel.pages.pages.expandAll: Tout développer panel.pages.pages.reorder: Réorganiser panel.pages.pages.search: Rechercher dans les pages… -panel.pages.parent: Parent panel.pages.preview: Aperçu panel.pages.previewFile: Aperçu panel.pages.previous: Page précédente @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Nom panel.pages.replaceFile: Remplacer le fichier panel.pages.save: Enregistrer panel.pages.saveOnly: Enregistrer sans publier -panel.pages.status.notPublished: Brouillon -panel.pages.status.notRoutable: Inaccessible -panel.pages.status.published: Publié -panel.pages.status.routable: Accessible -panel.pages.summary: Résumé -panel.pages.template: Modèle -panel.pages.text: Texte panel.pages.toggleChildren: Afficher/Masquer les sous-pages panel.pages.viewPage: Voir la page panel.panel: Panneau d’administration diff --git a/panel/translations/it.yaml b/panel/translations/it.yaml index 13e58c38..a431bd70 100644 --- a/panel/translations/it.yaml +++ b/panel/translations/it.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Elabora (ottimizza) le immagini cari panel.options.system.uploads.processImages.disabled: Disabilitato panel.options.system.uploads.processImages.enabled: Abilitato panel.options.updated: Opzioni aggiornate -panel.pages.attributes: Attributi panel.pages.changes.continue: Continua senza salvare panel.pages.changes.detected: Modifiche rilevate panel.pages.changes.detected.prompt: Alcune modifiche non sono state salvate. Si è sicuri di voler lasciare la pagina? panel.pages.changeSlug: Modifica indirizzo panel.pages.changeSlug.generate: Genera dal titolo -panel.pages.content: Contenuto panel.pages.deleteFile: Elimina file panel.pages.deleteFile.prompt: Si è sicuri di eliminare il file? Questa azione non può essere annullata. panel.pages.deletePage: Elimina pagina @@ -187,7 +185,6 @@ panel.pages.file.info.size: Dimensioni file panel.pages.file.info.uri: URI panel.pages.file.position: Posizione panel.pages.file.preview: Anteprima -panel.pages.files: File panel.pages.history.event.created: Pagina creata da %s %s. panel.pages.history.event.edited: Pagina modificata da %s %s. panel.pages.languages: Lingue @@ -202,10 +199,8 @@ panel.pages.newPage.template: Template panel.pages.newPage.title: Titolo panel.pages.next: Pagina successiva panel.pages.nextFile: File successivo -panel.pages.options: Opzioni panel.pages.page: Pagina panel.pages.page.actions: Azioni -panel.pages.page.cacheable: Abilita cache panel.pages.page.cannotChangeNum: Impossibile cambiare il numero della pagina panel.pages.page.cannotCreate: Impossibile creare la pagina panel.pages.page.cannotCreate.alreadyExists: Impossibile creare la pagina, una pagina con lo stesso indirizzo esiste già @@ -243,26 +238,16 @@ panel.pages.page.deleted: Pagina eliminata panel.pages.page.edited: Pagina modificata! panel.pages.page.fileDeleted: File eliminato panel.pages.page.fileRenamed: File rinominato -panel.pages.page.image: Immagine panel.pages.page.lastModified: Ultime modifiche -panel.pages.page.listed: Visibile nel menu panel.pages.page.moved: Pagina spostata! panel.pages.page.noDate: Nessuna data -panel.pages.page.noImage: Nessuna immagine -panel.pages.page.noTags: Nessun tag panel.pages.page.notFound: Pagina non trovata -panel.pages.page.postsPerPage: Post per pagina -panel.pages.page.publishDate: Data di pubblicazione panel.pages.page.status: Stato -panel.pages.page.tags: Tag -panel.pages.page.title: Titolo -panel.pages.page.unpublishDate: Data di rimozione panel.pages.pages: Pagine panel.pages.pages.collapseAll: Riduci tutte panel.pages.pages.expandAll: Espandi tutte panel.pages.pages.reorder: Riordina panel.pages.pages.search: Cerca pagine... -panel.pages.parent: Pagina superiore panel.pages.preview: Anteprima panel.pages.previewFile: Anteprima panel.pages.previous: Pagina precedente @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Nome panel.pages.replaceFile: Sostituisci file panel.pages.save: Salva panel.pages.saveOnly: Salva senza pubblicare -panel.pages.status.notPublished: Non pubblicato -panel.pages.status.notRoutable: Non raggiungibile -panel.pages.status.published: Pubblicato -panel.pages.status.routable: Raggiungibile -panel.pages.summary: Riassunto -panel.pages.template: Template -panel.pages.text: Testo panel.pages.toggleChildren: Mostra/nascondi sottopagine panel.pages.viewPage: Visualizza pagina panel.panel: Pannello di amministrazione diff --git a/panel/translations/pt.yaml b/panel/translations/pt.yaml index 9c0878ab..26033421 100644 --- a/panel/translations/pt.yaml +++ b/panel/translations/pt.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Processar (optimizar) imagens enviad panel.options.system.uploads.processImages.disabled: Desactivado panel.options.system.uploads.processImages.enabled: Activado panel.options.updated: Opções actualizadas -panel.pages.attributes: Atributos panel.pages.changes.continue: Continuar sem guardar panel.pages.changes.detected: Alterações encontradas panel.pages.changes.detected.prompt: Tem algumas alterações que não foram guardadas. Tem a certeza que deseja sair desta página? panel.pages.changeSlug: Editar slug panel.pages.changeSlug.generate: Criar a partir do título -panel.pages.content: Conteúdo panel.pages.deleteFile: Remover ficheiro panel.pages.deleteFile.prompt: Tem certeza de que deseja remover este ficheiro? Esta acção não pode ser desfeita. panel.pages.deletePage: Remover página @@ -187,7 +185,6 @@ panel.pages.file.info.size: Tamanho panel.pages.file.info.uri: URI panel.pages.file.position: Posição panel.pages.file.preview: Pré-visualização -panel.pages.files: Ficheiros panel.pages.history.event.created: Página criada por %s %s. panel.pages.history.event.edited: Página editada por %s %s. panel.pages.languages: Idiomas @@ -202,10 +199,8 @@ panel.pages.newPage.template: Template panel.pages.newPage.title: Título panel.pages.next: Próxima página panel.pages.nextFile: Próximo ficheiro -panel.pages.options: Opções panel.pages.page: Página panel.pages.page.actions: Acções -panel.pages.page.cacheable: Cache panel.pages.page.cannotChangeNum: Não é possível alterar o número da página panel.pages.page.cannotCreate: Não é possível criar página panel.pages.page.cannotCreate.alreadyExists: Não é possível criar a página, já existe uma página com o mesmo uri @@ -243,26 +238,16 @@ panel.pages.page.deleted: Página removida panel.pages.page.edited: Página editada panel.pages.page.fileDeleted: Ficheiro removido panel.pages.page.fileRenamed: Arquivo renomeado -panel.pages.page.image: Imagem panel.pages.page.lastModified: Última modificação -panel.pages.page.listed: Visível no menu panel.pages.page.moved: Página movida! panel.pages.page.noDate: Sem data -panel.pages.page.noImage: Sem imagem -panel.pages.page.noTags: Sem tags panel.pages.page.notFound: Página não encontrada -panel.pages.page.postsPerPage: Items por página -panel.pages.page.publishDate: Data de publicação panel.pages.page.status: Estado -panel.pages.page.tags: Tags -panel.pages.page.title: Titulo -panel.pages.page.unpublishDate: Data de cancelamento da publicação panel.pages.pages: Páginas panel.pages.pages.collapseAll: Recolher todas panel.pages.pages.expandAll: Expandir todas panel.pages.pages.reorder: Reordenar panel.pages.pages.search: Procurar páginas... -panel.pages.parent: Página parente panel.pages.preview: Preview panel.pages.previewFile: Preview panel.pages.previous: Página anterior @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Nome panel.pages.replaceFile: Substituir ficheiro panel.pages.save: Guardar panel.pages.saveOnly: Guardar sem publicar -panel.pages.status.notPublished: Não publicado -panel.pages.status.notRoutable: Não roteável -panel.pages.status.published: Publicado -panel.pages.status.routable: Roteável -panel.pages.summary: Resumo -panel.pages.template: Template -panel.pages.text: Texto panel.pages.toggleChildren: Expandir páginas panel.pages.viewPage: Ver página panel.panel: Painel de administração diff --git a/panel/translations/ru.yaml b/panel/translations/ru.yaml index dc8af2d3..cca773fb 100644 --- a/panel/translations/ru.yaml +++ b/panel/translations/ru.yaml @@ -133,13 +133,11 @@ panel.options.system.uploads.processImages: Обрабатывать (оптим panel.options.system.uploads.processImages.disabled: Отключено panel.options.system.uploads.processImages.enabled: Включено panel.options.updated: Опции обновляются -panel.pages.attributes: Атрибуты panel.pages.changes.continue: Продолжить без сохранения panel.pages.changes.detected: Изменения Обнаружены panel.pages.changes.detected.prompt: У вас есть какие-то изменения, которые не были сохранены. Вы уверены, что хотите покинуть эту страницу? panel.pages.changeSlug: Редактировать Slug panel.pages.changeSlug.generate: Сформировать из названия -panel.pages.content: Содержание panel.pages.deleteFile: Удалить файл panel.pages.deleteFile.prompt: Вы уверены, что хотите удалить этот файл? Это действие не может быть отменено. panel.pages.deletePage: Удалить страницу @@ -187,7 +185,6 @@ panel.pages.file.info.size: Размер panel.pages.file.info.uri: URI panel.pages.file.position: Позиция panel.pages.file.preview: Просмотр -panel.pages.files: Файлы panel.pages.history.event.created: Страница создана %s %s. panel.pages.history.event.edited: Страница изменена %s %s. panel.pages.languages: Языки @@ -202,10 +199,8 @@ panel.pages.newPage.template: Шаблон panel.pages.newPage.title: Заглавие panel.pages.next: Следующая страница panel.pages.nextFile: Следующий файл -panel.pages.options: Параметры panel.pages.page: Страница panel.pages.page.actions: Действия -panel.pages.page.cacheable: Кешируемый panel.pages.page.cannotChangeNum: Невозможно изменить номер страницы panel.pages.page.cannotCreate: Не удается создать страницу panel.pages.page.cannotCreate.alreadyExists: Невозможно создать страницу, страницу с тем же URI уже существует @@ -243,26 +238,16 @@ panel.pages.page.deleted: Страница удалена panel.pages.page.edited: Страница отредактирован panel.pages.page.fileDeleted: Файл удален panel.pages.page.fileRenamed: Файл переименован -panel.pages.page.image: Изображение panel.pages.page.lastModified: Последнее изменение -panel.pages.page.listed: Видимо в меню panel.pages.page.moved: Страница переехала! panel.pages.page.noDate: Без даты -panel.pages.page.noImage: Нет изображения -panel.pages.page.noTags: Нет тегов panel.pages.page.notFound: Страница не найдена -panel.pages.page.postsPerPage: Сообщения на странице -panel.pages.page.publishDate: Дата публикации panel.pages.page.status: Статус -panel.pages.page.tags: Теги -panel.pages.page.title: Заглавие -panel.pages.page.unpublishDate: Дата Отменить публикацию panel.pages.pages: Страницы panel.pages.pages.collapseAll: Свернуть все panel.pages.pages.expandAll: Расширить все panel.pages.pages.reorder: Изменение порядка panel.pages.pages.search: Поиск Страницы ... -panel.pages.parent: Родитель страницы panel.pages.preview: Предварительный просмотр panel.pages.previewFile: Предварительный просмотр panel.pages.previous: Предыдущая страница @@ -273,13 +258,6 @@ panel.pages.renameFile.name: Имя panel.pages.replaceFile: Заменить файл panel.pages.save: Сохранить panel.pages.saveOnly: Сохранить без публикации -panel.pages.status.notPublished: Не Опубликовано -panel.pages.status.notRoutable: Не маршрутизируемый -panel.pages.status.published: Опубликованный -panel.pages.status.routable: Маршрутизируемый -panel.pages.summary: Сводка -panel.pages.template: Шаблон -panel.pages.text: Текст panel.pages.toggleChildren: Переключить дочерние страницы panel.pages.viewPage: Просмотреть страницу panel.panel: Панель администрирования diff --git a/panel/views/fields/template.php b/panel/views/fields/template.php index d49e9fbc..2d7243e0 100644 --- a/panel/views/fields/template.php +++ b/panel/views/fields/template.php @@ -8,7 +8,6 @@ 'hidden' => $field->isHidden(), ]) ?>> templates() as $template) : ?> - schemes()->get('pages.' . $template->name()) ?> - + \ No newline at end of file diff --git a/panel/views/fields/upload.php b/panel/views/fields/upload.php index c593d1d9..707a7034 100644 --- a/panel/views/fields/upload.php +++ b/panel/views/fields/upload.php @@ -1,9 +1,10 @@ -has('label')) : ?> - - get('listFiles', false) && ($model = $field->parent()?->model())) : ?> insert('fields.partials.filelist', ['model' => $model, 'files' => $field->collection()]); ?> +has('label')) : ?> + + has('suggestion')) : ?>(= $this->escape($field->get('suggestion')) ?>) + attr([ 'type' => 'file', 'class' => ['form-input', 'form-input-file'], diff --git a/panel/views/pages/tree.php b/panel/views/pages/tree.php index 097e95eb..243deaa1 100644 --- a/panel/views/pages/tree.php +++ b/panel/views/pages/tree.php @@ -1,6 +1,6 @@