You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fun String.apertiumTranslated(): String {
val charset =Charset.forName("UTF-8")
val process =Runtime.getRuntime().exec("apertium en-eo")
val stdin = process.outputStream
stdin.write(this.toByteArray(charset))
stdin.flush()
stdin.close()
process.waitFor()
return process.inputStream.readBytes().toString(charset)
}
Question: Replace function body so the translation runs entirely in-process.
Sounds trivial. I spent 30 minutes getting a large FOSS game to run just fine in a natively unsupported language - translated on-the-fly through Apertium, then hours researching that question. I even cloned caffeine in the hopes reading source might be clearer. I give up. The only path that's documented and contains no "legacy" or "sourceforge" dead-ends wouldn't satisfy the "in-process" wish.
I'm not looking for a ready-cooked solution. I just want to raise awareness that your jungle can be extremely confusing for outsiders.
The text was updated successfully, but these errors were encountered:
Kotlin, so Java. We do not have up-to-date Java tools, and we have no plans on continuing the Java codebase.
If you were doing this in native code or Python, then you could get it all in-process. Still not trivially, but certainly doable. I actually recommend instrumenting a sub-process, as that insulates the host from pipe crashes.
This works (kotlin):
Question: Replace function body so the translation runs entirely in-process.
Sounds trivial. I spent 30 minutes getting a large FOSS game to run just fine in a natively unsupported language - translated on-the-fly through Apertium, then hours researching that question. I even cloned caffeine in the hopes reading source might be clearer. I give up. The only path that's documented and contains no "legacy" or "sourceforge" dead-ends wouldn't satisfy the "in-process" wish.
I'm not looking for a ready-cooked solution. I just want to raise awareness that your jungle can be extremely confusing for outsiders.
The text was updated successfully, but these errors were encountered: