Skip to content

Proper formatting of BlockClock's remaining sync time #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

jarolrod
Copy link
Member

@jarolrod jarolrod commented Feb 6, 2023

Applies proper formatting to the value obtained from nodeModel.remainingSyncTime, as specified in our design docs.

Displays the largest unit of time left until we get to less than 5 hours left, in which case it will shows both hours and minutes. When it reaches minutes, it only shows minutes until there is less than 5 minutes, which then it will display both minutes and seconds.

This works for now, but we'll probably want a different approach so that the units and the word "left" can be translated.

weeks days hours h & m minutes m & s seconds
Screen Shot 2023-02-05 at 9 21 37 PM Screen Shot 2023-02-05 at 9 17 29 PM Screen Shot 2023-02-05 at 9 17 33 PM Screen Shot 2023-02-05 at 9 14 21 PM Screen Shot 2023-02-05 at 9 14 26 PM Screen Shot 2023-02-05 at 9 15 10 PM Screen Shot 2023-02-05 at 9 16 11 PM

Fixes #225

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android

@jarolrod jarolrod mentioned this pull request Feb 6, 2023
@johnny9
Copy link
Collaborator

johnny9 commented Feb 6, 2023

concept ACK

@johnny9
Copy link
Collaborator

johnny9 commented Feb 6, 2023

if you wrap subText with qsTr() it should still be translatable with an appropriate parameterized translation. I just think the static analysis tool won't automatically find the string to translate.

@jarolrod
Copy link
Member Author

jarolrod commented Feb 6, 2023

@johnny9 I think that we should wait until we have translation wiring setup so we can test with Qt what will work in terms of recognizing strings to translate

Copy link
Collaborator

@johnny9 johnny9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 542e4d4

Screenshot from 2023-02-06 14-04-49 Screenshot from 2023-02-06 14-06-22 Screenshot from 2023-02-06 14-07-23 Screenshot from 2023-02-06 14-08-44 Screenshot from 2023-02-06 14-15-51 Screenshot from 2023-02-06 14-16-38 Screenshot from 2023-02-06 14-17-36

@hebasto hebasto merged commit d1c51ac into bitcoin-core:main Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block clock should show estimated times as hours/ hours+mins / minutes / estimating when appropriate
3 participants