@pocket-trash/localizations 0.23.1 → 0.23.2

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;
@@ -674,6 +701,7 @@ export declare const localizations: Readonly<{
674
701
  accountMenu: string;
675
702
  admin: string;
676
703
  betaFeatures: string;
704
+ changelog: string;
677
705
  collections: string;
678
706
  contact: string;
679
707
  help: string;
@@ -978,6 +1006,19 @@ export declare const localizations: Readonly<{
978
1006
  site: {
979
1007
  name: string;
980
1008
  };
1009
+ changelog: {
1010
+ allCategories: string;
1011
+ copyFailed: string;
1012
+ copyLink: string;
1013
+ dateModified: string;
1014
+ datePublished: string;
1015
+ empty: string;
1016
+ emptyCategory: string;
1017
+ linkCopied: string;
1018
+ nextPage: string;
1019
+ pageStatus: string;
1020
+ previousPage: string;
1021
+ };
981
1022
  action: {
982
1023
  addCollection: string;
983
1024
  addColor: string;
@@ -1625,6 +1666,7 @@ export declare const localizations: Readonly<{
1625
1666
  accountMenu: string;
1626
1667
  admin: string;
1627
1668
  betaFeatures: string;
1669
+ changelog: string;
1628
1670
  collections: string;
1629
1671
  contact: string;
1630
1672
  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;
@@ -672,6 +685,7 @@ export declare const enUS: {
672
685
  accountMenu: string;
673
686
  admin: string;
674
687
  betaFeatures: string;
688
+ changelog: string;
675
689
  collections: string;
676
690
  contact: string;
677
691
  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",
@@ -672,6 +685,7 @@ export const enUS = {
672
685
  accountMenu: "Account menu",
673
686
  admin: "Admin",
674
687
  betaFeatures: "Beta features",
688
+ changelog: "Changelog",
675
689
  collections: "Collections",
676
690
  contact: "Contact",
677
691
  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;
@@ -672,6 +685,7 @@ export declare const esMX: {
672
685
  accountMenu: string;
673
686
  admin: string;
674
687
  betaFeatures: string;
688
+ changelog: string;
675
689
  collections: string;
676
690
  contact: string;
677
691
  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",
@@ -672,6 +685,7 @@ export const esMX = {
672
685
  accountMenu: "Menu de cuenta",
673
686
  admin: "Administración",
674
687
  betaFeatures: "Funciones beta",
688
+ changelog: "Registro de cambios",
675
689
  collections: "Colecciones",
676
690
  contact: "Contacto",
677
691
  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;
@@ -669,6 +682,7 @@ export type CompleteLocalizationResource = Readonly<{
669
682
  accountMenu: string;
670
683
  admin: string;
671
684
  betaFeatures: string;
685
+ changelog: string;
672
686
  collections: string;
673
687
  contact: string;
674
688
  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.23.2",
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
  }