[frontend/components] Use localization for other category name in emoji picker

This commit is contained in:
pancakes 2025-03-07 14:56:36 +10:00 committed by Laura Hausmann
parent 28610192fe
commit d160d7337e
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1,9 +1,12 @@
@using AngleSharp.Text @using AngleSharp.Text
@using Iceshrimp.Frontend.Core.Services @using Iceshrimp.Frontend.Core.Services
@using Iceshrimp.Frontend.Localization
@using Iceshrimp.Shared.Schemas.Web @using Iceshrimp.Shared.Schemas.Web
@using Microsoft.Extensions.Localization
@inject EmojiService EmojiService @inject EmojiService EmojiService
@inject GlobalComponentSvc GlobalComponentSvc @inject GlobalComponentSvc GlobalComponentSvc
@inject IJSRuntime Js @inject IJSRuntime Js
@inject IStringLocalizer<Localization> Loc;
<dialog class="dialog" @ref="EmojiPickerRef"> <dialog class="dialog" @ref="EmojiPickerRef">
<div class="emoji-picker" style="--top: @(_top)px; --left: @(_left)px"> <div class="emoji-picker" style="--top: @(_top)px; --left: @(_left)px">
@ -77,6 +80,6 @@
.GroupBy(p => p.Category) .GroupBy(p => p.Category)
.OrderBy(p => string.IsNullOrEmpty(p.Key)) .OrderBy(p => string.IsNullOrEmpty(p.Key))
.ThenBy(p => p.Key) .ThenBy(p => p.Key)
.ToDictionary(p => p.Key ?? "Other", p => p.ToList()); .ToDictionary(p => p.Key ?? Loc["Other"], p => p.ToList());
} }
} }