Skip to main content

A simple GUI tool for translating text or documents and renaming files or folder names using both online and offline methods.

Project description

OnePi Multi-functional Translator

A simple GUI tool for translating text or documents and renaming files or folder names. Uses online (deeptranslator) and offline (Argos Translate) translation.

English | 中文

An integrated GUI program of offline translation Argos Translate and online translation DeepTranslator, which can be used to translate text, documents or batch translate and rename files or folders. Fixed some minor bugs in DeepTranslator and optimized Argos Translate.

Version Build Status

img1

Table of Contents

The video ⬆️ provides more detailed instructions

✨ Features

  • 🌐 Supports Multiple Languages
    Supported language options include: Simplified Chinese, English, العربية, Français, Español, Português, Deutsch, 한국어, Italiano, 日本語, Русский, Polski, हिन्दी, Türkçe, ไทย, Traditional Chinese.

  • ⚙️ Multiple Translation Engine Integration
    Combines online translation (via DeepTranslator) and offline translation (via Argos Translate), and can store API keys, switching between them with one click as needed.

    img5
  • 📁 Batch Translation and Renaming
    Supports batch translation of file names or folder names, which can be manually changed after translation, and original file names can be added, then renamed, with undo operation supported after renaming.

    img6

🚀 Installation

1️⃣ Installation Package (Recommended for Windows Systems)


Note: Running Argos Translate on Windows requires the Microsoft Visual C++ Redistributable and LLVM/OpenMP (the official C++ release does not include this library; you can try the development version or simply download libomp140.x86_64.dll and move it to C:\Windows\System32). package 3 and 4 will auto install it ,so no additional download is needed.

  • 1.💻 Online Installation Package size:~25M Link

    Download and install to use, no code operation required at all. Suitable for those with good internet connection. After installation, modules still need to be downloaded.

  • 2.📦 Package without Argos (Author's Recommendation) size:~35M Link

    Only need to download this package to use online translation. If offline translation is needed later, it can be installed through install_argos_translate.bat in the working directory.

  • 3.💽 Complete Online and Offline Translation Installation Package size: ~250M Link
    Includes all necessary components except for the Argos language pack and the CUDA acceleration component. The size is relatively large, and after installation, online translation can be used. Offline translation requires the separate download of language packs Link, or you can directly download the well-packaged complete package ↓↓↓↓.

  • 4.🖥️ Complete Installation Package with Language Packs Package size: ~2G_ Link
    Includes all components (except CUDA). The size is very large. Comes with language packs {Simplified Chinese: zh, Traditional Chinese: zt, English: en, French: fr, Spanish: es, German: de, Korean: ko, Japanese: ja, Russian: ru}.

2️⃣ PyPI Installation (for Users with Python Already Installed)

just install online translate

python -m pip install onepitranslator

then run :

python -m  onepitranslator

Note that a shortcut will be created on the desktop after running, just delete it if you don't want it, and it will not be created again.

If you need to use offline translation, you can continue to install argostranslate:

python -m pip install argostranslate spacy

In addition, offline translation also requires downloading the xx_sent_ud_sm module of spacy:

python -m spacy download xx_sent_ud_sm

Or download manually: ➡️ Download Link

The current version of argostranslate may not be available due to the numpy upgrade, so you can roll back the version:

python -m pip install "numpy>=1.0.0,<2.0.0"

download language packs Link

run software select Options and Settings choose Install Local Translation Language Library to install language packs

📖 Instructions

⏳ Regarding Argos and CUDA

Although Argos has been optimized and will automatically use all CPU cores when dealing with large volumes of text, the speed increase is still limited. CUDA can significantly speed up offline translation time. Since the author's graphics card is a modified version of the gtx1080, and the driver cannot be updated under Windows, only the CUDA acceleration on Linux has been tested. This is a time statistics chart for different modes.

CUDA Time Statistics ### 🌍 Language Settings

After downloading, the program should automatically switch to the language of the system's region. If not, you can manually select:

img3

📝 Translator Selection

Choose the needed translator, it's recommended to test with text translation first. Most translators require an API Key. You can check in 'Options and Settings' for information about free API Keys and application difficulty. Double-click the URL to jump to it.

img4

📂 Batch Translation of File/Folder Names

Supports selecting all files within a single folder (including subfolders), or selecting several files individually (use SHIFT for multiple selection or CTRL for single selection). After translation, you can double-click or right-click to modify, selected items can be deleted by pressing Delete or right-clicking. Supports batch renaming and can undo changes to revert to original file names.

🛠️ Example Use Cases

  • Translation Integration: Integrates multiple translations and has the function of remembering API keys (Remember to click the save API key button!!!).
  • File Name Translation: Automatically translates file or folder names into the target language, facilitating cross-language team collaboration.
  • Text Translation: Supports real-time translation in multiple languages, suitable for scenarios requiring instant text translation.

🔗 Links

❓ Unresolved Issues

When using CUDA to accelerate argostranslate translation, the GPU cannot exert its full capability, seemingly due to an I/O bottleneck. The versions of torch, CUDA, and drivers all match. Attempts to adjust torch parameters, including increasing Batch Size, have not resolved this issue.

img1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onepitranslator-1.0.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

onepitranslator-1.0.0-py3-none-win_amd64.whl (1.8 MB view details)

Uploaded Python 3 Windows x86-64

File details

Details for the file onepitranslator-1.0.0.tar.gz.

File metadata

  • Download URL: onepitranslator-1.0.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for onepitranslator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4db0b4923b37c46f53bfc2bb2bcf217c94ce575c7105d7bd820e94d2c3dd6f16
MD5 1afb0bdb914b004e8043e086cc9ebe65
BLAKE2b-256 9cfbc8809b57043ba469f36056813f7fa2babdcfc6d6ec8f5c320a30726d64a0

See more details on using hashes here.

File details

Details for the file onepitranslator-1.0.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for onepitranslator-1.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8bbc47ed117c8ffcaf40d3dd401d59a95bb6ef8f91c3e271d1d93ef2d997f4dc
MD5 840c5b163cc577727f5579d33b90b9bc
BLAKE2b-256 73375ad9c693b1d9b4667e1705b086763e5861ed8587ca64f5d59df2bd7bacac

See more details on using hashes here.

File details

Details for the file onepitranslator-1.0.0-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for onepitranslator-1.0.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9921f55004d265905aa807df05d137965180f557e2ca1c28d415a4f56325b00
MD5 89a0ea2d0d2bc0e8bdd8066b15378586
BLAKE2b-256 67ab7308868b7c177d93932fa2646f9d280be12742db1459da8ac0d2a2233637

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page