-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added locale utils * feat: localisation for jsx components * chore: lint * chore: tests fix for localisation and lint * feat: added french translation * chore: lint + prettier * chore: handle comments * chore: lint + prettier * chore: fix tests * chore: lint + prettier * chore: fix comment and added RULES.md * chore: fix comments
- Loading branch information
Showing
27 changed files
with
624 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Rules for Adding New Fields to the Language File | ||
|
||
1. **Key Naming Convention:** | ||
|
||
- Use **English text** to derive the key. | ||
- The key should be **camelized** (first word lowercase, subsequent words capitalized). | ||
- Keep the key to **no more than 5 words**. | ||
- If the text in English is **shorter than 5 words**, camelize the entire phrase. | ||
- For **longer text**, use a **concise and meaningful key** (this is a soft constraint). | ||
|
||
2. **Dynamic Text Placeholders:** | ||
|
||
- Use `{1}`, `{2}`, etc., for dynamic placeholders in messages. | ||
- Example: | ||
- `"visitCompanionDappAndUpgrade": { "message": "Visit the [companion dapp for Starknet]({1}) and click “Upgrade”.\nThank you!" }` | ||
- Usage: `translate("visitCompanionDappAndUpgrade", "https://website.com")` | ||
|
||
3. **Consistency:** | ||
- Ensure key names are meaningful and reflect the message context. | ||
- Avoid over-complicating keys; aim for clarity and simplicity. | ||
|
||
--- | ||
|
||
These guidelines will ensure consistency and clarity when adding new fields to the language file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
{ | ||
"locale": "en", | ||
"messages": { | ||
"accountDeploymentMandatory": { | ||
"message": "Account Deployment Mandatory!" | ||
}, | ||
"accountDeploymentNotice": { | ||
"message": "The account will be deployed with this transaction." | ||
}, | ||
"accountManagementIntro": { | ||
"message": "To manage your Starknet account and send and receive funds, visit the" | ||
}, | ||
"accountManagementReminder": { | ||
"message": "As usual, to manage your Starknet account and send and receive funds, visit the" | ||
}, | ||
"accountUpgradeMandatory": { | ||
"message": "Account Upgrade Mandatory!" | ||
}, | ||
"addTokenPrompt": { | ||
"message": "Do you want to add this token?" | ||
}, | ||
"address": { | ||
"message": "Address" | ||
}, | ||
"amount": { | ||
"message": "Amount" | ||
}, | ||
"amountWithSymbol": { | ||
"message": "Amount ({1})" | ||
}, | ||
"balance": { | ||
"message": "Balance" | ||
}, | ||
"baseUrl": { | ||
"message": "Base URL" | ||
}, | ||
"callData": { | ||
"message": "Call Data" | ||
}, | ||
"call": { | ||
"message": "Call" | ||
}, | ||
"chainId": { | ||
"message": "Chain ID" | ||
}, | ||
"chainName": { | ||
"message": "Chain Name" | ||
}, | ||
"classHash": { | ||
"message": "Class Hash" | ||
}, | ||
"companionDapp": { | ||
"message": "companion dapp for Starknet" | ||
}, | ||
"compiledClassHash": { | ||
"message": "Compiled Class Hash" | ||
}, | ||
"confirmPrivateKeyToDisplay": { | ||
"message": "Confirming this action will display your private key. Ensure you are in a secure environment." | ||
}, | ||
"contract": { | ||
"message": "Contract" | ||
}, | ||
"decimals": { | ||
"message": "Decimals" | ||
}, | ||
"declareTransactionDetails": { | ||
"message": "Declare Transaction Details" | ||
}, | ||
"estimatedGasFee": { | ||
"message": "Estimated Gas Fee" | ||
}, | ||
"explorerUrl": { | ||
"message": "Explorer URL" | ||
}, | ||
"message": { | ||
"message": "Message" | ||
}, | ||
"maxFeeETH": { | ||
"message": "Max Fee (ETH)" | ||
}, | ||
"name": { | ||
"message": "Name" | ||
}, | ||
"network": { | ||
"message": "Network" | ||
}, | ||
"networkFee": { | ||
"message": "network fee" | ||
}, | ||
"recipientAddress": { | ||
"message": "Recipient Address" | ||
}, | ||
"recipient": { | ||
"message": "Recipient" | ||
}, | ||
"rpcUrl": { | ||
"message": "RPC URL" | ||
}, | ||
"senderAddress": { | ||
"message": "Sender Address" | ||
}, | ||
"signMessagePrompt": { | ||
"message": "Do you want to sign this message?" | ||
}, | ||
"signTransactionPrompt": { | ||
"message": "Do you want to sign this transaction?" | ||
}, | ||
"signerAddress": { | ||
"message": "Signer Address" | ||
}, | ||
"signer": { | ||
"message": "Signer" | ||
}, | ||
"snapIsUpToDate": { | ||
"message": "Your Starknet Snap is now up-to-date!" | ||
}, | ||
"starknetPrivateKeyConfidential": { | ||
"message": "Below is your Starknet Account private key. Keep it confidential." | ||
}, | ||
"starknetPrivateKey": { | ||
"message": "Starknet Account Private Key" | ||
}, | ||
"switchNetworkPrompt": { | ||
"message": "Do you want to switch to this network?" | ||
}, | ||
"symbol": { | ||
"message": "Symbol" | ||
}, | ||
"token": { | ||
"message": "Token" | ||
}, | ||
"totalFor": { | ||
"message": "Total for" | ||
}, | ||
"transaction": { | ||
"message": "Transaction" | ||
}, | ||
"transactions": { | ||
"message": "Transactions" | ||
}, | ||
"visitCompanionDappHomePage": { | ||
"message": "Visit the [companion dapp for Starknet]({1}) to manage your account." | ||
}, | ||
"visitCompanionDappAndDeploy": { | ||
"message": "Visit the [companion dapp for Starknet]({1}) to deploy your account.\nThank you!" | ||
}, | ||
"visitCompanionDappAndUpgrade": { | ||
"message": "Visit the [companion dapp for Starknet]({1}) and click “Upgrade”.\nThank you!" | ||
}, | ||
"walletIsCompatible": { | ||
"message": "Your MetaMask wallet is now compatible with Starknet!" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
{ | ||
"locale": "fr", | ||
"messages": { | ||
"accountDeploymentMandatory": { | ||
"message": "Déploiement du compte obligatoire !" | ||
}, | ||
"accountDeploymentNotice": { | ||
"message": "Le compte sera déployé avec cette transaction." | ||
}, | ||
"accountManagementIntro": { | ||
"message": "Pour gérer votre compte Starknet et envoyer ou recevoir des fonds, accédez à cette page" | ||
}, | ||
"accountManagementReminder": { | ||
"message": "Comme d'habitude, pour gérer votre compte Starknet et envoyer ou recevoir des fonds, accédez à cette page" | ||
}, | ||
"accountUpgradeMandatory": { | ||
"message": "Mise à niveau du compte obligatoire !" | ||
}, | ||
"addTokenPrompt": { | ||
"message": "Voulez-vous ajouter ce token ?" | ||
}, | ||
"address": { | ||
"message": "Adresse" | ||
}, | ||
"amount": { | ||
"message": "Montant" | ||
}, | ||
"amountWithSymbol": { | ||
"message": "Montant ({1})" | ||
}, | ||
"balance": { | ||
"message": "Solde" | ||
}, | ||
"baseUrl": { | ||
"message": "URL de base" | ||
}, | ||
"callData": { | ||
"message": "Données d'appel" | ||
}, | ||
"call": { | ||
"message": "Appel" | ||
}, | ||
"chainId": { | ||
"message": "ID de la chaîne" | ||
}, | ||
"chainName": { | ||
"message": "Nom de la chaîne" | ||
}, | ||
"classHash": { | ||
"message": "Hash de la classe" | ||
}, | ||
"companionDapp": { | ||
"message": "dapp compagnon pour Starknet" | ||
}, | ||
"compiledClassHash": { | ||
"message": "Hash de la classe compilée" | ||
}, | ||
"confirmPrivateKeyToDisplay": { | ||
"message": "Confirmer cette action affichera votre clé privée. Assurez-vous d'être dans un environnement sécurisé." | ||
}, | ||
"contract": { | ||
"message": "Contrat" | ||
}, | ||
"decimals": { | ||
"message": "Décimales" | ||
}, | ||
"declareTransactionDetails": { | ||
"message": "Détails de la transaction à déclarer" | ||
}, | ||
"estimatedGasFee": { | ||
"message": "Frais de gaz estimés" | ||
}, | ||
"explorerUrl": { | ||
"message": "URL de l'explorateur" | ||
}, | ||
"message": { | ||
"message": "Message" | ||
}, | ||
"maxFeeETH": { | ||
"message": "Frais max (ETH)" | ||
}, | ||
"name": { | ||
"message": "Nom" | ||
}, | ||
"network": { | ||
"message": "Réseau" | ||
}, | ||
"networkFee": { | ||
"message": "frais de réseau" | ||
}, | ||
"recipientAddress": { | ||
"message": "Adresse du destinataire" | ||
}, | ||
"recipient": { | ||
"message": "Destinataire" | ||
}, | ||
"rpcUrl": { | ||
"message": "URL RPC" | ||
}, | ||
"senderAddress": { | ||
"message": "Adresse de l'expéditeur" | ||
}, | ||
"signMessagePrompt": { | ||
"message": "Voulez-vous signer ce message ?" | ||
}, | ||
"signTransactionPrompt": { | ||
"message": "Voulez-vous signer cette transaction ?" | ||
}, | ||
"signerAddress": { | ||
"message": "Adresse du signataire" | ||
}, | ||
"signer": { | ||
"message": "Signataire" | ||
}, | ||
"snapIsUpToDate": { | ||
"message": "Votre Starknet Snap est maintenant à jour !" | ||
}, | ||
"starknetPrivateKeyConfidential": { | ||
"message": "Voici la clé privée de votre compte Starknet. Gardez-la confidentielle." | ||
}, | ||
"starknetPrivateKey": { | ||
"message": "Clé privée du compte Starknet" | ||
}, | ||
"switchNetworkPrompt": { | ||
"message": "Voulez-vous changer pour ce réseau ?" | ||
}, | ||
"symbol": { | ||
"message": "Symbole" | ||
}, | ||
"token": { | ||
"message": "Token" | ||
}, | ||
"totalFor": { | ||
"message": "Total pour" | ||
}, | ||
"transaction": { | ||
"message": "Transaction" | ||
}, | ||
"transactions": { | ||
"message": "Transactions" | ||
}, | ||
"visitCompanionDappHomePage": { | ||
"message": "Visitez la [dapp compagnon pour Starknet]({1}) pour gérer votre compte." | ||
}, | ||
"visitCompanionDappAndDeploy": { | ||
"message": "Visitez la [dapp compagnon pour Starknet]({1}) pour déployer votre compte.\nMerci !" | ||
}, | ||
"visitCompanionDappAndUpgrade": { | ||
"message": "Visitez la [dapp compagnon pour Starknet]({1}) et cliquez sur “Upgrade”.\nMerci !" | ||
}, | ||
"walletIsCompatible": { | ||
"message": "Votre portefeuille MetaMask est désormais compatible avec Starknet !" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.