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;
}
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;

View File

@@ -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))
{

View File

@@ -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);

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>
/// Recherche une chaîne localisée semblable à Author.
/// </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>
/// Recherche une chaîne localisée semblable à Error.
/// </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>
/// Recherche une chaîne localisée semblable à Informations.
/// </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>
/// Recherche une chaîne localisée semblable à Media.
/// </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>
/// Recherche une chaîne localisée semblable à Version.
/// </summary>

View File

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

View File

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