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

TLN Update translations #11452

Merged
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ en:
SilverStripe\Forms\GridField\GridFieldFilterHeader:
Search: 'Search "{name}"'
SearchFormFaliure: 'No search form could be generated'
Search_Default: Search
SilverStripe\Forms\GridField\GridFieldGroupDeleteAction:
UnlinkSelfFailure: 'Cannot remove yourself from this group, you will lose admin rights'
SilverStripe\Forms\GridField\GridFieldPaginator:
Expand Down Expand Up @@ -199,6 +200,25 @@ en:
YEARS_SHORT_PLURALS:
one: '{count} year'
other: '{count} years'
SilverStripe\ORM\FieldType\DBDatetime:
nDays:
one: 'one day'
other: '{count} days'
nHours:
one: 'one hour'
other: '{count} hours'
nMinutes:
one: 'one minute'
other: '{count} minutes'
nMonths:
one: 'one month'
other: '{count} months'
nSeconds:
one: 'one second'
other: '{count} seconds'
nYears:
one: 'one year'
other: '{count} years'
SilverStripe\ORM\FieldType\DBEnum:
ANY: Any
SilverStripe\ORM\FieldType\DBForeignKey:
Expand Down
17 changes: 7 additions & 10 deletions src/ORM/FieldType/DBDatetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,16 @@ public static function getTimeBetween(DBDateTime $from, DBDateTime $to): string
['count' => $diff->i]
);
}
$message = _t(
__CLASS__ . '.nSeconds',
'one second|{count} seconds',
['count' => $diff->s ?? 0]
);
if ($diff->s) {
$result[] = _t(
__CLASS__ . '.nSeconds',
'one second|{count} seconds',
['count' => $diff->s]
);
$result[] = $message;
}
if (empty($result)) {
return _t(
__CLASS__ . '.nSeconds',
'{count} seconds',
['count' => 0]
);
return $message;
}
return implode(', ', $result);
}
Expand Down