Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots 📖

feat(guides): add snapshot naming and change summaries

Luis Ortiz9ddc7d598b63
diff --git a/src/core/guides/__tests__/snapshot-diff.test.ts b/src/core/guides/__tests__/snapshot-diff.test.ts
new file mode 100644
index 0000000..3f2fdce
--- /dev/null
+++ b/src/core/guides/__tests__/snapshot-diff.test.ts
@@ -0,0 +1,234 @@
+import { describe, expect, it } from 'vitest';
+import type { ScreenshotEdits } from '@/core/screenshot/types';
+import { diffSnapshots, type SnapshotLike } from '../snapshot-diff';
+import type { Snapshot } from '../types';
+
+type StepInput = SnapshotLike['steps'][number];
+type ShotInput = SnapshotLike['screenshots'][number];
+
+function step(id: string, description = `${id} description`, screenshotId?: string): StepInput {
+ return screenshotId ? { id, description, screenshotId } : { id, description };
+}
+
+function shot(id: string, stepId: string, edits?: ScreenshotEdits): ShotInput & { stepId: string } {
+ return edits ? { id, stepId, edits } : { id, stepId };
+}
+
+function like(steps: StepInput[], overrides: Partial<SnapshotLike> = {}): SnapshotLike {
+ return { title: 'Guide', stepIds: steps.map((s) => s.id), steps, screenshots: [], ...overrides };
+}
+
+const empty = { titleChanged: false, added: 0, removed: 0, reordered: false, edited: 0, images: 0 };
+
+describe('diffSnapshots', () => {
+ it('reports nothing for identical content', () => {
+ const a = like([step('s1'), step('s2', 'second', 'sc1')], { screenshots: [shot('sc1', 's2')] });
+ const b = like([step('s1'), step('s2', 'second', 'sc1')], { screenshots: [shot('sc1', 's2')] });
+
+ expect(diffSnapshots(a, b)).toEqual(empty);
+ });
+
+ it('reports a title change', () => {
+ const a = like([step('s1')], { title: 'Before' });
+ const b = like([step('s1')], { title: 'After' });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, titleChanged: true });
+ });
+
+ it('counts step ids present only in the newer side as added', () => {
+ const a = like([step('s1')]);
+ const b = like([step('s1'), step('s2'), step('s3')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 2 });
+ });
+
+ it('counts step ids present only in the older side as removed', () => {
+ const a = like([step('s1'), step('s2'), step('s3')]);
+ const b = like([step('s2')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, removed: 2 });
+ });
+
+ it('compares step ids as sets, so a pure reorder adds and removes nothing', () => {
+ const a = like([step('s1'), step('s2'), step('s3')]);
+ const b = like([step('s3'), step('s2'), step('s1')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, reordered: true });
+ });
+
+ it('does not report a reorder for a pure append', () => {
+ const a = like([step('s1'), step('s2')]);
+ const b = like([step('s1'), step('s2'), step('s3')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 1 });
+ });
+
+ it('does not report a reorder for an insert at the front', () => {
+ const a = like([step('s1'), step('s2')]);
+ const b = like([step('s3'), step('s1'), step('s2')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 1 });
+ });
+
+ it('does not report a reorder for a pure delete', () => {
+ const a = like([step('s1'), step('s2'), step('s3')]);
+ const b = like([step('s1'), step('s3')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, removed: 1 });
+ });
+
+ it('does not report a reorder when a delete plus an add leaves survivors in order', () => {
+ const a = like([step('s1'), step('s2'), step('s3')]);
+ const b = like([step('s1'), step('s4'), step('s3'), step('s5')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 2, removed: 1 });
+ });
+
+ it('reports a reorder when survivors of a delete change relative order', () => {
+ const a = like([step('s1'), step('s2'), step('s3')]);
+ const b = like([step('s3'), step('s1')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, removed: 1, reordered: true });
+ });
+
+ it('counts steps whose description changed as edited', () => {
+ const a = like([step('s1', 'Old one'), step('s2', 'Old two'), step('s3', 'Same')]);
+ const b = like([step('s1', 'New one'), step('s2', 'New two'), step('s3', 'Same')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, edited: 2 });
+ });
+
+ it('does not count a removed step as edited', () => {
+ const a = like([step('s1', 'Kept'), step('s2', 'Gone')]);
+ const b = like([step('s1', 'Kept')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, removed: 1 });
+ });
+
+ it('does not count an added step as edited', () => {
+ const a = like([step('s1', 'Kept')]);
+ const b = like([step('s1', 'Kept'), step('s2', 'Brand new')]);
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 1 });
+ });
+
+ it('counts a repointed screenshot as an image change', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1')] });
+ const b = like([step('s1', 'Same', 'sc2')], { screenshots: [shot('sc1', 's1'), shot('sc2', 's1')] });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('counts a deleted screenshot as an image change', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1')] });
+ const b = like([step('s1', 'Same')], { screenshots: [shot('sc1', 's1')] });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('counts a newly attached screenshot as an image change', () => {
+ const a = like([step('s1', 'Same')], { screenshots: [] });
+ const b = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1')] });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('counts changed edits on the same screenshot row as an image change', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1', { alt: 'before' })] });
+ const b = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1', { alt: 'after' })] });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('counts changed annotations as an image change', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1', { annotations: [] })] });
+ const b = like([step('s1', 'Same', 'sc1')], {
+ screenshots: [
+ shot('sc1', 's1', { annotations: [{ id: 'a1', type: 'redact', x: 0, y: 0, w: 2, h: 2, style: 'blur' }] }),
+ ],
+ });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('treats absent edits and empty edits as the same', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1')] });
+ const b = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1', {})] });
+
+ expect(diffSnapshots(a, b)).toEqual(empty);
+ });
+
+ it('resolves the screenshot through the step pointer, not by stepId', () => {
+ const a = like([step('s1', 'Same', 'sc2')], {
+ screenshots: [shot('sc1', 's1', { alt: 'stale row' }), shot('sc2', 's1', { alt: 'live row' })],
+ });
+ const b = like([step('s1', 'Same', 'sc2')], {
+ screenshots: [shot('sc1', 's1', { alt: 'stale row changed' }), shot('sc2', 's1', { alt: 'live row' })],
+ });
+
+ expect(diffSnapshots(a, b)).toEqual(empty);
+ });
+
+ it('counts a step once when both its pointer and its edits changed', () => {
+ const a = like([step('s1', 'Same', 'sc1')], { screenshots: [shot('sc1', 's1', { alt: 'one' })] });
+ const b = like([step('s1', 'Same', 'sc2')], {
+ screenshots: [shot('sc1', 's1', { alt: 'one' }), shot('sc2', 's1', { alt: 'two' })],
+ });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, images: 1 });
+ });
+
+ it('ignores screenshots belonging to steps present on only one side', () => {
+ const a = like([step('s1', 'Same'), step('s2', 'Gone', 'sc1')], { screenshots: [shot('sc1', 's2')] });
+ const b = like([step('s1', 'Same'), step('s3', 'New', 'sc2')], { screenshots: [shot('sc2', 's3')] });
+
+ expect(diffSnapshots(a, b)).toEqual({ ...empty, added: 1, removed: 1 });
+ });
+
+ it('reports every dimension at once', () => {
+ const a = like([step('s1', 'One', 'sc1'), step('s2', 'Two'), step('s3', 'Three')], {
+ title: 'Before',
+ screenshots: [shot('sc1', 's1', { alt: 'a' })],
+ });
+ const b = like([step('s3', 'Three'), step('s1', 'One edited', 'sc1'), step('s4', 'Four')], {
+ title: 'After',
+ screenshots: [shot('sc1', 's1', { alt: 'b' })],
+ });
+
+ expect(diffSnapshots(a, b)).toEqual({
+ titleChanged: true,
+ added: 1,
+ removed: 1,
+ reordered: true,
+ edited: 1,
+ images: 1,
+ });
+ });
+
+ it('accepts full Snapshot records on both sides', () => {
+ const base: Snapshot = {
+ id: 'n1',
+ guideId: 'g1',
+ createdAt: 1,
+ contentHash: 'h1',
+ title: 'Guide',
+ stepIds: ['s1'],
+ steps: [
+ {
+ id: 's1',
+ guideId: 'g1',
+ index: 0,
+ description: 'Click it',
+ action: 'click',
+ url: 'https://example.com',
+ timestamp: 1,
+ screenshotId: 'sc1',
+ },
+ ],
+ screenshots: [{ id: 'sc1', stepId: 's1', mimeType: 'image/png', width: 10, height: 10 }],
+ };
+ const next: Snapshot = { ...base, id: 'n2', title: 'Guide renamed' };
+
+ expect(diffSnapshots(base, next)).toEqual({ ...empty, titleChanged: true });
+ });
+});
diff --git a/src/core/guides/__tests__/snapshot-groups.test.ts b/src/core/guides/__tests__/snapshot-groups.test.ts
index 169c654..c174360 100644
--- a/src/core/guides/__tests__/snapshot-groups.test.ts
+++ b/src/core/guides/__tests__/snapshot-groups.test.ts
@@ -2,8 +2,18 @@ import { describe, expect, it } from 'vitest';
import { groupSnapshots } from '../snapshot-groups';
import type { Snapshot } from '../types';
-function snap(id: string, contentHash: string): Snapshot {
- return { id, guideId: 'g1', createdAt: 0, contentHash, title: '', stepIds: [], steps: [], screenshots: [] };
+function snap(id: string, contentHash: string, name?: string): Snapshot {
+ return {
+ id,
+ guideId: 'g1',
+ createdAt: 0,
+ contentHash,
+ title: '',
+ stepIds: [],
+ steps: [],
+ screenshots: [],
+ ...(name === undefined ? {} : { name }),
+ };
}
describe('groupSnapshots', () => {
@@ -42,4 +52,62 @@ describe('groupSnapshots', () => {
it('returns nothing for an empty list', () => {
expect(groupSnapshots([])).toEqual([]);
});
+
+ it('keeps a named snapshot out of a run of three, splitting it into three entries', () => {
+ const rows = groupSnapshots([snap('a', 'h1'), snap('b', 'h1', 'before rewrite'), snap('c', 'h1')]);
+
+ expect(rows.map((r) => r.kind)).toEqual(['entry', 'entry', 'entry']);
+ expect(rows.map((r) => r.kind === 'entry' && r.snapshot.id)).toEqual(['a', 'b', 'c']);
+ });
+
+ it('splits a longer run around a named snapshot', () => {
+ const rows = groupSnapshots([
+ snap('a', 'h1'),
+ snap('b', 'h1'),
+ snap('c', 'h1', 'checkpoint'),
+ snap('d', 'h1'),
+ snap('e', 'h1'),
+ ]);
+
+ expect(rows.map((r) => r.kind)).toEqual(['group', 'entry', 'group']);
+ expect(rows[0].kind === 'group' && rows[0].snapshots.map((s) => s.id)).toEqual(['a', 'b']);
+ expect(rows[1].kind === 'entry' && rows[1].snapshot.id).toBe('c');
+ expect(rows[2].kind === 'group' && rows[2].snapshots.map((s) => s.id)).toEqual(['d', 'e']);
+ });
+
+ it('never hides a named snapshot inside a group', () => {
+ const rows = groupSnapshots([
+ snap('a', 'h1'),
+ snap('b', 'h1', 'first name'),
+ snap('c', 'h1'),
+ snap('d', 'h1'),
+ snap('e', 'h2'),
+ snap('f', 'h2', 'second name'),
+ ]);
+
+ const grouped = rows.flatMap((r) => (r.kind === 'group' ? r.snapshots : []));
+ expect(grouped.some((s) => s.name)).toBe(false);
+ expect(rows.filter((r) => r.kind === 'entry' && r.snapshot.name).length).toBe(2);
+ });
+
+ it('keeps a named snapshot at the head of the list as an entry', () => {
+ const rows = groupSnapshots([snap('a', 'h1', 'named head'), snap('b', 'h1'), snap('c', 'h1')]);
+
+ expect(rows.map((r) => r.kind)).toEqual(['entry', 'group']);
+ expect(rows[0].kind === 'entry' && rows[0].snapshot.id).toBe('a');
+ });
+
+ it('keeps a named snapshot at the tail of the list as an entry', () => {
+ const rows = groupSnapshots([snap('a', 'h1'), snap('b', 'h1'), snap('c', 'h1', 'named tail')]);
+
+ expect(rows.map((r) => r.kind)).toEqual(['group', 'entry']);
+ expect(rows[1].kind === 'entry' && rows[1].snapshot.id).toBe('c');
+ });
+
+ it('treats an empty name as unnamed', () => {
+ const rows = groupSnapshots([snap('a', 'h1'), snap('b', 'h1', ''), snap('c', 'h1')]);
+
+ expect(rows.map((r) => r.kind)).toEqual(['group']);
+ expect(rows[0].kind === 'group' && rows[0].snapshots).toHaveLength(3);
+ });
});
diff --git a/src/core/guides/__tests__/snapshots.test.ts b/src/core/guides/__tests__/snapshots.test.ts
index 5b63561..4d53722 100644
--- a/src/core/guides/__tests__/snapshots.test.ts
+++ b/src/core/guides/__tests__/snapshots.test.ts
@@ -31,6 +31,7 @@ import {
getGuide,
getSnapshots,
permanentlyDeleteGuide,
+ renameSnapshot,
reorderSteps,
replaceScreenshot,
revertToSnapshot,
@@ -184,6 +185,79 @@ describe('getSnapshots', () => {
});
});
+describe('renameSnapshot', () => {
+ it('stores a name on the snapshot without a schema migration', async () => {
+ await seedGuide('g1', { stepIds: [] });
+ const snapshot = await createSnapshot('g1');
+
+ await renameSnapshot(snapshot!.id, 'before rewrite');
+
+ expect((await db.snapshots.get(snapshot!.id))?.name).toBe('before rewrite');
+ expect((await getSnapshots('g1'))[0].name).toBe('before rewrite');
+ });
+
+ it('trims surrounding whitespace', async () => {
+ await seedGuide('g1', { stepIds: [] });
+ const snapshot = await createSnapshot('g1');
+
+ await renameSnapshot(snapshot!.id, ' spaced out ');
+
+ expect((await db.snapshots.get(snapshot!.id))?.name).toBe('spaced out');
+ });
+
+ it('clears the name when given an empty or whitespace-only value', async () => {
+ await seedGuide('g1', { stepIds: [] });
+ const snapshot = await createSnapshot('g1');
+ await renameSnapshot(snapshot!.id, 'named');
+
+ await renameSnapshot(snapshot!.id, ' ');
+
+ expect((await db.snapshots.get(snapshot!.id))?.name).toBeUndefined();
+ });
+
+ it('leaves createdAt and contentHash untouched', async () => {
+ await seedGuide('g1', { stepIds: ['s1'] });
+ await db.steps.add(makeStep({ id: 's1', guideId: 'g1' }));
+ const snapshot = await createSnapshot('g1');
+
+ await renameSnapshot(snapshot!.id, 'milestone');
+
+ const stored = await db.snapshots.get(snapshot!.id);
+ expect(stored?.createdAt).toBe(snapshot!.createdAt);
+ expect(stored?.contentHash).toBe(snapshot!.contentHash);
+ });
+
+ it('keeps the content hash out of naming, so a named version still groups with unchanged siblings', async () => {
+ await seedGuide('g1', { stepIds: ['s1'] });
+ await db.steps.add(makeStep({ id: 's1', guideId: 'g1' }));
+ const first = await createSnapshot('g1');
+
+ await renameSnapshot(first!.id, 'checkpoint');
+ const second = await createSnapshot('g1');
+
+ expect(second?.contentHash).toBe(first?.contentHash);
+ expect(second?.name).toBeUndefined();
+ });
+
+ it('does not rename other snapshots or touch the guide', async () => {
+ await seedGuide('g1', { stepIds: [], updatedAt: 5000 });
+ const first = await createSnapshot('g1');
+ const second = await createSnapshot('g1');
+ await db.guides.update('g1', { updatedAt: 5000 });
+ broadcasts.length = 0;
+
+ await renameSnapshot(second!.id, 'only this one');
+
+ expect((await db.snapshots.get(first!.id))?.name).toBeUndefined();
+ expect((await db.guides.get('g1'))?.updatedAt).toBe(5000);
+ expect(broadcasts.filter((m) => !!m && typeof m === 'object' && 'type' in m)).toEqual([]);
+ });
+
+ it('is a no-op for an unknown snapshot id', async () => {
+ await expect(renameSnapshot('missing', 'ghost')).resolves.toBeUndefined();
+ });
+});
+
describe('revertToSnapshot', () => {
it('restores title, step order and step content', async () => {
await seedGuide('g1', { stepIds: ['s1', 's2'], title: 'Original' });
diff --git a/src/core/guides/service.ts b/src/core/guides/service.ts
index f848e89..b62df84 100644
--- a/src/core/guides/service.ts
+++ b/src/core/guides/service.ts
@@ -252,6 +252,11 @@ export async function getSnapshots(guideId: string): Promise<Snapshot[]> {
.toArray();
}
+export async function renameSnapshot(snapshotId: string, name: string): Promise<void> {
+ const trimmed = name.trim();
+ await db.snapshots.update(snapshotId, { name: trimmed === '' ? undefined : trimmed });
+}
+
export async function revertToSnapshot(snapshotId: string): Promise<Snapshot | null> {
const undo = await db.transaction('rw', db.guides, db.steps, db.screenshots, db.snapshots, async () => {
const snapshot = await db.snapshots.get(snapshotId);
diff --git a/src/core/guides/snapshot-diff.ts b/src/core/guides/snapshot-diff.ts
new file mode 100644
index 0000000..9abf78f
--- /dev/null
+++ b/src/core/guides/snapshot-diff.ts
@@ -0,0 +1,59 @@
+import type { ScreenshotEdits } from '@/core/screenshot/types';
+
+interface DiffStep {
+ id: string;
+ description: string;
+ screenshotId?: string;
+}
+
+interface DiffScreenshot {
+ id: string;
+ edits?: ScreenshotEdits;
+}
+
+export interface SnapshotLike {
+ title: string;
+ stepIds: readonly string[];
+ steps: readonly DiffStep[];
+ screenshots: readonly DiffScreenshot[];
+}
+
+export interface SnapshotDiff {
+ titleChanged: boolean;
+ added: number;
+ removed: number;
+ reordered: boolean;
+ edited: number;
+ images: number;
+}
+
+function editsKey(snapshot: SnapshotLike, screenshotId: string | undefined): string {
+ if (!screenshotId) return '{}';
+ const row = snapshot.screenshots.find((r) => r.id === screenshotId);
+ return JSON.stringify(row?.edits ?? {});
+}
+
+export function diffSnapshots(from: SnapshotLike, to: SnapshotLike): SnapshotDiff {
+ const fromIds = new Set(from.stepIds);
+ const toIds = new Set(to.stepIds);
+
+ const added = to.stepIds.filter((id) => !fromIds.has(id)).length;
+ const removed = from.stepIds.filter((id) => !toIds.has(id)).length;
+
+ const survivorsBefore = from.stepIds.filter((id) => toIds.has(id));
+ const survivorsAfter = to.stepIds.filter((id) => fromIds.has(id));
+ const reordered = survivorsBefore.some((id, i) => survivorsAfter[i] !== id);
+
+ const fromSteps = new Map(from.steps.map((s) => [s.id, s]));
+ let edited = 0;
+ let images = 0;
+ for (const step of to.steps) {
+ const before = fromSteps.get(step.id);
+ if (!before) continue;
+ if (before.description !== step.description) edited++;
+ if (before.screenshotId !== step.screenshotId) images++;
+ else if (editsKey(from, before.screenshotId) !== editsKey(to, step.screenshotId)) images++;
+ }
+
+ return { titleChanged: from.title !== to.title, added, removed, reordered, edited, images };
+}
diff --git a/src/core/guides/snapshot-groups.ts b/src/core/guides/snapshot-groups.ts
index 3ca0cb7..2775e0d 100644
--- a/src/core/guides/snapshot-groups.ts
+++ b/src/core/guides/snapshot-groups.ts
@@ -13,6 +13,11 @@ export function groupSnapshots(snapshots: Snapshot[]): SnapshotRow[] {
};
for (const snapshot of snapshots) {
+ if (snapshot.name) {
+ flush();
+ rows.push({ kind: 'entry', snapshot });
+ continue;
+ }
if (run.length > 0 && run[0].contentHash !== snapshot.contentHash) flush();
run.push(snapshot);
}
diff --git a/src/core/guides/types.ts b/src/core/guides/types.ts
index 4c4dfb9..4f69bc0 100644
--- a/src/core/guides/types.ts
+++ b/src/core/guides/types.ts
@@ -71,6 +71,7 @@ export interface Snapshot {
guideId: string;
createdAt: number;
contentHash: string;
+ name?: string;
title: string;
stepIds: string[];
steps: Step[];
diff --git a/src/locales/de.yml b/src/locales/de.yml
index 4e92ef8..65bf916 100644
--- a/src/locales/de.yml
+++ b/src/locales/de.yml
@@ -173,6 +173,22 @@ history:
restoreError: Wiederherstellen hat nicht geklappt. Versuche es gleich noch einmal.
storageFull: Zu wenig Speicher für einen Rückgängig-Punkt. Lösche eine Anleitung und versuche es erneut.
empty: Noch keine früheren Versionen. Sie erscheinen hier, sobald du diese Anleitung bearbeitest.
+ nameVersion: Version benennen
+ namePlaceholder: Versionsname
+ allVersions: Alle Versionen
+ namedOnly: Nur benannte Versionen
+ emptyNamed: Noch keine benannten Versionen. Benenne eine, um sie später wiederzufinden.
+ renameError: Name konnte nicht gespeichert werden. Versuche es erneut.
+ changeTitle: Titel geändert
+ changeStepAdded: "$1 Schritt hinzugefügt"
+ changeStepsAdded: "$1 Schritte hinzugefügt"
+ changeStepRemoved: "$1 Schritt gelöscht"
+ changeStepsRemoved: "$1 Schritte gelöscht"
+ changeStepEdited: "$1 Schritt bearbeitet"
+ changeStepsEdited: "$1 Schritte bearbeitet"
+ changeStepReordered: Schritte neu sortiert
+ changeImage: "$1 Bild geändert"
+ changeImages: "$1 Bilder geändert"
emptyGuide:
title: Diese Anleitung ist leer
diff --git a/src/locales/en.yml b/src/locales/en.yml
index 164aa59..9d62265 100644
--- a/src/locales/en.yml
+++ b/src/locales/en.yml
@@ -173,6 +173,22 @@ history:
restoreError: Unable to restore. Try again in a moment.
storageFull: Not enough storage to save an undo point. Delete a guide and try again.
empty: No earlier versions yet. They appear here once you edit this guide.
+ nameVersion: Name this version
+ namePlaceholder: Version name
+ allVersions: All versions
+ namedOnly: Named versions only
+ emptyNamed: No named versions yet. Name one to find it again later.
+ renameError: Unable to save that name. Try again.
+ changeTitle: Title changed
+ changeStepAdded: "$1 step added"
+ changeStepsAdded: "$1 steps added"
+ changeStepRemoved: "$1 step deleted"
+ changeStepsRemoved: "$1 steps deleted"
+ changeStepEdited: "$1 step edited"
+ changeStepsEdited: "$1 steps edited"
+ changeStepReordered: Steps reordered
+ changeImage: "$1 image changed"
+ changeImages: "$1 images changed"
emptyGuide:
title: This guide is empty
diff --git a/src/locales/es.yml b/src/locales/es.yml
index d0f1400..5df47d9 100644
--- a/src/locales/es.yml
+++ b/src/locales/es.yml
@@ -173,6 +173,22 @@ history:
restoreError: No se pudo restaurar. Inténtalo de nuevo en un momento.
storageFull: No hay espacio para guardar un punto de deshacer. Elimina una guía e inténtalo de nuevo.
empty: Todavía no hay versiones anteriores. Aparecerán aquí cuando edites esta guía.
+ nameVersion: Ponle nombre a esta versión
+ namePlaceholder: Nombre de la versión
+ allVersions: Todas las versiones
+ namedOnly: Solo versiones con nombre
+ emptyNamed: Todavía no hay versiones con nombre. Ponle nombre a una para encontrarla después.
+ renameError: No se pudo guardar el nombre. Inténtalo de nuevo.
+ changeTitle: Título cambiado
+ changeStepAdded: "$1 paso añadido"
+ changeStepsAdded: "$1 pasos añadidos"
+ changeStepRemoved: "$1 paso eliminado"
+ changeStepsRemoved: "$1 pasos eliminados"
+ changeStepEdited: "$1 paso editado"
+ changeStepsEdited: "$1 pasos editados"
+ changeStepReordered: Pasos reordenados
+ changeImage: "$1 imagen cambiada"
+ changeImages: "$1 imágenes cambiadas"
emptyGuide:
title: Esta guía está vacía
diff --git a/src/locales/fr.yml b/src/locales/fr.yml
index d0b7b30..fbb6559 100644
--- a/src/locales/fr.yml
+++ b/src/locales/fr.yml
@@ -173,6 +173,22 @@ history:
restoreError: Impossible de restaurer. Réessayez dans un instant.
storageFull: "Espace insuffisant pour enregistrer un point d'annulation. Supprimez un guide et réessayez."
empty: Pas encore de version antérieure. Elles apparaîtront ici dès que vous modifierez ce guide.
+ nameVersion: Nommer cette version
+ namePlaceholder: Nom de la version
+ allVersions: Toutes les versions
+ namedOnly: Versions nommées uniquement
+ emptyNamed: "Aucune version nommée pour l'instant. Nommez-en une pour la retrouver plus tard."
+ renameError: "Impossible d'enregistrer ce nom. Réessayez."
+ changeTitle: Titre modifié
+ changeStepAdded: "$1 étape ajoutée"
+ changeStepsAdded: "$1 étapes ajoutées"
+ changeStepRemoved: "$1 étape supprimée"
+ changeStepsRemoved: "$1 étapes supprimées"
+ changeStepEdited: "$1 étape modifiée"
+ changeStepsEdited: "$1 étapes modifiées"
+ changeStepReordered: Étapes réordonnées
+ changeImage: "$1 image modifiée"
+ changeImages: "$1 images modifiées"
emptyGuide:
title: Ce guide est vide
diff --git a/src/locales/pt-BR.yml b/src/locales/pt-BR.yml
index 53fb261..0b35afe 100644
--- a/src/locales/pt-BR.yml
+++ b/src/locales/pt-BR.yml
@@ -173,6 +173,22 @@ history:
restoreError: Não deu pra restaurar. Tenta de novo num instante.
storageFull: Sem espaço pra salvar um ponto de desfazer. Exclui um guia e tenta de novo.
empty: Nenhuma versão anterior ainda. Elas aparecem aqui quando você editar esse guia.
+ nameVersion: Dar um nome pra essa versão
+ namePlaceholder: Nome da versão
+ allVersions: Todas as versões
+ namedOnly: Só versões com nome
+ emptyNamed: Nenhuma versão com nome ainda. Dá um nome pra uma e acha ela fácil depois.
+ renameError: Não deu pra salvar o nome. Tenta de novo.
+ changeTitle: Título alterado
+ changeStepAdded: "$1 passo adicionado"
+ changeStepsAdded: "$1 passos adicionados"
+ changeStepRemoved: "$1 passo excluído"
+ changeStepsRemoved: "$1 passos excluídos"
+ changeStepEdited: "$1 passo editado"
+ changeStepsEdited: "$1 passos editados"
+ changeStepReordered: Passos reordenados
+ changeImage: "$1 imagem alterada"
+ changeImages: "$1 imagens alteradas"
emptyGuide:
title: Esse guia tá vazio