HamletDuFromage / aio-switch-updater

Update your CFW, cheat codes, firmwares and more directly from your Nintendo Switch!
GNU General Public License v3.0
1.29k stars 107 forks source link

add a time remaining indication #262

Closed PoloNX closed 1 year ago

HeikesFootSlave commented 1 year ago

Really good! Implemented and tested it here! Maybe some formatting on how it is shown because sometimes it is in the loading bar!

I like it!!!

But please think about a description on PRs = easier for the Dev!

PoloNX commented 1 year ago

But please think about a description on PRs = easier for the Dev!

Sorry Iā€™m not very good in English. I thought it was good

HeikesFootSlave commented 1 year ago

All fine!

Just saying that it is easier instead of = No description provided

Glad that I "fall" over this and saw it! Looking at "files changed" helped me to understand it, and I can't even code!

In case of how it is shown in Updater: Would using "\n" in the menus json help?

"worker": { "of": "of", "remaining": "Time remaining" }

PoloNX commented 1 year ago

I will do a commit juste to put the text 30 px over

HeikesFootSlave commented 1 year ago

Just a question if that is also possible:

`std::string labelText = fmt::format("({:.1f} MB {} {:.1f} MB - {:.1f} MB/s) - {}: ", fileSizeCurrentMB, "menus/worker/of"_i18n, fileSizeFinalMB, speedMB, "menus/worker/remaining"_i18n);

if (hours > 0)
    labelText += fmt::format("{}h ", "menus/worker/hours"_i18n);
if (minutes > 0)
    labelText += fmt::format("{}m ", "menus/worker/minutes"_i18n);

labelText += fmt::format("{}s", "menus/worker/seconds"_i18n);

return labelText;`

and in the menus.json:

` "worker": {

"of": "of",
"remaining": "Time remaining",
"hours": "hours",
"minutes": "minutes",
"seconds": "seconds"

}` Code function here is weird! SORRY)

Forgive me if it is stupid! (like I said I CAN'T code :( )

But now you could translate that also :)

PoloNX commented 1 year ago

It's a good idea. I can't test now but here is the new commit

PoloNX commented 1 year ago

Here is the nro : aio-switch-updater.zip

HeikesFootSlave commented 1 year ago

Here is the nro : aio-switch-updater.zip

Thank you, but prefer source because I compile it myself šŸ˜‰

And looking at source and on the new changes you made = learned a lot today! Thank you so much šŸ˜˜

PoloNX commented 1 year ago

Ahah thanks. It works ?

HeikesFootSlave commented 1 year ago

It works like a charm and I find it sooooo cool and awesome!

Nice work!

Only thing I even saw downloading our SwitchBros. Pack is = the digits are directly in front of "hours, minutes, seconds" so I put a "space" in front of them in the menus.json.

"minutes": " minutes",

I also changed this line

"remaining": "\nTime remaining", (This is now in a new line)

and because of that I also changed this line and deleted this " -", because if "Time remaining" is in a new line you would have " -" at the end of the MB size line!

std::string labelText = fmt::format("({:.1f} MB {} {:.1f} MB - {:.1f} MB/s) {}: ",

Think you "see" what I mean šŸ˜‰

Hope PR is in next release!

PoloNX commented 1 year ago

Yes I see thanks for the feedback

HeikesFootSlave commented 1 year ago

Made a screenshot for you (German)

2023061620205500-CC47F0DEC75C1FD3B1F95FA9F9D57667

PoloNX commented 1 year ago

@HamletDuFromage if you can review this pr so :)

HeikesFootSlave commented 1 year ago

@PoloNX Ist it possible to get it also for extracting? Would be nice!

Greetings from Germany

PoloNX commented 1 year ago

I don't know how to do it