waibu-db 2.1.5 → 2.1.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.
@@ -1,4 +1,5 @@
1
1
  {
2
+ "waibuDb": "DB",
2
3
  "pageOfPages%s%s": "Page %s of %s pages",
3
4
  "recsFound%s": "%s record(s) found",
4
5
  "recsPerPage": "recs per page",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "waibuDb": "DB",
2
3
  "pageOfPages%s%s": "Hal %s dari %s",
3
4
  "recsFound%s": "Ditemukan %s data",
4
5
  "recsPerPage": "data per halaman",
package/index.js CHANGED
@@ -96,7 +96,7 @@ async function factory (pkgName) {
96
96
  adminMenu = async (locals, req) => {
97
97
  const { getPluginPrefix } = this.app.waibu
98
98
  const { pascalCase } = this.app.lib.aneka
99
- const { getAppTitle } = this.app.waibuMpa
99
+ const { getPluginTitle } = this.app.waibuMpa
100
100
  const { camelCase, map, groupBy, keys, kebabCase, filter, get, isArray } = this.app.lib._
101
101
 
102
102
  const prefix = getPluginPrefix(this.ns)
@@ -112,7 +112,7 @@ async function factory (pkgName) {
112
112
  })
113
113
  const omenu = groupBy(map(models, s => {
114
114
  const item = { name: s.name, ns: s.plugin.ns }
115
- item.nsTitle = getAppTitle(s.plugin.ns)
115
+ item.nsTitle = getPluginTitle(s.plugin.ns)
116
116
  return item
117
117
  }), 'nsTitle')
118
118
  const menu = []
@@ -120,7 +120,7 @@ async function factory (pkgName) {
120
120
  const items = omenu[k]
121
121
  const plugin = this.app[items[0].ns]
122
122
  menu.push({
123
- title: k,
123
+ title: req.t(k),
124
124
  children: map(items, item => {
125
125
  return {
126
126
  title: camelCase(item.name.slice(plugin.alias.length)),
@@ -2,7 +2,8 @@ function buildParams ({ model, req, reply, action, options = {} }) {
2
2
  const { camelCase, kebabCase, map, upperFirst, get } = this.app.lib._
3
3
  const [, ...names] = map(kebabCase(model).split('-'), n => upperFirst(n))
4
4
  const mdl = this.app.dobo.getModel(model)
5
- const modelTitle = this.app[mdl.plugin.ns].title + ': ' + req.t(camelCase(names.join(' ')))
5
+ const prefix = this.app.waibuMpa ? this.app.waibuMpa.getPluginTitle(mdl.plugin.ns) : mdl.plugin.ns
6
+ const modelTitle = req.t(prefix) + ': ' + req.t(camelCase(names.join(' ')))
6
7
  const page = {
7
8
  title: req.t(get(req, 'routeOptions.config.title', this.app[mdl.plugin.ns].title)),
8
9
  modelTitle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-01-21
4
+
5
+ - [2.1.7] Bug fix on page titles
6
+
7
+ ## 2026-01-19
8
+
9
+ - [2.1.6] Bug fix on app title
10
+ - [2.1.6] Add some missing translations
11
+
3
12
  ## 2026-01-17
4
13
 
5
14
  - [2.1.4] Bug fix