Unify product name to as few places as possible #7192
pull luke-jr wants to merge 18 commits into bitcoin:master from luke-jr:single_prodname changing 53 files +403 −125-
luke-jr commented at 11:50 am on December 9, 2015: memberThis should help keep the software name consistent within translations (Bitcoin Kern, Nucleul Bitcoin, etc) or forks (Bitcoin LJR, etc).
-
btcdrak commented at 11:51 am on December 9, 2015: contributor
Good.
utACK
-
luke-jr force-pushed on Dec 9, 2015
-
in src/init.cpp: in 4f1b52b656 outdated
499@@ -500,7 +500,7 @@ std::string HelpMessage(HelpMessageMode mode) 500 std::string LicenseInfo() 501 { 502 // todo: remove urls from translations on next change 503- return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" + 504+ return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The %s Developers"), COPYRIGHT_YEAR, _(PACKAGE_NAME))) + "\n" +
MarcoFalke commented at 12:04 pm on December 9, 2015:As you are touching this translation anyway. Is there any language that translates 2009 into something other than 2009? If so, this should be changed as well.
laanwj commented at 11:45 am on December 10, 2015:Agree, makes sense to parametrize both years, even though the first one will never changein src/clientversion.h: in 4f1b52b656 outdated
37@@ -38,7 +38,7 @@ 38 #define DO_STRINGIZE(X) #X 39 40 //! Copyright string used in Windows .rc files 41-#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers" 42+#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The " PACKAGE_NAME " Developers"
jonasschnelli commented at 12:53 pm on December 9, 2015:Hmm… seems not to work on windows: https://travis-ci.org/bitcoin/bitcoin/jobs/95785144#L2082
maaku commented at 10:05 am on December 22, 2015:As a separate issue from Jonas, are we sure the copyright name is something we want to change? I’ve had to deal with this as maintainer of Freicoin .. changing the product name would result in “Copyright 2009-2015 The Freicoin Core Developers” which would certainly not be okay (or legal?).
It would be nice to detect if PACKAGE_NAME is changed from the default, and if so add a another copyright string (while maintaining the hard-coded “Bitcoin Core” text).
fanquake commented at 10:12 am on December 22, 2015:Concept ACK, haven’t had a chance to test.
On Tuesday, 22 December 2015, Mark Friedenbach notifications@github.com wrote:
In src/clientversion.h #7192 (review):
@@ -38,7 +38,7 @@ #define DO_STRINGIZE(X) #X
//! Copyright string used in Windows .rc files -#define COPYRIGHT_STR “2009-” STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers" +#define COPYRIGHT_STR “2009-” STRINGIZE(COPYRIGHT_YEAR) " The " PACKAGE_NAME " Developers"
As a separate issue from Jonas, are we sure the copyright name is something we want to change? I’ve had to deal with this as maintainer of Freicoin .. changing the product name would result in “Copyright 2009-2015 The Freicoin Core Developers” which would certainly not be okay (or legal?).
It would be nice to detect if PACKAGE_NAME is changed from the default, and if so add a another copyright string (while maintaining the hard-coded “Bitcoin Core” text).
— Reply to this email directly or view it on GitHub https://github.com/bitcoin/bitcoin/pull/7192/files#r48238911.
MarcoFalke commented at 10:16 am on December 22, 2015:@maaku Good catch! I also don’t think this is legal.
luke-jr commented at 10:31 am on December 22, 2015:There is no legal entity “The Bitcoin Core developers”, it is just a term used to indicate that each developer retains his own copyright. Replacing the package name in it doesn’t change that.
MarcoFalke commented at 10:43 am on December 22, 2015:IANAL but for instance “The MF Core developers” would just be me whereas “The Bitcoin Core developers” are something like https://github.com/bitcoin/bitcoin/graphs/contributors. Otherwise you wouldn’t need the multiline headers such as https://github.com/dogecoin/dogecoin/blob/bb4b082c086689434d67490a15224c42fefdfd13/src/main.cpp#L3?
luke-jr commented at 10:51 am on December 22, 2015:Why would “The MF Core developers” not similarly be https://github.com/MarcoFalke/bitcoin/graphs/contributors ?
Otherwise you wouldn’t need the multiline headers such as https://github.com/dogecoin/dogecoin/blob/bb4b082c086689434d67490a15224c42fefdfd13/src/main.cpp#L3?
I don’t know that they actually do.
jonasschnelli commented at 12:02 pm on December 22, 2015:After thinking about this in detail, I kind of agree with @luke-jr: this line does not change the copyright of the sources itself. It’s just a information string that will be transported to the user over package informations and it’s under the responsibility of the package-/project-mainteiner(s).
If this (string) needs to fit all legal constraints, then it would probably require to add “LevelDB” and other third-party copyrights here.
MarcoFalke commented at 12:31 pm on December 22, 2015:and it’s under the responsibility of the package-/project-mainteiner(s).
Right, but at least let’s not reuse the variable. Someone in IRC mentioned to split the two constants (one for package name and the other for copyright).
jonasschnelli commented at 12:53 pm on December 9, 2015: contributorNice! Concept ACK. Will test soon.luke-jr force-pushed on Dec 10, 2015jonasschnelli commented at 7:45 am on December 10, 2015: contributorCurrently fails windows: https://bitcoin.jonasschnelli.ch/pulls/7192/build-win.log i’m happy to test this if windows issues are solved.luke-jr force-pushed on Dec 10, 2015luke-jr force-pushed on Dec 10, 2015jonasschnelli added the label Refactoring on Dec 10, 2015luke-jr force-pushed on Dec 10, 2015in src/qt/bitcoingui.cpp: in 648e9649ca outdated
107@@ -104,7 +108,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n 108 { 109 GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this); 110 111- QString windowTitle = tr("Bitcoin Core") + " - "; 112+ QString windowTitle = tr(PACKAGE_NAME) + " - ";
laanwj commented at 11:46 am on December 10, 2015:This won’t work. And you don’t want the
tr
. Just use:0QString windowTitle = QString(PACKAGE_NAME) + " - ";
luke-jr commented at 11:57 am on December 10, 2015:But then it won’t be translated? I don’t mean to change that status quo in this PR…
laanwj commented at 12:06 pm on December 10, 2015:Oh, right, does this work then? Does qtranslate pick up the string out oftr(PACKAGE_NAME)
, even though it’s a macro? Same for_(PACKAGE_NAME)
in gettext? I thought only literal strings could be input to translation.
luke-jr commented at 12:09 pm on December 10, 2015:I doubt it. I imagine there’s some way to explicitly tell it? :/
laanwj commented at 11:47 am on December 10, 2015: memberConcept ACK (for 0.13 - due to translation changes this is too late for 0.12)in src/qt/forms/debugwindow.ui: in 648e9649ca outdated
356@@ -357,7 +357,7 @@ 357 <item row="16" column="0"> 358 <widget class="QPushButton" name="openDebugLogfileButton"> 359 <property name="toolTip"> 360- <string>Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files.</string> 361+ <string>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</string>
MarcoFalke commented at 5:51 pm on December 10, 2015:Needs rebase to at least 5940cf33b35fb70979a7baa3046107a9b72d8f0fluke-jr force-pushed on Dec 11, 2015luke-jr commented at 8:15 am on December 11, 2015: memberAdded a second commit reworking the binary blobs used for Mac-deploy. Haven’t rebased yet pending completion/testing. @laanwj I am probably going to need to do the translation updates for Bitcoin LJR anyway, so let me know and I can see about doing it in Transifex for 0.12 if that’d be preferable.luke-jr force-pushed on Dec 11, 2015pstratem commented at 10:05 am on December 11, 2015: contributorconcept ACK 0898436e860f695028b3fc6b612074712bbdcbc6 (reviewed the code also, but don’t know anything about qt/autotools)luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 13, 2015luke-jr commented at 5:59 am on December 13, 2015: memberOk, I believe I have addressed all previous requests, but also introduced a packaging FIXME which I hope @theuni can help out with…luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 13, 2015luke-jr force-pushed on Dec 14, 2015luke-jr force-pushed on Dec 14, 2015Unify package name to as few places as possible without major changes d5f46832deluke-jr force-pushed on Dec 14, 2015luke-jr force-pushed on Dec 14, 2015luke-jr commented at 7:25 am on December 14, 2015: memberTravis is happy with it now, and I’ve confirmed the Mac DMG background image is rendered correctly in gitian. Only thing left is the depends/ stuff I need @theuni ’s guidance on… But this is possibly “good enough to merge” without that, even if not perfect (which is the enemy of the good).MarcoFalke commented at 8:45 am on December 14, 2015: memberLooks like there are current binaries for testing at https://bitcoin.jonasschnelli.ch/pulls/7192/
Had a quick look at the linux binaries and it looks ok. Haven’t checked OS X, though.
jonasschnelli commented at 9:03 am on December 14, 2015: contributorLooks like there are current binaries for testing at https://bitcoin.jonasschnelli.ch/pulls/7192/
Yes. Just built. @luke-jr: Somethings wrong with the background. I don’t get one.
Did you made sure, that both resolutions are in the tiff file? Needs to be a @2x (HiDPI) and a normal? Maybe read this. I hope there is a linux tool for that.
jonasschnelli commented at 9:21 am on December 14, 2015: contributorOn linux, you probably need a tool like this: http://linux.die.net/man/1/tiffcpluke-jr force-pushed on Dec 14, 2015luke-jr commented at 9:58 am on December 14, 2015: memberOk, try this one.jonasschnelli commented at 12:14 pm on December 14, 2015: contributorBuild error on osx:
0/usr/bin/tiffcp -c none dpi36.background.tiff dpi72.background.tiff dist/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt dist/.background/background.tiff 1dist/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt: Not a TIFF or MDI file, bad magic number 64207 (0xfacf). 2make: *** [dist/.background/background.tiff] Error 253
I guess the output file is wrong: It’s
dist/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt dist/.background/background.tiff
instead ofdist/.background/background.tiff
luke-jr force-pushed on Dec 15, 2015luke-jr force-pushed on Dec 16, 2015luke-jr commented at 8:51 am on December 16, 2015: member@jonasschnelli Can you minimally modify the generated DS_Store to work, and post me the working file? (Not on your broken SSL server…)luke-jr force-pushed on Dec 17, 2015luke-jr force-pushed on Dec 17, 2015jonasschnelli commented at 9:07 am on December 17, 2015: contributorDMG including background.tiff and DS_Store looks good now. Well done!luke-jr force-pushed on Dec 17, 2015in .travis.yml: in 675cdae5a9 outdated
51@@ -52,6 +52,7 @@ install: 52 before_script: 53 - unset CC; unset CXX 54 - mkdir -p depends/SDKs depends/sdk-sources 55+ - if [ -n "$OSX_SDK" ]; then pip install --user cairosvg mac_alias ds_store; export PATH="$HOME/.local/bin:$PATH"; ( wget 'https://bitbucket.org/al45tair/ds_store/get/c80c23706eae.tar.gz' && tar -xzvpf c80c23706eae.tar.gz && cd al45tair-ds_store-c80c23706eae/ && python setup.py install --user; ) fi
theuni commented at 6:19 pm on December 17, 2015:This should go in “install”. Also, should depend on the host being OSX, not on the OSX_SDK availability.
luke-jr commented at 7:21 pm on December 17, 2015:How is host==OSX determined here, besides OSX_SDK availability?luke-jr force-pushed on Dec 17, 2015Parameterise 2009 in translatable copyright strings 1a6c67c8f5More complicated package name substitution for Mac deployment 63bcdc5227luke-jr force-pushed on Dec 22, 2015macdeploy: Use rsvg-convert rather than cairosvg e611b6e329depends: Pass PYTHONPATH along to configure de619a37fddepends: Add ds_store to depends 82a2d98d9adepends: Add mac_alias to depends 902ccde85eTravis & gitian-osx: Use depends for ds_store and mac_alias modules c39a6fffd7luke-jr force-pushed on Dec 22, 2015luke-jr commented at 9:39 am on December 22, 2015: memberI believe this is ready for merging. @laanwj Let me know if you would like me to prepare a 0.12 backport. Again, I am willing to fixup the translations for it. I will need to make it anyway for Bitcoin LJR, so might as well benefit Core in the process.maaku commented at 9:53 am on December 22, 2015: contributorNice! Concept ACK. I was just about to implement the same thing when I figured I’d check the PR history and found this pleasant surprise :)
Will test soon.
in share/qt/Info.plist.in: in c39a6fffd7 outdated
16@@ -17,7 +17,7 @@ 17 <string>APPL</string> 18 19 <key>CFBundleGetInfoString</key> 20- <string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers</string> 21+ <string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The @PACKAGE_NAME@ developers</string>
MarcoFalke commented at 10:24 am on December 22, 2015:This one as well: The copyright is held by “The Bitcoin Core developers”, so please leave as is or add another line.in src/init.cpp: in c39a6fffd7 outdated
512@@ -513,7 +513,7 @@ std::string HelpMessage(HelpMessageMode mode) 513 std::string LicenseInfo() 514 { 515 // todo: remove urls from translations on next change 516- return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" + 517+ return FormatParagraph(strprintf(_("Copyright (C) %i-%i The %s Developers"), 2009, COPYRIGHT_YEAR, _(PACKAGE_NAME))) + "\n" +
MarcoFalke commented at 10:27 am on December 22, 2015:in src/qt/splashscreen.cpp: in c39a6fffd7 outdated
41@@ -38,9 +42,9 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) 42 #endif 43 44 // define text to place 45- QString titleText = tr("Bitcoin Core"); 46+ QString titleText = tr(PACKAGE_NAME); 47 QString versionText = QString("Version %1").arg(QString::fromStdString(FormatFullVersion())); 48- QString copyrightText = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Bitcoin Core developers")); 49+ QString copyrightText = QChar(0xA9)+QString(" %1-%2 ").arg(2009).arg(COPYRIGHT_YEAR) + QString(tr("The %1 developers").arg(tr(PACKAGE_NAME)));
MarcoFalke commented at 10:28 am on December 22, 2015:
jonasschnelli commented at 11:57 am on December 22, 2015:I think this change is acceptable. Because it does not change the copyright of the source file header itself. The copyright informations within the GUI application may be different (additional assets attributions, libraries, etc.).luke-jr renamed this:
Unify product name to as few places as possible without major changes
Unify product name to as few places as possible
on Dec 22, 2015in contrib/macdeploy/background.svg: in c39a6fffd7 outdated
0@@ -0,0 +1,34 @@ 1+<?xml version="1.0" standalone="no"?> 2+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 3+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet"> 5+ <!-- kate: space-indent off; 6+ Copyright (c) 2011-2013 The Bitcoin Core developers
jonasschnelli commented at 11:44 am on December 22, 2015:nit: 2015in contrib/macdeploy/custom_dsstore.py: in c39a6fffd7 outdated
39+ 'showItemInfo': False, 40+ 'labelOnBottom': True, 41+ 'backgroundType': 2, 42+ 'backgroundColorRed': 1.0 43+} 44+alias = Alias.from_bytes(icvp['backgroundImageAlias'])
jonasschnelli commented at 11:51 am on December 22, 2015:This looks still a bit hackish.
Why not use alias =
Alias.for_file(path_in_image)
? Check: http://nullege.com/codes/show/src@d@m@dmgbuild-1.0.0@dmgbuild@core.py/337/biplist.DataThe whole byte-fiddling might break soon.
luke-jr commented at 11:57 am on December 22, 2015:Why not use alias = Alias.for_file(path_in_image)?
It only works on Mac…
The whole byte-fiddling might break soon.
???
jonasschnelli commented at 12:05 pm on December 22, 2015:It only works on Mac…
Okay. Thats a point.
The whole byte-fiddling might break soon.
I was trying to say, that the hex construct at L31 will very likely break with upcoming OSX updates.
luke-jr commented at 12:12 pm on December 22, 2015:I was trying to say, that the hex construct at L31 will very likely break with upcoming OSX updates.
Why is that? Nothing we can do here if so…
jonasschnelli commented at 12:15 pm on December 22, 2015:Why is that? Nothing we can do here if so…
I just think, if we could let the OS or a OS near function create the byte-stream for the alias, this might help for future compatibility. But as you said, this only runs on mac…
ACK how it is in this PR right now.
Set copyright holders displayed in notices separately from the package name
This helps avoid accidental removal of upstream copyright names
Bugfix: Correct copyright year in Mac DMG background image e4ab5e5f43luke-jr commented at 12:34 pm on December 22, 2015: memberFollowing further discussion of the copyright notice matter on IRC, I have separated the copyright notice code so that it instead uses independent COPYRIGHT_HOLDERS and COPYRIGHT_HOLDERS_SUBSTITUTION variables, so it is harder to accidentally modify them, yet when modified, translations get preserved as much as possible.
(also fixed the incorrect copyright years on the DMG background image template)
Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) 4d5a3df9d4btcdrak commented at 6:55 pm on December 22, 2015: contributorTested ACK 4d5a3dfjtimon commented at 7:03 pm on December 22, 2015: contributorConcept ACKjonasschnelli commented at 8:15 am on December 23, 2015: contributorTested ACK 4d5a3df9d4ea920bb2c63e17a044d14f3eb0fe90maaku commented at 8:29 am on December 23, 2015: contributorTested ACK On Dec 23, 2015 4:16 PM, “Jonas Schnelli” notifications@github.com wrote:
Tested ACK 4d5a3df https://github.com/bitcoin/bitcoin/commit/4d5a3df9d4ea920bb2c63e17a044d14f3eb0fe90
— Reply to this email directly or view it on GitHub #7192 (comment).
in contrib/macdeploy/background.svg: in 4d5a3df9d4 outdated
0@@ -0,0 +1,34 @@ 1+<?xml version="1.0" standalone="no"?> 2+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 3+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 4+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet"> 5+ <!-- kate: space-indent off;
fanquake commented at 12:46 pm on December 25, 2015:nit: Do we need this line, looks like a text-editor flag?luke-jr commented at 8:11 am on December 26, 2015: memberUpdate on 0.12: Too many languages unfortunately do not have common translations of “Bitcoin Core”, so it is impractical to try to include this for 0.12.0.jtimon commented at 10:09 am on December 26, 2015: contributorI still don’t see why “Bitcoin Core” needs to be translated in the first place: it’s a proper name.MarcoFalke commented at 10:12 am on December 26, 2015: memberI think we wanted to keep it because it was already translated in some places… What about not translating it after 0.13?jtimon commented at 10:28 am on December 26, 2015: contributorWhat about not translating it from 0.12? I’m sure I wouldn’t translate it to spanish. Why some languages translate it and others don’t?btcdrak commented at 2:44 pm on December 26, 2015: contributorToo many languages unfortunately do not have common translations of “Bitcoin Core”
Product names are not translated. “Windows” is “Windows”, even in China, Japan and Korea. Look at this as an example http://www.microsoft.com/zh-cn
sipa commented at 2:50 pm on December 26, 2015: memberThis may be a cultural thing, but I would personally find a translation of “Bitcoin Core” to Dutch quite silly.luke-jr commented at 9:11 pm on December 26, 2015: memberNo opinion on whether Bitcoin Core ought to be translated or not, but it would de facto be a change in translations, which is too late for 0.12.0 as I understand it. I would think at the very least, however, transliteration would be desirable for non-Latin languages.MarcoFalke commented at 10:44 pm on December 26, 2015: memberIt would make sense to translate if we had some different flavors to offer like Ubuntu Kylin for instance but I can’t see where this happens.luke-jr commented at 11:02 pm on December 26, 2015: memberAnyhow, whether or not to translate the name is out-of-scope for this PR.maaku commented at 3:51 am on December 27, 2015: contributorTranslation is complicated. I’m not 100% sure that that Luke-Jr meant the name was actually being changed in translation. It is also the case that in some languages even a proper name might be inflected or have grammatical particles attached based on context which would require a native speaker to review, and would have prevented Luke-Jr’s search-and-replace strategy. But even if you decide on not using translations of “Bitcoin Core” as are in use in the target demographic, it’s just plain rude not to transliterate into the native script. “Bitcoin” in Chinese is 比特币 – a phrase which has no real meaning but is the closest approximation of “bit-coin” to Chinese ears. The Japanese would have it as ビットコイン, “bit-coin” rendered in a script specifically meant for foreign transliterations. To hoist a non-native script on them would be quite inconsiderate.
But as mentioned it is out of scope for this PR anyway.
On Dec 26, 2015 6:13 PM, “MarcoFalke” notifications@github.com wrote:
I think we wanted to keep it because it was already translated in some places… What about not translating it after 0.13?
— Reply to this email directly or view it on GitHub.
dexX7 commented at 2:41 pm on December 27, 2015: contributorutACK – this seems very useful for “customized” Bitcoin Core versions.MarcoFalke commented at 2:46 pm on December 27, 2015: memberConcept ACK 4d5a3dfBugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere 3cae14056ain contrib/gitian-descriptors/gitian-osx.yml: in 4d5a3df9d4 outdated
22 - "libz-dev" 23 - "libbz2-dev" 24+- "python-dev" 25+- "python-setuptools" 26+- "fonts-tuffy" 27 reference_datetime: "2015-06-01 00:00:00"
MarcoFalke commented at 0:26 am on January 6, 2016:@luke-jr
reference_datetime
was accidentally changed in master. Thus, this needs rebase. :(Alternatively, it should be sufficient to move the
python*
packages up a bit.laanwj commented at 12:49 pm on January 20, 2016: memberIsn’t the “whether to translate Bitcoin Core” discussion irrelevant to this pull? It just factors it out, doesn’t make it untranslatable right?
Also: needs conflicts resolved
luke-jr commented at 5:24 pm on January 20, 2016: memberIsn’t the “whether to translate Bitcoin Core” discussion irrelevant to this pull? It just factors it out, doesn’t make it untranslatable right?
Right, it’s a tangent discussion. If it’s decided to make it untranslatable, someone would need to open a new PR - it’s outside the scope of this one, which maintains the status quo of “translatable”.
Merged master (conflicts resolved).
jtimon commented at 11:45 am on January 21, 2016: contributor@laanwj I thought this was out of 0.12 because of the translation (and things like “bitcoin kern” sound incredibly stupid as translations to me), but I didn’t thought about languages that don’t use the latin alphabet. My apologies, let’s leave that out of this PR.MarcoFalke commented at 11:51 am on January 21, 2016: memberThis was left out of 0.12 because it would change some translations after translation freeze. The changes are necessary due to the refactoring and I think @luke-jr already applied the refactoring to the translations on trasifex accordingly? (If so, this could go into 0.12.1)laanwj commented at 3:22 pm on January 22, 2016: memberThis gives me an empty translation string in
bitcoinstrings.cpp
, the output of GNU gettext:0+QT_TRANSLATE_NOOP("bitcoin-core", ""),
I’m not sure where it comes from - I can’t find any direct
_("")
in the code. But it indicates something is wrong, maybe a _() that gets passed a macro or variable.*Note: * after merging this, need to re-run
autogen.sh
andconfigure
otherwise there will be an undefined macro error during compile.laanwj commented at 2:36 pm on January 25, 2016: member@luke-jr It had nothing to do with what I thought above. You can apply the following diff to prevent adding an empty translation string:
0diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py 1index 2a6e4b9..cd76fab 100755 2--- a/share/qt/extract_strings_qt.py 3+++ b/share/qt/extract_strings_qt.py 4@@ -72,7 +72,7 @@ f.write(""" 5 f.write('static const char UNUSED *bitcoin_strings[] = {\n') 6 f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('PACKAGE_NAME'),)) 7 f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS'),)) 8-if os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') != os.getenv('PACKAGE_NAME'): 9+if os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') and os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') != os.getenv('PACKAGE_NAME'): 10 f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION'),)) 11 messages.sort(key=operator.itemgetter(0)) 12 for (msgid, msgstr) in messages:
(probably makes sense to do this for the other getenvs as well, thinking of it)
luke-jr commented at 5:20 pm on January 25, 2016: memberWhy would those variables ever be undefined or empty? :/laanwj commented at 9:34 am on January 27, 2016: memberAs said, COPYRIGHT_HOLDERS_SUBSTITUTION ends up empty in my tests, resulting in an empty translation string. If this is not the intention something else must be going wrong.splashscreen: Resize text to fit exactly 78ec83ddfeMove PACKAGE_URL to configure.ac 29598e41a5Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly cddffaf5e6luke-jr force-pushed on Jan 28, 2016luke-jr commented at 4:58 am on January 28, 2016: member@laanwj Ok, fixed that.
Also fixed the text sizing logic in splashscreen to be more flexible with unexpected fonts and/or name lengths; and moved PACKAGE_URL from setup.nsi.in to configure.ac’s AC_INIT (note that it uses the old bitcoin.org URL in the commit itself, and updated in the merge with master).
in configure.ac: in ccca8b470f outdated
5@@ -6,7 +6,9 @@ define(_CLIENT_VERSION_REVISION, 99) 6 define(_CLIENT_VERSION_BUILD, 0) 7 define(_CLIENT_VERSION_IS_RELEASE, false) 8 define(_COPYRIGHT_YEAR, 2016) 9-AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin]) 10+define(_COPYRIGHT_HOLDERS,[The %s developers])
laanwj commented at 9:49 am on January 28, 2016:Won’t this make it much to easy to ‘steal’ copyright, by just changing this value? We discussed something about only making it possible to add copyright holders this way, not replace the current ones. Or am I misunderstanding how this works and this is true already?
luke-jr commented at 4:12 pm on January 28, 2016:It was always easy to ‘steal’. This simply makes it easy to extend without stealing: changing the package name itself (in AC_INIT) won’t automatically change the substitution here (as with the original PR), and it can be easily amended to “The %s and FooCoin developers”.
laanwj commented at 12:18 pm on January 29, 2016:Yes, it’s easy to do anyway, if you really want to, but it should be as hard as possible to do so accidentally. E.g. I strongly feel it should at least involve changing the source code, not just the build metadata. Adding potential copyright holders in the build metadata is fine with me, although those in turn may have the same concern.
luke-jr commented at 6:10 pm on January 29, 2016:How about moving _COPYRIGHT_HOLDERS_SUBSTITUTION out of the top, down to the AC_SUBST area below?
jtimon commented at 7:04 pm on January 29, 2016:This suggestion may sound stupid…but how about repeating the line if %s != “Bitcoin Core” (or just always repeating the line if that’s too complicated)? That way, when someone uses the code and wants to add something to the copyright, “The Bitcoin Core Developers” will be maintained first, before the modified one, which is what forks of this project should always do.
laanwj commented at 10:59 am on February 1, 2016:Moving it doesn’t solve my issue; to be clear: having the copyright in a autoconf variable means it is passed to the compiler as a-D...
flag. I think this is ridiculous. Copyright should be in the code, not something that can be varied by changing a compiler argument. @jtimon’s solution sounds somewhat better to me. It needs to be impossible to get rid of our copyright by just changing build metadata, without changing the actual code.
luke-jr commented at 6:53 pm on February 1, 2016:The problem with simply moving this to the code, is that the copyright notice appears outside of code also (typically in single-line format).
laanwj commented at 11:49 am on February 2, 2016:OK, fair enough. In this case I only care about the copyright instance in the code (which will be shown with
--version
and in the about box) that should be resilient to change of compiler arguments.If there are other ones that are also in metadata, having them be modifiable in other metadata doesn’t bother me.
luke-jr commented at 5:43 am on February 3, 2016:Ok, how’s this look now?
laanwj commented at 12:05 pm on February 4, 2016:Looks good to me now, going to testRewrite FormatParagraph to handle newlines within input strings correctly cc2095ecaeWhen/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen 027fdb83b4Merge branch 'master' into single_prodname a68bb9f5e7luke-jr force-pushed on Feb 3, 2016laanwj commented at 12:36 pm on February 4, 2016: member0Bitcoin Core Daemon version v0.12.99.0-b204181-dirty 1Copyright (C) 2009-2016 The Shitcoin Core developers 2Copyright (C) 2009-2016 The Bitcoin Core developers
(could nit on the years, probably derived software will have a different year range for their own development, but it’s good enough for a fallback) ACK a68bb9f
laanwj merged this on Feb 4, 2016laanwj closed this on Feb 4, 2016
laanwj referenced this in commit 2cdbf28cf3 on Feb 4, 2016luke-jr referenced this in commit d805d84302 on Jun 28, 2016luke-jr referenced this in commit 5386064176 on Jun 29, 2016luke-jr referenced this in commit 4deeadbc25 on Jun 30, 2016sickpig referenced this in commit 41c7bce8f3 on Mar 31, 2017codablock referenced this in commit 47783416ff on Sep 16, 2017codablock referenced this in commit 56431b423d on Sep 19, 2017codablock referenced this in commit 4e357fe2c0 on Dec 9, 2017codablock referenced this in commit ead47f6f4e on Dec 9, 2017codablock referenced this in commit e7a6f79e5a on Dec 11, 2017MarcoFalke locked this on Sep 8, 2021
github-metadata-mirror
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-22 03:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me