@pocket-trash/localizations 0.23.1 → 0.24.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.
package/README.md CHANGED
@@ -249,3 +249,15 @@ For example, a Vite app can load the English image guide as text:
249
249
  ```ts
250
250
  import source from "@pocket-trash/localizations/help/en-US/image-size-and-resolution-guide.mdx?raw";
251
251
  ```
252
+
253
+ ## Product changelog
254
+
255
+ Changelog entries are published under
256
+ `@pocket-trash/localizations/changelog/<locale>/<dated-slug>.mdx`. English files
257
+ define `title`, `datePublished`, optional `dateModified`, and `categories`
258
+ frontmatter. Translations use the same filename and define only `title`; missing
259
+ translations fall back to English in the consuming app.
260
+
261
+ Run `pnpm changelog:validate` after editing entries. On pull requests, CI also
262
+ requires every existing translation to change or be removed when its English
263
+ source changes.
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Introducing the Pocket Trash changelog
3
+ datePublished: 2027-10-02
4
+ categories:
5
+ - feature
6
+ ---
7
+
8
+ You can now follow customer-facing Pocket Trash updates in the product changelog. Browse updates by category and share a direct link to any entry.
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Presentamos el registro de cambios de Pocket Trash
3
+ ---
4
+
5
+ Ahora puedes consultar las novedades de Pocket Trash en el registro de cambios del producto. Explora las novedades por categoría y comparte un enlace directo a cualquier entrada.
@@ -0,0 +1,30 @@
1
+ export const changelogCategories: Readonly<{
2
+ feature: Readonly<{
3
+ slug: "feature";
4
+ titles: Readonly<{
5
+ "en-US": "New Feature";
6
+ "es-MX": "Nueva funcionalidad";
7
+ }>;
8
+ }>;
9
+ bug: Readonly<{
10
+ slug: "bug";
11
+ titles: Readonly<{
12
+ "en-US": "Bug";
13
+ "es-MX": "Error";
14
+ }>;
15
+ }>;
16
+ "product-support": Readonly<{
17
+ slug: "product-support";
18
+ titles: Readonly<{
19
+ "en-US": "Product Support";
20
+ "es-MX": "Compatibilidad con productos";
21
+ }>;
22
+ }>;
23
+ improvement: Readonly<{
24
+ slug: "improvement";
25
+ titles: Readonly<{
26
+ "en-US": "Improvement";
27
+ "es-MX": "Mejora";
28
+ }>;
29
+ }>;
30
+ }>;
@@ -0,0 +1,24 @@
1
+ export const changelogCategories = Object.freeze({
2
+ feature: Object.freeze({
3
+ slug: "feature",
4
+ titles: Object.freeze({
5
+ "en-US": "New Feature",
6
+ "es-MX": "Nueva funcionalidad",
7
+ }),
8
+ }),
9
+ bug: Object.freeze({
10
+ slug: "bug",
11
+ titles: Object.freeze({ "en-US": "Bug", "es-MX": "Error" }),
12
+ }),
13
+ "product-support": Object.freeze({
14
+ slug: "product-support",
15
+ titles: Object.freeze({
16
+ "en-US": "Product Support",
17
+ "es-MX": "Compatibilidad con productos",
18
+ }),
19
+ }),
20
+ improvement: Object.freeze({
21
+ slug: "improvement",
22
+ titles: Object.freeze({ "en-US": "Improvement", "es-MX": "Mejora" }),
23
+ }),
24
+ });
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ import { changelogCategories } from "./changelog-categories.js";
1
2
  import type { TranslationKey, Translations } from "./types/localization.js";
3
+ export { changelogCategories } from "./changelog-categories.js";
2
4
  export { enUS } from "./localizations/en-US.js";
3
5
  export { esMX } from "./localizations/es-MX.js";
4
6
  export type { CompleteLocalizationResource, LocalizationResource, TranslationKey, Translations, } from "./types/localization.js";
@@ -6,6 +8,18 @@ export type SupportedLocale = "en-US" | "es-MX";
6
8
  export type MessageKey = TranslationKey;
7
9
  export type Messages = Translations;
8
10
  export type LocalePreference = string | readonly string[] | null | undefined;
11
+ export type ChangelogCategorySlug = keyof typeof changelogCategories;
12
+ export type ChangelogCategory = (typeof changelogCategories)[ChangelogCategorySlug];
13
+ export type ChangelogEntryMetadata = Readonly<{
14
+ title: string;
15
+ datePublished: string;
16
+ dateModified?: string;
17
+ categories: readonly ChangelogCategorySlug[];
18
+ }>;
19
+ export type ChangelogTranslationMetadata = Readonly<{
20
+ title: string;
21
+ }>;
22
+ export declare function getChangelogCategoryTitle(slug: ChangelogCategorySlug, locale: string): string;
9
23
  export declare const DEFAULT_LOCALE = "en-US";
10
24
  export declare const SUPPORTED_LOCALES: readonly ["en-US", "es-MX"];
11
25
  export declare const localizations: Readonly<{
@@ -27,6 +41,19 @@ export declare const localizations: Readonly<{
27
41
  site: {
28
42
  name: string;
29
43
  };
44
+ changelog: {
45
+ allCategories: string;
46
+ copyFailed: string;
47
+ copyLink: string;
48
+ dateModified: string;
49
+ datePublished: string;
50
+ empty: string;
51
+ emptyCategory: string;
52
+ linkCopied: string;
53
+ nextPage: string;
54
+ pageStatus: string;
55
+ previousPage: string;
56
+ };
30
57
  action: {
31
58
  addCollection: string;
32
59
  addColor: string;
@@ -221,6 +248,19 @@ export declare const localizations: Readonly<{
221
248
  };
222
249
  };
223
250
  catalog: {
251
+ approval: {
252
+ approve: string;
253
+ reasonLabel: string;
254
+ reasonPlaceholder: string;
255
+ reject: string;
256
+ reverse: string;
257
+ status: {
258
+ approved: string;
259
+ pending: string;
260
+ rejected: string;
261
+ };
262
+ title: string;
263
+ };
224
264
  collectionsWithProduct: string;
225
265
  colorEffect: {
226
266
  fade: string;
@@ -674,6 +714,7 @@ export declare const localizations: Readonly<{
674
714
  accountMenu: string;
675
715
  admin: string;
676
716
  betaFeatures: string;
717
+ changelog: string;
677
718
  collections: string;
678
719
  contact: string;
679
720
  help: string;
@@ -978,6 +1019,19 @@ export declare const localizations: Readonly<{
978
1019
  site: {
979
1020
  name: string;
980
1021
  };
1022
+ changelog: {
1023
+ allCategories: string;
1024
+ copyFailed: string;
1025
+ copyLink: string;
1026
+ dateModified: string;
1027
+ datePublished: string;
1028
+ empty: string;
1029
+ emptyCategory: string;
1030
+ linkCopied: string;
1031
+ nextPage: string;
1032
+ pageStatus: string;
1033
+ previousPage: string;
1034
+ };
981
1035
  action: {
982
1036
  addCollection: string;
983
1037
  addColor: string;
@@ -1172,6 +1226,19 @@ export declare const localizations: Readonly<{
1172
1226
  };
1173
1227
  };
1174
1228
  catalog: {
1229
+ approval: {
1230
+ approve: string;
1231
+ reasonLabel: string;
1232
+ reasonPlaceholder: string;
1233
+ reject: string;
1234
+ reverse: string;
1235
+ status: {
1236
+ approved: string;
1237
+ pending: string;
1238
+ rejected: string;
1239
+ };
1240
+ title: string;
1241
+ };
1175
1242
  collectionsWithProduct: string;
1176
1243
  colorEffect: {
1177
1244
  fade: string;
@@ -1625,6 +1692,7 @@ export declare const localizations: Readonly<{
1625
1692
  accountMenu: string;
1626
1693
  admin: string;
1627
1694
  betaFeatures: string;
1695
+ changelog: string;
1628
1696
  collections: string;
1629
1697
  contact: string;
1630
1698
  help: string;
package/dist/index.js CHANGED
@@ -1,7 +1,13 @@
1
+ import { changelogCategories } from "./changelog-categories.js";
1
2
  import { enUS } from "./localizations/en-US.js";
2
3
  import { esMX } from "./localizations/es-MX.js";
4
+ export { changelogCategories } from "./changelog-categories.js";
3
5
  export { enUS } from "./localizations/en-US.js";
4
6
  export { esMX } from "./localizations/es-MX.js";
7
+ export function getChangelogCategoryTitle(slug, locale) {
8
+ const titles = changelogCategories[slug].titles;
9
+ return titles[locale] ?? titles[DEFAULT_LOCALE];
10
+ }
5
11
  export const DEFAULT_LOCALE = "en-US";
6
12
  export const SUPPORTED_LOCALES = Object.freeze(["en-US", "es-MX"]);
7
13
  const localeAliases = new Map([
@@ -25,6 +25,19 @@ export declare const enUS: {
25
25
  site: {
26
26
  name: string;
27
27
  };
28
+ changelog: {
29
+ allCategories: string;
30
+ copyFailed: string;
31
+ copyLink: string;
32
+ dateModified: string;
33
+ datePublished: string;
34
+ empty: string;
35
+ emptyCategory: string;
36
+ linkCopied: string;
37
+ nextPage: string;
38
+ pageStatus: string;
39
+ previousPage: string;
40
+ };
28
41
  action: {
29
42
  addCollection: string;
30
43
  addColor: string;
@@ -219,6 +232,19 @@ export declare const enUS: {
219
232
  };
220
233
  };
221
234
  catalog: {
235
+ approval: {
236
+ approve: string;
237
+ reasonLabel: string;
238
+ reasonPlaceholder: string;
239
+ reject: string;
240
+ reverse: string;
241
+ status: {
242
+ approved: string;
243
+ pending: string;
244
+ rejected: string;
245
+ };
246
+ title: string;
247
+ };
222
248
  collectionsWithProduct: string;
223
249
  colorEffect: {
224
250
  fade: string;
@@ -672,6 +698,7 @@ export declare const enUS: {
672
698
  accountMenu: string;
673
699
  admin: string;
674
700
  betaFeatures: string;
701
+ changelog: string;
675
702
  collections: string;
676
703
  contact: string;
677
704
  help: string;
@@ -25,6 +25,19 @@ export const enUS = {
25
25
  site: {
26
26
  name: "Pocket Trash",
27
27
  },
28
+ changelog: {
29
+ allCategories: "All categories",
30
+ copyFailed: "Couldn’t copy link",
31
+ copyLink: "Copy link",
32
+ dateModified: "Date Modified",
33
+ datePublished: "Date",
34
+ empty: "No changelog entries yet.",
35
+ emptyCategory: "No entries in this category.",
36
+ linkCopied: "Link copied",
37
+ nextPage: "Next page",
38
+ pageStatus: "Page {page} of {pageCount}",
39
+ previousPage: "Previous page",
40
+ },
28
41
  action: {
29
42
  addCollection: "Add collection",
30
43
  addColor: "Add colour",
@@ -219,6 +232,19 @@ export const enUS = {
219
232
  },
220
233
  },
221
234
  catalog: {
235
+ approval: {
236
+ approve: "Approve product",
237
+ reasonLabel: "Decision reason",
238
+ reasonPlaceholder: "Explain this approval decision",
239
+ reject: "Reject product",
240
+ reverse: "Return to pending",
241
+ status: {
242
+ approved: "Approved",
243
+ pending: "Pending review",
244
+ rejected: "Rejected",
245
+ },
246
+ title: "Product approval",
247
+ },
222
248
  collectionsWithProduct: "Collections with this product",
223
249
  colorEffect: {
224
250
  fade: "Fade",
@@ -672,6 +698,7 @@ export const enUS = {
672
698
  accountMenu: "Account menu",
673
699
  admin: "Admin",
674
700
  betaFeatures: "Beta features",
701
+ changelog: "Changelog",
675
702
  collections: "Collections",
676
703
  contact: "Contact",
677
704
  help: "Help",
@@ -25,6 +25,19 @@ export declare const esMX: {
25
25
  site: {
26
26
  name: string;
27
27
  };
28
+ changelog: {
29
+ allCategories: string;
30
+ copyFailed: string;
31
+ copyLink: string;
32
+ dateModified: string;
33
+ datePublished: string;
34
+ empty: string;
35
+ emptyCategory: string;
36
+ linkCopied: string;
37
+ nextPage: string;
38
+ pageStatus: string;
39
+ previousPage: string;
40
+ };
28
41
  action: {
29
42
  addCollection: string;
30
43
  addColor: string;
@@ -219,6 +232,19 @@ export declare const esMX: {
219
232
  };
220
233
  };
221
234
  catalog: {
235
+ approval: {
236
+ approve: string;
237
+ reasonLabel: string;
238
+ reasonPlaceholder: string;
239
+ reject: string;
240
+ reverse: string;
241
+ status: {
242
+ approved: string;
243
+ pending: string;
244
+ rejected: string;
245
+ };
246
+ title: string;
247
+ };
222
248
  collectionsWithProduct: string;
223
249
  colorEffect: {
224
250
  fade: string;
@@ -672,6 +698,7 @@ export declare const esMX: {
672
698
  accountMenu: string;
673
699
  admin: string;
674
700
  betaFeatures: string;
701
+ changelog: string;
675
702
  collections: string;
676
703
  contact: string;
677
704
  help: string;
@@ -25,6 +25,19 @@ export const esMX = {
25
25
  site: {
26
26
  name: "",
27
27
  },
28
+ changelog: {
29
+ allCategories: "Todas las categorías",
30
+ copyFailed: "No se pudo copiar el enlace",
31
+ copyLink: "Copiar enlace",
32
+ dateModified: "Fecha de modificación",
33
+ datePublished: "Fecha",
34
+ empty: "Aún no hay entradas en el registro de cambios.",
35
+ emptyCategory: "No hay entradas en esta categoría.",
36
+ linkCopied: "Enlace copiado",
37
+ nextPage: "Página siguiente",
38
+ pageStatus: "Página {page} de {pageCount}",
39
+ previousPage: "Página anterior",
40
+ },
28
41
  action: {
29
42
  addCollection: "",
30
43
  addColor: "Agregar color",
@@ -219,6 +232,19 @@ export const esMX = {
219
232
  },
220
233
  },
221
234
  catalog: {
235
+ approval: {
236
+ approve: "Aprobar producto",
237
+ reasonLabel: "Motivo de la decisión",
238
+ reasonPlaceholder: "Explica esta decisión de aprobación",
239
+ reject: "Rechazar producto",
240
+ reverse: "Devolver a pendiente",
241
+ status: {
242
+ approved: "Aprobado",
243
+ pending: "Pendiente de revisión",
244
+ rejected: "Rechazado",
245
+ },
246
+ title: "Aprobación del producto",
247
+ },
222
248
  collectionsWithProduct: "Colecciones con este producto",
223
249
  colorEffect: {
224
250
  fade: "Degradado",
@@ -672,6 +698,7 @@ export const esMX = {
672
698
  accountMenu: "Menu de cuenta",
673
699
  admin: "Administración",
674
700
  betaFeatures: "Funciones beta",
701
+ changelog: "Registro de cambios",
675
702
  collections: "Colecciones",
676
703
  contact: "Contacto",
677
704
  help: "Ayuda",
@@ -22,6 +22,19 @@ export type CompleteLocalizationResource = Readonly<{
22
22
  site: {
23
23
  name: string;
24
24
  };
25
+ changelog: {
26
+ allCategories: string;
27
+ copyFailed: string;
28
+ copyLink: string;
29
+ dateModified: string;
30
+ datePublished: string;
31
+ empty: string;
32
+ emptyCategory: string;
33
+ linkCopied: string;
34
+ nextPage: string;
35
+ pageStatus: string;
36
+ previousPage: string;
37
+ };
25
38
  action: {
26
39
  addCollection: string;
27
40
  addColor: string;
@@ -216,6 +229,19 @@ export type CompleteLocalizationResource = Readonly<{
216
229
  };
217
230
  };
218
231
  catalog: {
232
+ approval: {
233
+ approve: string;
234
+ reasonLabel: string;
235
+ reasonPlaceholder: string;
236
+ reject: string;
237
+ reverse: string;
238
+ status: {
239
+ approved: string;
240
+ pending: string;
241
+ rejected: string;
242
+ };
243
+ title: string;
244
+ };
219
245
  collectionsWithProduct: string;
220
246
  colorEffect: {
221
247
  fade: string;
@@ -669,6 +695,7 @@ export type CompleteLocalizationResource = Readonly<{
669
695
  accountMenu: string;
670
696
  admin: string;
671
697
  betaFeatures: string;
698
+ changelog: string;
672
699
  collections: string;
673
700
  contact: string;
674
701
  help: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocket-trash/localizations",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "description": "Shared localization utilities and message catalogs for Pocket Trash.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,11 +10,13 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js"
12
12
  },
13
+ "./changelog/*.mdx": "./changelog/*.mdx",
13
14
  "./help/*.mdx": "./help/*.mdx",
14
15
  "./legal/*.mdx": "./legal/*.mdx"
15
16
  },
16
17
  "files": [
17
18
  "dist",
19
+ "changelog",
18
20
  "help",
19
21
  "legal"
20
22
  ],
@@ -53,6 +55,7 @@
53
55
  "agent-skills:update": "npx skills add pocket-trash/skills --skill '*' --agent codex claude-code -y",
54
56
  "build": "tsc -p tsconfig.json",
55
57
  "check": "biome check --write .",
58
+ "changelog:validate": "node scripts/validate-changelog.mjs",
56
59
  "changeset": "changeset",
57
60
  "changeset:version": "changeset version && node scripts/stamp-changelog-release-date.mjs",
58
61
  "dev": "tsc -p tsconfig.json --watch",
@@ -61,6 +64,6 @@
61
64
  "localization:create": "node scripts/localizations.mjs create",
62
65
  "localization:sync": "node scripts/localizations.mjs sync",
63
66
  "release": "npm whoami && pnpm run changeset:version && pnpm install --lockfile-only && git add package.json pnpm-lock.yaml CHANGELOG.md .changeset && git commit -m \"chore: version packages [skip ci]\" && changeset publish && git push --follow-tags && VERSION=$(node -p \"require('./package.json').version\") && gh release create \"v$VERSION\" --title \"v$VERSION\" --generate-notes --verify-tag",
64
- "test": "pnpm run build && node --test"
67
+ "test": "pnpm changelog:validate && pnpm run build && node --test"
65
68
  }
66
69
  }