bajo 1.0.6 → 1.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.
@@ -6,7 +6,7 @@ import Sprintf from 'sprintf-js'
6
6
  const { sprintf } = Sprintf
7
7
  let unknownLangWarning = false
8
8
 
9
- const { last, isPlainObject, get, without, reverse } = lodash
9
+ const { isString, last, isPlainObject, get, without, reverse, map } = lodash
10
10
 
11
11
  class Print {
12
12
  constructor (plugin, opts = {}) {
@@ -60,7 +60,11 @@ class Print {
60
60
  }
61
61
  }
62
62
  if (!trans) trans = text
63
- return sprintf(trans, ...args)
63
+ const params = map(args, a => {
64
+ if (!isString(a)) return a
65
+ return a.replaceAll('%', '%%')
66
+ })
67
+ return sprintf(trans, ...params)
64
68
  }
65
69
 
66
70
  setOpts (args = []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A framework to build a giant monstrous app rapidly",
5
5
  "main": "boot/index.js",
6
6
  "scripts": {