Skip to content
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

Feature/improved translations #4

Merged
merged 20 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/egui/popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl<'panel> PopupPanel<'panel> {

ui.add_space(8.);
ui.vertical_centered(|ui| {
if ui.medium_button("Close").clicked() {
if ui.medium_button(i18n("Close")).clicked() {
close_popup = true;
}
});
Expand Down
2 changes: 1 addition & 1 deletion core/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn close_maximize_minimize(ui: &mut egui::Ui, is_fullscreen: bool, is_maximized:
RichText::new(X.to_string()).size(button_height),
))
// .add(Button::new(RichText::new("❌").size(button_height)))
.on_hover_text("Close the window");
.on_hover_text(i18n("Close the window"));
if close_response.clicked() {
ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close);
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/donations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl ModuleT for Donations {

ui.add_space(8.);

ui.label(i18n("The Kaspa NG software represents an ongoing effort focused on building a state-of-the-art software platform dedicated to the Kaspa BlockDAG cryptocurrency network. Ideological at its core, this software has a strong focus on security, privacy, performance, and decentralization."));
ui.label(i18n("The Kaspa NG software represents an ongoing effort focused on building a state-of-the-art software platform dedicated to the Kaspa BlockDAG cryptocurrency network. Ideological at its core, this software prioritizes security, privacy, performance, and decentralization."));
ui.label(" ");
ui.label(i18n("Because of its focus on security and performance, this software is entirely developed in Rust, demanding significantly more time and effort compared to other traditional modern web-driven software."));
ui.label(" ");
Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl ModuleT for Metrics {
})
.with_min_width(240.)
.with_max_height(screen_rect_height * 0.8)
.with_caption("Settings")
.with_caption(i18n("Settings"))
.with_close_button(true)
.build(ui);

Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl ModuleT for Request {

})
.with_footer(|_ctx, ui| {
if ui.large_button("Close").clicked() {
if ui.large_button(i18n("Close")).clicked() {
*close.borrow_mut() = true;
}
})
Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl ModuleT for Scanner {
ui.label(i18n("The node is currently syncing with the Kaspa p2p network. Please wait for the node to sync."));
ui.add_space(16.);

if ui.large_button("Close").clicked() {
if ui.large_button(i18n("Close")).clicked() {
*back.borrow_mut() = true;
}

Expand Down
8 changes: 4 additions & 4 deletions core/src/modules/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ impl Settings {

let mut node_settings_error = None;

CollapsingHeader::new("Kaspa p2p Network & Node Connection")
CollapsingHeader::new(i18n("Kaspa p2p Network & Node Connection"))
.default_open(true)
.show(ui, |ui| {


CollapsingHeader::new("Kaspa Network")
CollapsingHeader::new(i18n("Kaspa Network"))
.default_open(true)
.show(ui, |ui| {
ui.horizontal_wrapped(|ui|{
Expand All @@ -168,7 +168,7 @@ impl Settings {
});


CollapsingHeader::new("Kaspa Node")
CollapsingHeader::new(i18n("Kaspa Node"))
.default_open(true)
.show(ui, |ui| {
ui.horizontal_wrapped(|ui|{
Expand Down Expand Up @@ -218,7 +218,7 @@ impl Settings {
#[cfg(not(target_arch = "wasm32"))]
if self.settings.node.node_kind.is_config_capable() {

CollapsingHeader::new("Cache Memory Size")
CollapsingHeader::new(i18n("Cache Memory Size"))
.default_open(true)
.show(ui, |ui| {
ui.horizontal_wrapped(|ui|{
Expand Down
2 changes: 1 addition & 1 deletion core/src/modules/wallet_secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl ModuleT for WalletSecret {
ui.label(i18n("This feature requires an open wallet"));
})
.with_footer(|_,ui| {
if ui.large_button("Close").clicked() {
if ui.large_button(i18n("Close")).clicked() {
*back.borrow_mut() = true;
}
})
Expand Down
10 changes: 5 additions & 5 deletions core/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ pub enum Network {
impl std::fmt::Display for Network {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Network::Mainnet => write!(f, "mainnet"),
Network::Testnet10 => write!(f, "testnet-10"),
Network::Testnet11 => write!(f, "testnet-11"),
Network::Mainnet => write!(f, "{}", Network::Mainnet.name()),
Network::Testnet10 => write!(f, "{}", Network::Testnet10.name()),
Network::Testnet11 => write!(f, "{}", Network::Testnet11.name()),
}
}
}
Expand Down Expand Up @@ -130,8 +130,8 @@ impl Network {
pub fn name(&self) -> &str {
match self {
Network::Mainnet => i18n("Mainnet"),
Network::Testnet10 => i18n("Testnet-10"),
Network::Testnet11 => i18n("Testnet-11"),
Network::Testnet10 => i18n("Testnet 10"),
Network::Testnet11 => i18n("Testnet 11"),
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl<'core> Status<'core> {
if ui
.add(
Label::new(RichText::new(i18n(
"Click to try an another server...",
"Click to try another server...",
)))
.sense(Sense::click()),
)
Expand Down
Loading
Loading