biesbjerg / ngx-translate-extract-marker Goto Github PK
View Code? Open in Web Editor NEWFunction to manually mark strings to be extracted using ngx-translate-extract
License: MIT License
Function to manually mark strings to be extracted using ngx-translate-extract
License: MIT License
The following could be supported but currently is not
Object.keys(MyEnum).forEach((val: string) => {
marker(`MyEnum.${val}`);
}
See biesbjerg/ngx-translate-extract#211, biesbjerg/ngx-translate-extract#235
When I try to install ngx-translate-extract-marker via npm command npm install @biesbjerg/ngx-translate-extract-marker
I got this error :
npm ERR! path D:\MyProject\node_modules\@biesbjerg\ngx-translate-extract-marker
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\MyProject\node_modules\@biesbjerg\ngx-translate-extract-marker' -> 'D:\MyProject\node_modules\@biesbjerg\.ngx-translate-extract-marker.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user.name\AppData\Roaming\npm-cache\_logs\2019-10-30T10_39_30_984Z-debug.log
I've tried to install it manually by adding this line
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
in my package.json
's dependencies (not devDependencies) and running npm install
from scratch, but when I run my production build, I got this error:
Uncaught ReferenceError: ngx_translate_extract_marker_1 is not defined
on this line:
this.siteTitleService.setTitle(ngx_translate_extract_marker_1.marker('@.Connection'));
Any idea?
[Question]
How can I add marker on enum values?
export enum Score {
Ok = 'Ok',
Failed = 'Failed'
}
After upgrade to Angular 13, Ivy distribution is norm, and View Engine is now legacy.
I have a strange issue and I am not sure if this is related to the extractor/marker (this package) or to ngx-translate/core, but I suspect it is this package.
As per your README I added
import {marker as TRANSLATE} from '@biesbjerg/ngx-translate-extract-marker';
to my Component and created a variable to translate:
atTime = TRANSLATE('g.txt.various.atTime');
Everything compiles but my in my html it only shows the id g.txt.various.atTime
Demo here, https://stackblitz.com/edit/angular-hxri9n is this a bug or am I doing something wrong?
cheers
We have built a library to cater to the UI needs of developers where we have developed some native web components using Angular 14. Apparently, there are few apps which is using Angular 12 and refusing to upgrade to Angular latest, and they want to use my library without any hassle. How can we do this?
Angular CLI (or Nx CLI) Version
[ng version] Angular 16.1.3
Node Version
18.16.0
OS Version
Windows 11
Expected Behaviour
Ivy compliant distribution
Due to trouble with
ngx-cookieconsent [es2015/esm2015] (git://github.com/tinesoft/ngx-cookieconsent.git)
which isn't angular 16 compliant anymore, I was notified that your intellectual property
@biesbjerg/ngx-translate-extract-marker [es2015/esm2015] (https://github.com/biesbjerg/ngx-translate-extract-marker.git)
has been tagged as a legacy 'View Engine' library, as well!
The angular upgrade team asked to encourage the library author(s) to publish an Ivy distribution. Thanks in advance, succes!
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.