Comments (5)
@torfeld6 Sorry, likely my fault. I tried to find the cause of the bug and it wasn't so much that parseJavascript
was the fallback (it was the same before), but that preprocessScript
always returns content and language now. Before we passed an empty string to preprocessScript
.
Since you have already digged into the code, can you check if changing line 260 in extract.js
to
({content, lang}) => {
if (lang) {
(lang === 'ts' || (!lang && ext === 'ts'))
? this.parseTypeScript(filename, content)
: this.parseJavascript(filename, content)
}
}
solves your problem? I would do a PR, but I only added some html templates to my project to reproduce your problem (it solves it and adds the strings to the .po files) and am not sure if there aren't some other cases I might have missed.
from easygettext.
Hi @Shin-- thank you for the quick reply. I tried to address the issue in the PR #86
from easygettext.
@torfeld6 Is this resolved in the latest release?
from easygettext.
@torfeld6 do you think you resolved the issue ? Or do you think you can fix this one as well as #93 in your incoming fix ?
from easygettext.
@torfeld6 do you think you resolved the issue ? Or do you think you can fix this one as well as #93 in your incoming fix ?
🙏
The HTML issue has been resolved with the release of 2.14. And here's the pull request #94 for #93
from easygettext.
Related Issues (20)
- Vue js <i18n>
- Incorrect processing of <br> tags when exporting HOT 2
- Sort generated strings by file occurrence
- gettext-extract - Unexpected Token (
- How to compile from pug files that uses pug locals? HOT 1
- Escape quotes bug HOT 1
- How to use gettext-extract? HOT 2
- Add an option to disable parsing JavaScript HOT 9
- Better support for HTML tags inside translated strings HOT 4
- How to use with Pug for server-side localization? HOT 3
- SyntaxError: Unexpected token when extracting .vue file with JSX expression HOT 1
- Extracting from html file is broken HOT 2
- Support nativescript-vue/multiple templates HOT 4
- extract of pure js files is not working ... HOT 7
- Support optional chaining HOT 3
- Feature request: use peer/optional dependencies to reduce node_modules HOT 2
- 2.14.0 stopped extracting strings from some Vue components HOT 9
- Upgrade acorn to 7.4 because of acorn-stage v4 dependency
- Option to output a json file per locale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easygettext.