Git Product home page Git Product logo

Comments (9)

ragulka avatar ragulka commented on August 31, 2024

I believe this is fixed in the latest release.

from po2json.

mikeedwards avatar mikeedwards commented on August 31, 2024

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.

ragulka avatar ragulka commented on August 31, 2024

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.

ragulka avatar ragulka commented on August 31, 2024

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.

mikeedwards avatar mikeedwards commented on August 31, 2024

@ragulka, that seems like a reasonable explanation. @rottmann, can you confirm, if you have a second?

from po2json.

rottmann avatar rottmann commented on August 31, 2024

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.

ragulka avatar ragulka commented on August 31, 2024

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.

rottmann avatar rottmann commented on August 31, 2024

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.

mikeedwards avatar mikeedwards commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.