Added the choice between formal and informal address to the whole app (#1200)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-13 10:16:56 +01:00
1 parent 382db4b8d0
commit c9a376f742
342 files changed
+14378 -1893

No files matched your search

@@ -40,6 +40,24 @@ public static class I18NAddressPrompt
return null;
}
/// <summary>
/// Gives every informal variant the words of its formal text, for a language with one form of address only.
/// </summary>
/// <remarks>
/// English addresses everybody alike, yet its language plugin may word a text differently than the source code
/// does. An informal variant taken from the source code would then differ from the formal text, and the language
/// would offer the choice of address, see <see cref="AIStudio.Tools.PluginSystem.LanguagePluginExtensions"/>.
/// </remarks>
/// <param name="content">All texts of the language plugin, by their keys; changed in place.</param>
public static void AlignInformalVariants(IDictionary<string, string> content)
{
foreach (var key in content.Keys.ToList())
{
if (I18NAddressVariant.TryGetFormalKey(key, out var formalKey) && content.TryGetValue(formalKey, out var formalText))
content[key] = formalText;
}
}
/// <summary>
/// Gets the section of the system prompt about the form of address.
/// </summary>