Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
6b369313
Commit
6b369313
authored
Nov 07, 2021
by
David Jarvie
Browse files
Make recurrenceText() output localised numeric values
parent
8d121a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kaevent.cpp
View file @
6b369313
...
...
@@ -2987,6 +2987,7 @@ QString KAEvent::recurrenceText(bool brief) const
return
brief
?
i18nc
(
"@info Brief form of 'At Login'"
,
"Login"
)
:
i18nc
(
"@info"
,
"At login"
);
}
if
(
d
->
mRecurrence
)
{
QLocale
locale
;
const
int
frequency
=
d
->
mRecurrence
->
frequency
();
switch
(
d
->
mRecurrence
->
defaultRRuleConst
()
->
recurrenceType
())
{
case
RecurrenceRule
::
rMinutely
:
...
...
@@ -2995,7 +2996,7 @@ QString KAEvent::recurrenceText(bool brief) const
}
else
if
(
frequency
%
60
==
0
)
{
return
i18ncp
(
"@info"
,
"1 Hour"
,
"%1 Hours"
,
frequency
/
60
);
}
else
{
return
i18nc
(
"@info Hours and minutes"
,
"%1h %2m"
,
frequency
/
60
,
QString
::
asprintf
(
"%02d"
,
frequency
%
60
));
return
i18nc
(
"@info Hours and minutes"
,
"%1h %2m"
,
locale
.
toString
(
frequency
/
60
)
,
locale
.
toString
(
frequency
%
60
));
}
case
RecurrenceRule
::
rDaily
:
return
i18ncp
(
"@info"
,
"1 Day"
,
"%1 Days"
,
frequency
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment