
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
@siemens/element-translate-ng
Advanced tools
element-translate-ng
is a translation abstraction layer. It can be used with
ngx-translate
See here for details how it works and how to use it.
Install the library as follows:
npm install --save @siemens/element-translate-ng
An important part of the library is the extraction of translatable keys as a TypeScript interface as well as extracting a JSON messages file with default translations. The extraction happens on compiled files. I.e. make sure to run the build first. Then, to run these extractions
npx update-translatable-keys
By default, this will pick of the configuration from a file element-translate.conf.json
. To
use a different config file, pass as the only argument to the command.
The config file looks like this
{
"files": "dist/@simpl/**/fesm2022/**/*.mjs",
"configs": [
{
"name": "element",
"locationPrefix": "projects/element-ng",
"keysFile": "projects/element-ng/translate/si-translatable-keys.interface.ts",
"keysInterfaceName": "SiTranslatableKeys",
"messagesFile": "dist/@siemens/element-ng/template-i18n.json"
}
]
}
files
is a glob pattern for defining the files to scanconfigs
is an array of configs. For mono-repos building multiple libraries, they can be
separated into different configs. All keys are required:
name
is a unique namelocationsPrefix
defines the path prefix of the source files, important to distinguish
between different libraries in a mono-repokeysFile
defines the path of the generated TypeScript interfaces filekeysInterfaceName
defines the name of the TypeScript interface
messagesFile
defines the path of the generated messages JSON fileRun npm run translate:test
to perform the unit tests via Karma.
You can set a seed for running the tests in a specific using an environment variable: SEED=71384 npm run translate:test
The following applies for code and documentation of the git repository, unless explicitly mentioned.
Copyright (c) Siemens 2016 - 2025
MIT, see LICENSE.md.
FAQs
Element translation abstraction layer.
The npm package @siemens/element-translate-ng receives a total of 4,727 weekly downloads. As such, @siemens/element-translate-ng popularity was classified as popular.
We found that @siemens/element-translate-ng demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.