@canonical/summon-application 0.43.0 → 0.46.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.
Files changed (95) hide show
  1. package/README.md +57 -11
  2. package/dist/esm/application/react/index.js +175 -21
  3. package/dist/esm/application/react/index.js.map +1 -1
  4. package/dist/esm/application/react/templates/README.md.ejs +33 -1
  5. package/dist/esm/application/react/templates/package.json.ejs +25 -18
  6. package/dist/esm/application/react/templates/src/client/entry.tsx.ejs +10 -16
  7. package/dist/esm/application/react/templates/src/domains/catalog/CatalogPage.tsx.ejs +5 -5
  8. package/dist/esm/application/react/templates/src/domains/dashboard/DashboardBreadcrumbs.tsx.ejs +35 -0
  9. package/dist/esm/application/react/templates/src/domains/dashboard/DashboardLayout.tsx.ejs +39 -0
  10. package/dist/esm/application/react/templates/src/domains/dashboard/InstancesPage.test.tsx.ejs +144 -0
  11. package/dist/esm/application/react/templates/src/domains/dashboard/InstancesPage.tsx.ejs +281 -0
  12. package/dist/esm/application/react/templates/src/domains/dashboard/OverviewPage.test.tsx.ejs +76 -0
  13. package/dist/esm/application/react/templates/src/domains/dashboard/OverviewPage.tsx.ejs +224 -0
  14. package/dist/esm/application/react/templates/src/domains/dashboard/SettingsPage.test.tsx.ejs +64 -0
  15. package/dist/esm/application/react/templates/src/domains/dashboard/SettingsPage.tsx.ejs +142 -0
  16. package/dist/esm/application/react/templates/src/domains/dashboard/constants.ts.ejs +229 -0
  17. package/dist/esm/application/react/templates/src/domains/dashboard/hooks/index.ts +2 -0
  18. package/dist/esm/application/react/templates/src/domains/dashboard/hooks/types.ts +13 -0
  19. package/dist/esm/application/react/templates/src/domains/dashboard/hooks/useDashboardNavigation.ts.ejs +94 -0
  20. package/dist/esm/application/react/templates/src/domains/dashboard/projectBreadcrumbs.test.ts +78 -0
  21. package/dist/esm/application/react/templates/src/domains/dashboard/projectBreadcrumbs.ts +48 -0
  22. package/dist/esm/application/react/templates/src/domains/dashboard/routes.ts +21 -0
  23. package/dist/esm/application/react/templates/src/domains/dashboard/selectRelativeTime.test.ts +19 -0
  24. package/dist/esm/application/react/templates/src/domains/dashboard/selectRelativeTime.ts +24 -0
  25. package/dist/esm/application/react/templates/src/domains/dashboard/styles.css +98 -0
  26. package/dist/esm/application/react/templates/src/domains/dashboard/types.ts.ejs +61 -0
  27. package/dist/esm/application/react/templates/src/domains/marketing/HomePage.tsx.ejs +14 -9
  28. package/dist/esm/application/react/templates/src/i18n/ar.ts.ejs +173 -0
  29. package/dist/esm/application/react/templates/src/i18n/en.ts.ejs +172 -0
  30. package/dist/esm/application/react/templates/src/i18n/fr.ts.ejs +170 -0
  31. package/dist/esm/application/react/templates/src/lib/ApplicationShell/ApplicationShell.stories.tsx +91 -0
  32. package/dist/esm/application/react/templates/src/lib/ApplicationShell/ApplicationShell.test.tsx.ejs +139 -0
  33. package/dist/esm/application/react/templates/src/lib/ApplicationShell/ApplicationShell.tsx.ejs +78 -0
  34. package/dist/esm/application/react/templates/src/lib/ApplicationShell/index.ts +2 -0
  35. package/dist/esm/application/react/templates/src/lib/ApplicationShell/styles.css +43 -0
  36. package/dist/esm/application/react/templates/src/lib/ApplicationShell/types.ts +20 -0
  37. package/dist/esm/application/react/templates/src/lib/CanonicalLogo/CanonicalLogo.tsx.ejs +51 -0
  38. package/dist/esm/application/react/templates/src/lib/CanonicalLogo/index.ts +2 -0
  39. package/dist/esm/application/react/templates/src/lib/CanonicalLogo/styles.css +31 -0
  40. package/dist/esm/application/react/templates/src/lib/CanonicalLogo/types.ts +11 -0
  41. package/dist/esm/application/react/templates/src/lib/CodeMessage/CodeMessage.test.tsx +33 -0
  42. package/dist/esm/application/react/templates/src/lib/CodeMessage/CodeMessage.tsx +33 -0
  43. package/dist/esm/application/react/templates/src/lib/CodeMessage/index.ts +2 -0
  44. package/dist/esm/application/react/templates/src/lib/CodeMessage/types.ts +16 -0
  45. package/dist/esm/application/react/templates/src/lib/ExampleComponent/styles.css +1 -1
  46. package/dist/esm/application/react/templates/src/lib/LazyComponent/{LazyComponent.tsx → LazyComponent.tsx.ejs} +26 -0
  47. package/dist/esm/application/react/templates/src/lib/LoadingMessage/LoadingMessage.test.tsx.ejs +20 -0
  48. package/dist/esm/application/react/templates/src/lib/LoadingMessage/LoadingMessage.tsx.ejs +21 -0
  49. package/dist/esm/application/react/templates/src/lib/LoadingMessage/index.ts +1 -0
  50. package/dist/esm/application/react/templates/src/lib/LocaleSelector/{LocaleSelector.tsx → LocaleSelector.tsx.ejs} +23 -0
  51. package/dist/esm/application/react/templates/src/lib/Navigation/Navigation.test.tsx.ejs +87 -0
  52. package/dist/esm/application/react/templates/src/lib/Navigation/Navigation.tsx.ejs +3 -0
  53. package/dist/esm/application/react/templates/src/lib/RouterLink/RouterLink.test.tsx +98 -0
  54. package/dist/esm/application/react/templates/src/lib/RouterLink/RouterLink.tsx +65 -0
  55. package/dist/esm/application/react/templates/src/lib/RouterLink/index.ts +1 -0
  56. package/dist/esm/application/react/templates/src/lib/ThemeSelector/ThemeSelector.tsx.ejs +29 -14
  57. package/dist/esm/application/react/templates/src/lib/TopBar/TopBar.stories.tsx.ejs +29 -0
  58. package/dist/esm/application/react/templates/src/lib/TopBar/TopBar.test.tsx.ejs +113 -0
  59. package/dist/esm/application/react/templates/src/lib/TopBar/TopBar.tsx.ejs +45 -0
  60. package/dist/esm/application/react/templates/src/lib/TopBar/index.ts +2 -0
  61. package/dist/esm/application/react/templates/src/lib/TopBar/styles.css +49 -0
  62. package/dist/esm/application/react/templates/src/lib/TopBar/types.ts +8 -0
  63. package/dist/esm/application/react/templates/src/lib/index.ts.ejs +10 -0
  64. package/dist/esm/application/react/templates/src/routes.tsx.ejs +70 -20
  65. package/dist/esm/application/react/templates/src/server/entry.tsx.ejs +6 -7
  66. package/dist/esm/application/react/templates/src/sitemap/getSitemapItems.ts.ejs +5 -0
  67. package/dist/esm/application/react/templates/src/styles/app.css +25 -12
  68. package/dist/esm/application/react/templates/src/testing/browserStubs.ts +57 -0
  69. package/dist/esm/application/react/templates/src/testing/fixtures.ts.ejs +29 -0
  70. package/dist/esm/application/react/templates/src/testing/renderWithProviders.tsx.ejs +64 -0
  71. package/dist/esm/application/react/templates/test/e2e/servers.e2e.ts.ejs +37 -1
  72. package/dist/esm/application/react/templates/vite-plugin-ds-icons.ts +7 -2
  73. package/dist/esm/application/react/templates/vitest.config.ts +6 -2
  74. package/dist/esm/application/react/textHelpers.js +9 -0
  75. package/dist/esm/application/react/textHelpers.js.map +1 -0
  76. package/dist/esm/shared/versions.js +35 -21
  77. package/dist/esm/shared/versions.js.map +1 -1
  78. package/dist/types/application/react/index.d.ts +1 -0
  79. package/dist/types/application/react/index.d.ts.map +1 -1
  80. package/dist/types/application/react/textHelpers.d.ts +18 -0
  81. package/dist/types/application/react/textHelpers.d.ts.map +1 -0
  82. package/dist/types/shared/versions.d.ts +41 -4
  83. package/dist/types/shared/versions.d.ts.map +1 -1
  84. package/package.json +9 -9
  85. package/dist/esm/application/react/templates/src/i18n/ar.ts +0 -73
  86. package/dist/esm/application/react/templates/src/i18n/en.ts +0 -72
  87. package/dist/esm/application/react/templates/src/i18n/fr.ts +0 -69
  88. /package/dist/esm/application/react/templates/src/domains/catalog/{ErrorBoundary.tests.tsx.ejs → ErrorBoundary.test.tsx.ejs} +0 -0
  89. /package/dist/esm/application/react/templates/src/domains/catalog/{ProductList.tests.tsx.ejs → ProductList.test.tsx.ejs} +0 -0
  90. /package/dist/esm/application/react/templates/src/i18n/{negotiation.tests.ts → negotiation.test.ts} +0 -0
  91. /package/dist/esm/application/react/templates/src/lib/ClientOnly/{ClientOnly.tests.tsx → ClientOnly.test.tsx} +0 -0
  92. /package/dist/esm/application/react/templates/src/lib/ExampleComponent/{ExampleComponent.tests.tsx → ExampleComponent.test.tsx} +0 -0
  93. /package/dist/esm/application/react/templates/src/lib/LocaleSelector/{LocaleSelector.tests.tsx → LocaleSelector.test.tsx} +0 -0
  94. /package/dist/esm/application/react/templates/src/relay/{environment.tests.ts → environment.test.ts} +0 -0
  95. /package/dist/esm/application/react/templates/src/relay/{schema.tests.ts → schema.test.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Text helpers for the templates. A string a reader sees renders as a catalog
3
+ * lookup when the app is internationalised and as the English text otherwise,
4
+ * so a template states each string once, beside its key, instead of carrying
5
+ * an `intl` branch per line. The three forms cover the three places a string
6
+ * appears in TSX; a message with values keeps an explicit branch, because its
7
+ * English form is a template literal.
8
+ */
9
+ export interface TextHelpers {
10
+ /** A JSX child: `{t("key")}` or the English text. */
11
+ readonly msg: (key: string, english: string) => string;
12
+ /** A JSX attribute value: `{t("key")}` or `"English"`. */
13
+ readonly attr: (key: string, english: string) => string;
14
+ /** A JavaScript expression: `t("key")` or `"English"`. */
15
+ readonly str: (key: string, english: string) => string;
16
+ }
17
+ export declare function textHelpers(intl: boolean): TextHelpers;
18
+ //# sourceMappingURL=textHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textHelpers.d.ts","sourceRoot":"","sources":["../../../../src/application/react/textHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACvD,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,0DAA0D;IAC1D,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACxD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAQtD"}
@@ -1,4 +1,35 @@
1
1
  import type { Task } from "@canonical/task";
2
+ /**
3
+ * Resolve the version ranges that a generated app pins for the @canonical/*
4
+ * packages it depends on directly. Those packages come from two repositories,
5
+ * each released on its own version line:
6
+ *
7
+ * - **pragma-web** — everything that renders and runs in the app:
8
+ * react-ds-global(-form), react-ds-app, react-head, react-hooks, react-ssr,
9
+ * router-core, router-react, i18n-*, ds-*, styles, storybook-*,
10
+ * typescript-config-react. Pinned to `PRAGMA_WEB_VERSION`.
11
+ * - **pragma-core** — the toolchain this generator ships with, of which the app
12
+ * depends only on biome-config. Pinned to this generator's own version, since
13
+ * summon-application is released in lockstep with the rest of pragma-core.
14
+ *
15
+ * Scope notes:
16
+ * - Third-party deps (react, express, vite…) keep their own ranges.
17
+ * - `@canonical/design-tokens` is versioned SEPARATELY and is NOT pinned here —
18
+ * it reaches the app transitively via `@canonical/styles`, which owns its range.
19
+ *
20
+ * Resolution is fully offline, by design: `pragma create` performs no network
21
+ * calls, and two scaffolds of the same generator are byte-identical (a registry
22
+ * lookup here once made concurrent scaffolds race the network and diverge).
23
+ */
24
+ /**
25
+ * The pragma-web release the templates are written against. The templates
26
+ * import from these packages (the application shell's `SelectInput`, say), so
27
+ * this is the oldest release they build with, and the caret range keeps a
28
+ * generated app on that minor line. Renovate tracks it through
29
+ * `@canonical/react-ds-global`, one of the packages released at this version;
30
+ * a bump is reviewed against the templates rather than merged on sight.
31
+ */
32
+ export declare const PRAGMA_WEB_VERSION = "0.45.0";
2
33
  /**
3
34
  * Read an installed package's version. Not `require("<pkg>/package.json")`:
4
35
  * none of the workspace packages export `./package.json` (and their ESM-only
@@ -11,12 +42,18 @@ import type { Task } from "@canonical/task";
11
42
  */
12
43
  export declare function readVersion(packageName: string): string;
13
44
  export declare function ownVersion(): string;
45
+ /** The version range pinned for each repository's packages. */
46
+ export interface PinnedRanges {
47
+ /** Range for the pragma-core packages (the generator's release line). */
48
+ readonly core: string;
49
+ /** Range for the pragma-web packages (`PRAGMA_WEB_VERSION`). */
50
+ readonly web: string;
51
+ }
14
52
  /**
15
- * Resolve the version range as a Task so the decision is visible in the
16
- * generator pipeline (dry-run included). Deterministic and offline: the range
17
- * comes from the installed generator's own release line.
53
+ * Resolve the version ranges as a Task so the decision is visible in the
54
+ * generator pipeline (dry-run included). Deterministic and offline.
18
55
  */
19
- export declare function resolvePragmaVersion(): Task<string>;
56
+ export declare function resolvePragmaVersion(): Task<PinnedRanges>;
20
57
  /**
21
58
  * Print a version table for the current generator run.
22
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/shared/versions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAuD5C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA2BvD;AASD,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAcD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAAC,MAAM,CAAC,CAQnD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAK/D"}
1
+ {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/shared/versions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAkC3C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA2BvD;AASD,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAaD,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAAC,YAAY,CAAC,CAYzD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAK/D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@canonical/summon-application",
3
3
  "description": "Summon generators for application scaffolding: application, domain, page, and wrapper",
4
- "version": "0.43.0",
4
+ "version": "0.46.0",
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -36,21 +36,21 @@
36
36
  "test": "vitest run"
37
37
  },
38
38
  "dependencies": {
39
- "@canonical/summon-core": "^0.43.0",
40
- "@canonical/task": "^0.43.0",
41
- "@canonical/utils": "^0.43.0"
39
+ "@canonical/summon-core": "^0.46.0",
40
+ "@canonical/task": "^0.46.0",
41
+ "@canonical/utils": "^0.46.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "2.5.14",
45
- "@canonical/biome-config": "^0.43.0",
46
- "@canonical/webarchitect": "^0.43.0",
44
+ "@biomejs/biome": "2.6.6",
45
+ "@canonical/biome-config": "^0.46.0",
46
+ "@canonical/webarchitect": "^0.46.0",
47
47
  "@types/node": "^26.0.0",
48
48
  "typescript": "^7.0.2",
49
- "vitest": "^4.0.18"
49
+ "vitest": "^5.0.0"
50
50
  },
51
51
  "bugs": {
52
52
  "url": "https://github.com/canonical/pragma-core/issues"
53
53
  },
54
54
  "homepage": "https://github.com/canonical/pragma-core#readme",
55
- "gitHead": "79f70779057238803359b820183de972b4a1220c"
55
+ "gitHead": "7a4c4cee18e814e78e71fe62e4679a3e07db4735"
56
56
  }
@@ -1,73 +0,0 @@
1
- import type { MessageValue } from "@canonical/i18n-core";
2
- import type { MessageKey } from "./en.js";
3
-
4
- /**
5
- * Arabic messages. Typed against the English key set, so the catalogs can
6
- * never drift apart silently.
7
- *
8
- * Arabic is the app's right-to-left demonstration locale, and its plural
9
- * system uses all six CLDR categories — `catalog.showing` spells them out,
10
- * which `Intl.PluralRules("ar")` selects from at runtime.
11
- */
12
- const ar: Record<MessageKey, MessageValue> = {
13
- "nav.label": "رئيسي",
14
- "nav.home": "الرئيسية",
15
- "nav.guide": "الدليل",
16
- "nav.catalog": "الكتالوج",
17
- "nav.contact": "اتصل بنا",
18
- "nav.signIn": "تسجيل دخول تجريبي",
19
- "theme.label": "سمة الألوان",
20
- "theme.system": "النظام",
21
- "theme.light": "فاتح",
22
- "theme.dark": "داكن",
23
- "locale.label": "اللغة",
24
- "notFound.heading": "الصفحة غير موجودة",
25
- "notFound.body": "الصفحة التي تبحث عنها غير موجودة.",
26
- "home.title": "الرئيسية",
27
- "home.heading": "الرئيسية",
28
- "home.tagline": "مرحبًا بك في تطبيق pragma النموذجي.",
29
- "home.exampleHeading": "مكوّن مثال",
30
- "home.streamingHeading": "البث مع Suspense",
31
- "home.streamFallback": "جارٍ تحميل المحتوى المتدفق…",
32
- "guide.body": "محتوى الدليل عن {slug}.",
33
- "account.title": "الحساب",
34
- "account.heading": "الحساب",
35
- "account.body": "صفحة حساب محمية. أنت مسجّل الدخول.",
36
- "login.title": "تسجيل الدخول",
37
- "login.heading": "تسجيل الدخول",
38
- "login.hintBefore": "تسجيل دخول تجريبي. أضف",
39
- "login.hintAfter": "إلى أي عنوان محمي لمحاكاة المصادقة.",
40
- "login.redirect": "ستتم إعادة توجيهك إلى {from} بعد تسجيل الدخول.",
41
- "contact.title": "اتصل بنا",
42
- "contact.heading": "اتصل بنا",
43
- "contact.name": "الاسم الكامل",
44
- "contact.email": "البريد الإلكتروني",
45
- "contact.emailRequired": "البريد الإلكتروني مطلوب",
46
- "contact.subject": "الموضوع",
47
- "contact.subjectGeneral": "استفسار عام",
48
- "contact.subjectSupport": "الدعم",
49
- "contact.subjectFeedback": "ملاحظات",
50
- "contact.message": "الرسالة",
51
- "contact.messageHint": "500 حرف كحد أقصى",
52
- "contact.send": "إرسال الرسالة",
53
- "catalog.title": "الكتالوج",
54
- "catalog.heading": "الكتالوج",
55
- "catalog.loading": "جارٍ تحميل الكتالوج…",
56
- "catalog.error": "تعذّر تحميل الكتالوج. أعد تحميل الصفحة للمحاولة مرة أخرى.",
57
- "catalog.listLabel": "كتالوج المنتجات",
58
- "catalog.signedInAs": "مسجّل الدخول باسم",
59
- "catalog.showing": {
60
- zero: "— لا توجد منتجات.",
61
- one: "— عرض {shown} من منتج واحد.",
62
- two: "— عرض {shown} من منتجين.",
63
- few: "— عرض {shown} من {count} منتجات.",
64
- many: "— عرض {shown} من {count} منتجًا.",
65
- other: "— عرض {shown} من {count} منتج.",
66
- },
67
- "catalog.more": "تتوفر منتجات إضافية.",
68
- "catalog.rating": "التقييم {rating} من 5",
69
- "catalog.inStock": "متوفر",
70
- "catalog.outOfStock": "غير متوفر",
71
- };
72
-
73
- export default ar;
@@ -1,72 +0,0 @@
1
- import type { Messages } from "@canonical/i18n-core";
2
-
3
- /**
4
- * English messages — the reference catalog. Its keys define the app's full
5
- * message surface; the other locales are typed against them (see `fr.ts`),
6
- * so adding a key here without translating it is a compile error.
7
- *
8
- * Keys are dotted namespaces per UI area. Values interpolate `{placeholder}`
9
- * slots via `createTranslator`; plural entries select a branch from
10
- * `vars.count` through `Intl.PluralRules`.
11
- */
12
- const en = {
13
- "nav.label": "Main",
14
- "nav.home": "Home",
15
- "nav.guide": "Guide",
16
- "nav.catalog": "Catalog",
17
- "nav.contact": "Contact",
18
- "nav.signIn": "Demo sign-in",
19
- "theme.label": "Color theme",
20
- "theme.system": "System",
21
- "theme.light": "Light",
22
- "theme.dark": "Dark",
23
- "locale.label": "Language",
24
- "notFound.heading": "Page not found",
25
- "notFound.body": "The page you are looking for does not exist.",
26
- "home.title": "Home",
27
- "home.heading": "Home",
28
- "home.tagline": "Welcome to the pragma router boilerplate.",
29
- "home.exampleHeading": "Example component",
30
- "home.streamingHeading": "Streaming with Suspense",
31
- "home.streamFallback": "Loading streamed content…",
32
- "guide.body": "Guide content for {slug}.",
33
- "account.title": "Account",
34
- "account.heading": "Account",
35
- "account.body": "Protected account page. You are signed in.",
36
- "login.title": "Login",
37
- "login.heading": "Login",
38
- "login.hintBefore": "Demo login. Add",
39
- "login.hintAfter": "to any protected URL to simulate authentication.",
40
- "login.redirect": "You will be redirected to {from} after login.",
41
- "contact.title": "Contact",
42
- "contact.heading": "Contact",
43
- "contact.name": "Full name",
44
- "contact.email": "Email address",
45
- "contact.emailRequired": "Email is required",
46
- "contact.subject": "Subject",
47
- "contact.subjectGeneral": "General enquiry",
48
- "contact.subjectSupport": "Support",
49
- "contact.subjectFeedback": "Feedback",
50
- "contact.message": "Message",
51
- "contact.messageHint": "Maximum 500 characters",
52
- "contact.send": "Send message",
53
- "catalog.title": "Catalog",
54
- "catalog.heading": "Catalog",
55
- "catalog.loading": "Loading catalog…",
56
- "catalog.error": "The catalog failed to load. Reload the page to try again.",
57
- "catalog.listLabel": "Product catalog",
58
- "catalog.signedInAs": "Signed in as",
59
- "catalog.showing": {
60
- one: "— showing {shown} of {count} product.",
61
- other: "— showing {shown} of {count} products.",
62
- },
63
- "catalog.more": "More products are available.",
64
- "catalog.rating": "rated {rating} / 5",
65
- "catalog.inStock": "in stock",
66
- "catalog.outOfStock": "out of stock",
67
- } satisfies Messages;
68
-
69
- /** Every message key the app can translate. */
70
- export type MessageKey = keyof typeof en;
71
-
72
- export default en;
@@ -1,69 +0,0 @@
1
- import type { MessageValue } from "@canonical/i18n-core";
2
- import type { MessageKey } from "./en.js";
3
-
4
- /**
5
- * French messages. Typed against the English key set, so the catalogs can
6
- * never drift apart silently.
7
- */
8
- const fr: Record<MessageKey, MessageValue> = {
9
- "nav.label": "Principale",
10
- "nav.home": "Accueil",
11
- "nav.guide": "Guide",
12
- "nav.catalog": "Catalogue",
13
- "nav.contact": "Contact",
14
- "nav.signIn": "Connexion démo",
15
- "theme.label": "Thème de couleur",
16
- "theme.system": "Système",
17
- "theme.light": "Clair",
18
- "theme.dark": "Sombre",
19
- "locale.label": "Langue",
20
- "notFound.heading": "Page introuvable",
21
- "notFound.body": "La page que vous recherchez n'existe pas.",
22
- "home.title": "Accueil",
23
- "home.heading": "Accueil",
24
- "home.tagline": "Bienvenue dans le boilerplate du routeur pragma.",
25
- "home.exampleHeading": "Composant d'exemple",
26
- "home.streamingHeading": "Streaming avec Suspense",
27
- "home.streamFallback": "Chargement du contenu diffusé…",
28
- "guide.body": "Contenu du guide pour {slug}.",
29
- "account.title": "Compte",
30
- "account.heading": "Compte",
31
- "account.body": "Page de compte protégée. Vous êtes connecté.",
32
- "login.title": "Connexion",
33
- "login.heading": "Connexion",
34
- "login.hintBefore": "Connexion de démonstration. Ajoutez",
35
- "login.hintAfter":
36
- "à n'importe quelle URL protégée pour simuler l'authentification.",
37
- "login.redirect": "Vous serez redirigé vers {from} après la connexion.",
38
- "contact.title": "Contact",
39
- "contact.heading": "Contact",
40
- "contact.name": "Nom complet",
41
- "contact.email": "Adresse e-mail",
42
- "contact.emailRequired": "L'adresse e-mail est requise",
43
- "contact.subject": "Objet",
44
- "contact.subjectGeneral": "Demande générale",
45
- "contact.subjectSupport": "Assistance",
46
- "contact.subjectFeedback": "Retour d'expérience",
47
- "contact.message": "Message",
48
- "contact.messageHint": "500 caractères maximum",
49
- "contact.send": "Envoyer le message",
50
- "catalog.title": "Catalogue",
51
- "catalog.heading": "Catalogue",
52
- "catalog.loading": "Chargement du catalogue…",
53
- "catalog.error":
54
- "Le chargement du catalogue a échoué. Rechargez la page pour réessayer.",
55
- "catalog.listLabel": "Catalogue de produits",
56
- "catalog.signedInAs": "Connecté en tant que",
57
- // "affichage de" keeps the wording invariant while the plural agrees with
58
- // the total ({count}), which is what drives Intl.PluralRules selection.
59
- "catalog.showing": {
60
- one: "— affichage de {shown} sur {count} produit.",
61
- other: "— affichage de {shown} sur {count} produits.",
62
- },
63
- "catalog.more": "D'autres produits sont disponibles.",
64
- "catalog.rating": "noté {rating} / 5",
65
- "catalog.inStock": "en stock",
66
- "catalog.outOfStock": "en rupture de stock",
67
- };
68
-
69
- export default fr;