Comments (9)
I believe this is fixed in the latest release.
from po2json.
Hmm, it actually seems like the problem is slightly worse. The latest output I got was:
{"Hallo \\\\\\\"Welt\\\\\\\", das ist ein Test":[null,"Hello \\\\\\\"World\\\\\\\", this is a test"]}
from po2json.
Hmm, that's weird - I added a test case for this: https://github.com/mikeedwards/po2json/blob/master/test/fixtures/pl.po#L45 - but I guess it may give different results when there are more (3) slashes.
from po2json.
After playing around a littlebit with Virtaal and Poedit, this is what I can say: I don't think having triple backslashes is valid at all in a po file. My installation of Virtaal did not turn single backslashes into triple ones. I guess this may have been a problem with an earlier version of Virtaal, or Virtaal was/is doing something that it should not do.
from po2json.
@ragulka, that seems like a reasonable explanation. @rottmann, can you confirm, if you have a second?
from po2json.
The slashes problem in virtaal seem to be fixed, i create a testfile and everything was ok.
virtaal test.po: Hello \"World\".
po2json test.json: Hello \\\"World\\\".
Is it correct, that po2json add 2 slashes ?
from po2json.
It shouldn't. Can you send or post a link to your po file so that I can play around with it and see what happens exactly?
from po2json.
It was this simple testfile:
test.po
msgid ""
msgstr ""
"Project-Id-Version: test 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-11-20 18:08+0200\n"
"PO-Revision-Date: 2013-11-20 18:10+0200\n"
"Last-Translator: tester\n"
"Language-Team: testteam\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Virtaal 0.7.0\n"
msgid "eMail address \"%email\" is not correct."
msgstr "E-Mail Adresse \"%email\" ist nicht korrekt."
from po2json.
Just tested this with recent versions against the test.po file there, and the slashed are now behaving as the should be.
from po2json.
Related Issues (20)
- A new stable version needed! HOT 3
- Invalid 'main' key HOT 4
- Invalid 'main' field in Node 16 HOT 1
- Fuzzy entries are ignored HOT 1
- Headers are output in inconsistent order HOT 1
- Error converting some files
- Using msgctxt HOT 8
- PO AJAX response 2 JSON? HOT 1
- Jed converting error HOT 4
- fuzzy and comments in po disappear on json. HOT 3
- Why is null added as the first entry in the translations? HOT 10
- Licensing issues HOT 4
- Version 1 alpha taged as latest in NPM breaks stuff HOT 2
- [1-alpha] Over escaping braces HOT 5
- .po -> Module parse failed HOT 1
- Invalid executable file `bin/po2json` which bundled npm package HOT 2
- npm WARN deprecated [email protected] HOT 2
- About dependencies in package.json HOT 4
- Different output in some languages when there is semicolon in header HOT 1
- `mf` format can't handle plurals HOT 4
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 po2json.