-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Unify product name to as few places as possible #7192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Good. utACK |
e7bcf86 to
4f1b52b
Compare
src/init.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, makes sense to parametrize both years, even though the first one will never change
|
Nice! |
4f1b52b to
81748c9
Compare
|
Currently fails windows: https://bitcoin.jonasschnelli.ch/pulls/7192/build-win.log i'm happy to test this if windows issues are solved. |
364d118 to
c1be808
Compare
c1be808 to
648e964
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work. And you don't want the tr. Just use:
QString windowTitle = QString(PACKAGE_NAME) + " - ";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then it won't be translated? I don't mean to change that status quo in this PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, does this work then? Does qtranslate pick up the string out of tr(PACKAGE_NAME), even though it's a macro? Same for _(PACKAGE_NAME) in gettext? I thought only literal strings could be input to translation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it. I imagine there's some way to explicitly tell it? :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this has been addressed here.
|
Concept ACK (for 0.13 - due to translation changes this is too late for 0.12) |
src/qt/forms/debugwindow.ui
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs rebase to at least 5940cf33b35fb70979a7baa3046107a9b72d8f0f
648e964 to
c903ae4
Compare
|
Added 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. |
c903ae4 to
0898436
Compare
|
concept ACK 0898436e860f695028b3fc6b612074712bbdcbc6 |
0c15a7a to
da198c7
Compare
|
Ok, I believe I have addressed all previous requests, but also introduced a packaging FIXME which I hope @theuni can help out with... |
fbca801 to
809d521
Compare
809d521 to
a3481e9
Compare
|
This gives me an empty translation string in I'm not sure where it comes from - I can't find any direct *Note: * after merging this, need to re-run |
|
@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: diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py
index 2a6e4b9..cd76fab 100755
--- a/share/qt/extract_strings_qt.py
+++ b/share/qt/extract_strings_qt.py
@@ -72,7 +72,7 @@ f.write("""
f.write('static const char UNUSED *bitcoin_strings[] = {\n')
f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('PACKAGE_NAME'),))
f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS'),))
-if os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') != os.getenv('PACKAGE_NAME'):
+if os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') and os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION') != os.getenv('PACKAGE_NAME'):
f.write('QT_TRANSLATE_NOOP("bitcoin-core", "%s"),\n' % (os.getenv('COPYRIGHT_HOLDERS_SUBSTITUTION'),))
messages.sort(key=operator.itemgetter(0))
for (msgid, msgstr) in messages:(probably makes sense to do this for the other getenvs as well, thinking of it) |
|
Why would those variables ever be undefined or empty? :/ |
|
As 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. |
…ons so it gets passed to extract-strings correctly
601bdfc to
ccca8b4
Compare
|
@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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving _COPYRIGHT_HOLDERS_SUBSTITUTION out of the top, down to the AC_SUBST area below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with simply moving this to the code, is that the copyright notice appears outside of code also (typically in single-line format).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, how's this look now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, going to test
…add a second line to copyrights in -version, About dialog, and splash screen
ccca8b4 to
a68bb9f
Compare
(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) |
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr) cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr) cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr) 29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr) 78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr) 3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr) 4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr) e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr) 917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr) c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr) 902ccde depends: Add mac_alias to depends (Luke Dashjr) 82a2d98 depends: Add ds_store to depends (Cory Fields) de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields) e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr) 63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr) 1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr) d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr) cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr) cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr) 29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr) 78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr) 3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr) 4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr) e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr) 917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr) c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr) 902ccde depends: Add mac_alias to depends (Luke Dashjr) 82a2d98 depends: Add ds_store to depends (Cory Fields) de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields) e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr) 63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr) 1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr) d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr) cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr) cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr) 29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr) 78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr) 3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr) 4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr) e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr) 917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr) c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr) 902ccde depends: Add mac_alias to depends (Luke Dashjr) 82a2d98 depends: Add ds_store to depends (Cory Fields) de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields) e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr) 63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr) 1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr) d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
This should help keep the software name consistent within translations (Bitcoin Kern, Nucleul Bitcoin, etc) or forks (Bitcoin LJR, etc).