Skip to content

Commit

Permalink
Add french translation
Browse files Browse the repository at this point in the history
Resolve #69
  • Loading branch information
zxbmmmmmmmmm committed Oct 12, 2024
1 parent d29a931 commit 5c25054
Show file tree
Hide file tree
Showing 5 changed files with 1,060 additions and 4 deletions.
279 changes: 279 additions & 0 deletions FluentWeather.Abstraction/Strings/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="USAQI_Good" xml:space="preserve">
<value>Bon</value>
</data>
<data name="USAQI_Hazardous" xml:space="preserve">
<value>Hazardous</value>
</data>
<data name="USAQI_Moderate" xml:space="preserve">
<value>Moderate</value>
</data>
<data name="USAQI_Unhealthy" xml:space="preserve">
<value>Unhealthy</value>
</data>
<data name="USAQI_UnhealthyForSensitiveGroups" xml:space="preserve">
<value>Unhealthy for sensitive groups</value>
</data>
<data name="USAQI_VeryUnhealthy" xml:space="preserve">
<value>Very unhealthy</value>
</data>
<data name="WeatherCode_0" xml:space="preserve">
<value>Ensoleillé</value>
</data>
<data name="WeatherCode_1" xml:space="preserve">
<value>Principalement clair</value>
</data>
<data name="WeatherCode_2" xml:space="preserve">
<value>Partiellement nuageux</value>
</data>
<data name="WeatherCode_3" xml:space="preserve">
<value>Ciel couvert</value>
</data>
<data name="WeatherCode_45" xml:space="preserve">
<value>Brume</value>
</data>
<data name="WeatherCode_48" xml:space="preserve">
<value>Dépôt du brouillard givré</value>
</data>
<data name="WeatherCode_51" xml:space="preserve">
<value>Légere bruine</value>
</data>
<data name="WeatherCode_53" xml:space="preserve">
<value>Bruine modérée</value>
</data>
<data name="WeatherCode_55" xml:space="preserve">
<value>Bruine dense</value>
</data>
<data name="WeatherCode_56" xml:space="preserve">
<value>Légère bruine verglaçante</value>
</data>
<data name="WeatherCode_57" xml:space="preserve">
<value>Bruine dense de gel</value>
</data>
<data name="WeatherCode_61" xml:space="preserve">
<value>Pluies légères</value>
</data>
<data name="WeatherCode_63" xml:space="preserve">
<value>Pluies modérées</value>
</data>
<data name="WeatherCode_65" xml:space="preserve">
<value>Pluies abondantes</value>
</data>
<data name="WeatherCode_66" xml:space="preserve">
<value>Faible pluie verglaçante</value>
</data>
<data name="WeatherCode_67" xml:space="preserve">
<value>Pluie lourde de gel</value>
</data>
<data name="WeatherCode_71" xml:space="preserve">
<value>Légère chute de neige</value>
</data>
<data name="WeatherCode_73" xml:space="preserve">
<value>Modérée chute de neige</value>
</data>
<data name="WeatherCode_75" xml:space="preserve">
<value>Fortes chutes de neige</value>
</data>
<data name="WeatherCode_77" xml:space="preserve">
<value>Neige en grains</value>
</data>
<data name="WeatherCode_80" xml:space="preserve">
<value>Légères pluies</value>
</data>
<data name="WeatherCode_81" xml:space="preserve">
<value>Pluies modérées</value>
</data>
<data name="WeatherCode_82" xml:space="preserve">
<value>Averses de pluie violentes</value>
</data>
<data name="WeatherCode_85" xml:space="preserve">
<value>Légères averses de neige</value>
</data>
<data name="WeatherCode_86" xml:space="preserve">
<value>Fortes averses de neige</value>
</data>
<data name="WeatherCode_95" xml:space="preserve">
<value>Orage</value>
</data>
<data name="WeatherCode_96" xml:space="preserve">
<value>Orage avec grêle légère</value>
</data>
<data name="WeatherCode_99" xml:space="preserve">
<value>Orage avec grêle lourde</value>
</data>
<data name="WeatherCode_Unknown" xml:space="preserve">
<value>Inconnu</value>
</data>
<data name="WindDirection_East" xml:space="preserve">
<value>E</value>
</data>
<data name="WindDirection_EastNorthEast" xml:space="preserve">
<value>NNE</value>
</data>
<data name="WindDirection_EastSouthEast" xml:space="preserve">
<value>ESE</value>
</data>
<data name="WindDirection_None" xml:space="preserve">
<value>Aucune direction de vent durable</value>
</data>
<data name="WindDirection_North" xml:space="preserve">
<value>N</value>
</data>
<data name="WindDirection_NorthEast" xml:space="preserve">
<value>NE</value>
</data>
<data name="WindDirection_NorthNorthEast" xml:space="preserve">
<value>NNE</value>
</data>
<data name="WindDirection_NorthNorthWest" xml:space="preserve">
<value>NNO</value>
</data>
<data name="WindDirection_NorthWest" xml:space="preserve">
<value>NW</value>
</data>
<data name="WindDirection_Rotational" xml:space="preserve">
<value>Rotationnel</value>
</data>
<data name="WindDirection_South" xml:space="preserve">
<value>S</value>
</data>
<data name="WindDirection_SouthEast" xml:space="preserve">
<value>SE</value>
</data>
<data name="WindDirection_SouthSouthEast" xml:space="preserve">
<value>SSE</value>
</data>
<data name="WindDirection_SouthSouthWest" xml:space="preserve">
<value>SSW</value>
</data>
<data name="WindDirection_SouthWest" xml:space="preserve">
<value>SW</value>
</data>
<data name="WindDirection_West" xml:space="preserve">
<value>W</value>
</data>
<data name="WindDirection_WestNorthWest" xml:space="preserve">
<value>WNW</value>
</data>
<data name="WindDirection_WestSouthWest" xml:space="preserve">
<value>WSW</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="QWeather">
<Version>1.1.4</Version>
<Version>1.2.2</Version>
</PackageReference>
<PackageReference Include="System.Memory">
<Version>4.5.5</Version>
Expand Down
9 changes: 6 additions & 3 deletions FluentWeather.Uwp.QWeatherProvider/QWeatherProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
Expand Down Expand Up @@ -67,13 +68,15 @@ public void GetSettings()
Option.Domain = Common.Settings.QWeatherDomain;
Option.PublicId = Common.Settings.QWeatherPublicId;
var language = Common.Settings.Language;
if (language.Contains("-") && !language.Contains("zh-hant"))

if (language.Contains("-") && !language.Contains("zh-hant") && !language.Contains("zh-TW"))
{
Option.Language = language.Remove(language.IndexOf("-", StringComparison.Ordinal));
var info = new RegionInfo(language);
Option.Language = info.Name.ToLower();
}
else
{
Option.Language = language;
Option.Language = language.Replace("zh-TW","zh-hant").Replace("zh-HK", "zh-hant");
}
}

Expand Down
1 change: 1 addition & 0 deletions FluentWeather.Uwp/FluentWeather.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<PRIResource Include="Strings\fr-FR\Resources.resw" />
<PRIResource Include="Strings\ja-JP\Resources.resw" />
</ItemGroup>
<ItemGroup>
Expand Down
Loading

0 comments on commit 5c25054

Please sign in to comment.