Skip to content

Commit

Permalink
Missing Language setting
Browse files Browse the repository at this point in the history
  • Loading branch information
JW-CH committed Apr 14, 2024
1 parent 57a8259 commit 792d98a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
3 changes: 3 additions & 0 deletions ImmichFrame/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<setting name="WeatherApiKey" serializeAs="String">
<value />
</setting>
<setting name="Language" serializeAs="String">
<value>en</value>
</setting>
</ImmichFrame.Properties.Settings>
</userSettings>
</configuration>
2 changes: 0 additions & 2 deletions ImmichFrame/Helpers/WeatherHelper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using ImmichFrame.Models;
using OpenWeatherMap;
using OpenWeatherMap.Models;
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace ImmichFrame.Helpers
Expand Down
37 changes: 19 additions & 18 deletions ImmichFrame/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,25 @@ public void Serialize()
// settings
var defaultSettings = Properties.Settings.Default;

defaultSettings.ImmichServerUrl = this.ImmichServerUrl;
defaultSettings.ApiKey = this.ApiKey;
defaultSettings.Interval = this.Interval;
defaultSettings.DownloadImages = this.DownloadImages;
defaultSettings.ShowMemories = this.ShowMemories;
defaultSettings.RenewImagesDuration = this.RenewImagesDuration;
defaultSettings.ShowClock = this.ShowClock;
defaultSettings.ClockFontSize = this.ClockFontSize;
defaultSettings.ClockFormat = this.ClockFormat;
defaultSettings.ShowPhotoDate = this.ShowPhotoDate;
defaultSettings.PhotoDateFontSize = this.PhotoDateFontSize;
defaultSettings.PhotoDateFormat = this.PhotoDateFormat;
defaultSettings.ShowImageDesc = this.ShowImageDesc;
defaultSettings.ImageDescFontSize = this.ImageDescFontSize;
defaultSettings.WeatherFontSize = this.WeatherFontSize;
defaultSettings.UnitSystem = this.UnitSystem?.ToString() ?? OpenWeatherMap.UnitSystem.Imperial;
defaultSettings.WeatherLatLong = this.WeatherLatLong;
defaultSettings.WeatherApiKey = this.WeatherApiKey;
defaultSettings.ImmichServerUrl = this.ImmichServerUrl;
defaultSettings.ApiKey = this.ApiKey;
defaultSettings.Interval = this.Interval;
defaultSettings.DownloadImages = this.DownloadImages;
defaultSettings.ShowMemories = this.ShowMemories;
defaultSettings.RenewImagesDuration = this.RenewImagesDuration;
defaultSettings.ShowClock = this.ShowClock;
defaultSettings.ClockFontSize = this.ClockFontSize;
defaultSettings.ClockFormat = this.ClockFormat;
defaultSettings.ShowPhotoDate = this.ShowPhotoDate;
defaultSettings.PhotoDateFontSize = this.PhotoDateFontSize;
defaultSettings.PhotoDateFormat = this.PhotoDateFormat;
defaultSettings.ShowImageDesc = this.ShowImageDesc;
defaultSettings.ImageDescFontSize = this.ImageDescFontSize;
defaultSettings.WeatherFontSize = this.WeatherFontSize;
defaultSettings.UnitSystem = this.UnitSystem?.ToString() ?? OpenWeatherMap.UnitSystem.Imperial;
defaultSettings.WeatherLatLong = this.WeatherLatLong;
defaultSettings.WeatherApiKey = this.WeatherApiKey;
defaultSettings.Language = this.Language;

var albums = new StringCollection();
if (this.Albums?.Any() ?? false)
Expand Down
12 changes: 12 additions & 0 deletions ImmichFrame/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ImmichFrame/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
<Setting Name="WeatherApiKey" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Language" Type="System.String" Scope="User">
<Value Profile="(Default)">en</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 792d98a

Please sign in to comment.