@kununu/phraseapp-cli 4.0.0-beta.4 → 4.0.0

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.
@@ -50,6 +50,18 @@ You have to add to the ```.phraseapp.json``` file a new var dynamicKeys
50
50
  }
51
51
  ```
52
52
 
53
+ ## Structure
54
+
55
+ ```
56
+ /
57
+ ├─ check-translations.js # Initial file
58
+ ├─ dynamic_keys.json # Add all dynamic keys that we have in the app or keys that we get from Ambassador/BE.
59
+ ├─ possible_dynamic_keys.json # Automatically created file indicating in which files we might have dynamic keys.
60
+ ├─ missing_keys.json # Automatically created file indicating the keys that exist in the app but are not translated.
61
+ ├─ not_used_keys.json # Automatically created file indicating the keys that are not being used in the app.
62
+
63
+ ```
64
+
53
65
  ## License
54
66
 
55
67
  Apache-2.0 © [kununu](https://kununu.com)
@@ -35,8 +35,10 @@ function extractTranslationKeys() {
35
35
  CallExpression({node}) {
36
36
  if (
37
37
  node.callee &&
38
- node.callee.property &&
39
- ['formatMessage'].includes(node.callee.property.name)
38
+ ((node.callee.property &&
39
+ ['formatMessage'].includes(node.callee.property.name)) ||
40
+ (node.callee.name &&
41
+ ['formatMessage'].includes(node.callee.name)))
40
42
  ) {
41
43
  const firstArg = node.arguments[0];
42
44
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@kununu/phraseapp-cli",
3
- "version": "4.0.0-beta.4",
3
+ "version": "4.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "kununu",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
- "lint": "eslint . --ext jsx --ext js --ext tsx --ext ts --ignore-path .eslintignore --max-warnings 10 --fix"
9
+ "lint": "eslint . --ext jsx --ext js --ext tsx --ext ts --ignore-path .eslintignore --max-warnings 10"
10
10
  },
11
11
  "dependencies": {
12
12
  "@babel/parser": "^7.26.10",