Skip to content
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

Use named parameters in get_timestamp() time formatting strings #2292

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

phw
Copy link
Member

@phw phw commented Aug 27, 2023

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

The function get_timestamp() in picard.util.time uses parametered strings like %.2dh %.2dm. For translation it is hard to see for what purpose those are being used for and how to replace them. Also order cannot be easily changed (should this be necessary in the target language), even though this is unlikely in this specific case.

Solution

Use named parameters like %(hours).2dh %(minutes).2dm

@phw phw requested a review from zas August 27, 2023 12:58
Copy link
Collaborator

@rdswift rdswift left a comment

Choose a reason for hiding this comment

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

This makes sense to me.

Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM

@phw phw merged commit d3ccfb9 into metabrainz:master Aug 27, 2023
63 checks passed
@phw phw deleted the get-timestamp-named-parameters branch August 27, 2023 16:23
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.

3 participants