Add missing translations

This commit is contained in:
2019-05-08 22:05:39 +02:00
parent 0cf9b3a566
commit b144629939
6 changed files with 82 additions and 7 deletions

View File

@@ -57,15 +57,14 @@ namespace PlantBox.Client.Forms
{ {
labelName.Text = PlantName; labelName.Text = PlantName;
} }
if (propertyName == PlantTypeProperty.PropertyName) if (propertyName == PlantTypeProperty.PropertyName && PlantType != PlantType.Default)
{ {
labelType.Text = PlantType.ToString(); labelType.Text = PlantType.ToString();
// Icon // Icon
imageType.Source = ImageResourceExtension.GetImage($"Type.{PlantType}.png"); imageType.Source = ImageResourceExtension.GetImage($"Type.{PlantType}.png");
} }
if (propertyName == PlantStateProperty.PropertyName) if (propertyName == PlantStateProperty.PropertyName && PlantState != PlantState.Default)
{ {
Color color; Color color;

View File

@@ -50,7 +50,7 @@ namespace PlantBox.Client.Forms
private async void Button_Clicked(object sender, EventArgs e) 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)) if (ulong.TryParse(input, out ulong id) && await IsValidId(id))
{ {

View File

@@ -13,6 +13,7 @@ using Microcharts;
using Entry = Microcharts.Entry; using Entry = Microcharts.Entry;
using PlantBox.Client.Extensions; using PlantBox.Client.Extensions;
using PlantBox.Client.ViewModels; using PlantBox.Client.ViewModels;
using PlantBox.Client.Resources;
namespace PlantBox.Client.Forms.Plant namespace PlantBox.Client.Forms.Plant
{ {
@@ -69,9 +70,9 @@ namespace PlantBox.Client.Forms.Plant
{ {
var charts = new NamedChart[] var charts = new NamedChart[]
{ {
new NamedChart(CreateChart(CaptorType.Humidity, _humidityColor, _humidityColorSecondary), "Humidity"), new NamedChart(CreateChart(CaptorType.Humidity, _humidityColor, _humidityColorSecondary), Locale.Humidity),
new NamedChart(CreateChart(CaptorType.Luminosity, _luminosityColor, _luminosityColorSecondary), "Luminosity"), new NamedChart(CreateChart(CaptorType.Luminosity, _luminosityColor, _luminosityColorSecondary), Locale.Luminosity),
new NamedChart(CreateChart(CaptorType.Temperature, _temperatureColor, _temperatureColorSecondary), "Temperature") new NamedChart(CreateChart(CaptorType.Temperature, _temperatureColor, _temperatureColorSecondary), Locale.Temperature)
}; };
BindableLayout.SetItemsSource(layout, charts); BindableLayout.SetItemsSource(layout, charts);

View File

@@ -69,6 +69,15 @@ namespace PlantBox.Client.Resources {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Add PlantBox.
/// </summary>
internal static string AddPlantBox {
get {
return ResourceManager.GetString("AddPlantBox", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Author. /// Recherche une chaîne localisée semblable à Author.
/// </summary> /// </summary>
@@ -105,6 +114,15 @@ namespace PlantBox.Client.Resources {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Enter a valid ID:.
/// </summary>
internal static string EnterValidID {
get {
return ResourceManager.GetString("EnterValidID", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Error. /// Recherche une chaîne localisée semblable à Error.
/// </summary> /// </summary>
@@ -150,6 +168,15 @@ namespace PlantBox.Client.Resources {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Humidity.
/// </summary>
internal static string Humidity {
get {
return ResourceManager.GetString("Humidity", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Informations. /// Recherche une chaîne localisée semblable à Informations.
/// </summary> /// </summary>
@@ -222,6 +249,15 @@ namespace PlantBox.Client.Resources {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Luminosity.
/// </summary>
internal static string Luminosity {
get {
return ResourceManager.GetString("Luminosity", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Media. /// Recherche une chaîne localisée semblable à Media.
/// </summary> /// </summary>
@@ -294,6 +330,15 @@ namespace PlantBox.Client.Resources {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Temperature.
/// </summary>
internal static string Temperature {
get {
return ResourceManager.GetString("Temperature", resourceCulture);
}
}
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Version. /// Recherche une chaîne localisée semblable à Version.
/// </summary> /// </summary>

View File

@@ -120,6 +120,9 @@
<data name="About" xml:space="preserve"> <data name="About" xml:space="preserve">
<value>À Propos</value> <value>À Propos</value>
</data> </data>
<data name="AddPlantBox" xml:space="preserve">
<value>Ajouter un PlantBox</value>
</data>
<data name="Author" xml:space="preserve"> <data name="Author" xml:space="preserve">
<value>Auteur</value> <value>Auteur</value>
</data> </data>
@@ -132,6 +135,9 @@
<data name="Day" xml:space="preserve"> <data name="Day" xml:space="preserve">
<value>Jour</value> <value>Jour</value>
</data> </data>
<data name="EnterValidID" xml:space="preserve">
<value>Entrer une id valide:</value>
</data>
<data name="Error" xml:space="preserve"> <data name="Error" xml:space="preserve">
<value>Erreur</value> <value>Erreur</value>
</data> </data>
@@ -147,6 +153,9 @@
<data name="Hour" xml:space="preserve"> <data name="Hour" xml:space="preserve">
<value>Heure</value> <value>Heure</value>
</data> </data>
<data name="Humidity" xml:space="preserve">
<value>Humidité</value>
</data>
<data name="Informations" xml:space="preserve"> <data name="Informations" xml:space="preserve">
<value>Informations</value> <value>Informations</value>
</data> </data>
@@ -171,6 +180,9 @@
<data name="Libraries" xml:space="preserve"> <data name="Libraries" xml:space="preserve">
<value>Bibliothèques</value> <value>Bibliothèques</value>
</data> </data>
<data name="Luminosity" xml:space="preserve">
<value>Luminosité</value>
</data>
<data name="Media" xml:space="preserve"> <data name="Media" xml:space="preserve">
<value>Media</value> <value>Media</value>
</data> </data>
@@ -195,6 +207,9 @@
<data name="Settings" xml:space="preserve"> <data name="Settings" xml:space="preserve">
<value>Préférences</value> <value>Préférences</value>
</data> </data>
<data name="Temperature" xml:space="preserve">
<value>Température</value>
</data>
<data name="Version" xml:space="preserve"> <data name="Version" xml:space="preserve">
<value>Version</value> <value>Version</value>
</data> </data>

View File

@@ -120,6 +120,9 @@
<data name="About" xml:space="preserve"> <data name="About" xml:space="preserve">
<value>About</value> <value>About</value>
</data> </data>
<data name="AddPlantBox" xml:space="preserve">
<value>Add PlantBox</value>
</data>
<data name="Author" xml:space="preserve"> <data name="Author" xml:space="preserve">
<value>Author</value> <value>Author</value>
</data> </data>
@@ -132,6 +135,9 @@
<data name="Day" xml:space="preserve"> <data name="Day" xml:space="preserve">
<value>Day</value> <value>Day</value>
</data> </data>
<data name="EnterValidID" xml:space="preserve">
<value>Enter a valid ID:</value>
</data>
<data name="Error" xml:space="preserve"> <data name="Error" xml:space="preserve">
<value>Error</value> <value>Error</value>
</data> </data>
@@ -147,6 +153,9 @@
<data name="Hour" xml:space="preserve"> <data name="Hour" xml:space="preserve">
<value>Hour</value> <value>Hour</value>
</data> </data>
<data name="Humidity" xml:space="preserve">
<value>Humidity</value>
</data>
<data name="Informations" xml:space="preserve"> <data name="Informations" xml:space="preserve">
<value>Informations</value> <value>Informations</value>
</data> </data>
@@ -171,6 +180,9 @@
<data name="Libraries" xml:space="preserve"> <data name="Libraries" xml:space="preserve">
<value>Libraries</value> <value>Libraries</value>
</data> </data>
<data name="Luminosity" xml:space="preserve">
<value>Luminosity</value>
</data>
<data name="Media" xml:space="preserve"> <data name="Media" xml:space="preserve">
<value>Media</value> <value>Media</value>
</data> </data>
@@ -195,6 +207,9 @@
<data name="Settings" xml:space="preserve"> <data name="Settings" xml:space="preserve">
<value>Settings</value> <value>Settings</value>
</data> </data>
<data name="Temperature" xml:space="preserve">
<value>Temperature</value>
</data>
<data name="Version" xml:space="preserve"> <data name="Version" xml:space="preserve">
<value>Version</value> <value>Version</value>
</data> </data>