Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
629f48e2
Commit
629f48e2
authored
Apr 22, 2015
by
Fabio Bas
Browse files
Permit translation in "game created" column; Fix #999
Also, extracted the 2 new strings
parent
3141fb84
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/gamesmodel.cpp
View file @
629f48e2
...
...
@@ -20,12 +20,12 @@ const QString GamesModel::getGameCreatedString(const int secs) const {
else
if
(
secs
<
SECS_PER_HOUR
)
ret
=
QString
::
number
(
secs
/
SECS_PER_MIN
).
append
(
tr
(
"m ago"
));
else
if
(
secs
<
SECS_PER_MIN
*
90
)
{
ret
=
tr
(
"1hr
"
).
append
(
QString
::
number
((
secs
/
SECS_PER_MIN
)
-
60
))
.
append
(
tr
(
"m ago"
))
;
ret
=
tr
(
"1hr
%1m ago"
).
arg
(
QString
::
number
((
secs
/
SECS_PER_MIN
)
-
60
));
}
else
if
(
secs
<
SECS_PER_HOUR
*
4
)
{
unsigned
int
hours
=
secs
/
SECS_PER_HOUR
;
if
(
secs
%
SECS_PER_HOUR
>=
SECS_PER_MIN
*
30
)
hours
++
;
ret
=
QString
::
number
(
hours
)
.
append
(
tr
(
"hr ago"
)
);
ret
=
tr
(
"%1hr ago"
).
arg
(
QString
::
number
(
hours
));
}
else
ret
=
tr
(
"5+ hrs ago"
);
...
...
cockatrice/translations/cockatrice_en.ts
View file @
629f48e2
...
...
@@ -1297,18 +1297,17 @@ Would you like to change your database location setting?</source>
<
/message
>
<
message
>
<
location
filename
=
"
../src/gamesmodel.cpp
"
line
=
"
21
"
/>
<
location
filename
=
"
../src/gamesmodel.cpp
"
line
=
"
23
"
/>
<
source
>
m
ago
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../src/gamesmodel.cpp
"
line
=
"
23
"
/>
<
source
>
1
hr
<
/source
>
<
source
>
1
hr
%
1
m
ago
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../src/gamesmodel.cpp
"
line
=
"
28
"
/>
<
source
>
hr
ago
<
/source
>
<
source
>
%
1
hr
ago
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
...
...
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