- ๐ญ Iโm a YouTrack Front-End Developer at JetBrains
andrey-skl / angular-gettext-cli Goto Github PK
View Code? Open in Web Editor NEWA command line interface for angular-gettext-tools
A command line interface for angular-gettext-tools
Are you planning of pushing the latest version to npm anytime?
Hi! Iโm working on a project where we decided to replace grunt with a set of npm/cli scripts โ would you accept a PR adding support for the compiler feature of angular-gettext (as opposed to extract)? If so, would you rather have that to be a completely new script in bin/, or would you want something differentiated by a flag (e.g. --compile
)?
/cc @nhaesler
make-dir pot && angular-gettext-cli --files './src/blocks/**/*.+(js|html)' --dest ./pot/default.pot --marker-name i18n
'html)'' is not recognized as an internal or external command,
operable program or batch file.npm ERR! code ELIFECYCLE
npm ERR! errno 255
If I add escaping then it seems files are not resolved (read 0 files):
[email protected] i18nExtract C:\Sources\Git\git.labs.intellij.net\ring\bundle\installer\client
make-dir pot && angular-gettext-cli --files \"'./src/blocks/**/*.+(js|html)'\" --dest ./pot/default.pot --marker-name i18nFinished parsing './src/blocks/**/*.+(js|html)', read 0 files.
All files processed, stored in a file ./pot/default.pot
Wondering if ya might accept a pr that added the option to process marker-names, thinking something along the lines of --marker-names ['__', 'N_']
I know there is no official support for typescript files, but so far I had no problems parsing them instead of JS.
But since TypeScript 2.7 there are Definite Assignment Assertions (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html) with an ! after the declaration; e.g. let x!: number;
A file with such a declaration is no longer parsable and throws a parsing error.
Would you be willing to accept a PR fixing this issue?
One possible solution is extracting the strings from the converted file afterwards, but then i loose the correct file & line information in the messages.pot
angular-gettext-cli --files 'public/templates/funds/*.+(html)' --dest './angular_html.pot'
generate po file with below header:
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Project-Id-Version: \n"
i updated from 1.0.5 to 1.0.7 (automatically because of defined range of ^1.0.5)
my command looks like this:
angular-gettext-cli --files './src/**/*.+(config\\.js)' --dest $CIRCLE_ARTIFACTS/master.pot --marker-name gettext
with 1.0.5 everything is working, at 1.0.7 the result looks like this (without generating any errors):
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Project-Id-Version: \n"
took me some time to figure out, the error was not me, but the patch version update...
please try to fix the problem and make sure, you don't publish patch releases containing breaking changes
I get Error parsing some/javascript/file.js
error with no information (line number, character in line) on where the error is present.
Is there a way to get this information?
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.