mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-10-30 19:50:28 +01:00
Take the remaining I/O out of the domain and drop AppState.Instance
Scenery translations and load weights get repositories; AppState moves to the application layer.
This commit is contained in:
23
StarterNG/Application/Abstractions/ISceneryTranslations.cs
Normal file
23
StarterNG/Application/Abstractions/ISceneryTranslations.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using StarterNG.Domain.Sceneries;
|
||||
|
||||
namespace StarterNG.Application.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// The translations a scenery ships alongside itself, in scenery/i18n/*.json.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Scenery text may be an "@key" reference rather than literal prose, resolved
|
||||
/// against the currently loaded scenery's table. The table is per scenery, so
|
||||
/// <see cref="LoadFor"/> replaces it rather than adding to it.
|
||||
/// </remarks>
|
||||
public interface ISceneryTranslations
|
||||
{
|
||||
/// <summary>Loads the tables for one scenery, English first then the user's language.</summary>
|
||||
void LoadFor(Scenery scenery, string langCode);
|
||||
|
||||
/// <summary>
|
||||
/// Resolves an "@key" reference against the loaded table. Text that is not a
|
||||
/// reference, or a key with no translation, comes back unchanged.
|
||||
/// </summary>
|
||||
string Translate(string? text);
|
||||
}
|
||||
Reference in New Issue
Block a user