mirror of
https://github.com/MSWS/TTT.git
synced 2025-12-05 22:20:25 -08:00
``` Introduce IMsgLocalizer interface and improve localization functionality - Extend `StringLocalizer` to support `IMsg` object localization and implement the new `IMsgLocalizer` interface. - Update `.github/workflows/dotnet.yml` to use newer Actions versions, enable coverage tracking, and generate dynamic coverage badges. - Add `IMsgLocalizer` interface and implement localization indexer in `IMsgLocalizer.cs`. - Update dependency injection in `Startup.cs` to register `IMsgLocalizer` and refine localization services. - Improve tests in `LocaleTest.cs` to validate `IMsgLocalizer` usage, placeholder substitution, and remove redundant assertions. Minor: Adjust `en.yml` formatting by removing unnecessary quotes. ```
7 lines
154 B
C#
7 lines
154 B
C#
using Microsoft.Extensions.Localization;
|
|
|
|
namespace TTT.Locale;
|
|
|
|
public interface IMsgLocalizer : IStringLocalizer {
|
|
string this[IMsg msg] { get; }
|
|
} |