@flogeez/angular-tiptap-editor 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1076,7 +1076,9 @@ const ENGLISH_TRANSLATIONS = {
1076
1076
  editor: {
1077
1077
  placeholder: "Start typing...",
1078
1078
  character: "character",
1079
+ characterPlural: "characters",
1079
1080
  word: "word",
1081
+ wordPlural: "words",
1080
1082
  linkPrompt: "Enter link URL",
1081
1083
  linkUrlPrompt: "Enter URL",
1082
1084
  confirmDelete: "Are you sure you want to delete this?",
@@ -1110,6 +1112,7 @@ const ENGLISH_TRANSLATIONS = {
1110
1112
  copiedSuccess: "Copied to clipboard!",
1111
1113
  },
1112
1114
  };
1115
+
1113
1116
  const FRENCH_TRANSLATIONS = {
1114
1117
  toolbar: {
1115
1118
  bold: "Gras\nCtrl+B",
@@ -1262,7 +1265,9 @@ const FRENCH_TRANSLATIONS = {
1262
1265
  editor: {
1263
1266
  placeholder: "Commencez à écrire...",
1264
1267
  character: "caractère",
1268
+ characterPlural: "caractères",
1265
1269
  word: "mot",
1270
+ wordPlural: "mots",
1266
1271
  linkPrompt: "Entrez l'URL du lien",
1267
1272
  linkUrlPrompt: "Entrez l'URL",
1268
1273
  confirmDelete: "Êtes-vous sûr de vouloir supprimer ceci ?",
@@ -1296,18 +1301,209 @@ const FRENCH_TRANSLATIONS = {
1296
1301
  copiedSuccess: "Copié dans le presse-papiers !",
1297
1302
  },
1298
1303
  };
1304
+
1305
+ const GERMAN_TRANSLATIONS = {
1306
+ toolbar: {
1307
+ bold: "Fett\nStrg+B",
1308
+ italic: "Kursiv\nStrg+I",
1309
+ underline: "Unterstrichen\nStrg+U",
1310
+ strike: "Durchgestrichen\nStrg+Shift+X",
1311
+ code: "Inline-Code\nStrg+E",
1312
+ codeBlock: "Codeblock",
1313
+ superscript: "Hochgestellt",
1314
+ subscript: "Tiefgestellt",
1315
+ highlight: "Hervorheben",
1316
+ highlightPicker: "Hintergrundfarbe",
1317
+ heading1: "Überschrift 1",
1318
+ heading2: "Überschrift 2",
1319
+ heading3: "Überschrift 3",
1320
+ bulletList: "Aufzählungsliste",
1321
+ orderedList: "Nummerierte Liste",
1322
+ blockquote: "Zitatblock",
1323
+ alignLeft: "Links ausrichten",
1324
+ alignCenter: "Zentrieren",
1325
+ alignRight: "Rechts ausrichten",
1326
+ alignJustify: "Blocksatz",
1327
+ link: "Link hinzufügen",
1328
+ image: "Bild hinzufügen",
1329
+ horizontalRule: "Horizontale Linie",
1330
+ table: "Tabelle einfügen",
1331
+ undo: "Rückgängig\nStrg+Z",
1332
+ redo: "Wiederholen\nStrg+Shift+Z",
1333
+ clear: "Leeren",
1334
+ textColor: "Textfarbe",
1335
+ customColor: "Benutzerdefinierte Farbe",
1336
+ presets: "Voreinstellungen",
1337
+ },
1338
+ bubbleMenu: {
1339
+ bold: "Fett\nStrg+B",
1340
+ italic: "Kursiv\nStrg+I",
1341
+ underline: "Unterstrichen\nStrg+U",
1342
+ strike: "Durchgestrichen\nStrg+Shift+X",
1343
+ code: "Code\nStrg+E",
1344
+ superscript: "Hochgestellt",
1345
+ subscript: "Tiefgestellt",
1346
+ highlight: "Hervorheben",
1347
+ highlightPicker: "Hintergrundfarbe",
1348
+ textColor: "Textfarbe",
1349
+ link: "Link",
1350
+ addLink: "Link hinzufügen",
1351
+ editLink: "Link bearbeiten",
1352
+ removeLink: "Link entfernen",
1353
+ linkUrl: "Link-URL",
1354
+ linkText: "Link-Text",
1355
+ openLink: "Link öffnen",
1356
+ customColor: "Benutzerdefinierte Farbe",
1357
+ presets: "Voreinstellungen",
1358
+ },
1359
+ slashCommands: {
1360
+ heading1: {
1361
+ title: "Überschrift 1",
1362
+ description: "Große Abschnittsüberschrift",
1363
+ keywords: ["überschrift", "heading", "h1", "titel", "1", "header"],
1364
+ },
1365
+ heading2: {
1366
+ title: "Überschrift 2",
1367
+ description: "Mittlere Abschnittsüberschrift",
1368
+ keywords: ["überschrift", "heading", "h2", "titel", "2", "header"],
1369
+ },
1370
+ heading3: {
1371
+ title: "Überschrift 3",
1372
+ description: "Kleine Abschnittsüberschrift",
1373
+ keywords: ["überschrift", "heading", "h3", "titel", "3", "header"],
1374
+ },
1375
+ bulletList: {
1376
+ title: "Aufzählungsliste",
1377
+ description: "Eine Aufzählungsliste erstellen",
1378
+ keywords: ["aufzählung", "liste", "bullet", "ul", "unordered"],
1379
+ },
1380
+ orderedList: {
1381
+ title: "Nummerierte Liste",
1382
+ description: "Eine nummerierte Liste erstellen",
1383
+ keywords: ["nummeriert", "liste", "ordered", "ol", "zahlen"],
1384
+ },
1385
+ blockquote: {
1386
+ title: "Zitatblock",
1387
+ description: "Einen Zitatblock hinzufügen",
1388
+ keywords: ["zitat", "blockquote", "quote", "citation"],
1389
+ },
1390
+ code: {
1391
+ title: "Codeblock",
1392
+ description: "Einen Codeblock hinzufügen",
1393
+ keywords: ["code", "codeblock", "pre", "programmierung"],
1394
+ },
1395
+ image: {
1396
+ title: "Bild",
1397
+ description: "Ein Bild einfügen",
1398
+ keywords: ["bild", "image", "foto", "photo", "picture", "img"],
1399
+ },
1400
+ horizontalRule: {
1401
+ title: "Horizontale Linie",
1402
+ description: "Eine horizontale Trennlinie hinzufügen",
1403
+ keywords: ["linie", "horizontal", "rule", "hr", "trennlinie", "separator"],
1404
+ },
1405
+ table: {
1406
+ title: "Tabelle",
1407
+ description: "Eine Tabelle einfügen",
1408
+ keywords: ["tabelle", "table", "grid", "raster", "daten", "zeilen", "spalten"],
1409
+ },
1410
+ },
1411
+ table: {
1412
+ addRowBefore: "Zeile davor einfügen",
1413
+ addRowAfter: "Zeile danach einfügen",
1414
+ deleteRow: "Zeile löschen",
1415
+ addColumnBefore: "Spalte davor einfügen",
1416
+ addColumnAfter: "Spalte danach einfügen",
1417
+ deleteColumn: "Spalte löschen",
1418
+ deleteTable: "Tabelle löschen",
1419
+ toggleHeaderRow: "Kopfzeile umschalten",
1420
+ toggleHeaderColumn: "Kopfspalte umschalten",
1421
+ mergeCells: "Zellen verbinden",
1422
+ splitCell: "Zelle teilen",
1423
+ },
1424
+ imageUpload: {
1425
+ selectImage: "Bild auswählen",
1426
+ loadError: "Fehler beim Laden des Bildes",
1427
+ uploadingImage: "Bild wird hochgeladen...",
1428
+ uploadProgress: "Upload-Fortschritt",
1429
+ uploadError: "Upload-Fehler",
1430
+ uploadSuccess: "Upload erfolgreich",
1431
+ imageTooLarge: "Bild ist zu groß",
1432
+ invalidFileType: "Ungültiger Dateityp",
1433
+ dragDropText: "Bilder hierher ziehen und ablegen",
1434
+ changeImage: "Bild ändern",
1435
+ downloadImage: "Bild herunterladen",
1436
+ deleteImage: "Bild löschen",
1437
+ resizeSmall: "Klein",
1438
+ resizeMedium: "Mittel",
1439
+ resizeLarge: "Groß",
1440
+ resizeOriginal: "Originalgröße",
1441
+ alignLeft: "Links ausrichten",
1442
+ alignCenter: "Zentrieren",
1443
+ alignRight: "Rechts ausrichten",
1444
+ resizing: "Größe wird angepasst...",
1445
+ compressing: "Bild wird komprimiert...",
1446
+ compressionError: "Fehler bei der Komprimierung",
1447
+ validating: "Datei wird geprüft...",
1448
+ uploadingToServer: "Upload zum Server...",
1449
+ replacingImage: "Bild wird ersetzt...",
1450
+ insertingImage: "Bild wird in den Editor eingefügt...",
1451
+ noFileSelected: "Keine Bilddatei ausgewählt",
1452
+ selectionCancelled: "Auswahl abgebrochen",
1453
+ },
1454
+ editor: {
1455
+ placeholder: "Beginne zu schreiben...",
1456
+ character: "Zeichen",
1457
+ characterPlural: "Zeichen",
1458
+ word: "Wort",
1459
+ wordPlural: "Wörter",
1460
+ linkPrompt: "Link-URL eingeben",
1461
+ linkUrlPrompt: "URL eingeben",
1462
+ confirmDelete: "Möchtest du dies wirklich löschen?",
1463
+ toggleEdit: "In den Bearbeitungsmodus wechseln",
1464
+ viewMode: "In den Ansichtsmodus wechseln",
1465
+ blockAdd: "Klicken, um einen Block hinzuzufügen",
1466
+ blockDrag: "Ziehen, um diesen Block zu verschieben",
1467
+ },
1468
+ common: {
1469
+ cancel: "Abbrechen",
1470
+ confirm: "Bestätigen",
1471
+ apply: "Anwenden",
1472
+ delete: "Löschen",
1473
+ save: "Speichern",
1474
+ close: "Schließen",
1475
+ loading: "Lädt",
1476
+ error: "Fehler",
1477
+ success: "Erfolg",
1478
+ },
1479
+ export: {
1480
+ export: "Exportieren",
1481
+ html: "HTML",
1482
+ markdown: "Markdown",
1483
+ text: "Nur Text",
1484
+ copyHtml: "Als HTML kopieren",
1485
+ copyMarkdown: "Als Markdown kopieren",
1486
+ copyText: "Als reinen Text kopieren",
1487
+ downloadHtml: ".html herunterladen",
1488
+ downloadMarkdown: ".md herunterladen",
1489
+ downloadText: ".txt herunterladen",
1490
+ copiedSuccess: "In die Zwischenablage kopiert!",
1491
+ },
1492
+ };
1493
+
1299
1494
  class AteI18nService {
1300
1495
  constructor() {
1301
1496
  this._currentLocale = signal("en");
1302
1497
  this._translations = signal({
1303
1498
  en: ENGLISH_TRANSLATIONS,
1304
1499
  fr: FRENCH_TRANSLATIONS,
1500
+ de: GERMAN_TRANSLATIONS,
1305
1501
  });
1306
1502
  // Public signals
1307
1503
  this.currentLocale = this._currentLocale.asReadonly();
1308
1504
  /** All loaded translations (useful for dynamic key access) */
1309
1505
  this.allTranslations = this._translations.asReadonly();
1310
- this.translations = computed(() => this._translations()[this._currentLocale()]);
1506
+ this.translations = computed(() => this._translations()[this._currentLocale()] ?? this._translations().en);
1311
1507
  // Fast translation methods
1312
1508
  this.t = computed(() => this.translations());
1313
1509
  this.toolbar = computed(() => this.translations().toolbar);
@@ -8522,7 +8718,7 @@ class AngularTiptapEditorComponent {
8522
8718
  [class.limit-reached]="finalMaxCharacters() && characterCount() >= finalMaxCharacters()!">
8523
8719
  @if (finalShowCharacterCount()) {
8524
8720
  {{ characterCount() }}
8525
- {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
8721
+ {{ characterCount() > 1 ? currentTranslations().editor.characterPlural : currentTranslations().editor.character }}
8526
8722
  @if (finalMaxCharacters()) {
8527
8723
  / {{ finalMaxCharacters() }}
8528
8724
  }
@@ -8534,7 +8730,7 @@ class AngularTiptapEditorComponent {
8534
8730
 
8535
8731
  @if (finalShowWordCount()) {
8536
8732
  {{ wordCount() }}
8537
- {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
8733
+ {{ wordCount() > 1 ? currentTranslations().editor.wordPlural : currentTranslations().editor.word }}
8538
8734
  }
8539
8735
  </div>
8540
8736
  }
@@ -8683,7 +8879,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
8683
8879
  [class.limit-reached]="finalMaxCharacters() && characterCount() >= finalMaxCharacters()!">
8684
8880
  @if (finalShowCharacterCount()) {
8685
8881
  {{ characterCount() }}
8686
- {{ currentTranslations().editor.character }}{{ characterCount() > 1 ? "s" : "" }}
8882
+ {{ characterCount() > 1 ? currentTranslations().editor.characterPlural : currentTranslations().editor.character }}
8687
8883
  @if (finalMaxCharacters()) {
8688
8884
  / {{ finalMaxCharacters() }}
8689
8885
  }
@@ -8695,7 +8891,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
8695
8891
 
8696
8892
  @if (finalShowWordCount()) {
8697
8893
  {{ wordCount() }}
8698
- {{ currentTranslations().editor.word }}{{ wordCount() > 1 ? "s" : "" }}
8894
+ {{ wordCount() > 1 ? currentTranslations().editor.wordPlural : currentTranslations().editor.word }}
8699
8895
  }
8700
8896
  </div>
8701
8897
  }