docs: translate all code comments to English (language policy)

Translate every Italian /// XML doc comment, <!-- --> XAML comment, and
// inline comment to English across all source files (Core, App, tests).
Add the language policy to CLAUDE.md (conversation Italian; all code
and docs English). Update one test assertion that checked an Italian
exception message that was also translated.
This commit is contained in:
2026-06-16 14:40:06 +02:00
parent 4b82a0852c
commit 3d5a226a5a
59 changed files with 721 additions and 716 deletions
+17 -17
View File
@@ -4,25 +4,25 @@ using PalladiumWallet.Core.Chain;
namespace PalladiumWallet.Core.Crypto;
/// <summary>
/// Costruzione dei derivation path BIP44/49/84 (blueprint §4.2) e mappatura
/// ScriptKind → purpose / ScriptPubKeyType. I purpose sono costanti di protocollo
/// BIP (chain-independent); il coin_type viene sempre dal ChainProfile.
/// BIP44/49/84 derivation path construction (blueprint §4.2) and mapping of
/// ScriptKind → purpose / ScriptPubKeyType. Purposes are BIP protocol constants
/// (chain-independent); coin_type always comes from the ChainProfile.
/// </summary>
public static class DerivationPaths
{
/// <summary>Purpose BIP44 (P2PKH legacy).</summary>
/// <summary>BIP44 purpose (P2PKH legacy).</summary>
public const int PurposeLegacy = 44;
/// <summary>Purpose BIP49 (P2SH-P2WPKH).</summary>
/// <summary>BIP49 purpose (P2SH-P2WPKH).</summary>
public const int PurposeWrappedSegwit = 49;
/// <summary>Purpose BIP84 (P2WPKH nativo).</summary>
/// <summary>BIP84 purpose (native P2WPKH).</summary>
public const int PurposeNativeSegwit = 84;
/// <summary>Purpose BIP48 (multisig — fase successiva, §16 passo 8).</summary>
/// <summary>BIP48 purpose (multisig — next phase, §16 step 8).</summary>
public const int PurposeMultisig = 48;
/// <summary>Purpose BIP86 (P2TR key-path, Taproot).</summary>
/// <summary>BIP86 purpose (P2TR key-path, Taproot).</summary>
public const int PurposeTaproot = 86;
public static int PurposeFor(ScriptKind kind) => kind switch
@@ -36,9 +36,9 @@ public static class DerivationPaths
};
/// <summary>
/// Tipo di scriptPubKey NBitcoin per la derivazione da pubkey singola.
/// I tipi multisig derivano da redeem script, non da una pubkey: arriveranno
/// con i wallet M-di-N (§4.5).
/// NBitcoin scriptPubKey type for single-pubkey derivation.
/// Multisig types are derived from a redeem script, not a pubkey — they will
/// arrive with M-of-N wallet support (§4.5).
/// </summary>
public static ScriptPubKeyType ScriptPubKeyTypeFor(ScriptKind kind) => kind switch
{
@@ -48,13 +48,13 @@ public static class DerivationPaths
ScriptKind.Taproot => ScriptPubKeyType.TaprootBIP86,
ScriptKind.WrappedSegwitMultisig or ScriptKind.NativeSegwitMultisig =>
throw new NotSupportedException(
"I tipi multisig derivano da redeem script: supporto previsto con i wallet M-di-N (§4.5)."),
"Multisig types are derived from a redeem script: support planned with M-of-N wallets (§4.5)."),
_ => throw new ArgumentOutOfRangeException(nameof(kind)),
};
/// <summary>
/// Path di account relativo alla root: purpose'/coin'/account' (§4.2).
/// Il coin_type è quello del profilo (746 mainnet, 1 testnet).
/// Account path relative to the root: purpose'/coin'/account' (§4.2).
/// coin_type is taken from the profile (746 mainnet, 1 testnet).
/// </summary>
public static KeyPath AccountPath(ScriptKind kind, ChainProfile profile, int account = 0)
{
@@ -64,7 +64,7 @@ public static class DerivationPaths
$"{PurposeFor(kind)}'/{profile.Bip44CoinType}'/{account}'");
}
/// <summary>Sottopath non-hardened change/index sotto l'account (change=0 receiving, change=1 change).</summary>
/// <summary>Non-hardened change/index sub-path under the account (change=0 receiving, change=1 change).</summary>
public static KeyPath AddressSubPath(bool isChange, int index)
{
if (index < 0)
@@ -73,8 +73,8 @@ public static class DerivationPaths
}
/// <summary>
/// Parsing di derivation path personalizzati in import (Sparrow-like, §4.2):
/// accetta il prefisso "m/" opzionale e gli hardened marker ' oppure h.
/// Parsing of custom derivation paths on import (Sparrow-like, §4.2):
/// accepts the optional "m/" prefix and hardened markers ' or h.
/// </summary>
public static bool TryParse(string path, out KeyPath? keyPath)
{