diff --git a/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs b/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs index afc40072..11b3ca6c 100644 --- a/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs +++ b/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs @@ -83,14 +83,17 @@ namespace Yavsc.Helpers } public async Task InvokeJson(object query) - { - JsonValue jsonDoc=null; - using (Stream streamQuery = request.GetRequestStream()) { - using (StreamWriter writer = new StreamWriter(streamQuery)) { - writer.Write (JsonConvert.SerializeObject(query)); - }} + { + JsonValue jsonDoc = null; try { + using (Stream streamQuery = request.GetRequestStream()) + { + using (StreamWriter writer = new StreamWriter(streamQuery)) + { + writer.Write(JsonConvert.SerializeObject(query)); + } + } using (WebResponse response = request.GetResponse()) { using (Stream stream = response.GetResponseStream()) diff --git a/BookAStar/BookAStar/BookAStar.csproj b/BookAStar/BookAStar/BookAStar.csproj index a686bc5d..e8deb46c 100644 --- a/BookAStar/BookAStar/BookAStar.csproj +++ b/BookAStar/BookAStar/BookAStar.csproj @@ -65,6 +65,16 @@ UserProfilePage.xaml + + True + True + Strings.resx + + + True + True + Strings.en.resx + DocSigning.xaml @@ -380,6 +390,14 @@ + + PublicResXFileCodeGenerator + Strings.Designer.cs + + + PublicResXFileCodeGenerator + Strings.en.Designer.cs + MSBuild:UpdateDesignTimeXaml Designer diff --git a/BookAStar/BookAStar/Converters/RatingText.cs b/BookAStar/BookAStar/Converters/RatingText.cs index 53153cb8..66398081 100644 --- a/BookAStar/BookAStar/Converters/RatingText.cs +++ b/BookAStar/BookAStar/Converters/RatingText.cs @@ -13,17 +13,17 @@ namespace BookAStar.Converters { var rating = (int)value; if (rating == 0) - return "Nul!"; + return Strings.NoStar; if (rating == 1) - return "Décevant!"; + return Strings.OneStar; if (rating == 2) - return "Pas terrible!"; + return Strings.TwoStars; if (rating == 3) - return "Bien!"; + return Strings.ThreeStars; if (rating == 4) - return "J'aime!"; + return Strings.ForStars; if (rating == 5) - return "J'adore"; + return Strings.FiveStars; return string.Empty; } diff --git a/BookAStar/BookAStar/Pages/UserProfile/UserFiles.xaml b/BookAStar/BookAStar/Pages/UserProfile/UserFiles.xaml index 47b012fa..a849b5b3 100644 --- a/BookAStar/BookAStar/Pages/UserProfile/UserFiles.xaml +++ b/BookAStar/BookAStar/Pages/UserProfile/UserFiles.xaml @@ -35,8 +35,6 @@ diff --git a/BookAStar/BookAStar/Strings.Designer.cs b/BookAStar/BookAStar/Strings.Designer.cs new file mode 100644 index 00000000..4b394f62 --- /dev/null +++ b/BookAStar/BookAStar/Strings.Designer.cs @@ -0,0 +1,127 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace BookAStar { + using System; + using System.Reflection; + + + /// + /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + /// + // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + // à l'aide d'un outil, tel que ResGen ou Visual Studio. + // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + // avec l'option /str ou régénérez votre projet VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BookAStar.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Remplace la propriété CurrentUICulture du thread actuel pour toutes + /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Recherche une chaîne localisée semblable à Star. + /// + public static string FiveStars { + get { + return ResourceManager.GetString("FiveStars", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à Célébrité. + /// + public static string ForStars { + get { + return ResourceManager.GetString("ForStars", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à Un artiste. + /// + public static string NoStar { + get { + return ResourceManager.GetString("NoStar", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à Étoile montante. + /// + public static string OneStar { + get { + return ResourceManager.GetString("OneStar", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à sc. + /// + public static string String1 { + get { + return ResourceManager.GetString("String1", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à Incontournable. + /// + public static string ThreeStars { + get { + return ResourceManager.GetString("ThreeStars", resourceCulture); + } + } + + /// + /// Recherche une chaîne localisée semblable à À ne manquer sous aucun prétexte. + /// + public static string TwoStars { + get { + return ResourceManager.GetString("TwoStars", resourceCulture); + } + } + } +} diff --git a/BookAStar/BookAStar/Strings.en.Designer.cs b/BookAStar/BookAStar/Strings.en.Designer.cs new file mode 100644 index 00000000..e69de29b diff --git a/BookAStar/BookAStar/Strings.en.resx b/BookAStar/BookAStar/Strings.en.resx new file mode 100644 index 00000000..479e0369 --- /dev/null +++ b/BookAStar/BookAStar/Strings.en.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Star + Da star, da one + + + Planet + + + Artist + pas d'étoile + + + Rising star + + + Continent + + + Rock + + \ No newline at end of file diff --git a/BookAStar/BookAStar/Strings.resx b/BookAStar/BookAStar/Strings.resx new file mode 100644 index 00000000..75619247 --- /dev/null +++ b/BookAStar/BookAStar/Strings.resx @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Star + Da star, da one + + + Célébrité + + + Un artiste + pas d'étoile + + + Étoile montante + + + sc + + + Incontournable + + + À ne manquer sous aucun prétexte + + \ No newline at end of file