adapt-authoring-lang 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/bin/check.js +4 -2
  2. package/package.json +1 -1
package/bin/check.js CHANGED
@@ -52,10 +52,12 @@ async function getTranslatedStrings () {
52
52
  await Promise.all((langPacks).map(async l => {
53
53
  await Promise.all((await fs.readdir(l)).map(async f => {
54
54
  const keys = JSON.parse(await fs.readFile(`${l}/${f}`))
55
- const [lang, id] = f.split('.')
55
+ const parts = f.replace(/\.json$/, '').split('.')
56
+ const lang = parts[0]
57
+ const id = parts[1] // undefined for {lang}.json files
56
58
  if (!keyMap[lang]) keyMap[lang] = {}
57
59
  Object.keys(keys)
58
- .map(k => `${id}.${k}`)
60
+ .map(k => id ? `${id}.${k}` : k)
59
61
  .forEach(k => {
60
62
  keyMap[lang][k] = false
61
63
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-lang",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Localisation for the Adapt authoring tool",
5
5
  "homepage": "https://github.com/taylortom/adapt-authoring-lang",
6
6
  "license": "GPL-3.0",