@@ -17,43 +17,11 @@ Install the library as follows:
1717npm install --save @siemens/element-translate-ng
1818```
1919
20- An important part of the library is the extraction of translatable keys as a TypeScript interface
21- as well as extracting a JSON messages file with default translations. The extraction happens on
22- compiled files. I.e. make sure to run the build first. Then, to run these extractions
23-
24- ``` sh
25- npx update-translatable-keys
26- ```
27-
28- By default, this will pick of the configuration from a file ` element-translate.conf.json ` . To
29- use a different config file, pass as the only argument to the command.
30-
31- The config file looks like this
32-
33- ``` json
34- {
35- "files" : " dist/@simpl/**/fesm2022/**/*.mjs" ,
36- "configs" : [
37- {
38- "name" : " element" ,
39- "locationPrefix" : " projects/element-ng" ,
40- "keysFile" : " projects/element-ng/translate/si-translatable-keys.interface.ts" ,
41- "keysInterfaceName" : " SiTranslatableKeys" ,
42- "messagesFile" : " dist/@siemens/element-ng/template-i18n.json"
43- }
44- ]
45- }
46- ```
47-
48- - ` files ` is a glob pattern for defining the files to scan
49- - ` configs ` is an array of configs. For mono-repos building multiple libraries, they can be
50- separated into different configs. All keys are required:
51- - ` name ` is a unique name
52- - ` locationsPrefix ` defines the path prefix of the source files, important to distinguish
53- between different libraries in a mono-repo
54- - ` keysFile ` defines the path of the generated TypeScript interfaces file
55- - ` keysInterfaceName ` defines the name of the TypeScript ` interface `
56- - ` messagesFile ` defines the path of the generated messages JSON file
20+ An important part of the translation tooling is the extraction of translatable keys as a TypeScript
21+ interface as well as extracting a JSON messages file with default translations. This is provided by
22+ the separate ` @siemens/element-translate-cli ` package via the ` update-translatable-keys ` CLI. See
23+ [ Extracting translatable keys] ( https://element.siemens.io/fundamentals/localization/#extracting-translatable-keys )
24+ for details on how to run it and how to configure it.
5725
5826## Testing
5927
0 commit comments