@ossy/app 3.0.6 → 3.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -49,21 +49,21 @@
49
49
  "@babel/eslint-parser": "^7.15.8",
50
50
  "@babel/preset-react": "^7.26.3",
51
51
  "@babel/register": "^7.25.9",
52
- "@ossy/authentication": "^3.0.6",
53
- "@ossy/design-system": "^3.0.6",
54
- "@ossy/locale": "^3.0.6",
55
- "@ossy/manifest": "^3.0.6",
56
- "@ossy/package-catalog": "^3.0.6",
57
- "@ossy/pages": "^3.0.6",
58
- "@ossy/platform": "^3.0.6",
59
- "@ossy/resources": "^3.0.6",
60
- "@ossy/router": "^3.0.6",
61
- "@ossy/router-react": "^3.0.6",
62
- "@ossy/schema": "^3.0.6",
63
- "@ossy/sdk": "^3.0.6",
64
- "@ossy/sdk-react": "^3.0.6",
65
- "@ossy/themes": "^3.0.6",
66
- "@ossy/workspaces": "^3.0.6",
52
+ "@ossy/authentication": "^3.0.7",
53
+ "@ossy/design-system": "^3.0.7",
54
+ "@ossy/locale": "^3.0.7",
55
+ "@ossy/manifest": "^3.0.7",
56
+ "@ossy/package-catalog": "^3.0.7",
57
+ "@ossy/pages": "^3.0.7",
58
+ "@ossy/platform": "^3.0.7",
59
+ "@ossy/resources": "^3.0.7",
60
+ "@ossy/router": "^3.0.7",
61
+ "@ossy/router-react": "^3.0.7",
62
+ "@ossy/schema": "^3.0.7",
63
+ "@ossy/sdk": "^3.0.7",
64
+ "@ossy/sdk-react": "^3.0.7",
65
+ "@ossy/themes": "^3.0.7",
66
+ "@ossy/workspaces": "^3.0.7",
67
67
  "@rollup/plugin-alias": "^6.0.0",
68
68
  "@rollup/plugin-babel": "^7.1.0",
69
69
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -97,5 +97,5 @@
97
97
  "README.md",
98
98
  "tsconfig.json"
99
99
  ],
100
- "gitHead": "3e1c558069c7738dd751e429c69b10e52d247d8c"
100
+ "gitHead": "5010f51795d5b8f4c63ef52495f4b2935b801b3f"
101
101
  }
@@ -74,6 +74,8 @@ export function buildSidebarNav ({
74
74
  return {
75
75
  slug,
76
76
  label: def?.title || slugToDisplayName(slug),
77
+ // Prefer explicit Definition.titleKey; otherwise reuse package home title i18n.
78
+ labelKey: def?.titleKey || `${slug}.home.title`,
77
79
  icon: def?.icon || 'package',
78
80
  order: def?.navOrder ?? 100,
79
81
  pageId,
@@ -33,9 +33,16 @@ function isNavSelected ({ href, pageId, itemPageId, routerHref }) {
33
33
  return false
34
34
  }
35
35
 
36
+ function resolveNavLabel (item, t) {
37
+ if (!item.labelKey) return item.label
38
+ const translated = t(item.labelKey)
39
+ // Missing keys resolve to the key string — keep the English Definition title instead.
40
+ return translated !== item.labelKey ? translated : item.label
41
+ }
42
+
36
43
  function navLabelForItem (item, showLabels, t) {
37
44
  if (!showLabels) return ''
38
- return item.labelKey ? t(item.labelKey) : item.label
45
+ return resolveNavLabel(item, t)
39
46
  }
40
47
 
41
48
  export default function DefaultSidebar ({
@@ -103,13 +110,14 @@ export default function DefaultSidebar ({
103
110
 
104
111
  const packageButtons = packageItems.map((item) => {
105
112
  const href = router.getHref(item.pageId)
113
+ const resolvedLabel = resolveNavLabel(item, t)
106
114
  return {
107
115
  key: item.slug,
108
116
  href,
109
117
  selected: isNavSelected({ href, pageId, itemPageId: item.pageId, routerHref: router.href }),
110
118
  prefix: iconOnly ? { name: item.icon, size: 's', style: { flexShrink: 0 } } : item.icon,
111
- label: iconOnly ? '' : item.label,
112
- title: iconOnly ? item.label : undefined,
119
+ label: showLabels ? resolvedLabel : '',
120
+ title: iconOnly ? resolvedLabel : undefined,
113
121
  }
114
122
  })
115
123