Git Product home page Git Product logo

Comments (2)

Franklin89 avatar Franklin89 commented on August 25, 2024

I have been playing around with this a bit...

The issue seems to when writing calling parser.toFileFormatted AND only with the ... (three dots)

Ah ok I see the issue here. Because to get the key we do a const keyParts = key.split("."); which splits on the key. I guess this is a limitation and can not be solved in a easy way.

from resource-translator.

Franklin89 avatar Franklin89 commented on August 25, 2024

If there are any strings in the key with a '.' it could break the translation process. I just created a simple string Hello World. which breaks the JSON Parser.

It also breaks if there is a period inside of a text to be translated: Hello World. Hello Universe. for example.

This:

"Reference number already in use. Please enter a different reference number": "Reference number already in use. Please enter a different reference number",

results:

"Reference number already in use": {
   " Please enter a different reference number": "Reference number already in use. Please enter a different reference number"
},

Update

There actually is a solution to this. When building the map a period is used which then prevents that any key can have this inside of the string. The easiest way to solve this is by using another delimiter. I tested with something like [--] which works but is not really the nice IMHO :-D Any suggestion?

from resource-translator.

Related Issues (19)

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.