Page MenuHomePhabricator

[backport#16224 3/5] Make InitError bilingual
ClosedPublic

Authored by PiRK on Oct 20 2020, 09:52.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC5b1bc64e8e32: [backport#16224 3/5] Make InitError bilingual
Summary

This PR:

  • makes GUI error messages bilingual: user's native language + untranslated (i.e. English)
  • insures that only untranslated messages are written to the debug log file and to stderr (that is not the case on master).

Backport of Core PR16224 - part 3 of 5
Commit: https://github.com/bitcoin/bitcoin/pull/16224/commits/7e923d47ba9891856b86bc9f718cf2f1f773bdf6

Depends on D7986

Test Plan

ninja && ninja check

Event Timeline

Owners added a reviewer: Restricted Owners Package.Oct 20 2020, 09:52
PiRK requested review of this revision.Oct 20 2020, 09:52

Tail of the build log:

  -t abc-base-image-"${HASH}" debian:buster

(cat <<EOF
results() {
  set +e
  shopt -s dotglob nullglob
  mv /work/abc-ci-builds/"build-debug"/* /results
  chown -R ${ME} /work
  chown -R ${ME} /results
  chown -R ${ME} /root/.ccache
}
trap "results" EXIT
export TEAMCITY_VERSION="2019.2.4 (build 72059)"
export BASE_CACHE="/root/abc-depends/cache"
export SDK_ARCHIVE_DIR="/root/abc-depends/osx-sdk"
export SOURCES_PATH="/root/abc-depends/sources"
mkdir -p "/root/abc-depends/cache" "/root/abc-depends/osx-sdk" "/root/abc-depends/sources"
./contrib/teamcity/build-configurations.py "build-debug"
EOF
) > run-command.sh
chmod +x run-command.sh

~/infra/docker/docker-run.sh \
  -a "-v /home/teamcity/.ccache:/root/.ccache -v /home/teamcity/.abc-depends:/root/abc-depends -v "${RESULTS_DIR}":/results" \
  -c run-command.sh /work/run-command.sh abc-base-image-"${HASH}" ./run-command.sh

[09:53:20] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script3101592248465442227
[09:53:20] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/jailed-build
[09:53:20] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:53:20] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[09:53:20] :	 [Step 1/1] Building base image for: 51c0d5ea6...
[09:53:20] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:53:21] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[09:53:21] :	 [Step 1/1] Tag name: abc-base-image-51c0d5ea6
[09:53:29]W:	 [Step 1/1] Traceback (most recent call last):
[09:53:29]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 570, in <module>
[09:53:29]W:	 [Step 1/1]     main()
[09:53:29]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 559, in main
[09:53:29]W:	 [Step 1/1]     script_dir, config_path, args.build)
[09:53:29]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 59, in __init__
[09:53:29]W:	 [Step 1/1]     self.load(build_name)
[09:53:29]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 82, in load
[09:53:29]W:	 [Step 1/1]     self.name, list(config.keys())
[09:53:29]W:	 [Step 1/1] AssertionError: build-debug is not a valid build identifier. Valid identifiers are ['templates', 'builds']
[09:53:29]W:	 [Step 1/1] mv: missing destination file operand after '/results'
[09:53:29]W:	 [Step 1/1] Try 'mv --help' for more information.
[09:53:33]W:	 [Step 1/1] Process exited with code 1
[09:53:33]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[09:53:33]E:	 [Step 1/1] Step Command Line failed
[09:53:34]E: Ant JUnit report watcher
[09:53:34]E:	 [Ant JUnit report watcher] No reports found for paths:
[09:53:34]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[09:53:34]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[09:53:34] : Publishing internal artifacts (2s)
[09:53:36] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:53:36] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[09:53:34]W: Publishing artifacts (2s)
[09:53:34] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[09:53:34]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[09:53:36] : Build finished
PiRK retitled this revision from [backport#16224 2/5] Make InitError bilingual to [backport#16224 3/5] Make InitError bilingual.

Tail of the build log:

  -t abc-base-image-"${HASH}" debian:buster

(cat <<EOF
results() {
  set +e
  shopt -s dotglob nullglob
  mv /work/abc-ci-builds/"build-debug"/* /results
  chown -R ${ME} /work
  chown -R ${ME} /results
  chown -R ${ME} /root/.ccache
}
trap "results" EXIT
export TEAMCITY_VERSION="2019.2.4 (build 72059)"
export BASE_CACHE="/root/abc-depends/cache"
export SDK_ARCHIVE_DIR="/root/abc-depends/osx-sdk"
export SOURCES_PATH="/root/abc-depends/sources"
mkdir -p "/root/abc-depends/cache" "/root/abc-depends/osx-sdk" "/root/abc-depends/sources"
./contrib/teamcity/build-configurations.py "build-debug"
EOF
) > run-command.sh
chmod +x run-command.sh

~/infra/docker/docker-run.sh \
  -a "-v /home/teamcity/.ccache:/root/.ccache -v /home/teamcity/.abc-depends:/root/abc-depends -v "${RESULTS_DIR}":/results" \
  -c run-command.sh /work/run-command.sh abc-base-image-"${HASH}" ./run-command.sh

[11:11:59] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script8241260791667565279
[11:11:59] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/jailed-build
[11:11:59] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[11:11:59] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[11:11:59] :	 [Step 1/1] Building base image for: 216cabf37...
[11:11:59] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[11:12:01] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[11:12:01] :	 [Step 1/1] Tag name: abc-base-image-216cabf37
[11:12:24]W:	 [Step 1/1] Traceback (most recent call last):
[11:12:24]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 570, in <module>
[11:12:24]W:	 [Step 1/1]     main()
[11:12:24]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 559, in main
[11:12:24]W:	 [Step 1/1]     script_dir, config_path, args.build)
[11:12:24]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 59, in __init__
[11:12:24]W:	 [Step 1/1]     self.load(build_name)
[11:12:24]W:	 [Step 1/1]   File "./contrib/teamcity/build-configurations.py", line 82, in load
[11:12:24]W:	 [Step 1/1]     self.name, list(config.keys())
[11:12:24]W:	 [Step 1/1] AssertionError: build-debug is not a valid build identifier. Valid identifiers are ['templates', 'builds']
[11:12:24]W:	 [Step 1/1] mv: missing destination file operand after '/results'
[11:12:24]W:	 [Step 1/1] Try 'mv --help' for more information.
[11:12:27]W:	 [Step 1/1] Process exited with code 1
[11:12:27]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[11:12:28]E:	 [Step 1/1] Step Command Line failed
[11:12:28]E: Ant JUnit report watcher
[11:12:28]E:	 [Ant JUnit report watcher] No reports found for paths:
[11:12:28]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[11:12:28]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[11:12:28] : Publishing internal artifacts (4s)
[11:12:33] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[11:12:33] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[11:12:28]W: Publishing artifacts (5s)
[11:12:28] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[11:12:28]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[11:12:34] : Build finished
This revision is now accepted and ready to land.Oct 20 2020, 14:01