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,7 +17,7 @@ public class AddressDerivationTests
[Fact]
public void Il_vettore_bip44_produce_lo_stesso_hash_su_bitcoin_e_plm()
{
// Indirizzo noto di abandon-about su m/44'/0'/0'/0/0 (riferimento pubblico).
// Known abandon-about address at m/44'/0'/0'/0/0 (public reference).
var account = HdAccount.FromSeed(AbandonAboutSeed(), ScriptKind.Legacy,
ChainProfiles.Mainnet, new KeyPath("44'/0'/0'"));
var pubKey = account.GetPublicKey(isChange: false, 0);
@@ -27,8 +27,8 @@ public class AddressDerivationTests
var plmAddr = account.GetReceiveAddress(0);
Assert.StartsWith("P", plmAddr.ToString());
// Stesso hash160 sotto i due prefissi: la derivazione è identica,
// cambia solo la veste di rete.
// Same hash160 under the two prefixes: the derivation is identical,
// only the network dress changes.
Assert.Equal(pubKey.Hash, ((BitcoinPubKeyAddress)plmAddr).Hash);
}
@@ -5,9 +5,9 @@ using PalladiumWallet.Core.Crypto;
namespace PalladiumWallet.Tests.Crypto;
/// <summary>
/// Vettore di test 1 della specifica BIP32 (seed 000102...0e0f). Gli header
/// Legacy della mainnet PLM coincidono con quelli Bitcoin, quindi il confronto
/// con le stringhe della specifica è diretto sulla rete PLM.
/// BIP32 specification test vector 1 (seed 000102...0e0f). The Legacy headers
/// of the PLM mainnet coincide with the Bitcoin ones, so the comparison
/// with the specification strings is direct on the PLM network.
/// </summary>
public class Bip32Tests
{
@@ -40,7 +40,7 @@ public class Bip32Tests
[Fact]
public void I_path_hardened_non_sono_derivabili_da_una_xpub()
{
// Garanzia §17: da sole chiavi pubbliche niente derivazione hardened.
// §17 guarantee: from public keys alone, no hardened derivation.
Assert.ThrowsAny<InvalidOperationException>(() =>
Root.Neuter().Derive(new KeyPath("0'")));
}
@@ -4,7 +4,7 @@ namespace PalladiumWallet.Tests.Crypto;
public class Bip39Tests
{
// Vettori ufficiali Trezor (python-mnemonic/vectors.json), passphrase "TREZOR".
// Official Trezor vectors (python-mnemonic/vectors.json), passphrase "TREZOR".
[Theory]
[InlineData(
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
@@ -30,8 +30,8 @@ public class Bip39Tests
[Fact]
public void Il_vettore_giapponese_copre_la_normalizzazione_nfkd()
{
// Vettore ufficiale bip32JP (test_JP_BIP39.json[0]): mnemonica con spazi
// ideografici U+3000 e passphrase con caratteri da normalizzare NFKD.
// Official bip32JP vector (test_JP_BIP39.json[0]): mnemonic with U+3000
// ideographic spaces and a passphrase with characters to normalize NFKD.
const string words =
"あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あいこくしん あおぞら";
const string passphrase = "㍍ガバヴァぱばぐゞちぢ十人十色";
@@ -55,8 +55,8 @@ public class Bip39Tests
[Fact]
public void Checksum_invalido_viene_rifiutato()
{
// 12 × "abandon": parole valide ma checksum errato — il caso che il
// costruttore NBitcoin non controlla da solo.
// 12 × "abandon": valid words but wrong checksum — the case that the
// NBitcoin constructor does not check on its own.
var words = string.Join(' ', Enumerable.Repeat("abandon", 12));
Assert.False(Bip39.TryParse(words, out _));
}
@@ -5,12 +5,12 @@ using PalladiumWallet.Core.Crypto;
namespace PalladiumWallet.Tests.Crypto;
/// <summary>
/// Vettore di test della specifica BIP84 (mnemonica abandon-about, senza
/// passphrase). Gli header SLIP-132 della mainnet PLM coincidono con quelli
/// Bitcoin, quindi zprv/zpub si confrontano direttamente; gli indirizzi si
/// confrontano sul witness program (chain-independent) + prefisso PLM.
/// Il path m/84'/0'/0' è volutamente "personalizzato" (coin type 0, non 746):
/// esercita anche l'import con path custom (§4.2).
/// BIP84 specification test vector (abandon-about mnemonic, without
/// passphrase). The SLIP-132 headers of the PLM mainnet coincide with the
/// Bitcoin ones, so zprv/zpub are compared directly; addresses are
/// compared on the witness program (chain-independent) + PLM prefix.
/// The path m/84'/0'/0' is deliberately "customized" (coin type 0, not 746):
/// it also exercises the import with a custom path (§4.2).
/// </summary>
public class Bip84Slip132Tests
{
@@ -64,12 +64,12 @@ public class Bip84Slip132Tests
[Fact]
public void Una_xkey_con_header_sconosciuto_viene_rifiutata()
{
// xpub Bitcoin valida ma con header Legacy: non è una zpub.
// Valid Bitcoin xpub but with Legacy header: it is not a zpub.
var account = Account();
var asXpub = account.AccountXpub.ToString(Network.Main);
Assert.True(Slip132.TryDecodePublic(asXpub, ChainProfiles.Mainnet, out _, out var kind));
Assert.Equal(ScriptKind.Legacy, kind); // header xpub → riconosciuto come Legacy
Assert.Equal(ScriptKind.Legacy, kind); // xpub header → recognized as Legacy
Assert.False(Slip132.TryDecodePublic("non-base58!!!", ChainProfiles.Mainnet, out _, out _));
Assert.False(Slip132.TryDecodePrivate(asXpub, ChainProfiles.Mainnet, out _, out _)); // pub ≠ priv
}
@@ -88,8 +88,8 @@ public class Bip84Slip132Tests
if (expectedPubKeyHex is not null)
Assert.Equal(expectedPubKeyHex, pubKey.ToHex());
// Il witness program (hash160 della pubkey) è chain-independent: deve
// coincidere con quello dell'indirizzo bc1 del vettore ufficiale.
// The witness program (hash160 of the pubkey) is chain-independent: it must
// coincide with that of the bc1 address from the official vector.
var bitcoinExpected = (BitcoinWitPubKeyAddress)BitcoinAddress.Create(bitcoinAddress, Network.Main);
Assert.Equal(bitcoinExpected.Hash, pubKey.WitHash);
@@ -5,11 +5,11 @@ using PalladiumWallet.Core.Crypto;
namespace PalladiumWallet.Tests.Crypto;
/// <summary>
/// Vettori di test BIP86 (mnemonica abandon-about, senza passphrase).
/// La chiave pubblica tweakizzata (output key, 32 byte x-only) è chain-independent:
/// viene verificata contro i vettori ufficiali Bitcoin, poi si controlla che
/// l'indirizzo PLM abbia il prefisso plm1p (witness v1, bech32m).
/// Il path m/86'/0'/0' usa coin_type=0 (non 746) per aderire ai vettori BIP86.
/// BIP86 test vectors (abandon-about mnemonic, no passphrase).
/// The tweaked public key (output key, 32-byte x-only) is chain-independent:
/// verified against the official Bitcoin vectors, then checked that the PLM
/// address starts with plm1p (witness v1, bech32m).
/// The path m/86'/0'/0' uses coin_type=0 (not 746) to match the BIP86 vectors.
/// </summary>
public class Bip86TaprootTests
{
@@ -46,9 +46,9 @@ public class Bip86TaprootTests
}
/// <summary>
/// L'output key (chiave tweakizzata x-only, 32 byte) è identica al vettore BIP86
/// indipendentemente dalla rete: la rete cambia solo HRP e checksum, non il programma.
/// Indirizzi Bitcoin da https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki
/// The output key (tweaked x-only pubkey, 32 bytes) matches the BIP86 vector
/// regardless of network: the network changes only HRP and checksum, not the program.
/// Bitcoin addresses from https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki
/// </summary>
[Theory]
[InlineData(false, 0, "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr")]
@@ -60,7 +60,7 @@ public class Bip86TaprootTests
var account = Account();
var plmAddr = account.GetAddress(isChange, index);
// Il witness program (output key tweakizzata) è chain-independent
// The witness program (tweaked output key) is chain-independent.
var btcAddr = (TaprootAddress)BitcoinAddress.Create(bitcoinAddress, Network.Main);
var plmTaproot = (TaprootAddress)plmAddr;
Assert.Equal(btcAddr.PubKey, plmTaproot.PubKey);