mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
Using Humaniser instead of fixed string... (#335)
Update tooltip text generation in MetaRegistration The tooltip text generation in MetaRegistration.cs is updated to use Humanizer's 'HumanizeForCurrentCulture' method with 'TimeUnit.Hour' as maxUnit. This change leverages the Humanizer library to provide more precise and localized time formatting.
This commit is contained in:
parent
5dca8717b9
commit
27a9a2eebf
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Humanizer.Localisation;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
@ -118,7 +119,7 @@ namespace IW4MAdmin.Application.Meta
|
||||
ClientId = client.ClientId,
|
||||
Key = _transLookup["WEBFRONT_PROFILE_META_PLAY_TIME"],
|
||||
Value = friendlyTime.HumanizeForCurrentCulture(),
|
||||
ToolTipText = $"{friendlyTime.TotalHours:N1} hour(s)",
|
||||
ToolTipText = friendlyTime.HumanizeForCurrentCulture(maxUnit: TimeUnit.Hour),
|
||||
ShouldDisplay = true,
|
||||
Order = 8,
|
||||
Type = MetaType.Information
|
||||
|
Loading…
x
Reference in New Issue
Block a user