m9dfukc / deepl-alfred-workflow

DeepL translations for Alfred
MIT License
75 stars 3 forks source link

Flags not available for most languages #20

Closed justin-m-schmidt closed 2 years ago

justin-m-schmidt commented 2 years ago

image

m9dfukc commented 2 years ago

pull requests are welcome, just add the the specific language icon to the src/icons folder using it's language code as filename, no code changes needed!

If nobody else does it, I will do it myself at some point. But that might take a little while as I am busy with other things atm.

justin-m-schmidt commented 2 years ago

Sorry, I'm new to Github. It seems like I can't create a fork: image

I'd recommend using the ones from Icons8.

justin-m-schmidt commented 2 years ago

I tried it locally, and indeed it switched the old flags, but it didn't adopt the new ones: image

justin-m-schmidt commented 2 years ago

Here are the icons: https://drive.google.com/open?id=1Zh4J3m0bHmmsMucoxQVzCIIf-TImw1ZM

justin-m-schmidt commented 2 years ago

Here is the bug fix log: [13:36:26.546] Deepl Translate[Script Filter] Queuing argument 'hello' [13:36:26.819] Deepl Translate[Script Filter] Script with argv '(null)' finished [13:36:26.829] Deepl Translate[Script Filter] {"items":[{"uid":null,"arg":"h","title":"h","subtitle":"h","icon":{"path":"icons\/de.png"},"valid":"yes","autocomplete":"autocomplete"}]} [13:36:28.499] Deepl Translate[Script Filter] Script with argv '(null)' finished [13:36:28.508] Deepl Translate[Script Filter] {"items":[{"uid":null,"arg":"hallo","title":"hallo","subtitle":"hello","icon":{"path":"icons\/de.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"hello","title":"hello","subtitle":"hello","icon":{"path":"icons\/en.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"Bonjour","title":"Bonjour","subtitle":"hello","icon":{"path":"icons\/fr.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"ol\u00e1","title":"ol\u00e1","subtitle":"hello","icon":{"path":"icon.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"hola","title":"hola","subtitle":"hello","icon":{"path":"icons\/es.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435","title":"\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435","subtitle":"hello","icon":{"path":"icon.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"\u4f60\u597d","title":"\u4f60\u597d","subtitle":"hello","icon":{"path":"icon.png"},"valid":"yes","autocomplete":"autocomplete"}]}

m9dfukc commented 2 years ago

Ah, you are right ... code changes are required indeed. I somehow though that I did automatic name inferencing. I gonna dd your icons then!

m9dfukc commented 2 years ago

Hi, I added your new icons and updated the code, pls check this commit. I didn't update the workflow itself as I have no time to test that at the moment. But you can replace the source inside the workflow with the updated one (just navigate to the workflow folder from within Alfred).

m9dfukc commented 2 years ago

Bt the way, there are even more languages available ... which ones you can check here line 33 - 48. If you send me the other language icons I will add them too.

justin-m-schmidt commented 2 years ago

Thanks. Somehow I didn't manage to get it to work: image It deleted the variables inside the Alfred settings and I added them back manually but that didn't help.

justin-m-schmidt commented 2 years ago

Ok added Portugal and US flag: https://drive.google.com/open?id=1CcDI10pkQhiVhCSCf4udOQRQYq3p8cJJ

m9dfukc commented 2 years ago

Fixed with latest commit

m9dfukc commented 2 years ago

Thanks. Somehow I didn't manage to get it to work: image It deleted the variables inside the Alfred settings and I added them back manually but that didn't help.

I added the Alfred Workflow file

justin-m-schmidt commented 2 years ago

I tried the new file. It does include the right icons but it doesn't work with new languages such as Portuguese or Chinese: image image

justin-m-schmidt commented 2 years ago

Log:

[18:20:45.924] Deepl Translate[Script Filter] Queuing argument 'hello' [18:20:48.718] Deepl Translate[Script Filter] Script with argv '(null)' finished [18:20:48.722] Deepl Translate[Script Filter] {"items":[{"uid":null,"arg":"hallo","title":"hallo","subtitle":"hello","icon":{"path":"icons\/de.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"hello","title":"hello","subtitle":"hello","icon":{"path":"icons\/en.png"},"valid":"yes","autocomplete":"autocomplete"},{"uid":null,"arg":"ol\u00e1","title":"ol\u00e1","subtitle":"hello","icon":{"path":"icon.png"},"valid":"yes","autocomplete":"autocomplete"}]}

m9dfukc commented 2 years ago

hi, can you try again pls. for whatever reason the workflow file didn't pickup my code changes. should be working now.

justin-m-schmidt commented 2 years ago

image Now everything works!