multranslate
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -6,3 +6,15 @@ #!/usr/bin/env node | ||
const screen = blessed.screen() | ||
var screen = blessed.screen({ | ||
cursor: { | ||
artificial: true, | ||
shape: { | ||
bg: 'white', | ||
fg: 'white', | ||
bold: true, | ||
ch: '' | ||
}, | ||
blink: false, | ||
terminal: 'windows-ansi' | ||
} | ||
}) | ||
@@ -26,5 +38,8 @@ // Панель для ввода текста | ||
fg: 'white', | ||
bg: 'transparent', | ||
bg: 'black', | ||
border: { | ||
fg: 'white' | ||
fg: 'blue' | ||
}, | ||
scrollbar: { | ||
bg: 'white' | ||
} | ||
@@ -51,5 +66,8 @@ } | ||
fg: 'white', | ||
bg: 'transparent', | ||
bg: 'black', | ||
border: { | ||
fg: 'white' | ||
fg: 'blue' | ||
}, | ||
scrollbar: { | ||
bg: 'white' | ||
} | ||
@@ -77,5 +95,8 @@ } | ||
fg: 'white', | ||
bg: 'transparent', | ||
bg: 'black', | ||
border: { | ||
fg: 'white' | ||
fg: 'blue' | ||
}, | ||
scrollbar: { | ||
bg: 'white' | ||
} | ||
@@ -102,5 +123,8 @@ } | ||
fg: 'white', | ||
bg: 'transparent', | ||
bg: 'black', | ||
border: { | ||
fg: 'white' | ||
fg: 'blue' | ||
}, | ||
scrollbar: { | ||
bg: 'white' | ||
} | ||
@@ -128,5 +152,8 @@ } | ||
fg: 'white', | ||
bg: 'transparent', | ||
bg: 'black', | ||
border: { | ||
fg: 'white' | ||
fg: 'blue' | ||
}, | ||
scrollbar: { | ||
bg: 'white' | ||
} | ||
@@ -151,6 +178,8 @@ } | ||
const englishCount = englishMatches.length | ||
if (russianCount > englishCount) { | ||
if (russianCount >= englishCount) { | ||
return 'ru' | ||
} else if (russianCount <= englishCount) { | ||
return 'en' | ||
} else { | ||
return 'en' | ||
return '' | ||
} | ||
@@ -163,4 +192,6 @@ } | ||
return 'en' | ||
} else if (lang === 'en') { | ||
return 'ru' | ||
} else { | ||
return 'ru' | ||
return '' | ||
} | ||
@@ -332,4 +363,4 @@ } | ||
// Обработчик событий клавиш для перемотки экрана | ||
inputBox.key(['up', 'down', 'left', 'right'], function(ch, key) { | ||
// Обработчик событий клавиш для прокрутки экрана панелей вывода | ||
inputBox.key(['up', 'down'], function(ch, key) { | ||
const value = inputBox.getValue() | ||
@@ -350,12 +381,2 @@ // Прокрутка вверх | ||
} | ||
// else if (key.name === 'left') { | ||
// const currentPos = inputBox.getValue().length | ||
// inputBox.setValue(inputBox.getValue().slice(0, currentPos - 1)) | ||
// screen.render() | ||
// } | ||
// else if (key.name === 'right') { | ||
// const currentPos = inputBox.getValue().length | ||
// inputBox.setValue(inputBox.getValue().slice(0, currentPos + 1)) | ||
// screen.render() | ||
// } | ||
}) | ||
@@ -362,0 +383,0 @@ |
{ | ||
"name": "multranslate", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Cross-platform TUI for translating text using multiple providers simultaneously and support automatic detection of the source and destination language", | ||
@@ -12,3 +12,3 @@ "keywords": [ | ||
"DeepLX", | ||
"mymemory", | ||
"MyMemory", | ||
"Reverso" | ||
@@ -24,3 +24,3 @@ ], | ||
"scripts": { | ||
"start": "multranslate.js" | ||
"start": "node multranslate.js" | ||
}, | ||
@@ -27,0 +27,0 @@ "dependencies": { |
@@ -5,4 +5,10 @@ <h1 align="center"> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/multranslate"><img title="GitHub License"src="https://img.shields.io/npm/v/multranslate?logo=npm&logoColor=red"></a> | ||
<a href="https://www.npmjs.com/package/multranslate"><img title="GitHub License"src="https://img.shields.io/github/languages/top/Lifailon/multranslate?logo=JavaScript&color=yellow"></a> | ||
<a href="https://github.com/Lifailon/multranslate/blob/rsa/LICENSE"><img title="GitHub License"src="https://img.shields.io/github/license/Lifailon/multranslate?logo=readme&logoColor=white&color=white"></a> | ||
</p> | ||
<h4 align="center"> | ||
<strong>Русский</strong> | <a href="README.md">English</a> | ||
<a href="README.md">English</a> | <strong>Русский</strong> | ||
</h4> | ||
@@ -9,0 +15,0 @@ |
@@ -5,2 +5,8 @@ <h1 align="center"> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/multranslate"><img title="GitHub License"src="https://img.shields.io/npm/v/multranslate?logo=npm&logoColor=red"></a> | ||
<a href="https://www.npmjs.com/package/multranslate"><img title="GitHub License"src="https://img.shields.io/github/languages/top/Lifailon/multranslate?logo=JavaScript&color=yellow"></a> | ||
<a href="https://github.com/Lifailon/multranslate/blob/rsa/LICENSE"><img title="GitHub License"src="https://img.shields.io/github/license/Lifailon/multranslate?logo=readme&logoColor=white&color=white"></a> | ||
</p> | ||
<h4 align="center"> | ||
@@ -7,0 +13,0 @@ <strong>English</strong> | <a href="README_RU.md">Русский</a> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
368
86
244569