waibu 2.1.0 → 2.1.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.
@@ -1,4 +1,5 @@
1
1
  {
2
+ "waibu": "Waibu",
2
3
  "pluginPrefixConflic%s%s%s": "Plugin prefix '%s' conflict between '%s' and '%s'",
3
4
  "serverIs%s": "Server is %s",
4
5
  "closedL": "closed",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "waibu": "Waibu",
2
3
  "pluginPrefixConflic%s%s%s": "Ada konflik di prefiks '%s' antara '%s' dan '%s'",
3
4
  "serverIs%s": "Server %s",
4
5
  "closedL": "tertutup",
@@ -56,14 +56,13 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
56
56
  const { runHook } = this.app.bajo
57
57
  const { set, merge, pick, get, isEmpty, find, pullAt } = this.app.lib._
58
58
  const { req, reply } = opts
59
-
60
- const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : ''
59
+ const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : (req.ns ?? '')
61
60
  params.page = merge(params.page ?? {}, { ns: req.ns, appTitle })
62
61
  params.sidebar = params.sidebar ?? []
63
62
 
64
63
  const { site, user, lang, darkMode } = req
65
- const theme = pick(find(this.themes, { name: req.theme }) ?? {}, ['name', 'framework'])
66
- const iconset = pick(find(this.iconsets, { name: req.iconset }) ?? {}, ['name'])
64
+ const theme = pick(find(this.themes, { name: opts.theme ?? req.theme }) ?? {}, ['name', 'framework'])
65
+ const iconset = pick(find(this.iconsets, { name: opts.iconset ?? req.iconset }) ?? {}, ['name'])
67
66
  const routeOpts = get(req, 'routeOptions.config', {})
68
67
  const _meta = { theme, iconset, site, user, lang, darkMode, routeOpts }
69
68
  _meta.site = _meta.site ?? {}
@@ -86,7 +85,8 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
86
85
  _meta.errorMessage = params.error.message
87
86
  if (params.error.ns) {
88
87
  params.page.ns = params.error.ns
89
- params.page.appTitle = this.app.waibuMpa.getAppTitle(params.error.ns)
88
+ params.page.appTitle = params.error.ns
89
+ if (this.app.waibuMpa) params.page.appTitle = req.t(this.app.waibuMpa.getAppTitle(params.page.appTitle))
90
90
  }
91
91
  if (!errs[req.id]) {
92
92
  this.log.error('error%s', params.error.message)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-01-19
4
+
5
+ - [2.1.2] Bug fix on ```getAppTitle()```
6
+ - [2.1.2] Add missing some translation
7
+
3
8
  ## 2025-12-28
4
9
 
5
10
  - [2.1.0] Ported to ```bajo@2.2.x``` specs