Skip to content

Commit

Permalink
Merge pull request #28 from rolandbernard/devel
Browse files Browse the repository at this point in the history
v0.0.19
  • Loading branch information
rolandbernard committed Feb 25, 2021
2 parents 6dab27c + 723239f commit b583b5f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 326 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ This module allows you to find open windows.
![screenshot](assets/linux_windows.png)

#### Google Translate
This module allows you to translate text by using Google Translate in a headless window.
This module was removed with version 0.0.19 because google changed their website
and the module no longer works. It might be added back in a future release.

![screenshot](assets/google_translate.png)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "marvin",
"version": "0.0.18",
"version": "0.0.19",
"license": "MIT",
"scripts": {
"dev": "electron-webpack dev",
Expand Down
1 change: 1 addition & 0 deletions src/common/local/english.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const TRANSLATION_ENGLISH = {
history: 'History',
history_description: 'This module allows you to execute recent options again',
searchable: 'Searchable',
sort_by_frequency: 'Sort by frequency',

color: 'Color',
color_description: 'This module allows you to convert colors between hex/rgb/hsl',
Expand Down
1 change: 1 addition & 0 deletions src/common/local/german.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const TRANSLATION_GERMAN = {
history: 'Verlauf',
history_description: 'Dieses Modul erlaub es Optionen erneut auszuführen',
searchable: 'Durchsuchbar',
sort_by_frequency: 'Sortieren nach Häufigkeit',

color: 'Farben',
color_description: 'Mit diesem Modul ist es möglich Farben zwischen hex/rgb/hsl unzuwandeln',
Expand Down
1 change: 1 addition & 0 deletions src/common/local/italian.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const TRANSLATION_ITALIAN = {
history: 'Cronologia',
history_description: 'Questo modulo consente di eseguire nuovamente le opzioni',
searchable: 'Cercabile',
sort_by_frequency: 'Ordina per frequenza',

color: 'Colori',
color_description: 'Questo modulo ti consente di convertite colori tra hex/rgb/hsl',
Expand Down
6 changes: 1 addition & 5 deletions src/main/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ export const CONFIG_DEFAULT = {
active: false,
prefix: '',
},
google_translate: {
active: false,
prefix: '',
quality: 1.0,
},
duckduckgo: {
active: false,
prefix: '',
Expand All @@ -122,6 +117,7 @@ export const CONFIG_DEFAULT = {
prefix: '',
quality: 0.1,
maximum_history: 1000,
sort_by_frequency: false,
},
color: {
active: false,
Expand Down
2 changes: 0 additions & 2 deletions src/main/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import ScriptsModule from "./modules/scripts";
import ClipboardModule from "./modules/clipboard";
import DeeplModule from "./modules/deepl";
import LinuxWindowsModule from "./modules/linux-windows";
import GoogleTranslateModule from "./modules/google-translate";
import DuckduckgoModule from "./modules/duckduckgo";
import HistoryModule from "./modules/history";
import ColorModule from "./modules/color";
Expand All @@ -42,7 +41,6 @@ const MODULES = {
clipboard: ClipboardModule,
deepl: DeeplModule,
linux_windows: LinuxWindowsModule,
google_translate: GoogleTranslateModule,
duckduckgo: DuckduckgoModule,
history: HistoryModule,
color: ColorModule,
Expand Down
301 changes: 0 additions & 301 deletions src/main/modules/google-translate.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/modules/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const HistoryModule = {
return execute_history.map((option) => ({
...option,
quality: config.modules.history.quality
})).sort((a, b) => b.history_frequency - a.history_frequency);
})).sort((a, b) => config.modules.history.sort_by_frequency ? b.history_frequency - a.history_frequency : 0);
} else {
return execute_history.map((option, i) => {
let quality = Math.max(
Expand All @@ -56,7 +56,7 @@ const HistoryModule = {
...option,
quality: Math.min(1.0, quality + quality / (i + 1)),
};
}).sort((a, b) => b.history_frequency - a.history_frequency);
}).sort((a, b) => config.modules.history.sort_by_frequency ? b.history_frequency - a.history_frequency : 0);
}
},
globalExecute: async (option) => {
Expand Down
Loading

0 comments on commit b583b5f

Please sign in to comment.