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

[stable-3.15] Fix text strings #7598

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/gui/userstatusselectormodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,25 +409,25 @@ QString UserStatusSelectorModel::timeDifferenceToString(int differenceSecs) cons
if (differenceSecs < 60) {
return tr("Less than a minute");
} else if (differenceSecs < 60 * 60) {
const auto minutesLeft = std::ceil(differenceSecs / 60.0);
const auto minutesLeft = static_cast<int>(std::ceil(differenceSecs / 60.0));
if (minutesLeft == 1) {
return tr("1 minute");
} else {
return tr("%1 minutes").arg(minutesLeft);
return tr("%1 minutes", "", minutesLeft).arg(minutesLeft);
}
} else if (differenceSecs < 60 * 60 * 24) {
const auto hoursLeft = std::ceil(differenceSecs / 60.0 / 60.0);
const auto hoursLeft = static_cast<int>(std::ceil(differenceSecs / 60.0 / 60.0));
if (hoursLeft == 1) {
return tr("1 hour");
} else {
return tr("%1 hours").arg(hoursLeft);
return tr("%1 hours", "", hoursLeft).arg(hoursLeft);
}
} else {
const auto daysLeft = std::ceil(differenceSecs / 60.0 / 60.0 / 24.0);
const auto daysLeft = static_cast<int>(std::ceil(differenceSecs / 60.0 / 60.0 / 24.0));
if (daysLeft == 1) {
return tr("1 day");
} else {
return tr("%1 days").arg(daysLeft);
return tr("%1 days", "", daysLeft).arg(daysLeft);
}
}
}
Expand Down
Loading