Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
Fix code docs xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Ponce de León committed Nov 27, 2016
1 parent 96934cb commit 5c71167
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion I18NPortable/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static string Translate(this Enum value)
/// i.e: <code>var mainScreen = new MainScreen();
/// var title = mainScreen.Translate();
/// </code>
/// It will look for "MainScreen" or [Namespace].MainScreen at your locale file
/// It will look for <code>MainScreen</code> or <code>[Namespace].MainScreen</code> at your locale file
/// </summary>
public static string Translate(this object instance)
{
Expand Down
21 changes: 11 additions & 10 deletions I18NPortable/I18N.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Reflection;
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable MemberCanBeMadeStatic.Global
// ReSharper disable UnusedMethodReturnValue.Global

namespace I18NPortable
{
Expand Down Expand Up @@ -158,12 +159,12 @@ public I18N SetFallbackLocale(string locale)
return this;
}

/// <summary>
/// Call this when your app starts
/// ie: I18N.Current.Init(GetType().GetTypeInfo().Assembly);
/// </summary>
/// <param name="hostAssembly">The PCL assembly that hosts the locale text files</param>
public I18N Init(Assembly hostAssembly)
/// <summary>
/// Call this when your app starts
/// ie: <code>I18N.Current.Init(GetType().GetTypeInfo().Assembly);</code>
/// </summary>
/// <param name="hostAssembly">The PCL assembly that hosts the locale text files</param>
public I18N Init(Assembly hostAssembly)
{
Unload();

Expand Down Expand Up @@ -324,8 +325,8 @@ public string TranslateOrNull(string key, params object[] args) =>
/// <summary>
/// Get the translation for a given Type name or Type full name.
///
/// i.e: Given a class <code>MainScreen</code>, <code>Translate<MainScreen>()</code> will search a key "MainScreen" in the locale file.
/// If not found, it will search for a key [Namespace].MainScreen
/// i.e: Given a class <code>MainScreen</code>, <code>Translate&lt;MainScreen&gt;()</code> will search a key "MainScreen" in the locale file.
/// If not found, it will search for a key <code>[Namespace].MainScreen</code>
/// </summary>
public string Translate<T>()
{
Expand All @@ -344,7 +345,7 @@ public Dictionary<TEnum, string> TranslateEnum<TEnum>()
=> TranslateEnumToDictionary<TEnum>();

/// <summary>
/// Convert Enum Type values to a Dictionary<TEnum, string> where the key is the Enum value and the string is the translated value.
/// Convert Enum Type values to a Dictionary&lt;TEnum, string&gt; where the key is the Enum value and the string is the translated value.
/// </summary>
public Dictionary<TEnum, string> TranslateEnumToDictionary<TEnum>()
{
Expand Down Expand Up @@ -374,7 +375,7 @@ select Translate($"{type.Name}.{name}"))
}

/// <summary>
/// Converts Enum Type values to a List of Tuple<TEnum, string> where the Item2 (string) is the enum value translation
/// Converts Enum Type values to a List of <code>Tuple&lt;TEnum, string&gt;</code> where the Item2 (string) is the enum value translation
/// </summary>
/// <typeparam name="TEnum"></typeparam>
/// <returns></returns>
Expand Down

0 comments on commit 5c71167

Please sign in to comment.