diff --git a/PlantBox.Client/PlantBox.Client/Forms/HomeItem.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/HomeItem.xaml.cs
index d53f670..fbc7b87 100644
--- a/PlantBox.Client/PlantBox.Client/Forms/HomeItem.xaml.cs
+++ b/PlantBox.Client/PlantBox.Client/Forms/HomeItem.xaml.cs
@@ -57,15 +57,14 @@ namespace PlantBox.Client.Forms
{
labelName.Text = PlantName;
}
- if (propertyName == PlantTypeProperty.PropertyName)
+ if (propertyName == PlantTypeProperty.PropertyName && PlantType != PlantType.Default)
{
labelType.Text = PlantType.ToString();
// Icon
imageType.Source = ImageResourceExtension.GetImage($"Type.{PlantType}.png");
-
}
- if (propertyName == PlantStateProperty.PropertyName)
+ if (propertyName == PlantStateProperty.PropertyName && PlantState != PlantState.Default)
{
Color color;
diff --git a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs
index 193dbc5..c32fea8 100644
--- a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs
+++ b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs
@@ -50,7 +50,7 @@ namespace PlantBox.Client.Forms
private async void Button_Clicked(object sender, EventArgs e)
{
- string input = await FormsDialog.InputBox(Navigation, "Add PlantBox", "Enter a valid ID:");
+ string input = await FormsDialog.InputBox(Navigation, Locale.AddPlantBox, Locale.EnterValidID);
if (ulong.TryParse(input, out ulong id) && await IsValidId(id))
{
diff --git a/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs
index 11dc616..b30f79c 100644
--- a/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs
+++ b/PlantBox.Client/PlantBox.Client/Forms/Plant/HistoricPage.xaml.cs
@@ -13,6 +13,7 @@ using Microcharts;
using Entry = Microcharts.Entry;
using PlantBox.Client.Extensions;
using PlantBox.Client.ViewModels;
+using PlantBox.Client.Resources;
namespace PlantBox.Client.Forms.Plant
{
@@ -69,9 +70,9 @@ namespace PlantBox.Client.Forms.Plant
{
var charts = new NamedChart[]
{
- new NamedChart(CreateChart(CaptorType.Humidity, _humidityColor, _humidityColorSecondary), "Humidity"),
- new NamedChart(CreateChart(CaptorType.Luminosity, _luminosityColor, _luminosityColorSecondary), "Luminosity"),
- new NamedChart(CreateChart(CaptorType.Temperature, _temperatureColor, _temperatureColorSecondary), "Temperature")
+ new NamedChart(CreateChart(CaptorType.Humidity, _humidityColor, _humidityColorSecondary), Locale.Humidity),
+ new NamedChart(CreateChart(CaptorType.Luminosity, _luminosityColor, _luminosityColorSecondary), Locale.Luminosity),
+ new NamedChart(CreateChart(CaptorType.Temperature, _temperatureColor, _temperatureColorSecondary), Locale.Temperature)
};
BindableLayout.SetItemsSource(layout, charts);
diff --git a/PlantBox.Client/PlantBox.Client/Resources/Locale.Designer.cs b/PlantBox.Client/PlantBox.Client/Resources/Locale.Designer.cs
index dd8a845..ff44d86 100644
--- a/PlantBox.Client/PlantBox.Client/Resources/Locale.Designer.cs
+++ b/PlantBox.Client/PlantBox.Client/Resources/Locale.Designer.cs
@@ -69,6 +69,15 @@ namespace PlantBox.Client.Resources {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Add PlantBox.
+ ///
+ internal static string AddPlantBox {
+ get {
+ return ResourceManager.GetString("AddPlantBox", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Author.
///
@@ -105,6 +114,15 @@ namespace PlantBox.Client.Resources {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Enter a valid ID:.
+ ///
+ internal static string EnterValidID {
+ get {
+ return ResourceManager.GetString("EnterValidID", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Error.
///
@@ -150,6 +168,15 @@ namespace PlantBox.Client.Resources {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Humidity.
+ ///
+ internal static string Humidity {
+ get {
+ return ResourceManager.GetString("Humidity", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Informations.
///
@@ -222,6 +249,15 @@ namespace PlantBox.Client.Resources {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Luminosity.
+ ///
+ internal static string Luminosity {
+ get {
+ return ResourceManager.GetString("Luminosity", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Media.
///
@@ -294,6 +330,15 @@ namespace PlantBox.Client.Resources {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Temperature.
+ ///
+ internal static string Temperature {
+ get {
+ return ResourceManager.GetString("Temperature", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Version.
///
diff --git a/PlantBox.Client/PlantBox.Client/Resources/Locale.fr.resx b/PlantBox.Client/PlantBox.Client/Resources/Locale.fr.resx
index 8df7e22..0327bb3 100644
--- a/PlantBox.Client/PlantBox.Client/Resources/Locale.fr.resx
+++ b/PlantBox.Client/PlantBox.Client/Resources/Locale.fr.resx
@@ -120,6 +120,9 @@
À Propos
+
+ Ajouter un PlantBox
+
Auteur
@@ -132,6 +135,9 @@
Jour
+
+ Entrer une id valide:
+
Erreur
@@ -147,6 +153,9 @@
Heure
+
+ Humidité
+
Informations
@@ -171,6 +180,9 @@
Bibliothèques
+
+ Luminosité
+
Media
@@ -195,6 +207,9 @@
Préférences
+
+ Température
+
Version
diff --git a/PlantBox.Client/PlantBox.Client/Resources/Locale.resx b/PlantBox.Client/PlantBox.Client/Resources/Locale.resx
index b77347a..179630e 100644
--- a/PlantBox.Client/PlantBox.Client/Resources/Locale.resx
+++ b/PlantBox.Client/PlantBox.Client/Resources/Locale.resx
@@ -120,6 +120,9 @@
About
+
+ Add PlantBox
+
Author
@@ -132,6 +135,9 @@
Day
+
+ Enter a valid ID:
+
Error
@@ -147,6 +153,9 @@
Hour
+
+ Humidity
+
Informations
@@ -171,6 +180,9 @@
Libraries
+
+ Luminosity
+
Media
@@ -195,6 +207,9 @@
Settings
+
+ Temperature
+
Version