Skip to content

Commit

Permalink
Merge pull request #12 from alexplusde/i18n
Browse files Browse the repository at this point in the history
I18n - Sprachdateien und Introducing: 🎴🔦 Wildcard
  • Loading branch information
alxndr-w authored May 20, 2024
2 parents 683b96e + 7d36ec0 commit fab8185
Show file tree
Hide file tree
Showing 20 changed files with 325 additions and 17 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <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.
3. Alles löschen, was du aktuell nicht brauchst (oder für später auskommentiert lassen)

## Features
Expand Down Expand Up @@ -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.
Expand All @@ -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
<http://www.alexplus.de>
<https://github.com/alexplusde>

**Projekt-Lead**
[Alexander Walther](https://github.com/alexplusde)
Expand Down
8 changes: 0 additions & 8 deletions boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
*/
4 changes: 3 additions & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
21 changes: 21 additions & 0 deletions lang/da_dk.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
9 changes: 7 additions & 2 deletions lang/de_de.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# 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.: <code>Mein Name</code>
21 changes: 21 additions & 0 deletions lang/el_gr.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/en_gb.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/fi_fi.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/fr_fr.lang
Original file line number Diff line number Diff line change
@@ -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 : <code>Test</code>

# 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 : <code>Mon nom</code>
21 changes: 21 additions & 0 deletions lang/it_it.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/nl_nl.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/no_no.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/pl_pl.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/ro_ro.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/sv_se.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/tr_tr.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
21 changes: 21 additions & 0 deletions lang/uk_ua.lang
Original file line number Diff line number Diff line change
@@ -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: <code>Test</code>

# YForm table translation

blaupause_table_name_label = Name
blaupause_table_name_notice = Note explaining something and possibly mentioning an example value, e.g.: <code>My Name</code>
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions update.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

/* Todo: Wildcard aktualisieren */
Loading

0 comments on commit fab8185

Please sign in to comment.