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
Itinerary
Commits
1284d526
Commit
1284d526
authored
Nov 21, 2021
by
Volker Krause
Browse files
Add i18n changes we can't do in the stable branch due to string freeze
parent
8c355f75
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/app/HealthCertificateTest.qml
View file @
1284d526
...
...
@@ -72,11 +72,10 @@ ColumnLayout {
return
certificate
.
resultString
;
}
switch
(
certificate
.
result
)
{
// TODO as we are past the string freeze this reuses already existing strings that are close to what we want, fix this is master
case
KHC
.
TestCertificate
.
Positive
:
return
i18n
(
'
Positive
test
'
);
return
i18n
c
(
'
test result
'
,
'
Positive
'
);
case
KHC
.
TestCertificate
.
Negative
:
return
i18n
(
'
Negative
test
'
);
return
i18n
c
(
'
test result
'
,
'
Negative
'
);
}
}
Kirigami.FormData.label
:
i18n
(
"
Result:
"
)
...
...
src/app/healthcertificatemanager.cpp
View file @
1284d526
...
...
@@ -110,11 +110,14 @@ QVariant HealthCertificateManager::data(const QModelIndex &index, int role) cons
#if HAVE_KHEALTHCERTIFICATE
if
(
v
.
cert
.
userType
()
==
qMetaTypeId
<
KVaccinationCertificate
>
())
{
const
auto
cert
=
v
.
cert
.
value
<
KVaccinationCertificate
>
();
return
i18n
(
"Vaccination %1/%2 (%3)"
,
cert
.
dose
(),
cert
.
totalDoses
(),
cert
.
name
());
if
(
cert
.
dose
()
>
0
&&
cert
.
totalDoses
()
>
0
)
{
return
i18n
(
"Vaccination %1/%2 (%3)"
,
cert
.
dose
(),
cert
.
totalDoses
(),
cert
.
name
());
}
return
i18n
(
"Vaccination (%1)"
,
cert
.
name
());
}
if
(
v
.
cert
.
userType
()
==
qMetaTypeId
<
KTestCertificate
>
())
{
const
auto
cert
=
v
.
cert
.
value
<
KTestCertificate
>
();
return
i18n
(
"Test %1 (%2)"
,
QLocale
().
toString
(
cert
.
date
(),
QLocale
::
NarrowFormat
),
cert
.
name
());
return
i18n
(
"Test %1 (%2)"
,
QLocale
().
toString
(
cert
.
date
()
.
isValid
()
?
cert
.
date
()
:
cert
.
certificateIssueDate
().
date
()
,
QLocale
::
NarrowFormat
),
cert
.
name
());
}
if
(
v
.
cert
.
userType
()
==
qMetaTypeId
<
KRecoveryCertificate
>
())
{
const
auto
cert
=
v
.
cert
.
value
<
KRecoveryCertificate
>
();
...
...
src/app/localizer.cpp
View file @
1284d526
...
...
@@ -142,7 +142,7 @@ QString Localizer::formatDate(const QVariant &obj, const QString &propertyName)
}
if
(
dt
.
year
()
<=
1900
)
{
// no year specified
return
dt
.
toString
(
QStringLiteral
(
"dd MMMM"
));
// TODO i18n in master
return
dt
.
toString
(
i18nc
(
"day-only date format"
,
"dd MMMM"
));
}
return
QLocale
().
toString
(
dt
,
QLocale
::
ShortFormat
);
}
...
...
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