Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHROMLATE

A Chrome extension that translates selected text in a tooltip on the page, sending the whole sentence to the API as context. Written for reading English material without opening a translator in another tab every few paragraphs.

Selected phrase and its translation in a tooltip

What it does

  • Select a word or a phrase, click the button that appears, and the translation shows up in place
  • The surrounding sentence goes to the API alongside the selection, so DeepL can tell apart meanings that depend on context instead of returning the first dictionary hit
  • Settings panel for the interface language, the target language and the API key
  • Esc or a click elsewhere closes the tooltip; a phrase translated once comes back instantly and without spending the API allowance again

It works on words and short phrases. Selecting a whole paragraph is not what it is for.

How it is built

file role
manifest.json Manifest V3, permissions limited to storage and the DeepL domains
background.js service worker — the only thing that talks to the DeepL API
content.js injected into the page: catches the selection, draws the tooltip
content.css tooltip styles, isolated from the host page
popup.html/js settings panel
i18n.js Polish and English interface strings, shared by the files above
icons/ extension icon in four sizes

The API key is not in the code. The user types their own into the settings panel and the extension keeps it in chrome.storage.

Installation

  1. chrome://extensions → turn on Developer mode
  2. Load unpacked → point it at this directory
  3. Click the extension icon and paste in your DeepL API key

Getting a key

  1. Sign up for DeepL API Free at https://www.deepl.com/pro-api (free monthly character allowance, currently 500,000; the card is for verification only)
  2. In your account, open API keys and copy the key
  3. Paste it into the extension's settings, pick a target language, hit Save

Free keys end in :fx. The extension reads that suffix and picks the right endpoint by itself, so there is nothing else to set up.

Stack

JavaScript · Chrome Manifest V3 · DeepL API



CHROMLATE

Rozszerzenie do Chrome, które tłumaczy zaznaczony tekst w dymku na stronie, wysyłając do API całe zdanie jako kontekst. Powstało do czytania angielskich materiałów bez otwierania tłumacza w osobnej karcie co kilka akapitów.

Zaznaczony zwrot i jego tłumaczenie w dymku

Co robi

  • Zaznaczasz słowo albo zwrot, klikasz przycisk, który się pojawia, i tłumaczenie wyświetla się w miejscu
  • Razem z zaznaczeniem do API idzie całe zdanie, więc DeepL rozróżnia znaczenia zależne od kontekstu, zamiast zwracać pierwsze trafienie ze słownika
  • Panel ustawień: język interfejsu, język docelowy i klucz API
  • Esc albo kliknięcie obok zamyka dymek; raz przetłumaczony zwrot wraca natychmiast i bez ponownego zużycia limitu API

Działa na słowach i krótkich zwrotach. Nie jest do zaznaczania całych akapitów.

Jak jest zbudowane

plik rola
manifest.json Manifest V3, uprawnienia ograniczone do storage i domen DeepL
background.js service worker — jedyne miejsce, które rozmawia z API DeepL
content.js wstrzykiwany na stronę: łapie zaznaczenie, rysuje dymek
content.css style dymka, odseparowane od stylów strony
popup.html/js panel ustawień
i18n.js polskie i angielskie teksty interfejsu, wspólne dla powyższych
icons/ ikona rozszerzenia w czterech rozmiarach

Klucz API nie siedzi w kodzie. Użytkownik wpisuje własny w panelu ustawień, a rozszerzenie trzyma go w chrome.storage.

Instalacja

  1. chrome://extensions → włącz Tryb dewelopera
  2. Załaduj rozpakowane → wskaż ten katalog
  3. Kliknij ikonę rozszerzenia i wklej swój klucz DeepL API

Skąd wziąć klucz

  1. Załóż konto DeepL API Free na https://www.deepl.com/pro-api (darmowy miesięczny limit znaków, obecnie 500 000; karta służy tylko do weryfikacji)
  2. W koncie otwórz API keys i skopiuj klucz
  3. Wklej go w ustawieniach rozszerzenia, wybierz język docelowy i naciśnij Zapisz

Darmowe klucze kończą się na :fx. Rozszerzenie rozpoznaje tę końcówkę i samo wybiera właściwy adres API, więc nie ma nic więcej do ustawiania.

Stack

JavaScript · Chrome Manifest V3 · DeepL API

About

Rozszerzenie Chrome do szybkiego tłumaczenia zaznaczonych słów i fraz. Bierze pod uwagę kontekst całego zdania, tłumaczenie pokazuje w dymku na stronie. 13 języków

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages