From a57de586215050e124bae1c3e968143d5e149289 Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Tue, 12 May 2026 22:38:39 +0500 Subject: [PATCH] Update plugin ID and version; enhance translation settings and documentation --- CHANGELOG.md | 4 ++++ TESTING.md | 6 +++--- manifest.json | 4 ++-- package-lock.json | 10 +++++----- package.json | 2 +- src/translator.ts | 3 ++- src/types.ts | 1 + versions.json | 3 ++- 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac2a10..337df3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.2] — 2026-05-12 + +- Changed ID in manifest to fix "An entry with this ID already exists." + ## [1.0.1] — 2026-05-02 ### Fixed diff --git a/TESTING.md b/TESTING.md index 2778ba8..bc1ea1e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -27,7 +27,7 @@ This produces `main.js` in the repository root. 1. Locate your vault folder. Inside it, open (or create) the directory: ``` - /.obsidian/plugins/ai-translator/ + /.obsidian/plugins/l10n-ai-translator/ ``` 2. Copy the following files from the repository root into that folder: - `main.js` @@ -38,7 +38,7 @@ This produces `main.js` in the repository root. 5. If prompted, select **Turn on community plugins**. 6. Find **L10n.dev - AI Translator** in the list and toggle it on. -> **Tip:** Clone the repository directly into `/.obsidian/plugins/ai-translator/` and run `npm run dev` for live reloading during development. +> **Tip:** Clone the repository directly into `/.obsidian/plugins/l10n-ai-translator/` and run `npm run dev` for live reloading during development. --- @@ -83,7 +83,7 @@ This produces `main.js` in the repository root. ## 6. Mobile testing 1. Build `main.js` on desktop (`npm run build`). -2. Transfer `main.js`, `manifest.json`, and `styles.css` to your vault's `.obsidian/plugins/ai-translator/` folder using a sync solution (e.g. iCloud, Obsidian Sync, or manual file transfer). +2. Transfer `main.js`, `manifest.json`, and `styles.css` to your vault's `.obsidian/plugins/l10n-ai-translator/` folder using a sync solution (e.g. iCloud, Obsidian Sync, or manual file transfer). 3. Open Obsidian on the mobile device and enable the plugin as described in step 2. 4. Repeat the manual test checklist on mobile, paying attention to the language picker and context menu behaviour. diff --git a/manifest.json b/manifest.json index cdbe9a3..91533a2 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { - "id": "ai-translator", + "id": "l10n-ai-translator", "name": "L10n.dev - AI Translator", - "version": "1.0.1", + "version": "1.0.2", "minAppVersion": "0.15.0", "description": "Translate notes into any of 165 languages with AI. Preserves Markdown formatting and structure. Powered by L10n.dev's AI translation API.", "author": "l10n.dev", diff --git a/package-lock.json b/package-lock.json index 11cd73b..9d64207 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-plugin-ai-translator", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-plugin-ai-translator", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "dependencies": { "obsidian": "latest" @@ -2607,9 +2607,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", + "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index c57683a..7f8e3f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-plugin-ai-translator", - "version": "1.0.1", + "version": "1.0.2", "description": "Obsidian plugin to translate notes with AI using l10n.dev", "main": "main.js", "type": "module", diff --git a/src/translator.ts b/src/translator.ts index 08f4846..67719a8 100644 --- a/src/translator.ts +++ b/src/translator.ts @@ -46,8 +46,9 @@ async function doTranslate( { sourceStrings: sourceText, targetLanguageCode: lang.code, - format: "txt", + format: "md", useContractions: true, + translateMetadata: plugin.settings.translateFrontmatter, }, ); translated = result.translations; diff --git a/src/types.ts b/src/types.ts index 854c10f..ff73b6e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,6 +17,7 @@ export interface TranslateRequest { targetLanguageCode: string; format?: string; useContractions?: boolean; + translateMetadata?: boolean; } export interface TranslateResponse { diff --git a/versions.json b/versions.json index 189c17e..f66b649 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { "1.0.0": "0.15.0", - "1.0.1": "0.15.0" + "1.0.1": "0.15.0", + "1.0.2": "0.15.0" }