Skip to content

Conversation

@furszy
Copy link
Member

@furszy furszy commented Jul 21, 2022

Simple, and not interesting, refactor that someone has to do sooner or later. We are translating some init arguments names when those shouldn't be translated.

@hebasto
Copy link
Member

hebasto commented Jul 21, 2022

Also #20404.

@furszy
Copy link
Member Author

furszy commented Jul 21, 2022

hmm k thanks @hebasto, I do agree with laanwj there. Some contextual information wouldn't be bad for this.
We could change a bit the error description by adding something like "invalid init argument value for %s bla bla" so translators can infer what will be placed in %s better.

Saying that, I'm good with any approach here. Pushed it merely because found it while was working on other things in the wallet.

Also, I would keep this PR scoped to the wallet module only (same as someone could tackle other points of #20404 scoped to other area of the sources), mainly to not end up conflicting with many PRs.
Otherwise, the rebase work burden would be, by far, bigger than what it costed to do this tiny changes.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 21, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK ryanofsky, achow101, MarcoFalke
Concept ACK hebasto

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message should probably be deduplicated to one location.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably we should first move all the init args reads and validations to a separate file (wallet_init.cpp or something similar). Then cleanup all the string messages at once. So we don't continue mixing init stuff with wallet's internals.

@jarolrod
Copy link
Contributor

concept ack, needs rebase

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 5fb8b862f455190dede1253dfd36cec7df14a7a8

There was some concern in #20404 (comment) that this change could lead to more questions from translators. But this PR is more limited than #20404, so this should be an easier place to start. Also it should be possible to provide context to translators through comments, and discussion in #20404 seems not to acknowledge benefits of the change for preventing translation errors.

@furszy furszy force-pushed the 2022_refactor_do_not_translate_init_flags branch from 5fb8b86 to e43a547 Compare October 6, 2022 21:14
@furszy
Copy link
Member Author

furszy commented Oct 6, 2022

great to see some movement here, rebased.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK e43a547. Just rebased since last review.

@fanquake fanquake requested a review from hebasto October 13, 2022 03:01
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@achow101
Copy link
Member

ACK e43a547

@maflcko
Copy link
Member

maflcko commented Mar 18, 2023

lgtm ACK e43a547

@fanquake fanquake merged commit 40e1c4d into bitcoin:master Mar 19, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 19, 2023
…names

e43a547 refactor: wallet, do not translate init arguments names (furszy)

Pull request description:

  Simple, and not interesting, refactor that someone has to do sooner or later. We are translating some init arguments names when those shouldn't be translated.

ACKs for top commit:
  achow101:
    ACK e43a547
  MarcoFalke:
    lgtm ACK e43a547
  ryanofsky:
    Code review ACK e43a547. Just rebased since last review.

Tree-SHA512: c6eca98fd66d54d5510de03ab4e63c00ba2838af4237d2bb135d01c47f8ad8ca9aa7ae1e45cf668afcfb9dd958b075a1756cc887b3beef2cb494933d4d83eab0
if (feeCalc.reason == FeeReason::FALLBACK && !wallet.m_allow_fallback_fee) {
// eventually allow a fallback fee
return util::Error{_("Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.")};
return util::Error{strprintf(_("Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable %s."), "-fallbackfee")};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, the middle sentence is a bit redundant (and also contains the option name)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For translators, it will be better to drop the middle sentence or put a place holder instead of the option name.

@bitcoin bitcoin locked and limited conversation to collaborators Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants