diff --git a/CHANGELOG.md b/CHANGELOG.md index 05613b0..0ba142a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.1.2](https://github.com/elpamplina/mastodon-threading/compare/1.1.1...1.1.2) + +### New features + +* Error messages more informative. + ## [1.1.1](https://github.com/elpamplina/mastodon-threading/compare/1.1.0...1.1.1) ### Bug fixes diff --git a/lang/de.json b/lang/de.json index 0ebaf20..f0f9a75 100644 --- a/lang/de.json +++ b/lang/de.json @@ -54,11 +54,11 @@ "no_selection": "Kein Text ausgewählt!", "no_text": "Kein Text zum Versenden!", "size_exceeded": "NICHT VERSENDET: Mehr als {{max}} Zeichen in einem Beitrag.", - "file_size_exceeded": "NICHT VERSENDET: Größe der Anhänge wurde überschritten.", + "file_size_exceeded": "NICHT VERSENDET: Größe der Anhänge wurde überschritten: {{file}}", "alt_exceeded": "NICHT VERSENDET: Mehr als {{max}} Zeichen in der Beschreibung.", "attachment_exceeded": "NICHT VERSENDET: Mehr als {{max}} angehängte Dateien in einem Beitrag.", "void_fragment": "NICHT VERSENDET: Leere Fragmente können nicht versendet werden! (z.B. Leerzeilen außerhalb des Threads)", - "file_not_found": "FEHLER: Angehängte Dateien konnten nicht gefunden werden.", + "file_not_found": "FEHLER: Angehängte Dateien konnten nicht gefunden werden: {{file}}", "filetype_not_allowed": "FEHLER: Typ des Anhangs wird nicht unterstützt.", "rate_limit": "FEHLER: Postlimit erreicht. Warten Sie 5 Minuten und versuchen Sie es erneut." } diff --git a/lang/en.json b/lang/en.json index f452b59..d0c7b81 100644 --- a/lang/en.json +++ b/lang/en.json @@ -54,11 +54,11 @@ "no_selection": "No text selected!", "no_text": "No text to send!", "size_exceeded": "NOT SENT: More than {{max}} characters in one post.", - "file_size_exceeded": "NOT SENT: Attachment size exceeded.", + "file_size_exceeded": "NOT SENT: Attachment size exceeded: {{file}}", "alt_exceeded": "NOT SENT: More than {{max}} characters in description.", "attachment_exceeded": "NOT SENT: More than {{max}} images in one post.", "void_fragment": "NOT SENT: Can't send empty fragments!", - "file_not_found": "ERROR: Attachment file not found.", + "file_not_found": "ERROR: Attachment file not found: {{file}}", "filetype_not_allowed": "ERROR: Attachment type not supported.", "rate_limit": "ERROR: Post limit reached. Wait 5 minutes and retry." } diff --git a/lang/es.json b/lang/es.json index 75747f0..aa28768 100644 --- a/lang/es.json +++ b/lang/es.json @@ -56,11 +56,11 @@ "no_selection": "¡No hay texto seleccionado!", "no_text": "¡No hay texto para enviar!", "size_exceeded": "NO ENVIADO: Se superan los {{max}} caracteres.", - "file_size_exceeded": "NO ENVIADO: Se supera el tamaño de archivo adjunto.", + "file_size_exceeded": "NO ENVIADO: Se supera el tamaño de archivo adjunto: {{file}}", "alt_exceeded": "NO ENVIADO: Se superan los {{max}} caracteres en la descripción.", "attachment_exceeded": "NO ENVIADO: Se superan las {{max}} imágenes en un post.", "void_fragment": "NO ENVIADO: Hay fragmentos vacíos.", - "file_not_found": "ERROR: Archivo adjunto no encontrado.", + "file_not_found": "ERROR: Archivo adjunto no encontrado: {{file}}", "filetype_not_allowed": "ERROR: Tipo de adjunto no soportado.", "rate_limit": "ERROR: Límite de posts alcanzado. Espera 5 minutos para reintentar." } diff --git a/main.ts b/main.ts index c3ef7dd..d09dd09 100644 --- a/main.ts +++ b/main.ts @@ -271,13 +271,13 @@ export default class MastodonThreading extends Plugin { if (mimetype.startsWith('image')) { if (post.images.some(it => !it.isimage)) { // Trying to add image to videos - new Notice(t('error.filetype_not_allowed')); + new Notice(t('error.filetype_not_allowed', {file: m[1]})); return; } } else { // Trying to add video to another media - new Notice(t('error.filetype_not_allowed')); + new Notice(t('error.filetype_not_allowed', {file: m[1]})); return; } } @@ -287,12 +287,12 @@ export default class MastodonThreading extends Plugin { // @ts-ignore file = this.app.vault.getFileByPath(`${this.app.vault.getConfig("attachmentFolderPath").replace(/^\.\//, '')}/${m[1]}`); if (file === null) { - new Notice(t('error.file_not_found')); + new Notice(t('error.file_not_found', {file: m[1]})); return; } } if (file.stat.size > (mimetype.startsWith('image') ? this.settings.serverMaxImage : this.settings.serverMaxVideo)) { - new Notice(t('error.file_size_exceeded')); + new Notice(t('error.file_size_exceeded', {file: m[1]})); return; } let desc: string = ''; diff --git a/manifest.json b/manifest.json index 84d124b..8db65b1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "mastodon-threading", "name": "Mastodon Threading", - "version": "1.1.1", + "version": "1.1.2", "minAppVersion": "1.7.7", "description": "Compose and post threads to Mastodon.", "author": "El Pamplina de Cai", diff --git a/package.json b/package.json index f83a467..a26294f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mastodon-threading", - "version": "1.1.1", + "version": "1.1.2", "description": "Obsidian plugin to compose and post threads to Mastodon", "main": "main.js", "scripts": { diff --git a/versions.json b/versions.json index 8e91508..8c4f398 100644 --- a/versions.json +++ b/versions.json @@ -7,5 +7,6 @@ "1.0.8": "1.7.7", "1.0.9": "1.7.7", "1.1.0": "1.7.7", - "1.1.1": "1.7.7" + "1.1.1": "1.7.7", + "1.1.2": "1.7.7" } \ No newline at end of file