Giter VIP home page Giter VIP logo

Comments (8)

stardiviner avatar stardiviner commented on July 21, 2024 1

macOS Bob.app support translating long text through AppleScript command-line invocation.
For example: https://repo.or.cz/external-dict.el.git/blobdiff/e178548b9d88d86881aa870ae743ee4b82089533..68ab3e5f78239774d1710874e8a68e3f8498cee3:/external-dict.el

from emacs-immersive-translate.

Elilif avatar Elilif commented on July 21, 2024

@stardiviner This is what I will do in the next stage. Currently, I have just completed the preliminary formatting work for the front-end.

from emacs-immersive-translate.

stardiviner avatar stardiviner commented on July 21, 2024

Thanks for quick respond. Great, wait for in new release.

from emacs-immersive-translate.

Elilif avatar Elilif commented on July 21, 2024

@stardiviner I have implemented the relevant functionality preliminarily (see 添加新的翻译服务), but I am unsure if
this is appropriate. If you have any ideas, please let me know.

from emacs-immersive-translate.

stardiviner avatar stardiviner commented on July 21, 2024

Thanks for quick added feature! I checked out the new release commit.
I know for current translating services status, almost 97% services are online URL API. But I think this Emacs extension should also support offline local translating software which has command-line or other schema support. So I think the core API function immersive-translate-curl-do should be like immersive-translate-translate (name it as you like). The immersive-translate-curl-get-translation-alist also need to be modified to suite for a translating backend interface function as a blackbox instead of unified cURL requesting, cURL requesting functions can be in a common library file immersive-translate-curl-common.el. For example:

(defcustom immersive-translate-backend-functions-alist
  '((chatgpt . immersive-translate-chatgpt-get-translation)
     (baidu . immersive-translate-chatgpt-get-translation)
     (goldendict . immersive-translate-goldendict-get-translation) ; Here give goldendict as an example
)
.........
(defun immersive-translate-goldendict-get-translation (text)
  "Translate input TEXT then return an Elisp data structure like alist etc?"
  .....)

Those are my little opinions. WDYT?

from emacs-immersive-translate.

Elilif avatar Elilif commented on July 21, 2024

@stardiviner

But I think this Emacs extension should also support offline local translating software which has command-line or other schema support.

This package is intended to translate long texts, which means paragraphs are considered as the smallest unit. I don't know whether there is local offline translation software that can do this well. If there is, could you submit a PR? Because I am not very familiar with the relevant knowledge.

from emacs-immersive-translate.

Elilif avatar Elilif commented on July 21, 2024

@stardiviner Thank you for your suggestion! I tried to make some improvements based on your advice (see 1090e1c and sorry for my chaotic commits.). Since I only have Linux devices on hand, I tested it using translate-shell , and the results were good.

from emacs-immersive-translate.

stardiviner avatar stardiviner commented on July 21, 2024

Thanks for quick response. Looks great for me. Close now.

from emacs-immersive-translate.

Related Issues (7)

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.