Live data from Hacker News

Show HN: I coded my own JSON translation tool to easily localize my side project

quicklang.app

31–36 of 36 posts

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#31
Very cool, I've done similar in the past. One point of contention is that I like YAML more than JSON for this kind of effort as multi-line text is much easier to deal with. I'd also generate typescript definitions based on the YAML/JSON for the default built values that has tended to help with the dev side (at least for JS/web projects).

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#32

>Perfect for manage project localization >This credits will never expire. >So if you sync new o modified content There are obvious mistakes in the English version of your website, which is totally bizarre to me, since these errors are absent in the German version. My guess is that the AI actually fixed these errors when translating. I have to say that the German translation is really bad though. "Habe nach einem Onli…

this is a perfect example of why AI prompting is important, even if people roll their eyes and tell you that using an LLM is “easy”. Clearly not. Pro tip: If you are using an LLM to do translations for you, give it CONTEXT so that the translations are not garbage. Don’t just say “translate x into german”. Explain in sentence or two what it’s translating and who the audience is. Many words are translated differently d…

That tip btw isn't limited to LLMs. Blindfolded human translators given single word to translate tend not to do great jobs.

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#33
post #32

Earlier quoted context omitted.

this is a perfect example of why AI prompting is important, even if people roll their eyes and tell you that using an LLM is “easy”. Clearly not. Pro tip: If you are using an LLM to do translations for you, give it CONTEXT so that the translations are not garbage. Don’t just say “translate x into german”. Explain in sentence or two what it’s translating and who the audience is. Many words are translated differently d…

That tip btw isn't limited to LLMs. Blindfolded human translators given single word to translate tend not to do great jobs.

For example, Breath of the Wild has a quest-line featuring two NPCs sending love letters via a river, and you can help then get together or something. Only issue is that it's hella creepy in the English translation, while it's much less in the original Japanese one. I don't remember the specifics, but the problem there was the translators were not given context for what they were translating.

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#34
post #32

Earlier quoted context omitted.

That tip btw isn't limited to LLMs. Blindfolded human translators given single word to translate tend not to do great jobs.

For example, Breath of the Wild has a quest-line featuring two NPCs sending love letters via a river, and you can help then get together or something. Only issue is that it's hella creepy in the English translation, while it's much less in the original Japanese one. I don't remember the specifics, but the problem there was the translators were not given context for what they were translating.

It doesn't take that much specific examples or Japanese text as an example. "Walk" could be referring to speed, a physical walkway, undesired mechanical behaviors, some sort of activism, so on. "Connect with $VAR" translates differently depending on what the $VAR is; a human, a group of humans, a computer, a webservice. The intention of a word or few words divorced from associated stimuli is simply in-determinate.

In GP's defense, I suppose there are values in butchered translation as a low-budget checkbox checker. LLM do generate a lot of great lipsums.

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#35
post #27

plugging my own project: https://github.com/KevinColemanInc/i18n-translate-go Works well for i18njs. The issues I ran into are: chat-gpt didn't translate all the keys in the batch (especially for obscure languages like Laos) and sometimes the chatgpt output invalid unicode (see error in the readme).

Hey! I ran into the same issues. In order to fix the invalid output you can specify to ChatGPT that you want to recieve the response as a JSON formatted text.

I think that is what I did: I had it use the functions api to pass the translations, but it still wouldn't output everything in the small languages.

I was a bit lazy, so I just inform the user to re-run it manually instead of automatically handling it.

Re: Show HN: I coded my own JSON translation tool to easily localize my side project

#36

>Perfect for manage project localization >This credits will never expire. >So if you sync new o modified content There are obvious mistakes in the English version of your website, which is totally bizarre to me, since these errors are absent in the German version. My guess is that the AI actually fixed these errors when translating. I have to say that the German translation is really bad though. "Habe nach einem Onli…

The Spanish is better than the German but is still super clunky. In particular, it goes from the informal to the informal second person as if there were no difference, and the end result reads like it was written by committee (which I suppose it was) with no one doing any kind of QA.

This is in spite of OP apparently being Spanish.

Post reply on HN