kanehekili / VideoCut

MPEG2,MP4,MKV,WEBM Cutter for Linux using MPV and libavcodec or ffmpeg. Cutting is lossless, the target file will not be reencoded
Other
44 stars 6 forks source link

New icons #24

Closed RedFraction closed 1 year ago

RedFraction commented 1 year ago
RedFraction commented 1 year ago

Icons drawed by me

RedFraction commented 1 year ago

Need review for I8N module, cause it's my first time writing something in Python.

kanehekili commented 1 year ago

thanks for providing the pull request. I'll check your src/I8N.py. Concerning the icons - since I do not want to miss my colorful icons, i'd like to have the icons in a separate folder. (eg colorIcons and flatIcons) The icons in each folder should have the same name. So in code we can switch easily from one "iconset" to another. I'll provide an additional setting for selecting the icons.

kanehekili commented 1 year ago

Screenshot for dark themes: That won't work image

So we would need either two "iconthemes" from you, or your icons are agnostic to "light" or "dark" mode. I Like your multi language approach, but you did not consider the other modules. Can you give me a hint how you created them ? (Ihaven't used I8N yet, but this looks cool) . Having just one file makes language support a little more difficult (against the standard python NLS, which has a .po file for every language...). Check the offical documentation using "gettext"

kanehekili commented 1 year ago

After reading some more stuff I'm inclined to reject your pull request concerning I8N. If you use "gettext", I will support you fully. If you could update your pullrequest with the "gettext" module I 'll support it. - And thanks for help!

RedFraction commented 1 year ago

R U sure, that U want to use gettext? It's more complicated than my solution, but wokrs similary. I think that JSON format more human-friendly than ".po".

kanehekili commented 1 year ago

I8N does not seem to scalable. All languages reside in one file. Is there a solution to have a file for each language? Update

Ok, I think I found a solution. Ill provide a template and a script to join the different languages and will test it.

Could you rename and copy the icons into a folder besides the "icon" folder, so I can make the theme selectable?

RedFraction commented 1 year ago
  1. Ok, I will move icons set.
  2. And I can redesign my solution, to make it work with amount of files. So it will be a diffrent file for each language.
kanehekili commented 1 year ago

Very good. Thanks for your cooperation. I'll adapt the code for icon theme selection

RedFraction commented 1 year ago

My custom Internalization support has been removed New icons now in icons/flaticons

kanehekili commented 1 year ago

Why did you remove the language support? Well I might work on it later.. Merging.

RedFraction commented 1 year ago

@kanehekili, Sorry, it's my misunderstanding. Can you contact me to decide on the next steps? All code for i18n remained in my local repository. All contact information you can find on my profile.

RedFraction commented 1 year ago

I will impore my i18n solution, and will make new pull request later

kanehekili commented 1 year ago

Sorry I didn't react. I have currently some other projects to attend. You i8n changes are still visible, so no harm is done. Could you explain how you created the entries in the code? Did you use some tools or was that done manually?

RedFraction commented 1 year ago

Use only standard libs/modules - locale and json, all code and algorithms, created by my self. Inspired by Android developer kit and things like Java XML/JSON XPath libraries like Jackson.

kanehekili commented 1 year ago

I still do not understand how to detect and convert all the string occurrences using I8N. Reading this article , it depends on gettext. So if you do not use gettext, how do you identify the text within the code and convert it?

RedFraction commented 1 year ago

I still do not understand how to detect and convert all the string occurrences using I8N. Reading this article , it depends on gettext. So if you do not use gettext, how do you identify the text within the code and convert it?

There is no way, for any "magic" solution that will do all work by pressing big red button. Only with pre-processing software that will run before we started main func or like I do (check next Pull Request) (all of software that I know - using exact that way). I don't know python as good, as I know java, but if it have some type of annotations, we can use theirs to mark strings and any translation software to do this work, but of course it's require internet access to one of API.