fkirc / attranslate

A command line tool for translating JSON, YAML, CSV, ARB, XML (via a CLI)
https://www.npmjs.com/package/attranslate
Other
336 stars 27 forks source link

.ts file feature for translate #253

Open johnfelipe opened 1 year ago

johnfelipe commented 1 year ago

Will be great if you add .TS files for translate...

fkirc commented 1 year ago

Hi, would it be possible for you to provide a small sample file? Just to be sure what kind of .ts file needs to be translated.

johnfelipe commented 1 year ago

Hi dear https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/app/locales/en.ts

That one Is possible add TS file feature That will be great

johnfelipe commented 1 year ago

@fkirc can u help me for translate that kind of .ts file?

fkirc commented 1 year ago

I would be happy to add support for this kind of .ts file, but I am not yet sure how to parse those files.

Since attranslate runs within NodeJS, it cannot directly import TypeScript-files at runtime. So I guess that some kind of parsing-package would be needed to make this work? https://stackoverflow.com/questions/61148385/read-and-operate-on-a-ts-file-using-node-js

johnfelipe commented 1 year ago

Or may be know another tool? I can use azure and google translator

El vie, 7 jul 2023, 2:15 a. m., Felix K @.***> escribió:

I would be happy to add support for this kind of .ts file, but I am not yet sure how to parse those files.

Since attranslate runs within NodeJS, it cannot directly import TypeScript-files at runtime. So I guess that some kind of parsing-package would be needed to make this work? https://stackoverflow.com/questions/61148385/read-and-operate-on-a-ts-file-using-node-js

— Reply to this email directly, view it on GitHub https://github.com/fkirc/attranslate/issues/253#issuecomment-1624871306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFGTM4Z2V4R5FM77LQDXO6ZQTANCNFSM6AAAAAAZWVUKRY . You are receiving this because you authored the thread.Message ID: @.***>