dawnclass / DF_Calculator

46 stars 7 forks source link

[Question]i18n support? #8

Open aradtamako opened 4 years ago

aradtamako commented 4 years ago

Hello, thank you for releasing good application.

Do you have a plan for i18n support? (English, Chinese, Japanese...etc)

I can contribute for i18n. But your python code includes korean string comparison. Could you fix this? (For example, weapon values is loaded dpeend on korean weapon name) https://github.com/dawnclass/DF_Calculator/blob/940d53e1bfa4dfbb639247caec488e1beb0a9d88/calc_main.py#L3395-L3397

Also, this branch is dead? https://github.com/dawnclass/DF_Calculator/tree/lang/eng_V3.0.0

Anyway, when you decided direction for i18n, i can contribute.

dawnclass commented 4 years ago

Well... When I start this project, I can't expect that foreign players use my program. I have co-worker who wants to translate to English, but I think he's busy. I expect I will not translate this by myself because I'm do this just for interest and I'm busy for studying python and adding more function. But I'm college student so when the vacation come, I consider about your opinion.

fzls commented 4 years ago

Well... When I start this project, I can't expect that foreign players use my program. I have co-worker who wants to translate to English, but I think he's busy. I expect I will not translate this by myself because I'm do this just for interest and I'm busy for studying python and adding more function. But I'm college student so when the vacation come, I consider about your opinion.

Hello,I'm one of those foreign players who use your program. I have to say this is a great tool. But when i use it, i found several inconvenient points and lack of some function, so when i see the source code from hanxie(the one who once send a email to you to ask for source code), i read it and make a lot of modification based on that. https://github.com/fzls/dnf_calc

  1. use a hand writen dfs procedure so that prune based one your value estimate function is possiable(which is actually the number of entries of the sets), in this way, the time complexity as well as space complexity is drastically reduced, which make it possiable to calc the result in several minutes even when you click all the equipments. In this way, we don't need to fill all the combinations in the memory at once, and don't need to calc all the combinations.
  2. use minheap to save the time and memory for ranking, In original way, using a dict and got the max from each iter, the save step takes O(nlogn), the ranking step takes O(5n). With the help of minheap, the save step is only O(n*log5), the ranking step is O(5)
  3. make almost all the option in the ui to be in the save, so we don't need to set these when we open the calc
  4. auto load the first save on start
  5. load the image by loop the gif and png files in the images directory, rather than loop from 1101 to 3350, so we only need to load about 351 image(on version 2.0.3), rather than 6794 images.
  6. add supoort for 百变怪(the equipment exchanged with 1260 material), and upgrade how many nature set(the one upgrade from lv95 equipments), and transfer how many equipments from others saves that this save not own.
  7. add support for multiple weapons
  8. further chinese localization in code as weel data files
  9. refactor code to make it more readable and maintainable
  10. add a setting framework for style/creature/other attributes, make it possiable add more style or creature by modifing setting file
  11. make some ui modification, make it easier to use
  12. when exceptions occurs, show some error dialog, so user can know what happens
  13. add support for export any number of ranking result to excel file
  14. add logs, make it eaiser to debug
  15. using bugsnag to report some unexpected exception, so we can fix it before user report to us
  16. add supoort for multithreading in one logical cpu with threading module, which make the calc speed to boost about double as before. currently, i'm working on using multiprocessing module to make it possiable to use all logical cpu to calc, but current code can not directly use it, as it run a lot code regardless of what thread it is in, like the tkinter init part, so when using multithreading to create a new process, during the fork step, the tkinter init code and other code will be execute again in the new process. so i'm working to refactor it, to make these code only be called at main thread. If everying goes well, it might be done in several days(as in the daytime, i didn't have much spare time)
  17. add support for gif file, so it can play frame by frame

After i finish the current work, i'll try to make several pull requests to this repository.

And finally, below is some screencut of my modified version. Snipaste_2020-05-31_17-35-14 Snipaste_2020-05-31_17-35-36 Snipaste_2020-05-31_17-37-20 Snipaste_2020-05-31_17-37-42 Snipaste_2020-05-31_17-38-05

sugyx-fsff6