Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@cbourgois/simonsays
Advanced tools
"Jacques a dit" Like.
simonsays
help you: to find translations key used in your project and:
To do it, simonsays
parse your javascript and html files to detect angular-translate
usages.
Simonsays detect :
$translate
and $translate.instant
calls in your javascript files,translate
directives in your HTML files,translate
filter usages in your HTML files.We use @babel/parser
to parse your javascript code in AST and we have ported $interpolate
and $ParseProvider
from AngularJS (code available here).
Simonsays
supports translations defined in JSON or XML files.
With yarn
:
yarn add @cbourgois/simonsays
or
With npm
:
npm install @cbourgois/simonsays
With npx
:
npx @cbourgois/simonsays --help
Compatibles options: --locale
, --module
, --output
.
To check used translations:
simonsays check <sourcePath>
simonsays search <sourcePath> <projectPath>
To search used translations (only used translations will be reported):
simonsays search <sourcePath> <projectPath>
To search used translations and retrieve all (already present translations + used translations):
simonsays search <sourcePath> <projectPath> --all
To overwrite existing translations by the project translations:
simonsays search <sourcePath> <projectPath> --merge
Compatibles options: --all
, --merge
, --locale
, --module
, --output
.
To rewrite JSON translations file:
simonsays rewrite <sourceDir> <projectPath>
To rewrite JSON translations file and prefix translations (AngularJS code and html will be overwritten):
simonsays rewrite <sourceDir> <projectPath> --prefix=ng_
Compatibles options: --all
, --merge
, --locale
, --module
, --output
, --prefix
.
By default, the script parse all the source path and will generate one, and only one translation file.
If you want, you can specify the --module
option to parse/generate translations for each AngularJS module contained in the source path.
For example:
simonsays check <sourcePath> --module
By default, simonsays
target the fr_FR
locale, but you can change it by specifying --locale
option.
For example:
simonsays check <sourcePath> --locale=en_GB
You can specify an output format from the following:
summary
(default) : output a table with the resultstext
: output a table with num of resultsjson
: output a jsonsilent
: no outputFor example:
simonsays search <sourcePath> <projectPath> --output=text
This project embed some portions of AngularJS source code (see ./src/angularjs/**
).
FAQs
Find translations used in AngularJS project
The npm package @cbourgois/simonsays receives a total of 5 weekly downloads. As such, @cbourgois/simonsays popularity was classified as not popular.
We found that @cbourgois/simonsays demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.