feat: UI-feinschliff, scan-vorlagenerkennung, einmal-laden, DE/EN-sprachen

UI:
- Ein-/Ausklappen jetzt mit grossem +/- Icon statt kleinem Pfeil.
- "Entfernen" ist ein Papierkorb-Symbol (dashicon).
- Aktiver Tab klar gekennzeichnet (Akzent-Unterstrich + Farbe).
- 20px Abstand zwischen Tabs und Inhalt.

Funktionen:
- Scan erkennt Anbieter, fuer die es eine Vorlage gibt ("Vorlage verfuegbar"),
  und "Vorlage uebernehmen" fuellt die komplette Vorlage statt nur Host/Pattern.
- Platzhalter: Checkbox "Diesen Dienst kuenftig immer laden" (Standard AN).
  Abgewaehlt -> Inhalt wird nur einmal geladen, keine dauerhafte Einwilligung.

i18n:
- Sprachumschaltung: Deutsch fuer alle de_* Locales, Englisch fuer alle anderen
  (plugin_locale-Filter). Vollstaendige englische Uebersetzung (126 Strings,
  inkl. Vorlagentexte/Empfaenger) als gdpr-content-blocker-en_US.po/.mo.
- Helper-Skripte (extract/build) in hilfsdaten/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
s4luorth
2026-06-07 15:06:16 +02:00
parent ecb5e1bd22
commit 3c37bf63cc
10 changed files with 752 additions and 16 deletions

View File

@@ -38,6 +38,17 @@ require_once CB_DIR . 'includes/class-autodetect.php';
require_once CB_DIR . 'includes/class-license.php';
require_once CB_DIR . 'includes/class-updater.php';
// Language policy: German source strings for any German locale (de_*), English
// for everything else. We map the plugin's locale accordingly and ship an
// en_US translation. Applies to admin and frontend (filter runs for both).
add_filter( 'plugin_locale', 'cb_plugin_locale', 10, 2 );
function cb_plugin_locale( $locale, $domain ) {
if ( $domain !== 'gdpr-content-blocker' ) {
return $locale;
}
return str_starts_with( (string) $locale, 'de' ) ? 'de_DE' : 'en_US';
}
add_action( 'plugins_loaded', 'cb_init' );
function cb_init(): void {