Comments (9)
This is new behaviour since 5.0.0. But only when you set foldLength
to 0, right?
from gettext-parser.
@smhg, I have not tried to mess with foldLength yet but this is a behavior since 4.2.0. I just upgraded to 5.0.0 and it's still the case. I will try foldLength and get back.
from gettext-parser.
Just tried const res = po.compile(out, {foldLength: 0})
and I get the same result
from gettext-parser.
@sinnstudio-nas I'm sorry, I mixed things up. This indeed has nothing to do with the recent changes (5.0.0).
Yes, line folding on newline characters seems to happen in any case.
Some thoughts:
- I think it would indeed be great to be able to configure line folding, as many different opinions seem to exists. And likely other options are necessary (as there are other characters on which folding happens).
- Maybe it is good to pull this into a separate library? With the
foldLength
option replaced byfolding
which will be passed on directly to the new library?
from gettext-parser.
@smhg so maybe a folding
object that has properties like enabled
and foldLength
? That seems to be the better option here
from gettext-parser.
Yes, that's it I think. But putting a line-folding package on npm doesn't sound too bad I think?
It has little to do with gettext-conversion and others might use it. Also, it would separate the tests (as they neither have anything to do with gettext).
Do you feel like giving this a try?
from gettext-parser.
@smhg I would rather update the code here to account for all use cases for this project. Npm package may be a little heavy overtaking for me. Let me know your thoughts!
from gettext-parser.
That's ok if you can put the folding-related tests in a separate folder please.
from gettext-parser.
Solved with #67
from gettext-parser.
Related Issues (20)
- Support unescaped double quotes in message strings & IDs HOT 5
- Avoid catastrophic backtracking
- Option to remove comments from JSON output HOT 5
- Module not found: Error: Can't resolve 'stream' in '../node_modules/gettext-parser/lib/poparser.js` HOT 1
- error when using mo files with angular app compiled with aot
- TypeScript support HOT 3
- Backwards compatibility (es6) HOT 5
- Adjust line wrapping algorithm to be closer to the GNU gettext tooling HOT 4
- lowercase header transformation destroys custom headers of translation software HOT 7
- declaration of control variable of plurals HOT 2
- Support for 'empty' form of plurals HOT 2
- disabling line folding causes headers to break HOT 7
- Tests fail on Windows due to EOL HOT 6
- Version 5.0.0 seems to break Safari HOT 4
- Custom validation rules HOT 8
- Tolerate additional entries in obsolete messages HOT 10
- Typescript update HOT 4
- Repository Refactoring (proposal) HOT 15
- Tests for big endian mo files
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 gettext-parser.