Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Jun 26, 2019

Generally the package name is not translated, but the package description is.

E.g. GIMP or Firefox are always called that way regardless of the system language. However, "Firefox webbrowser" or "GIMP image manipulation program" are translated.

MarcoFalke added 3 commits June 26, 2019 11:01
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src)
-END VERIFY SCRIPT-
@hebasto
Copy link
Member

hebasto commented Jun 26, 2019

Strong concept ACK (#15894 (comment)).

@maflcko
Copy link
Member Author

maflcko commented Jun 26, 2019

The GUI never picked up the translation anyway, so there shouldn't be any user-facing changes other than in InitErrors (See the difference between "Bitcoin Core" and "Bitcoin Kern"):

Screenshot from 2019-06-26 11-23-15

Edit: So I'd say to backport this change to 0.18.1

@promag
Copy link
Contributor

promag commented Jun 26, 2019

Concept ACK.

@laanwj
Copy link
Member

laanwj commented Jun 26, 2019

Concept ACK

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 26, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16224 (gui: Bilingual GUI error messages by hebasto)
  • #15864 (Fix datadir handling by hebasto)

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.

@practicalswift
Copy link
Contributor

Concept ACK

@fanquake
Copy link
Member

@MarcoFalke

So I'd say to backport this change to 0.18.1

What would be the benefit of backporting this? Isn't it just a simplification to the code that wont have any user facing effects?

@maflcko
Copy link
Member Author

maflcko commented Jun 27, 2019

Only the following instances are translated: git grep '_(PACKA', but not the others.

@laanwj
Copy link
Member

laanwj commented Jun 27, 2019

What would be the benefit of backporting this? Isn't it just a simplification to the code that wont have any user facing effects?

The only user-visible impact would be the InitErrors, I guess. It also reduces the workload of translators a bit by removing one(!) translation message. I don't think it's strictly necessary for backport but as there's really no added risk it doesn't hurt either.

@fanquake fanquake added this to the 0.18.1 milestone Jun 27, 2019
@hebasto
Copy link
Member

hebasto commented Jun 27, 2019

Is the qt: Run «make translate» in ./src/ commit (fab8520) a subject to review?
It seems it should be a part of the release process, right?

@maflcko
Copy link
Member Author

maflcko commented Jun 27, 2019

Yes, it is subject to review, since I changed the buildfile and reviewers will need to check that the new buildfile works as expected anyway (with or without my commit).

@hebasto
Copy link
Member

hebasto commented Jun 27, 2019

Is any reason to keep both PACKAGE_NAME and COPYRIGHT_HOLDERS_SUBSTITUTION?

@maflcko
Copy link
Member Author

maflcko commented Jun 27, 2019

I changed it so that COPYRIGHT_HOLDERS_SUBSTITUTION is also no longer translated, but I kept it for now. Maybe @luke-jr knows more why it is needed.

@luke-jr
Copy link
Member

luke-jr commented Jun 28, 2019

Generally, COPYRIGHT_HOLDERS_SUBSTITUTION should be "Bitcoin Core" even for software that isn't named "Bitcoin Core".

Regarding the PR itself: Should we get input from translators who have been using translated package names for a long time?

@laanwj
Copy link
Member

laanwj commented Jun 28, 2019

Regarding the PR itself: Should we get input from translators who have been using translated package names for a long time?

It can't hurt to ask people's input, but I'm not sure this makes much of a difference. E.g. are there any other occurences of "Bitcoin core" in the translated messages that shouldn't be translated?

@maflcko
Copy link
Member Author

maflcko commented Jun 28, 2019

are there any other occurences of "Bitcoin core" in the translated messages that shouldn't be translated?

It doesn't look like it:

git grep 'Bitcoin Core' src/qt/locale/|grep '<source>'|grep -v '<source>Bitcoin Core</source>'|wc
      0       0       0

@DrahtBot
Copy link
Contributor

Gitian builds for commit 7400135 (master):

Gitian builds for commit 0b2f4ee1f385b88a4a1d11ff4c0d7823950df8ef (master and this pull):

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.

ACK fa64b94, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.

std::string CopyrightHolders(const std::string& strPrefix)
{
std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION));
const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION);
Copy link
Member

Choose a reason for hiding this comment

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

nit:

const std::string copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION);

@maflcko maflcko merged commit fa64b94 into bitcoin:master Jul 8, 2019
maflcko pushed a commit that referenced this pull request Jul 8, 2019
fa64b94 util: No translation of `Bitcoin Core` in the copyright (MarcoFalke)
fab8520 qt: Run «make translate» in ./src/ (MarcoFalke)
fabe87d scripted-diff: Avoid passing PACKAGE_NAME for translation (MarcoFalke)
fa5e9f1 build: Stop translating PACKAGE_NAME (MarcoFalke)

Pull request description:

  Generally the package name is not translated, but the package description is.

  E.g. `GIMP` or `Firefox` are always called that way regardless of the system language. However, "`Firefox` webbrowser" or "`GIMP` image manipulation program" are translated.

ACKs for top commit:
  hebasto:
    ACK fa64b94, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.

Tree-SHA512: 626f811531182d0ba0ef1044930d32726773349bcb49b10261288a86ee6b80a183db30a87d817d5b0d501fad058ac22d6272311716b4f5a154f17c6f391a5a1a
@maflcko maflcko deleted the 1906-noTranslatePackageName branch July 8, 2019 17:44
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 9, 2019
fa64b94 util: No translation of `Bitcoin Core` in the copyright (MarcoFalke)
fab8520 qt: Run «make translate» in ./src/ (MarcoFalke)
fabe87d scripted-diff: Avoid passing PACKAGE_NAME for translation (MarcoFalke)
fa5e9f1 build: Stop translating PACKAGE_NAME (MarcoFalke)

Pull request description:

  Generally the package name is not translated, but the package description is.

  E.g. `GIMP` or `Firefox` are always called that way regardless of the system language. However, "`Firefox` webbrowser" or "`GIMP` image manipulation program" are translated.

ACKs for top commit:
  hebasto:
    ACK fa64b94, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.

Tree-SHA512: 626f811531182d0ba0ef1044930d32726773349bcb49b10261288a86ee6b80a183db30a87d817d5b0d501fad058ac22d6272311716b4f5a154f17c6f391a5a1a
@fanquake
Copy link
Member

Is this still a candidate for backport? It's likely missed v0.18.1 unless we have an rc2. But could still be pulled into the v0.18 branch if wanted.

@fanquake fanquake mentioned this pull request Aug 15, 2019
@fanquake fanquake modified the milestones: 0.18.1, 0.18.2 Aug 15, 2019
@fanquake
Copy link
Member

Bumped to 0.18.2. I've included this for backport in #16617.

fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Sep 23, 2019
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Sep 23, 2019
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src)
-END VERIFY SCRIPT-

Github-Pull: bitcoin#16291
Rebased-From: fabe87d
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Sep 23, 2019
laanwj added a commit that referenced this pull request Nov 25, 2019
0b18ea6 util: Filter control characters out of log messages (Wladimir J. van der Laan)
ac30fc4 build: Factor out qt translations from build system (Wladimir J. van der Laan)
3b8af5f build: update boost macros to latest upstream (fanquake)
b12defc Test that joinpsbts randomly shuffles the inputs (Andrew Chow)
eb07d22 Shuffle inputs and outputs after joining psbts (Andrew Chow)
1175410 addrdb: Remove temporary files created in SerializeFileDB. Fixes non-determinism in unit tests. (practicalswift)
c52dd12 Handle the result of posix_fallocate system call (Luca Venturini)
f792b25 torcontrol: Use the default/standard network port for Tor hidden services, even if the internal port is set differently (Luke Dashjr)
9fe8d28 Bugfix: QA: Run tests with UPnP disabled (Luke Dashjr)
1d12e52 Add vertical spacer (Josu Goñi)
d764141 depends: add patch to common dependencies (fanquake)
56815e9 Give QApplication dummy arguments (Andrew Chow)
9d389d0 util: No translation of `Bitcoin Core` in the copyright (MarcoFalke)
87908e9 scripted-diff: Avoid passing PACKAGE_NAME for translation (MarcoFalke)
a44e18f build: Stop translating PACKAGE_NAME (MarcoFalke)
7bd8f4e rpc: Fix getblocktemplate CLI example (#16594) (Emil Engler)
1cc06a1 doc: Fix typos in COPYRIGHT (Chuf)

Pull request description:

  Backports some commits to the `0.18` branch:

  * #16596 - rpc: Fix getblocktemplate CLI example
  * #16615 - doc: Fix typos in COPYRIGHT
  * #16291 - gui: Stop translating PACKAGE_NAME (without the `make translate` commit)
  * #16578 - Do not pass in command line arguments to QApplication
  * #16051 - depends: add patch to common dependencies
  * #16090 - Add vertical spacer
  * #15651 - torcontrol: Use the default/standard network port for Tor hidden services, even if the internal port is set differently
  * #15650 - Handle the result of posix_fallocate system call
  * #16646 - Bugfix: QA: Run tests with UPnP disabled
  * #16212 - addrdb: Remove temporary files created in SerializeFileDB. Fixes non-determinism in unit tests.
  * #16512 - rpc: Shuffle inputs and outputs after joining psbts
  * #16870 - build: update boost macros to latest upstream for improved error reporting
  * #16982 - build: Factor out qt translations from build system
  * #17095 - util: Filter control characters out of log messages

ACKs for top commit:
  laanwj:
    ACK 0b18ea6

Tree-SHA512: 37f0e5afc20975f4d1506e8662eda2ae0125f2f424a852818b5af2c3b8db78fc1c365b83571aa80ca63c885ca314302190b891a50ff3851fda9b9238455a5627
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 21, 2020
…late`

Summary:
c640ca24f9d94f468ec6de023bf885813ac6c9a9 Always generate `bitcoinstrings.cpp` on `make translate` (Franck Royer)

Pull request description:

  Resolves #16891.

  `bitcoinstrings.cpp` is to be generated at release time. Hence,
  it should not depend on whether the source files are younger as the
  releaser may proceed from a fresh checkout.

  More information on the investigation in the issue.

ACKs for top commit:
  jonasschnelli:
    Tested ACK c640ca24f9d94f468ec6de023bf885813ac6c9a9 - Tested master + this on macOS 10.14. With this PR, it always "runs" `GEN      qt/bitcoinstrings.cpp` and `GEN      translate`.

Tree-SHA512: f799fdc3ad16a2a6a59704bc2c50f5179e6a7e064d8f43354592f11857cc901cac99b2b90f3319d25d49c9d78378b8d119cc5f59b48ea7f1008f33dd26700877

Backport of Core [[bitcoin/bitcoin#17068 | PR17068]]

According to the PR discussion, this issue may affect `make translate` on MacOS and Ubuntu.

Reviewer note: This is out of order, as [[bitcoin/bitcoin#16291 | PR16291]] should ideally come first. But I don't want to tackle that backport
at this time.

Depends on D5790 for the test plan.

Test Plan:
```
../configure
make -j8
cd src
make translate
arc lint
```
Not committed with this patch, but there should be some sane output in bitcoinstrings.cpp

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5791
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 21, 2020
Summary:
 * build: Stop translating PACKAGE_NAME

 * scripted-diff: Avoid passing PACKAGE_NAME for translation

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src)
-END VERIFY SCRIPT-

 * qt: Run «make translate» in ./src/

 * util: No translation of `Bitcoin Core` in the copyright

This is a backport of Core [[bitcoin/bitcoin#16291 | PR16291]]

Depends on D5790

Test Plan:
  make translate

It seems like I have parasites changes in there, so somethign may still be borken on my end.

Reviewers: #bitcoin_abc, jasonbcox, Fabien

Reviewed By: #bitcoin_abc, jasonbcox, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5798
ftrader added a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
gui: Stop translating PACKAGE_NAME

Backport of bitcoin/bitcoin#16291 to BCHN, done by dagurval.

See merge request bitcoin-cash-node/bitcoin-cash-node!895
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Sep 6, 2021
d838f20 Update manpages to reflect newer template (Fuzzbawls)
d510ce0 [Docs] Reformat -help output for help2man (Fuzzbawls)
7f655de Run make translate to update source files (Fuzzbawls)
8608d3a Stop translating command line options (Fuzzbawls)
00dcec7 Stop translating remaining usages of PACKAGE_NAME (Fuzzbawls)
03a002a Unify product name to as few places as possible (Fuzzbawls)

Pull request description:

  This stops the practice of repeatedly translating the string literal `PIVX Core` in multiple strings, which should never be localized as it is a proper product name.

  Also stops translating command line arguments as they were only ever translated for pivx-qt and not for the command line programs. Many of these arguments are highly technical in nature, and translating them has been problematic (with translation errors or literal translations that result in incorrect argument names) and leads to more confusion rather than less confusion.

  Lastly, a quick formatting change to the `-help` output of binary programs is included to make the release-distributed manpages more compliant with the help2man expected formatting.

  Overall, this results in a reduction of strings to translate by ~190, which should assist in getting language translations to meet our minimum translation threshold for inclusion in releases.

  -------

  Based on the following upstream commits/PRs:
  - bitcoin@d5f4683
  - bitcoin#13341
  - bitcoin#13872
  - bitcoin#16291

ACKs for top commit:
  furszy:
    ACK d838f20
  random-zebra:
    utACK d838f20. Merging.

Tree-SHA512: bb57d637b7b905421279483fcf95cfea4f4acf301fb1556e6bc8d2ab6e1c4f00d5a232be8d17181119c847047b3b81c4d2f5f62ec949999e4274836ef27e680f
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants