Skip to content
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

Peers Window rename 'Peer id' to 'Peer' #311

Merged
merged 2 commits into from
May 26, 2021

Conversation

jarolrod
Copy link
Member

@jarolrod jarolrod commented May 3, 2021

Picking up #290

Original PR Description:

While here, we also add Qt translator comments for the Peer Table columns.

Master PR
Screen Shot 2021-05-03 at 1 23 05 AM Screen Shot 2021-05-05 at 4 08 45 AM

@hebasto
Copy link
Member

hebasto commented May 3, 2021

@jarolrod

Did you consider how it will look on a long-running node when one-digit id peer is next to, say, four-digit id one?

@jarolrod
Copy link
Member Author

jarolrod commented May 4, 2021

@hebasto Actually, that's a good point. As a tabular figure, perhaps it makes more sense to leave as-is. Especially, if we enforce a monospace font at some point

@jarolrod
Copy link
Member Author

jarolrod commented May 5, 2021

Update from 4ed95c0 -> 73a91c6

Changes:

  • Keep Peer # left-aligned as this is more appropriate for a tabular figure

@jarolrod jarolrod changed the title Peers Window 'Peer id' improvements Peers Window rename 'Peer id' to Peer May 5, 2021
@jarolrod jarolrod changed the title Peers Window rename 'Peer id' to Peer Peers Window rename 'Peer id' to 'Peer' May 5, 2021
@hebasto hebasto added the UI All about "look and feel" label May 9, 2021
@hebasto
Copy link
Member

hebasto commented May 9, 2021

  • renames the peers tab column header from Peer Id to Peer to allow resizing the column more tightly

If saving of the horizontal space is the motivation, leaving just "ID" or "id" is strictly better approach for the following reasons:

  • the translated "Peer" could become much longer, e.g., the both variants in Ukrainian are "Вузол" or "З'єднання"
  • "ID"/"id" is shorter, and often remains untranslated

Also, #290 (comment)

@jonatack
Copy link
Member

Did you consider how it will look on a long-running node when one-digit id peer is next to, say, four-digit id one?

I considered it carefully and described some of that process in the parent PR description: "center-aligns the entries in the Peer column to align them under the column header rather than to the left (I also tried right-alignment but the values are unreadably close to the Address values and it seems more esthetic to be aligned under the header)."

Ideally they would be right-justified like in -netinfo. Center is still ok and under the header. Left for numbers doesn't make sense to me.

@jonatack
Copy link
Member

jonatack commented May 10, 2021

leaving just "ID" or "id" is strictly better approach

Hm, I disagree for the reasons I already described in the parent PR.

For laypeople (not devs or database people), the right word here is probably "number", "peer number" or just "peer", as "number" is self-understood. Of those three, peer is the shortest, and shorter than 4 characters doesn't make sense to consider as these peer numbers don't take long to reach 5+ digits anyway.

"ID" means "identification" and in common use, your ID card. "Show me some ID" is what the police officer or the security guard would ask you.

"Id" is a word from Freudian psychology IIRC.

Maybe a good solution is to have native speakers of each language decide on the best word for that language, and in cases where the English-as-a-first-language and English-as-a-second-language-or-as-dev-jargon differ, provide helpful translation hints in the translator comments.

@hebasto
Copy link
Member

hebasto commented May 10, 2021

Maybe a good solution is to have native speakers of each language decide on the best word for that language, and in cases where the English-as-a-first-language and English-as-a-second-language-or-as-dev-jargon differ, provide helpful translation hints in the translator comments.

Agree!

@jonatack
Copy link
Member

jonatack commented May 11, 2021

№ - numero will work..

https://en.wikipedia.org/wiki/Numero_sign

Interesting, it is a standard abbreviation in French, TIL it exists in English. I like it better than ID, not sure how well known it is and what the GUI policy is regarding signs/symbols/abbreviations.

@hebasto
Copy link
Member

hebasto commented May 12, 2021

Agree to use any neutral replacement for "id" string, even just "#" for English locale :)
https://en.wikipedia.org/wiki/Number_sign

@jonatack
Copy link
Member

These column headers are words, so for the English I would suggest using "Peer" and then describe alternatives ("This column means the peer number or ID") for translators in the tr comment.

@hebasto
Copy link
Member

hebasto commented May 12, 2021

It seem this PR needs translation comments only :)

@promag
Copy link
Contributor

promag commented May 12, 2021

Honest opinion here, could be empty. Otherwise ID or # LGTM.

@RandyMcMillan
Copy link
Contributor

In this old PR #135 "ID" looked ok...

@jarolrod
Copy link
Member Author

Updated from 73a91c6 -> b405f19 (pr311.02, pr311.03, diff)

Changes:

  • added translator comments for the columns of the Peers Table to address this comment. Hopefully, this translator comment is enough to guide the translation of the term and can appease all sides on the debate of ID vs Peer

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 b405f19, I agree on column title renaming, and as a translator I'm happy to see more translator comments.

I'm not an expert in the English Grammar, therefore, the following nits could be just ignored.

unique number used to identify a connection. */
tr("Peer"),
/*: Title of Peers Table column which contains the
IP/Onion/I2P address we used to connect to the peer. */
Copy link
Member

Choose a reason for hiding this comment

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

"we used to connect to the peer" -- looks like it is about outgoing connections only.

Copy link
Member Author

Choose a reason for hiding this comment

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

what do you think about this rephrasing:
Title of the Peers Table column which contains the IP/Onion/I2P address of the connected peer

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

Choose a reason for hiding this comment

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

"column for the peer address" ?

(reviewing from my phone so apologies if a bit out of context)

Comment on lines 84 to 85
/*: Title of Peers Table column which contains a value for
the type of connection we have established with the peer.
Copy link
Member

Choose a reason for hiding this comment

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

"a value for the type" -- sounds unusual for me.

Copy link
Member

Choose a reason for hiding this comment

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

agree that "we have established" sounds like outbound

"which describes the type of peer connection" ?

Comment on lines 88 to 89
/*: Title of Peers Table column which contains a value for
the network the peer resides on. */
Copy link
Member

Choose a reason for hiding this comment

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

"a value for the network" -- sounds unusual for me.

Copy link
Member

Choose a reason for hiding this comment

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

"column for the network the peer connected through" ?

the latency of the connection established with the peer. */
tr("Ping"),
/*: Title of Peers Table column which contains a value for
the total amount of bytes we have sent to the peer. */
Copy link
Member

Choose a reason for hiding this comment

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

"bytes" -- could the exact name of the unit be avoided? (two places)

tr("Received"),
/*: Title of Peers Table column which contains the peer's
User Agent string. A peer can configure this value to
allow itself to be identifiable. */
Copy link
Member

Choose a reason for hiding this comment

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

I assume there could be more reasons to use -uacomment, maybe avoid this particular pattern to make the comment more general?

Adds Qt Translator Comments to each Peers Table column to aid translators by providing context.
@jarolrod
Copy link
Member Author

jarolrod commented May 26, 2021

updated from b405f19 -> 657b33e (pr311.03, pr311.04, diff)

Changes:
Updated to address review comments on the translator comment contents, thanks @hebasto and @jonatack!

Here is a diff of how I've taken your suggestions and updated from pr311.03:

diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index 268ae013e..3d195342f 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -79,27 +79,25 @@ private:
             unique number used to identify a connection. */
         tr("Peer"),
         /*: Title of Peers Table column which contains the
-            IP/Onion/I2P address we used to connect to the peer. */
+            IP/Onion/I2P address of the connected peer. */
         tr("Address"),
-        /*: Title of Peers Table column which contains a value for
-            the type of connection we have established with the peer.
-            Type is a term denoting what the connection is for. */
+        /*: Title of Peers Table column which describes the type of
+            peer connection. The "type" describes why the connection exists. */
         tr("Type"),
-        /*: Title of Peers Table column which contains a value for
-            the network the peer resides on. */
+        /*: Title of Peers Table column which states the network the peer
+            connected through. */
         tr("Network"),
-        /*: Title of Peers Table column which contains a value for
-            the latency of the connection established with the peer. */
+        /*: Title of Peers Table column which indicates the current latency
+            of the connection with the peer. */
         tr("Ping"),
-        /*: Title of Peers Table column which contains a value for
-            the total amount of bytes we have sent to the peer. */
+        /*: Title of Peers Table column which indicates the total amount of
+            network information we have sent to the peer. */
         tr("Sent"),
-        /*: Title of Peers Table column which contains a value for
-            the total amount of bytes we have received from the peer. */
+        /*: Title of Peers Table column which indicates the total amount of
+            network information we have received from the peer. */
         tr("Received"),
         /*: Title of Peers Table column which contains the peer's
-            User Agent string. A peer can configure this value to
-            allow itself to be identifiable. */
+            User Agent string. */
         tr("User Agent")};
     std::unique_ptr<PeerTablePriv> priv;
     QTimer *timer;

@jonatack
Copy link
Member

utACK 657b33e

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.

re-ACK 657b33e

@hebasto hebasto merged commit 5c041cb into bitcoin-core:master May 26, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 27, 2021
657b33e qt: add translator comments for peers table columns (Jarol Rodriguez)
73a91c6 gui: rename "Peer Id" to "Peer" in tab column and details area (Jon Atack)

Pull request description:

  Picking up bitcoin-core/gui#290

  **Original PR Description:**
  - renames the peers tab column header from `Peer Id` to `Peer` to allow resizing the column more tightly (this will be particularly useful after #256) and does the same for the peer details area.

  While here, we also add Qt translator comments for the Peer Table columns.

  | Master        | PR               |
  | ----------- | ----------- |
  | ![Screen Shot 2021-05-03 at 1 23 05 AM](https://user-images.githubusercontent.com/23396902/116843818-20a14b00-abaf-11eb-913e-ddff11cda5cd.png) | ![Screen Shot 2021-05-05 at 4 08 45 AM](https://user-images.githubusercontent.com/23396902/117112825-a2cc7380-ad57-11eb-939b-1aceb4214ad1.png) |

ACKs for top commit:
  jonatack:
    utACK 657b33e
  hebasto:
    re-ACK 657b33e

Tree-SHA512: f50116f7ca8719cadf1f95f45e3594b3b92bde9c43eb954f3e963ed10629dd9406efdb5e96aa1f750a926e24a96321d824ed3780bd9cd748774e0b85fd0c9535
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin-core bitcoin-core locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Translations UI All about "look and feel"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants