hebasto
commented at 6:02 pm on July 9, 2019:
member
GH does not render comment address correctly:
https://github.com/bitcoin/bitcoin/pull/16224/#issuecomment-509701396
MarcoFalke
commented at 6:48 pm on July 9, 2019:
member
ACK4e1eda717e, the diff seems verbose but I think it makes sense
to be more explicit where translated strings are passed in.
Currently we have issues where translated strings end up in the debug log.
Also, this is a requirement for future fixes such as #16224
Signature:
0-----BEGIN PGP SIGNED MESSAGE-----
1Hash: SHA512
2 3ACK4e1eda717e, the diff seems verbose but I think it makes sense
4to be more explicit where translated strings are passed in.
5Currently we have issues where translated strings end up in the debug log.
6 7Also, this is a requirement for future fixes such as [#16224](/bitcoin-bitcoin/16224/)
8-----BEGIN PGP SIGNATURE-----
910iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
11pUgAxgv7B8gVJW+NBhgvYFjV7GzTcEDz0+R5pW0pW+8JXt5bYm4l9YkmBZVq/kk+
12Pf/Wr2Vv91OoFIAiAu8iObedp35PzybgeZ4Dc9HlidhOHZvqxOrjNf+lINNyh+ZZ
13ibv0VVcNQTeffMf6+zQoHazuyJPtNarJHmfPQQPBuYPbniW8DpDcRtamMIBxg0sd
142FMLWtgt214boyf0aNUTmQUjxqwtafuqSpOri1VVMc458lIAKma8tdQUo9U/ryfP
15+F8ev8SuK+ZJF3DRqah5mCO6+5Cd5vv0e/wsVemL6DBW11IuTOdW8WCFQoTIQINL
16ayT1m4fbe9wdKh1r/j4Hla8qGjrtPSfgoEj+wfghACLP2MVZxZwqraLz2tH4NFQ4
178zVtjR7Ms1PVSSNFGEoEWU7ouYdX/Jgz/KDp/MxpeFMwzTNZkBWrP5An1AwuJyyt
185VR16+80UJfF5qnOXpO3tt7t7CQzB194ZBJVLneTVUye0Q/87xW8Y5MjCDn5QBVD
19TtPRZurp
20=g2TS
21-----END PGP SIGNATURE-----
#15112 (build: Optionally enable -Wzero-as-null-pointer-constant by Empact)
#13751 (Utils and libraries: Drops the boost/algorithm/string/split.hpp dependency by l2a5b1)
#10443 (Add fee_est tool for debugging fee estimation code by ryanofsky)
#8994 (Testchains: Introduce custom chain whose constructor… by jtimon)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
fanquake added the label
GUI
on Jul 9, 2019
DrahtBot added the label
Needs rebase
on Jul 9, 2019
hebasto force-pushed
on Jul 10, 2019
hebasto
commented at 3:15 pm on July 10, 2019:
member
Rebased.
DrahtBot removed the label
Needs rebase
on Jul 10, 2019
DrahtBot added the label
Needs rebase
on Jul 16, 2019
hebasto force-pushed
on Jul 18, 2019
hebasto
commented at 4:37 pm on July 18, 2019:
member
Rebased.
DrahtBot removed the label
Needs rebase
on Jul 18, 2019
DrahtBot added the label
Needs rebase
on Jul 23, 2019
hebasto force-pushed
on Jul 23, 2019
hebasto
commented at 5:19 pm on July 23, 2019:
member
Rebased.
DrahtBot removed the label
Needs rebase
on Jul 23, 2019
ryanofsky approved
ryanofsky
commented at 8:04 pm on July 23, 2019:
member
Thank for a making new PR to separate refactoring and behavior changes!
Conditional utACK3b7348ff8a4633679a387dcbfe266348dcba6c2a if this PR is fixed to have a descriptive title and OP. For title I’d suggest, “Add bilingual_str class”. In the description, I’d say something like, “This PR adds a bilingual_str class and a strprintf overload that allows bitcoin code to easily send dual translated and non-translated messages to the GUI and the logging framework. This PR is only a refactoring, and does not change behavior.”
As I commented on the other PR, I think this PR and its followup would be simpler if the _ function signature was changed to return bilingual_str in the same commit that changed ThreadSafeMessageBox, InitError, InitWarning, and similar functions to accept bilingual_str arguments. This would avoid the churn of having to add .translated suffixes and then remove them later. It would mean replacing the scripted diff commit with a manual commit, but I think the manual commit should be smaller, and honestly I’d consider it an advantage not to have to decipher the sed / bash code anyway. But this is just my suggested approach, I’m also fine with the current approach.
DrahtBot added the label
Needs rebase
on Jul 24, 2019
DrahtBot
commented at 0:43 am on July 24, 2019:
member
hebasto renamed this:
gui: Bilingual translation
gui: Add bilingual_str type
on Jul 24, 2019
hebasto
commented at 12:27 pm on July 24, 2019:
member
For title I’d suggest, “Add bilingual_str class”. In the description, I’d say something like, “This PR adds a bilingual_str class and a strprintf overload that allows bitcoin code to easily send dual translated and non-translated messages to the GUI and the logging framework. This PR is only a refactoring, and does not change behavior.”
Done.
… I’m also fine with the current approach.
Let it be ;)
hebasto force-pushed
on Jul 24, 2019
ryanofsky approved
ryanofsky
commented at 1:31 pm on July 24, 2019:
member
utACK375d90974a9ba3569bb6710c8f26cdda53d01389. Only changes since last review are rebase and updating the PR title & description (thanks!). There currently a lint error making travis fail, but this looks good otherwise.
One thing is I would probably remove “gui:” prefix from PR title because that even though this is refactoring that doesn’t change behavior and is meant to help the gui, the prefix could mislead reviewers to thinking the PR doesn’t touch non-gui code.
Refactor out translation.h
This is a prerequisite for introducing bilingual error messages.
Note: #includes are arranged by clang-format-diff.py script.
0b86e517ad
Add bilingual message type7c45e14f2f
scripted-diff: Make translation bilingual
-BEGIN VERIFY SCRIPT-
sed -i 's/inline std::string _(const char\* psz)/inline bilingual_str _(const char\* psz)/' src/util/translation.h
sed -i 's/return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;/return bilingual_str{psz, G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz};/' src/util/translation.h
sed -i 's/\b_("\([^"]\|\\"\)*")/&.translated/g' $(git grep --files-with-matches '\b_("' src)
echo Hard cases - multiline strings.
sed -i 's/"Visit %s for further information about the software.")/&.translated/g' src/init.cpp
sed -i "s/\"Only rebuild the block database if you are sure that your computer's date and time are correct\")/&.translated/g" src/init.cpp
sed -i 's/" restore from a backup.")/&.translated/g' src/wallet/db.cpp
sed -i 's/" or address book entries might be missing or incorrect.")/&.translated/g' src/wallet/wallet.cpp
echo Special case.
sed -i 's/_(COPYRIGHT_HOLDERS)/&.translated/' src/util/system.cpp test/lint/lint-format-strings.py
-END VERIFY SCRIPT-
753f7cccce
hebasto force-pushed
on Jul 24, 2019
hebasto renamed this:
gui: Add bilingual_str type
Add bilingual_str type
on Jul 24, 2019
hebasto
commented at 1:46 pm on July 24, 2019:
member
There currently a lint error making travis fail, but this looks good otherwise.
Fixed.
One thing is I would probably remove “gui:” prefix from PR title because that even though this is refactoring that doesn’t change behavior and is meant to help the gui, the prefix could mislead reviewers to thinking the PR doesn’t touch non-gui code.
Fair point. Done.
fanquake removed the label
Needs rebase
on Jul 24, 2019
fanquake removed the label
GUI
on Jul 24, 2019
fanquake added the label
Utils/log/libs
on Jul 24, 2019
ryanofsky approved
ryanofsky
commented at 2:06 pm on July 24, 2019:
member
utACK753f7cccce83084f4b18cf4bdf3225183179508c. Only change since last review is fixing lint error (double includes)
MarcoFalke
commented at 6:06 pm on July 24, 2019:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-18 09:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me