@o3r/localization 9.3.0-alpha.4 → 9.3.0-alpha.40

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/README.md CHANGED
@@ -717,5 +717,5 @@ Otter framework provides a set of code generators based on [angular schematics](
717
717
  | Schematics | Description | How to use |
718
718
  | ------------------------------ | -------------------------------------------------------------- | ------------------------------------ |
719
719
  | add | Include Otter localization module in a library / application. | `ng add @o3r/localization` |
720
- | localization-to-component | Add localization architecture to an Otter component | `ng g localization-to-component` |
721
- | localization-key-to-component | Add localization key to an Otter component | `ng g localization-key-to-component` |
720
+ | localization-to-component | Add localization architecture to an Otter component | `ng g localization-to-component` |
721
+ | localization-key-to-component | Add a localization key to an Otter component | `ng g localization-key-to-component` |
@@ -19,7 +19,7 @@ class LocalizationExtractor {
19
19
  /** Get the list of file from tsconfig.json */
20
20
  getFilesFromTsConfig() {
21
21
  const { include, exclude, cwd } = this.getPatternsFromTsConfig();
22
- return glob(include, { ignore: exclude, cwd });
22
+ return glob.sync(include, { ignore: exclude, cwd });
23
23
  }
24
24
  /**
25
25
  * Return the class node if the class is an angular element
@@ -216,7 +216,7 @@ class LocalizationExtractor {
216
216
  * @param extraLocalizationFiles Additional translations to add
217
217
  */
218
218
  async extractLocalizationFromTsConfig(extraLocalizationFiles = []) {
219
- const files = await this.getFilesFromTsConfig();
219
+ const files = this.getFilesFromTsConfig();
220
220
  const tsFiles = files
221
221
  .filter((file) => /\.ts$/.test(file))
222
222
  .map((file) => path.join(path.dirname(this.tsconfigPath), file));
@@ -24,8 +24,8 @@ exports.default = (0, architect_1.createBuilder)((options, context) => {
24
24
  recursive: true
25
25
  });
26
26
  }
27
- const enGB = path.join(i18nPath, options.defaultLanguageFile);
28
- fs.writeFileSync(enGB, newContent);
27
+ const defaultLanguageFile = path.join(i18nPath, options.defaultLanguageFile);
28
+ fs.writeFileSync(defaultLanguageFile, newContent + '\n');
29
29
  });
30
30
  });
31
31
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/localization",
3
- "version": "9.3.0-alpha.4",
3
+ "version": "9.3.0-alpha.40",
4
4
  "description": "This module provides a runtime dynamic language/translation support and debug tools.",
5
5
  "keywords": [
6
6
  "localization",
@@ -20,11 +20,11 @@
20
20
  "@formatjs/intl-numberformat": "^8.0.2",
21
21
  "@ngrx/store": "~16.2.0",
22
22
  "@ngx-translate/core": "~15.0.0",
23
- "@o3r/core": "^9.3.0-alpha.4",
24
- "@o3r/dynamic-content": "^9.3.0-alpha.4",
25
- "@o3r/extractors": "^9.3.0-alpha.4",
26
- "@o3r/logger": "^9.3.0-alpha.4",
27
- "@o3r/schematics": "^9.3.0-alpha.4",
23
+ "@o3r/core": "^9.3.0-alpha.40",
24
+ "@o3r/dynamic-content": "^9.3.0-alpha.40",
25
+ "@o3r/extractors": "^9.3.0-alpha.40",
26
+ "@o3r/logger": "^9.3.0-alpha.40",
27
+ "@o3r/schematics": "^9.3.0-alpha.40",
28
28
  "@schematics/angular": "~16.2.0",
29
29
  "chokidar": "^3.5.2",
30
30
  "intl-messageformat": "~10.5.0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAiD1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAkD1D"}
@@ -34,6 +34,7 @@ function ngAdd(options) {
34
34
  skipConfirmation: true,
35
35
  version: depsInfo.packageVersion,
36
36
  parentPackageInfo: `${depsInfo.packageName} - setup`,
37
+ projectName: options.projectName,
37
38
  dependencyType: getProjectDepType(t),
38
39
  workingDirectory
39
40
  })(t, c),