bajo 2.13.0 → 2.13.1

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/class/app.js CHANGED
@@ -382,8 +382,15 @@ class App {
382
382
  */
383
383
  t = (ns, text, ...params) => {
384
384
  const { formatText, isSet } = this.lib.aneka
385
+ const { isArray, last } = this.lib._
386
+ const { join } = this.bajo
385
387
  let { text: newText, trans, params: args } = this._prepTrans(ns, text, params)
386
388
  if (!isSet(trans)) trans = newText
389
+ const lang = isPlainObject(last(args)) ? last(args).lang : undefined
390
+ for (const idx in args) {
391
+ const arg = args[idx]
392
+ if (isArray(arg)) args[idx] = join(arg, { lang })
393
+ }
387
394
  return formatText(trans, ...args)
388
395
  }
389
396
 
package/class/bajo.js CHANGED
@@ -800,12 +800,10 @@ class Bajo extends Plugin {
800
800
  * @param {string} [options.lastSeparator=and] - Text to use as the last separator
801
801
  * @returns {string}
802
802
  */
803
- join = (array, options = {}) => {
804
- let separator = ', '
805
- let lastSeparator = 'and'
806
- let lang
807
- if (isString(options)) separator = options
808
- else ({ separator, lastSeparator, lang } = options)
803
+ join = (input = [], options = {}) => {
804
+ const array = [...input]
805
+ if (isString(options)) options = { separator: options }
806
+ let { separator = ', ', lastSeparator = 'and', lang } = options
809
807
  const translate = (val) => {
810
808
  return this.t(val, { lang }).toLowerCase()
811
809
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "The ultimate framework for whipping up massive apps in no time",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-05-02
4
+
5
+ - [2.13.1] Bug fix in ```app.t()```
6
+ - [2.13.1] Bug fix in ```bajo.join()```
7
+
3
8
  ## 2026-04-28
4
9
 
5
10
  - [2.13.0] Add ```options.merge``` to ```readConfig()```