seveves / ngx-translate-zombies Goto Github PK
View Code? Open in Web Editor NEWfinds unused translation keys in your project
Home Page: https://marketplace.visualstudio.com/items?itemName=seveseves.ngx-translate-zombies
finds unused translation keys in your project
Home Page: https://marketplace.visualstudio.com/items?itemName=seveseves.ngx-translate-zombies
when getting a translation object with the TranslateService then you have access to its properties but this is not recognized by the extension and will be removed in the diff.
this.translateService.get('MANY.KEYS')
.pipe(take(1))
.subscribe(keys => {
console.log(keys['MISSING']; // no zombie at all!
});
Hi there ๐,
first of all: thanks for this project, really nice to find zombies so easily.
However I've ran into some false positives. I am sure this isn't an easy issue to solve, but wanted to report it nevertheless.
Example code snippets:
<p class="error">{{'LOGIN.ERROR.' + (loginCode | async) | translate}}</p>
(Where loginCode
is a string from a selector.)
Another example:
getFilterName(filter: WalksheetFilter) {
const name = WalksheetFilterType[filter.type];
return this.translate.instant(`WALKSHEET.ACTIONBAR.FILTER.${name}`);
}
ngx-translate-zombies marks these keys (like LOGIN.ERROR.NOT_AUTHORIZED
) as a zombie, but they are definitively used via the dynamic key construction.
Any ideas how to solve this?
Two use cases:
export enum GPSFieldType {
LOCATION = 'LV.GPS_INFO.LOCATION',
MANUAL_DEPTH = 'LV.GPS_INFO.MANUAL_DEPTH',
...
...
...
}
which we use to more easily access specific translations.
2. When defining translation strings within objects
options: [
{
title: 'LV.SYSTEM_MAPPING.INTERNAL_GPS',
value: NeedQPSQualityKey.InternalGPS,
},
]
In both cases translations are marked as zombies
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.