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
36a0d25c
Commit
36a0d25c
authored
Apr 22, 2015
by
ctrlaltca
Browse files
Merge pull request #1001 from ctrlaltca/fix_999
Permit translation in "game created" column; Fix #999
parents
3141fb84
629f48e2
Changes
2
Show whitespace changes
Inline
Side-by-side
cockatrice/src/gamesmodel.cpp
View file @
36a0d25c
...
...
@@ -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 @
36a0d25c
...
...
@@ -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>1hr </source>
<source>1hr
%1m 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