-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ui): small fixes #1505
base: main
Are you sure you want to change the base?
fix(ui): small fixes #1505
Changes from 13 commits
ed566e7
19028d7
8ab9117
8665654
9136214
42511b1
a57f43f
d7008eb
122219e
2492b02
86410e7
e4a95ae
5c2f80f
9b687fa
8333450
26561fb
52bcaae
dcae794
25a681b
4d59f9e
e500b53
06ce3bd
5674e2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,7 @@ | |||||
"importing-wallet-copy": "Tari Universe wird automatisch neu starten, sobald dein Wallet importiert wurde", | ||||||
"invalid-seed-words": "Geben Sie 24 Wörter ein, getrennt durch Leerzeichen", | ||||||
"invalid-stats-server-port": "Ungültiger Statistik-Server-Port", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to German. The error message is in English but should be translated to German to maintain consistency with other localized strings. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "Statistik-Server-Port darf nicht leer sein", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Einladungscode", | ||||||
"is-on-orphan-chain": "Sie scheinen mit einem Fork verbunden zu sein und nicht mit der Hauptkette. Alle gewonnenen Blöcke könnten ungültig werden.", | ||||||
"last-block-added-time": "Letzte Blockzeit, die zur Kette hinzugefügt wurde", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,7 @@ | |||||
"importing-wallet-copy": "Tari Universe redémarrera automatiquement une fois que votre portefeuille aura été importé", | ||||||
"invalid-seed-words": "Entrez 24 mots séparés par des espaces", | ||||||
"invalid-stats-server-port": "Port du serveur de statistiques invalide", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to French. The error message is in English but should be translated to French to maintain consistency with other localized strings. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "Le port du serveur de statistiques ne peut pas être vide", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Code d\"invitation", | ||||||
"is-on-orphan-chain": "Vous semblez être connecté à une branche secondaire, et non à la chaîne principale. Tout bloc que vous gagnez pourrait être invalidé.", | ||||||
"last-block-added-time": "Heure du dernier bloc ajouté à la chaîne", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,7 @@ | |||||
"importing-wallet-copy": "Tari Universe akan memulai ulang secara otomatis setelah dompet Anda diimpor", | ||||||
"invalid-seed-words": "Masukkan 24 kata yang dipisahkan oleh spasi", | ||||||
"invalid-stats-server-port": "Port server statistik tidak valid", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to Indonesian. The error message is currently in English while other messages in the file are in Indonesian. This inconsistency affects the user experience for Indonesian users. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "Port server statistik tidak boleh kosong", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Kode Undangan", | ||||||
"is-on-orphan-chain": "Anda tampaknya terhubung ke cabang, bukan rantai utama. Blok yang Anda menangkan mungkin akan dibatalkan.", | ||||||
"last-block-added-time": "Waktu blok terakhir ditambahkan ke rantai", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -53,6 +53,7 @@ | |||||
"importing-wallet-copy": "Tari Universe uruchomi się ponownie automatycznie po zaimportowaniu portfela", | ||||||
"invalid-seed-words": "Wprowadź 24 słowa oddzielone spacjami", | ||||||
"invalid-stats-server-port": "Nieprawidłowy port serwera statystyk", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to Polish. The error message is currently in English while other messages in the file are in Polish. This inconsistency affects the user experience for Polish users. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "Port serwera statystyk nie może być pusty", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Kod Zaproszenia", | ||||||
"is-on-orphan-chain": "Wygląda na to, że jesteś połączony z rozwidleniem, a nie z głównym łańcuchem. Wszelkie wygrane bloki mogą zostać unieważnione.", | ||||||
"last-block-added-time": "Czas dodania ostatniego bloku do łańcucha", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,7 @@ | |||||
"importing-wallet-copy": "Tari Universe автоматически перезапустится после импорта вашего кошелька", | ||||||
"invalid-seed-words": "Введите 24 слова, разделенные пробелами", | ||||||
"invalid-stats-server-port": "Неверный порт сервера статистики", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to Russian. The error message is currently in English while other messages in the file are in Russian. This inconsistency affects the user experience for Russian users. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "Порт сервера статистики не может быть пустым", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Код приглашения", | ||||||
"is-on-orphan-chain": "Похоже, вы подключены к форку, а не к основной цепочке. Любые выигранные вами блоки могут быть аннулированы.", | ||||||
"last-block-added-time": "Время добавления последнего блока в цепь", | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,7 @@ | |||||
"importing-wallet-copy": "Cüzdanınız içe aktarıldığında Tari Universe otomatik olarak yeniden başlayacak", | ||||||
"invalid-seed-words": "Boşluklarla ayrılmış 24 kelime girin", | ||||||
"invalid-stats-server-port": "Geçersiz istatistik sunucu portu", | ||||||
"invalid-stats-server-port-empty": "Stats server port cannot be empty", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Translate the error message to Turkish. The error message is currently in English while other messages in the file are in Turkish. This inconsistency affects the user experience for Turkish users. Apply this diff to translate the message: - "invalid-stats-server-port-empty": "Stats server port cannot be empty",
+ "invalid-stats-server-port-empty": "İstatistik sunucu portu boş olamaz", 📝 Committable suggestion
Suggested change
|
||||||
"inviteCode": "Davet Kodu", | ||||||
"is-on-orphan-chain": "Bir çatal ile bağlantılı görünüyorsunuz, ana zincirle değil. Kazandığınız bloklar geçersiz kılınabilir.", | ||||||
"last-block-added-time": "Zincir zamanına eklenen son blok", | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ const P2poolMarkup = () => { | |
const [editedCustomStatsServerPort, setEditedCustomStatsServerPort] = useState(customStatsServerPort); | ||
const [isRandomStatsServerPort, setIsRandomStatsServerPort] = useState(!customStatsServerPort); | ||
const [currentStatsServerPort, setCurrentStatsServerPort] = useState(customStatsServerPort); | ||
|
||
useEffect(() => { | ||
invoke('get_used_p2pool_stats_server_port').then(setCurrentStatsServerPort).catch(console.error); | ||
}, []); | ||
|
@@ -76,6 +75,12 @@ const P2poolMarkup = () => { | |
[currentStatsServerPort, editedCustomStatsServerPort, isRandomStatsServerPort] | ||
); | ||
|
||
const errorMessage = !currentStatsServerInputPort | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nested ternary are hard to read, what about using just i18n context for example ?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooh nice, thank you @Misieq01 <3 updated! |
||
? t('invalid-stats-server-port-empty') | ||
: hasStatsServerPortError(currentStatsServerInputPort) | ||
? t('invalid-stats-server-port') | ||
: null; | ||
|
||
return ( | ||
<> | ||
<SettingsGroupWrapper> | ||
|
@@ -88,7 +93,7 @@ const P2poolMarkup = () => { | |
</Typography> | ||
</SettingsGroupTitle> | ||
</SettingsGroupContent> | ||
<SettingsGroupAction style={{ alignItems: 'center' }}> | ||
<SettingsGroupAction style={{ alignItems: 'center', minHeight: 50 }}> | ||
{isSaveButtonVisible && <Button onClick={onSave}>{t('save')}</Button>} | ||
</SettingsGroupAction> | ||
</SettingsGroup> | ||
|
@@ -108,9 +113,7 @@ const P2poolMarkup = () => { | |
setEditedCustomStatsServerPort(Number(target.value.trim())); | ||
}} | ||
/> | ||
<ErrorTypography variant="p"> | ||
{hasStatsServerPortError(currentStatsServerInputPort) && t('invalid-stats-server-port')} | ||
</ErrorTypography> | ||
<ErrorTypography variant="p">{!isRandomStatsServerPort && errorMessage}</ErrorTypography> | ||
</SettingsGroupContent> | ||
<SettingsGroupAction> | ||
<ToggleSwitch | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Translate the error message to Afrikaans.
The error message is currently in English while other messages in the file are in Afrikaans. This inconsistency affects the user experience for Afrikaans users.
Apply this diff to translate the message:
📝 Committable suggestion