From a2985f644f4fcc60bdd83b8d5515f63552719a14 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Mon, 20 May 2024 22:51:57 +0200 Subject: [PATCH 1/3] i18n Sprachdateien und wildcard-Vorlage --- lang/da_dk.lang | 21 +++++++++++++++++++++ lang/de_de.lang | 9 +++++++-- lang/el_gr.lang | 21 +++++++++++++++++++++ lang/en_gb.lang | 21 +++++++++++++++++++++ lang/fi_fi.lang | 21 +++++++++++++++++++++ lang/fr_fr.lang | 21 +++++++++++++++++++++ lang/it_it.lang | 21 +++++++++++++++++++++ lang/nl_nl.lang | 21 +++++++++++++++++++++ lang/no_no.lang | 21 +++++++++++++++++++++ lang/pl_pl.lang | 21 +++++++++++++++++++++ lang/ro_ro.lang | 21 +++++++++++++++++++++ lang/sv_se.lang | 21 +++++++++++++++++++++ lang/tr_tr.lang | 21 +++++++++++++++++++++ lang/uk_ua.lang | 21 +++++++++++++++++++++ wildcard/translations.json | 25 +++++++++++++++++++++++++ 15 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 lang/da_dk.lang create mode 100644 lang/el_gr.lang create mode 100644 lang/en_gb.lang create mode 100644 lang/fi_fi.lang create mode 100644 lang/fr_fr.lang create mode 100644 lang/it_it.lang create mode 100644 lang/nl_nl.lang create mode 100644 lang/no_no.lang create mode 100644 lang/pl_pl.lang create mode 100644 lang/ro_ro.lang create mode 100644 lang/sv_se.lang create mode 100644 lang/tr_tr.lang create mode 100644 lang/uk_ua.lang create mode 100644 wildcard/translations.json diff --git a/lang/da_dk.lang b/lang/da_dk.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/da_dk.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/de_de.lang b/lang/de_de.lang index 94edb9c..7b39212 100644 --- a/lang/de_de.lang +++ b/lang/de_de.lang @@ -1,16 +1,21 @@ -blaupause_title = Blaupause +blaupause_title = Blaupause # Titel des Addons + +# Menüpunkte blaupause_table = Blaupause blaupause_settings = Einstellungen blaupause_docs = Hilfe -# FriendsOfREDAXO-Addons können bei YTraduco zur Übersetzung eingereicht werden +# Tipp: FriendsOfREDAXO-Addons können bei YTraduco zur Übersetzung eingereicht werden. +# Fertige Übersetzungen mit Copilot oder Profi-Übersetzungstools an. # Konfigurationsformulare + blaupause_config = Einstellungen blaupause_config_mytextfield_label = Test-Feld blaupause_config_mytextfield_notice = Notiz, die etwas erklärt und bspw. einen Standardwert nennt. Hier: Test # YForm Tabellen-Übersetzung + blaupause_table_name_label = Name blaupause_table_name_notice = Notiz, die etwas erklärt und auch einen Beispielwert nennen kann, z.B.: Mein Name diff --git a/lang/el_gr.lang b/lang/el_gr.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/el_gr.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/en_gb.lang b/lang/en_gb.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/en_gb.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/fi_fi.lang b/lang/fi_fi.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/fi_fi.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/fr_fr.lang b/lang/fr_fr.lang new file mode 100644 index 0000000..aebfeb6 --- /dev/null +++ b/lang/fr_fr.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Titre de l'addon + +# Éléments de menu + +blaupause_table = Blueprint +blaupause_settings = Paramètres +blaupause_docs = Aide + +# Astuce : Les addons FriendsOfREDAXO peuvent être soumis à YTraduco pour traduction. +# Traductions finies avec Copilot ou outils de traduction professionnels. + +# Formulaires de configuration + +blaupause_config = Paramètres +blaupause_config_mytextfield_label = Champ de test +blaupause_config_mytextfield_notice = Note expliquant quelque chose et mentionnant par exemple une valeur par défaut. Ici : Test + +# Traduction de table YForm + +blaupause_table_name_label = Nom +blaupause_table_name_notice = Note expliquant quelque chose et pouvant mentionner une valeur d'exemple, par exemple : Mon nom diff --git a/lang/it_it.lang b/lang/it_it.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/it_it.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/nl_nl.lang b/lang/nl_nl.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/nl_nl.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/no_no.lang b/lang/no_no.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/no_no.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/pl_pl.lang b/lang/pl_pl.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/pl_pl.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/ro_ro.lang b/lang/ro_ro.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/ro_ro.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/sv_se.lang b/lang/sv_se.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/sv_se.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/tr_tr.lang b/lang/tr_tr.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/tr_tr.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/lang/uk_ua.lang b/lang/uk_ua.lang new file mode 100644 index 0000000..c11fe60 --- /dev/null +++ b/lang/uk_ua.lang @@ -0,0 +1,21 @@ +blaupause_title = Blueprint # Addon title + +# Menu items + +blaupause_table = Blueprint +blaupause_settings = Settings +blaupause_docs = Help + +# Tip: FriendsOfREDAXO addons can be submitted to YTraduco for translation. +# Complete translations with Copilot or professional translation tools. + +# Configuration forms + +blaupause_config = Settings +blaupause_config_mytextfield_label = Test field +blaupause_config_mytextfield_notice = Note explaining something and possibly mentioning a default value. Here: Test + +# YForm table translation + +blaupause_table_name_label = Name +blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: My Name diff --git a/wildcard/translations.json b/wildcard/translations.json new file mode 100644 index 0000000..41783c8 --- /dev/null +++ b/wildcard/translations.json @@ -0,0 +1,25 @@ +{ + "wildcards": { + "blaupause.beispiel.string": { + "timestamp": "2024-05-20 12:00:00", + "translations": { + "da_DK": "Blåprint", + "de_DE": "Blaupause", + "el_GR": "Πρότυπο", + "en_GB": "Blueprint", + "es_ES": "Plantilla", + "fi_FI": "Malli", + "fr_FR": "Modèle", + "it_IT": "Modello", + "nl_NL": "Sjabloon", + "no_NO": "Mal", + "pl_PL": "Szablon", + "ro_RO": "Șablon", + "sl_SI": "Predloga", + "sv_SE": "Mall", + "tr_TR": "Şablon", + "uk_UA": "Шаблон" + } + } + } +} From 50b185e1c09ee137cc7129ac7b619a93a48e7332 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Mon, 20 May 2024 22:57:45 +0200 Subject: [PATCH 2/3] div. Korrekturen --- README.md | 18 +++++++++++++----- boot.php | 8 -------- install.php | 4 +++- update.php | 3 +++ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3208906..af05608 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Vorlage für REDAXO-Addons für einen schnelleren Start bei der Addon-Entwicklung. -1. https://github.com/alexplusde/blaupause/archive/refs/heads/main.zip ZIP der aktuellen Vorlage herunterladen oder direkt in GitHub ein Repo auf Basis von `alexplusde/blaupause` erstellen: https://github.com/new/import und dort `https://github.com/alexplusde/blaupause.git` angeben. -2. Mit "Suchen und Ersetzen" alles, was `blaupause` heißt, durch den Namen deines Addons ersetzen, z.B. `supi-dupi-kalender`, und speichern. Sowohl Dateinamen, als auch Dateiinhalte. +1. ZIP der aktuellen Vorlage herunterladen oder direkt in GitHub ein Repo auf Basis von `alexplusde/blaupause` erstellen: und dort `https://github.com/alexplusde/blaupause.git` angeben. +2. Mit "Suchen und Ersetzen" alles, was `blaupause` heißt, durch den Namen deines Addons ersetzen, z.B. `supi-dupi-kalender`, und speichern. Sowohl Dateinamen, als auch Dateiinhalte. 3. Alles löschen, was du aktuell nicht brauchst (oder für später auskommentiert lassen) ## Features @@ -38,12 +38,20 @@ Liefere passende YOrm Dataset-Methoden mit deinem Addon. Diese kannst du dir gan ### `lang/` -Blaupause für deine eigene Sprachdatei. Beginne die Addon-Entwicklung direkt so, dass weitere Sprachen ohne Anpassungen ergänzt werden können. +Blaupause für deine eigenen Sprachdateien. Beginne die Addon-Entwicklung direkt so, dass weitere Sprachen ohne Anpassungen ergänzt werden können. Dazu kannst du in REDAXO an verschiedenen Stellen `rex_i18n::msg('blaupause_key')` nutzen oder `translate:blaupause_key` in YForm-Tabellen und Modulnamen. + +### `pages/blaupause.settings.php` + +Blaupause für die Einstellungsseite deines Addons. Passe die Einstellungsseite an deine Bedürfnisse an und nutze die REDAXO-Formularklassen `rex_config_form` und `rex_form`. ### `fragments/` Blaupause für die Nutzung eigener Fragmente. +### `wildcard/` + +In Arbeit: Definiere eigene Sprachkeys für das Addon [Wildcard](https://github.com/alexplusde/wildcard) oder Sprog und lasse diese automatisch installieren und updaten. + ### Docs-Seite Passe diese README.md-Datei an und spiele sie als Hilfe-Seite zu deinem Addon aus. Halte dich an die Struktur dieser README.md-Datei für deine eigenen Addons, indem du die wichtigsten Funktionen, Klassen und Methoden sowie den Installationsprozess und die Funktionsweise erklärst. Mit Verweis auf die Autoren, Projekt-Lead und Credits. @@ -59,8 +67,8 @@ MIT Lizenz, siehe [LICENSE.md](https://github.com/alexplusde/blaupause/blob/mast ## Autoren **Alexander Walther** -http://www.alexplus.de -https://github.com/alexplusde + + **Projekt-Lead** [Alexander Walther](https://github.com/alexplusde) diff --git a/boot.php b/boot.php index a4722a5..53e6dac 100644 --- a/boot.php +++ b/boot.php @@ -33,11 +33,3 @@ rex_view::addJsFile($this->getAssetsUrl('backend.js')); } */ - -// Beispiel: Cronjob registriert, blaupause_cronjob.php beachten. -// https://friendsofredaxo.github.io/tricks/addons/cronjob/article_archive_cronjob#artikel-autoarchivierung-mittels-cronjob -/* -if (rex_addon::get('cronjob')->isAvailable() && !rex::isSafeMode()) { -rex_cronjob_manager::registerType('rex_cronjob_blaupause'); -} -*/ diff --git a/install.php b/install.php index 1620eb4..9190378 100644 --- a/install.php +++ b/install.php @@ -4,10 +4,12 @@ $addon = rex_addon::get('blaupause'); if (rex_addon::get('yform')->isAvailable() && !rex::isSafeMode()) { - rex_yform_manager_table_api::importTablesets(rex_file::get(rex_path::addon($addon->getName(), 'install/rex_blaupause.tableset.json'))); + rex_yform_manager_table_api::importTablesets(rex_file::get(__DIR__ . 'install/rex_blaupause.tableset.json')); rex_yform_manager_table::deleteCache(); } +/* Todo: Wildcard aktualisieren */ + /* $modules = scandir(rex_path::addon("blaupause")."module"); diff --git a/update.php b/update.php index e69de29..9b35836 100644 --- a/update.php +++ b/update.php @@ -0,0 +1,3 @@ + Date: Mon, 20 May 2024 22:58:01 +0200 Subject: [PATCH 3/3] Update package.yml --- package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yml b/package.yml index d6843ee..9fa8654 100644 --- a/package.yml +++ b/package.yml @@ -1,5 +1,5 @@ package: blaupause # Addon-Key, ggf. wie er bei MyREDAXO hinterlegt ist. -version: '2.0.0-dev-2024-02-11' # Aktuelle Version. +version: '2.0.0-dev-2024-05-20' # Aktuelle Version. author: 'Alexander Walther' # Name(n) der Autoren, wird im Installer gezeigt supportpage: https://github.com/alexplusde/blaupause # Support-Seite, wird im Installer gezeigt # load: late