From 43549c633448606efe8f2189232015440fd34441 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 18 Feb 2026 23:50:02 +0100 Subject: [PATCH] fix: restructure locale keys to use proper nesting for migrate section The i18n system resolves dots as nested path separators, but migrate keys were flat strings with dots in the key name. Restructure migrate as a nested object with a title sub-key. --- lib/controllers/migrate.js | 4 ++-- locales/en.json | 38 +++++++++++++++++---------------- package.json | 2 +- views/activitypub-dashboard.njk | 2 +- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/lib/controllers/migrate.js b/lib/controllers/migrate.js index efcc633..f3c97c8 100644 --- a/lib/controllers/migrate.js +++ b/lib/controllers/migrate.js @@ -16,7 +16,7 @@ export function migrateGetController(mountPath) { return async (request, response, next) => { try { response.render("activitypub-migrate", { - title: response.locals.__("activitypub.migrate"), + title: response.locals.__("activitypub.migrate.title"), mountPath, result: null, }); @@ -92,7 +92,7 @@ export function migratePostController(mountPath, pluginOptions) { } response.render("activitypub-migrate", { - title: response.locals.__("activitypub.migrate"), + title: response.locals.__("activitypub.migrate.title"), mountPath, result, }); diff --git a/locales/en.json b/locales/en.json index 9453cb8..4f25669 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4,7 +4,6 @@ "followers": "Followers", "following": "Following", "activities": "Activity log", - "migrate": "Mastodon migration", "recentActivity": "Recent activity", "noActivity": "No activity yet. Once your actor is federated, interactions will appear here.", "noFollowers": "No followers yet.", @@ -20,22 +19,25 @@ "direction": "Direction", "directionInbound": "Received", "directionOutbound": "Sent", - "migrate.aliasLabel": "Your old Mastodon account URL", - "migrate.aliasHint": "e.g. https://mstdn.social/users/rmdes — sets alsoKnownAs on your actor", - "migrate.aliasSave": "Save alias", - "migrate.importLabel": "Import followers and following", - "migrate.fileLabel": "Mastodon export CSV", - "migrate.fileHint": "Upload following_accounts.csv from your Mastodon data export", - "migrate.importButton": "Import", - "migrate.importFollowing": "Import following list", - "migrate.importFollowers": "Import followers list (pending until they re-follow after Move)", - "migrate.step1Title": "Step 1 — Configure actor alias", - "migrate.step1Desc": "Link your old Mastodon account to this actor so the fediverse knows they are the same person.", - "migrate.step2Title": "Step 2 — Import followers/following", - "migrate.step2Desc": "Upload your Mastodon data export CSV to import your social graph.", - "migrate.step3Title": "Step 3 — Trigger Move on Mastodon", - "migrate.step3Desc": "Go to your Mastodon instance → Preferences → Account → Move to a different account. Enter your new handle and confirm. After the Move, followers will automatically re-follow you here.", - "migrate.success": "Imported %d following, %d followers (%d failed).", - "migrate.aliasSuccess": "Actor alias updated." + "migrate": { + "title": "Mastodon migration", + "step1Title": "Step 1 — Configure actor alias", + "step1Desc": "Link your old Mastodon account to this actor so the fediverse knows they are the same person.", + "aliasLabel": "Your old Mastodon account URL", + "aliasHint": "e.g. https://mstdn.social/users/rmdes — sets alsoKnownAs on your actor", + "aliasSave": "Save alias", + "step2Title": "Step 2 — Import followers/following", + "step2Desc": "Upload your Mastodon data export CSV to import your social graph.", + "importLabel": "Import followers and following", + "fileLabel": "Mastodon export CSV", + "fileHint": "Upload following_accounts.csv from your Mastodon data export", + "importButton": "Import", + "importFollowing": "Import following list", + "importFollowers": "Import followers list (pending until they re-follow after Move)", + "step3Title": "Step 3 — Trigger Move on Mastodon", + "step3Desc": "Go to your Mastodon instance → Preferences → Account → Move to a different account. Enter your new handle and confirm. After the Move, followers will automatically re-follow you here.", + "success": "Imported %d following, %d followers (%d failed).", + "aliasSuccess": "Actor alias updated." + } } } diff --git a/package.json b/package.json index 8aa24e7..5376648 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rmdes/indiekit-endpoint-activitypub", - "version": "0.1.3", + "version": "0.1.4", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "keywords": [ "indiekit", diff --git a/views/activitypub-dashboard.njk b/views/activitypub-dashboard.njk index dcd304e..10513da 100644 --- a/views/activitypub-dashboard.njk +++ b/views/activitypub-dashboard.njk @@ -23,7 +23,7 @@ url: mountPath + "/admin/activities" }, { - title: __("activitypub.migrate"), + title: __("activitypub.migrate.title"), url: mountPath + "/admin/migrate" } ]}) }}