Do not translate file extensions #220
pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210223-fileext changing 6 files +8 −6-
hebasto commented at 3:30 pm on February 23, 2021: memberFile extensions are untranslatable by their nature.
-
jarolrod commented at 6:20 pm on February 23, 2021: member
ACK 6af0a9a9e59b17e6b8491bc9715b67b5310e599e
Nice catch, this will help prevent any unintended translations
-
jonatack commented at 7:44 pm on February 23, 2021: contributor
Tested ACK 6af0a9a9e59b17e6b8491bc9715b67b5310e599e
Two questions: (a) does this change require translators to update every language? (b) Testing this patch, I don’t see the file extensions in the dialogs. I then built master and I don’t see the extensions there either :thinking: (checked in default and in French)
0src/qt/locale/bitcoin_fr.ts:1574: <source>Partially Signed Transaction (Binary) (*.psbt)</source> 1src/qt/locale/bitcoin_fr.ts:1575: <translation>Transaction signée partiellement (fichier binaire) (*.psbt)</translation> 2src/qt/locale/bitcoin_fr.ts:2557: <source>Partially Signed Transaction (Binary) (*.psbt)</source> 3src/qt/locale/bitcoin_fr.ts:2558: <translation>Transaction signée partiellement (fichier binaire) (*.psbt)</translation> 4src/qt/locale/bitcoin_fr.ts:3496: <source>Partially Signed Transaction (*.psbt)</source> 5src/qt/locale/bitcoin_fr.ts:3497: <translation>Transaction signée partiellement (*.psbt)</translation>
-
hebasto commented at 8:04 pm on February 23, 2021: member
(a) does this change require translators to update every language?
Yes. I’d say that each translator updates her language :)
(b) Testing this patch, I don’t see the file extensions in the dialogs. I then built master and I don’t see the extensions there either thinking (checked in default and in French)
See
GUIUtil::getSaveFileName
implementation. -
in src/qt/addressbookpage.cpp:300 in 6af0a9a9e5 outdated
297+ QString filename = GUIUtil::getSaveFileName( 298+ this, 299 tr("Export Address List"), QString(), 300- tr("Comma separated file (*.csv)"), nullptr); 301+ // TODO: Replace QStringLiteral with QLatin1String when Qt minimum version >= 5.10. 302+ tr("Comma separated file (%1)").arg(QStringLiteral("*.csv")), nullptr);
luke-jr commented at 5:12 pm on February 24, 2021:IIRC the parenthesis format is also special, to trigger the dialog filtering files shown. So perhaps this should be:
0 tr("Comma separated file", "Translated name of CSV file format") + QStringLiteral(" (*.csv)"), nullptr);
luke-jr changes_requestedhebasto force-pushed on Feb 24, 2021in src/qt/psbtoperationsdialog.cpp:144 in 5fe0ff342b outdated
140@@ -141,7 +141,7 @@ void PSBTOperationsDialog::saveTransaction() { 141 filename_suggestion.append(".psbt"); 142 QString filename = GUIUtil::getSaveFileName(this, 143 tr("Save Transaction Data"), filename_suggestion, 144- tr("Partially Signed Transaction (Binary) (*.psbt)"), &selected_filter); 145+ tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selected_filter);
luke-jr commented at 10:18 pm on February 24, 2021:Annotate thetr
here and later too?
luke-jr commented at 11:18 pm on February 24, 2021:0 tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selected_filter);
hebasto commented at 11:03 pm on February 24, 2021: memberCould you suggest a good variant of annotation?
On Thu, 25 Feb 2021 at 00:18 Luke Dashjr notifications@github.com wrote:
@luke-jr commented on this pull request.
In src/qt/psbtoperationsdialog.cpp https://github.com/bitcoin-core/gui/pull/220#discussion_r582345696:
@@ -141,7 +141,7 @@ void PSBTOperationsDialog::saveTransaction() { filename_suggestion.append(".psbt"); QString filename = GUIUtil::getSaveFileName(this, tr(“Save Transaction Data”), filename_suggestion,
-
tr("Partially Signed Transaction (Binary) (*.psbt)"), &selected_filter);
-
tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selected_filter);
Annotate the tr here and later too?
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/bitcoin-core/gui/pull/220#pullrequestreview-597986728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3PXPWTEF7VBYA6M57P7L3TAV3MDANCNFSM4YCWAUUA .
–
– Hennadii Stepanov
hebasto renamed this:
qt: Do not translate file extensions
Do not translate file extensions
on Feb 25, 2021hebasto force-pushed on Feb 25, 2021jonatack commented at 12:01 pm on February 25, 2021: contributorre-ACK d4ed848e00cc0232cae234f0361b54bb7375fe2f
(IDK if the “Wallet Data” ts string should be annotated as well or if it’s self-evident.)
in src/qt/walletview.cpp:276 in d4ed848e00 outdated
272@@ -273,7 +273,7 @@ void WalletView::backupWallet() 273 { 274 QString filename = GUIUtil::getSaveFileName(this, 275 tr("Backup Wallet"), QString(), 276- tr("Wallet Data (*.dat)"), nullptr); 277+ tr("Wallet Data") + QLatin1String(" (*.dat)"), nullptr);
luke-jr commented at 6:07 pm on February 25, 2021:Also needs annotation…
(If you were asked to translate “Wallet Data” with no context, would you know what it was referring to? XD)
qt: Do not translate file extensions 88df300f20hebasto force-pushed on Mar 6, 2021Talkless approvedTalkless commented at 2:41 pm on March 7, 2021: nonetACK 88df300f20da02060694cfe643e1c882efaa306c, tested on Debian Sid with Qt 5.15.2. Tested all filters except for .psbt.jarolrod commented at 6:50 pm on March 7, 2021: memberre-ACK 88df300f20da02060694cfe643e1c882efaa306c
when to use and how to place disambiguation strings is another thing to add to the Qt dev notes
hebasto commented at 8:03 pm on March 14, 2021: memberSome things appear unclear to me.
-
Does the non-default
disambiguation
argument, which is passed to thetr
function, is visible to translators on transifex? -
What are other options to make designated notes to translators on transifex? Do “Translator Comments” work in such a manner?
In the meantime, converting this pr to a draft.
hebasto marked this as a draft on Mar 14, 2021laanwj commented at 11:20 am on March 16, 2021: memberConcept and code review ACK 88df300f20da02060694cfe643e1c882efaa306c
Does the non-default disambiguation argument, which is passed to the tr function, is visible to translators on transifex? What are other options to make designated notes to translators on transifex? Do “Translator Comments” work in such a manner?
I think those are great questions. I do not know the answer though. Maybe @wtogami knows who can weigh in—from what i remember he knows some people at Transifex.
hebasto commented at 11:31 am on March 16, 2021: memberEven if disambiguation arguments won’t actually help translators, they won’t hurt.
As already many ACKs are collected, reverted back from “Draft” to “Ready for review”.
hebasto marked this as ready for review on Mar 16, 2021laanwj commented at 12:06 pm on March 16, 2021: memberAt least the comment makes it into the xml, that’s one part of it being picked up
0 <message> 1 <location line="+1"/> 2- <source>Comma separated file (*.csv)</source> 3+ <source>Comma separated file</source> 4+ <comment>Name of CSV file format</comment> 5 <translation type="unfinished"></translation> 6 </message>
laanwj merged this on Mar 16, 2021laanwj closed this on Mar 16, 2021
hebasto deleted the branch on Mar 16, 2021hebasto added the label Translations on Apr 25, 2021hebasto referenced this in commit b789914f17 on May 27, 2021bitcoin-core locked this on Aug 16, 2022
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 07:20 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me