Giter Site home page Giter Site logo

Comments (6)

leolabs avatar leolabs commented on May 27, 2024 1

Ah, I think there lies the problem. When you remove the key from the file in fr, or remove the file altogether, it should work as expected. This tool won't touch existing keys because it doesn't know whether you've already modified the translation yourself :)

from json-autotranslate.

kernelogic avatar kernelogic commented on May 27, 2024

I just tried manual too, seems it does not recognize any key

json-autotranslate -f -l en -s manual -i locales -m i18next -t natural
Found 1 target language(s):
-> fr

🏭 Loading source files...
├── translation.json (natural)
└── Done

✨ Initializing Manual Translation...
└── Done

🔍 Looking for key-value inconsistencies in source files...
└── No inconsistencies found

🔍 Looking for invalid keys in source files...
└── No invalid keys found

💬 Translating strings from en to fr...
├── Translating translation.json (0 changes from cache) (+0)
└── All strings have been translated.

🗂 Caching source translation files...
└── Translation files have been cached.

0 new translations have been added!

from json-autotranslate.

leolabs avatar leolabs commented on May 27, 2024

Thanks for the bug report! Could you show me what your en folder looks like? I've been trying to reproduce it on my side, but everything seems to work as expected.

from json-autotranslate.

kernelogic avatar kernelogic commented on May 27, 2024

Hi, so I have the following structure:
locales/en/translation.json
locales/fr/translation.json

Initially the two json files have identical content:
{
"Please try it again later.": ""
}

After I run the command, locales/en/translation.json content becomes
{
"Please try it again later.": "Please try it again later."
}
Which is correct. However the locales/fr/translation.json remain as
{
"Please try it again later.": ""
}
I expected it to be containing a french translation.

from json-autotranslate.

kernelogic avatar kernelogic commented on May 27, 2024

Aha thank you so much. That saved my day.
After I replace the french translation.json with an empty {} it worked!

from json-autotranslate.

leolabs avatar leolabs commented on May 27, 2024

Awesome, that's good to hear! Feel free to let me know if you have any other issues or questions regarding json-autotranslate :)

from json-autotranslate.

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.