mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
StyleCop: 10 files of small miscellaneous fixes
This commit is contained in:
parent
97d8fa855a
commit
81b04b2b3c
11 changed files with 38 additions and 48 deletions
|
|
@ -41,7 +41,7 @@ namespace Dalamud
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for the <see cref="Localization.OnLocalizationChanged"/> event that occurs when the language is changed.
|
||||
/// Delegate for the <see cref="OnLocalizationChanged"/> event that occurs when the language is changed.
|
||||
/// </summary>
|
||||
/// <param name="langCode">The language code of the new language.</param>
|
||||
public delegate void LocalizationChangedDelegate(string langCode);
|
||||
|
|
@ -51,6 +51,19 @@ namespace Dalamud
|
|||
/// </summary>
|
||||
public event LocalizationChangedDelegate OnLocalizationChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Search the set-up localization data for the provided assembly for the given string key and return it.
|
||||
/// If the key is not present, the fallback is shown.
|
||||
/// The fallback is also required to create the string files to be localized.
|
||||
/// </summary>
|
||||
/// <param name="key">The string key to be returned.</param>
|
||||
/// <param name="fallBack">The fallback string, usually your source language.</param>
|
||||
/// <returns>The localized string, fallback or string key if not found.</returns>
|
||||
public static string Localize(string key, string fallBack)
|
||||
{
|
||||
return Loc.Localize(key, fallBack, Assembly.GetCallingAssembly());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up the UI language with the users' local UI culture.
|
||||
/// </summary>
|
||||
|
|
@ -118,19 +131,6 @@ namespace Dalamud
|
|||
Loc.ExportLocalizableForAssembly(this.assembly);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Search the set-up localization data for the provided assembly for the given string key and return it.
|
||||
/// If the key is not present, the fallback is shown.
|
||||
/// The fallback is also required to create the string files to be localized.
|
||||
/// </summary>
|
||||
/// <param name="key">The string key to be returned.</param>
|
||||
/// <param name="fallBack">The fallback string, usually your source language.</param>
|
||||
/// <returns>The localized string, fallback or string key if not found.</returns>
|
||||
public static string Localize(string key, string fallBack)
|
||||
{
|
||||
return Loc.Localize(key, fallBack, Assembly.GetCallingAssembly());
|
||||
}
|
||||
|
||||
private string ReadLocData(string langCode)
|
||||
{
|
||||
if (this.useEmbedded)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue