New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-extract-i18n-merge

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-extract-i18n-merge

Extract and merge i18n xliff translation files for angular projects.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

npm Coverage Status Language grade: JavaScript

Angular extract i18n and merge

This extends Angular CLI to improve the i18n extraction and merge workflow. New/removed translations are added/removed from the target translation files. Additionally, translation files are normalized (pretty print, sorted by id) so that diffs are easy to read (and translations in PRs might actually get reviewd ;-) ).

Install

ng add ng-extract-i18n-merge

Usage

ng run [PROJECT_ID]:extract-i18n-merge

# or (if you confirmed to adding an npm command):
npm run extract-i18n-merge 

Configuration

In your angular.json you'll find a new target extract-i18n-merge that can be configured with the following options:

NameDefaultDescription
formatInferred from current setup by ng addAn of xlf, xlif, xliff, xlf2, xliff2
outputPathInferred from current setup by ng addPath to folder containing all (source and target) translation files.
targetFilesInferred from current setup by ng addFilenames (relative to outputPath of all target translation files (e.g. ["messages.fr.xlf", "messages.de.xlf"]
removeIdsWithPrefixundefinedList of prefix strings. All translation units with matching id attribute are removed. Useful for excluding duplicate library translations.
fuzzyMatchtrueWhether translation units without matching IDs are fuzzy matched by source text.
resetTranslationStatetrueReset the translation state to new/initial for new/changed units.
collapseWhitespacetrueCollapsing of multiple whitespaces and trimming when comparing translations sources.
includeContextfalseWhether to include the context information (like notes) in the translation files. This is useful for sending the target translation files to translation agencies/services.

Contribute

Feedback and PRs always welcome :-)

Keywords

FAQs

Package last updated on 31 Jan 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc