-
Notifications
You must be signed in to change notification settings - Fork 9
Comparing changes
Open a pull request
base repository: ryanofsky/bitcoin
base: pr/bfmt.4-rebase
head repository: ryanofsky/bitcoin
compare: pr/bfmt.5
- 6 commits
- 16 files changed
- 2 contributors
Commits on Nov 15, 2024
-
refactor: Avoid concatenation of format strings
Instead just concatenate already formatted strings. This allows untranslated format strings to be checked at compile time now, and translated format strings to be checked at compile time in bitcoin#31061.
Configuration menu - View commit details
-
Copy full SHA for 9120245 - Browse repository at this point
Copy the full SHA 9120245View commit details -
refactor: Pick translated string after format
This passes the return value of _() directly to strprintf so the format string can be checked at compile time in bitcoin#31061.
MarcoFalke committedNov 15, 2024 Configuration menu - View commit details
-
Copy full SHA for b8bf7bf - Browse repository at this point
Copy the full SHA b8bf7bfView commit details -
Requested by clang-tidy: src/wallet/salvage.cpp:119:18: error: use emplace_back instead of push_back [modernize-use-emplace,-warnings-as-errors] 119 | warnings.push_back(Untranslated("Salvage: Database salvage found errors, all data may not be recoverable.")); | ^~~~~~~~~~ | emplace_back(
MarcoFalke committedNov 15, 2024 Configuration menu - View commit details
-
Copy full SHA for d0695fe - Browse repository at this point
Copy the full SHA d0695feView commit details -
refactor: Don't embed translated string in untranslated string.
This could produce an english error message containing non-english string fragments if PopulateAndValidateSnapshot started returning any translated strings in the future. This change is also needed to make the next scripted-diff commit work.
Configuration menu - View commit details
-
Copy full SHA for d392068 - Browse repository at this point
Copy the full SHA d392068View commit details -
refactor: Use + instead of strformat to concatenate translated & untr…
…anslated strings This change is needed to let the scripted-diff commit following this compile. It should also make code a little more obvious and easy to read.
Configuration menu - View commit details
-
Copy full SHA for 75643fd - Browse repository at this point
Copy the full SHA 75643fdView commit details -
scripted-diff: Replace strprintf(Untranslated) with Untranslated(strp…
…rintf) This makes code more consistent and makes it easier to add compile-time checking to enforce that format strings contain the right specifiers, because it stops using Untranslated() to create the format string, so the Untranslated() function will not need to get involved in formatting. -BEGIN VERIFY SCRIPT- quote='"[^"]+"' quotes="(?:$quote|\\s)*" nonparens="[^()]*" single_level_paren="\($nonparens\)" double_level_paren="\($nonparens\($nonparens\)$nonparens\)" exprs="(?:$double_level_paren|$single_level_paren|$nonparens)*" git grep -l 'Untranslated' | xargs perl -0777 -i -pe "s/strprintf\((\\W*)Untranslated\(($quotes)\)($exprs)(\))/Untranslated(\1strprintf(\2\3))/gs" -END VERIFY SCRIPT-
Configuration menu - View commit details
-
Copy full SHA for 85df2fb - Browse repository at this point
Copy the full SHA 85df2fbView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff pr/bfmt.4-rebase...pr/bfmt.5