feat(storage): XDG-compliant paths and default language English

AppPaths: use Environment.SpecialFolder.ApplicationData for all platforms
  - Windows  → %APPDATA%\PalladiumWallet  (unchanged)
  - Linux    → ~/.config/PalladiumWallet  (XDG standard, was ~/.palladium-wallet)
  - macOS    → ~/Library/Application Support/PalladiumWallet

AppConfig: change default language from "it" to "en" for new installs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 18:41:47 +02:00
parent 71a604c8a5
commit 8ab8bbd8b3
2 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ namespace PalladiumWallet.Core.Storage;
/// </summary> /// </summary>
public sealed class AppConfig public sealed class AppConfig
{ {
/// <summary>Codice lingua UI ("it", "en").</summary> /// <summary>Codice lingua UI.</summary>
public string Language { get; set; } = "it"; public string Language { get; set; } = "en";
/// <summary>Unità di visualizzazione degli importi (vedi <see cref="Wallet.CoinAmount.Units"/>).</summary> /// <summary>Unità di visualizzazione degli importi (vedi <see cref="Wallet.CoinAmount.Units"/>).</summary>
public string Unit { get; set; } = "PLM"; public string Unit { get; set; } = "PLM";
+6 -3
View File
@@ -18,9 +18,12 @@ public static class AppPaths
if (Directory.Exists(portable)) if (Directory.Exists(portable))
return portable; return portable;
return OperatingSystem.IsWindows() // Windows → %APPDATA%\PalladiumWallet
? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PalladiumWallet") // Linux → $XDG_CONFIG_HOME/PalladiumWallet (default ~/.config/PalladiumWallet)
: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".palladium-wallet"); // macOS → ~/Library/Application Support/PalladiumWallet
return Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"PalladiumWallet");
} }
/// <summary>Cartella dati della rete (config, wallet, header, certificati).</summary> /// <summary>Cartella dati della rete (config, wallet, header, certificati).</summary>