Comments (15)
from json-translator.
from json-translator.
from json-translator.
from json-translator.
from json-translator.
Thanks for your report. Can you please provide more information about your flow?
1 - The size of your JSON object (number of fields approximately)
2 - Which languages are you translating your JSON object to? (number of languages)
3 - Are you using CLI or functions?
from json-translator.
Thank you.
Can you please try the v0.7.0 version? (will be available after 10 hours) I will also mention here when the new release comes.
from json-translator.
v0.7.0 is available now. Can you please try the same flow?
from json-translator.
Actually, it is normal for that big file. I translated 700 lines JSON file before, and it took 10 minutes. If there is no error, it will respond.
This package works in async
format to make operations fast. That means if there are 5 fields in the object it tries to translate them at the same time. And when sending more than 1000+ requests at the same time to the Google Translate API, response times get longer (Google Translate API makes this latency.).
At that time problem occurs on big files. Unfortunately, I can't solve it right now (I don't have much time nowadays) but there can be a way to solve it manually. You can do like this:
Please divide your JSON file into 3 or more pieces, translate them separately and merge it. For example:
You have 1000 lines JSON file (a.json):
Create valid JSON files:
a1.json (from a.json, take 0 to 250 lines)
a2.json (from a.json, take 251 to 500 lines)
a3.json (from a.json, take 501 to 750 lines)
a4.json (from a.json, take 751 to 1000 lines)
And translate them separately. (Don't forget to change the name of the file which will be created each time. Because the new English file name will always be en.json).
Sorry for the problem. I am adding this problem to the roadmap to solve it when I am available.
from json-translator.
Great idea. Thank you for the feedback :)
from json-translator.
Hi @Aido21 , json-translater now will show the number of lines that are translated already with the 0.8.0 version. Now, it is available to use.
Thank you for your great feedback.
from json-translator.
from json-translator.
from json-translator.
The number of lines can be limited by Google Translate API (because of concurrent requests from the same IP address). I will try to find a way to handle these errors. Thank you for the report.
For the current situation, you can try to split your file into 3 different files and translate them one by one and can combine them all until I fix this problem.
from json-translator.
Fixed #2 with version 1.0.0
from json-translator.
Related Issues (20)
- Translation error: GotError [RequestError]: unable to get local issuer certificate HOT 1
- an error when translate words HOT 2
- Too Many Requests HOT 5
- Sync translation files HOT 4
- Cannot convert undefined or null to object HOT 3
- TypeError: Cannot read properties of undefined (reading 'length') HOT 4
- DeepL HOT 3
- Translation error in Libre Translate, Argos Translate
- Multiple errors when trying to translate with libretranslate HOT 1
- Debugging with VSCODE HOT 1
- bad request error HOT 9
- Setup my own LibreTranslate instance HOT 1
- translate only key : value HOT 2
- Too many requests HOT 2
- 302 moved permanetly HOT 3
- Add cli options for specify in/out language HOT 3
- 'jsontt' is not recognized HOT 9
- ID TypeError: Cannot assign to read only property '10' of string HOT 1
- Ignore urls in translation HOT 4
- English to Korean translation problem HOT 2
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 json-translator.