From 11fe72d64baae967a0acf9992db66474c1d6ab0b Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Mon, 11 May 2015 16:23:55 +0200 Subject: [PATCH] Completing translations --- res/i18n/ts/fr_FR.ts | 41 +++++++++++++++++++++++++++++++ src/cutecoin/core/account.py | 17 ++++++++----- src/cutecoin/gui/community_tab.py | 2 +- src/cutecoin/models/wallets.py | 4 ++- 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/res/i18n/ts/fr_FR.ts b/res/i18n/ts/fr_FR.ts index c757d0cb..b7204279 100644 --- a/res/i18n/ts/fr_FR.ts +++ b/res/i18n/ts/fr_FR.ts @@ -1,6 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="fr_FR" sourcelanguage="en"> +<context> + <name>@default</name> + <message> + <location filename="../../../src/cutecoin/core/account.py" line="61"/> + <source>ud {0}</source> + <translation>du {0}</translation> + </message> + <message> + <location filename="../../../src/cutecoin/core/account.py" line="58"/> + <source>q0 {0}</source> + <translation></translation> + </message> + <message> + <location filename="../../../src/cutecoin/core/account.py" line="61"/> + <source>r0 {0}</source> + <translation></translation> + </message> +</context> <context> <name>AboutPopup</name> <message> @@ -323,6 +341,11 @@ The process to join back the community later will have to be done again.</source Envoyer une demande pour quitter la communauté ne peut être annulée. Le processus pour rejoindre la communauté devrait être refait à zéro.</translation> </message> + <message> + <location filename="../../../src/cutecoin/gui/community_tab.py" line="57"/> + <source>Web of Trust</source> + <translation>Toile de Confiance</translation> + </message> </context> <context> <name>ConfigureContactDialog</name> @@ -1628,6 +1651,24 @@ Veuillez rééssayer plus tard</translation> <translation>Nouveau portefeuille</translation> </message> </context> +<context> + <name>WalletsTableModel</name> + <message> + <location filename="../../../src/cutecoin/models/wallets.py" line="67"/> + <source>Name</source> + <translation>Nom</translation> + </message> + <message> + <location filename="../../../src/cutecoin/models/wallets.py" line="67"/> + <source>Amount</source> + <translation>Montant</translation> + </message> + <message> + <location filename="../../../src/cutecoin/models/wallets.py" line="67"/> + <source>Pubkey</source> + <translation>Clé publique</translation> + </message> +</context> <context> <name>WotTabWidget</name> <message> diff --git a/src/cutecoin/core/account.py b/src/cutecoin/core/account.py index 9a5b02da..a1df04d1 100644 --- a/src/cutecoin/core/account.py +++ b/src/cutecoin/core/account.py @@ -13,7 +13,7 @@ from ucoinpy.key import SigningKey import logging import time -from PyQt5.QtCore import QObject, pyqtSignal, QCoreApplication +from PyQt5.QtCore import QObject, pyqtSignal, QCoreApplication, QT_TR_NOOP from .wallet import Wallet from .community import Community @@ -51,12 +51,17 @@ class Account(QObject): Each account has only one key, and a key can be locally referenced by only one account. ''' - referentials = {'Units': (quantitative, '{0}', quantitative, '{0}'), - 'UD': (relative, 'ud {0}', relative, 'ud {0}'), - 'Quant Z-sum': (quantitative_zerosum, 'q0 {0}', + referentials = {'Units': (quantitative, '{0}', + quantitative, '{0}'), + 'UD': (relative, QT_TR_NOOP('ud {0}'), + relative, QT_TR_NOOP('ud {0}')), + 'Quant Z-sum': (quantitative_zerosum, + QT_TR_NOOP('q0 {0}'), quantitative, '{0}'), - 'Relat Z-sum': (relative_zerosum, 'r0 {0}', - relative, 'ud {0}') + 'Relat Z-sum': (relative_zerosum, + QT_TR_NOOP('r0 {0}'), + relative, + QT_TR_NOOP('ud {0}')) } loading_progressed = pyqtSignal(int, int) diff --git a/src/cutecoin/gui/community_tab.py b/src/cutecoin/gui/community_tab.py index 9955e6b3..0d4d42fc 100644 --- a/src/cutecoin/gui/community_tab.py +++ b/src/cutecoin/gui/community_tab.py @@ -54,7 +54,7 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget): app.monitor.persons_watcher(self.community).person_changed.connect(self.refresh_person) self.wot_tab = WotTabWidget(app, account, community, password_asker, self) - self.tabs_information.addTab(self.wot_tab, QIcon(':/icons/wot_icon'), "WoT") + self.tabs_information.addTab(self.wot_tab, QIcon(':/icons/wot_icon'), self.tr("Web of Trust")) members_action = QAction(self.tr("Members"), self) members_action.triggered.connect(self.search_members) self.button_search.addAction(members_action) diff --git a/src/cutecoin/models/wallets.py b/src/cutecoin/models/wallets.py index 493a8418..efb0a247 100644 --- a/src/cutecoin/models/wallets.py +++ b/src/cutecoin/models/wallets.py @@ -64,7 +64,9 @@ class WalletsTableModel(QAbstractTableModel): super().__init__(parent) self.account = account self.community = community - self.columns_headers = ('Name', 'Amount', 'Pubkey') + self.columns_headers = (self.tr('Name'), + self.tr('Amount'), + self.tr('Pubkey')) self.columns_types = ('name', 'amount', 'pubkey') @property -- GitLab