Peers Window rename ‘Peer id’ to ‘Peer’ #311

pull jarolrod wants to merge 2 commits into bitcoin-core:master from jarolrod:peer_id_improv changing 2 files +26 −2
  1. jarolrod commented at 5:35 am on May 3, 2021: member

    Picking up #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 Screen Shot 2021-05-05 at 4 08 45 AM
  2. hebasto commented at 9:26 pm on May 3, 2021: member

    @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?

  3. jarolrod commented at 4:26 pm on May 4, 2021: member
    @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
  4. gui: rename "Peer Id" to "Peer" in tab column and details area
    to allow resizing the column more tightly
    73a91c63ec
  5. jarolrod force-pushed on May 5, 2021
  6. jarolrod commented at 8:11 am on May 5, 2021: member

    Update from 4ed95c0 -> 73a91c6

    Changes:

    • Keep Peer # left-aligned as this is more appropriate for a tabular figure
  7. jarolrod renamed this:
    Peers Window 'Peer id' improvements
    Peers Window rename 'Peer id' to `Peer`
    on May 5, 2021
  8. jarolrod renamed this:
    Peers Window rename 'Peer id' to `Peer`
    Peers Window rename 'Peer id' to 'Peer'
    on May 5, 2021
  9. hebasto added the label UI on May 9, 2021
  10. hebasto commented at 5:22 pm on May 9, 2021: member
    • 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)

  11. jonatack commented at 10:07 pm on May 10, 2021: contributor

    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.

  12. jonatack commented at 10:22 pm on May 10, 2021: contributor

    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.

  13. hebasto commented at 10:30 pm on May 10, 2021: member

    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!

  14. jonatack commented at 6:08 am on May 11, 2021: contributor

    № - 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.

  15. hebasto commented at 4:16 pm on May 12, 2021: member
    Agree to use any neutral replacement for “id” string, even just “#” for English locale :) https://en.wikipedia.org/wiki/Number_sign
  16. jonatack commented at 4:25 pm on May 12, 2021: contributor
    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.
  17. hebasto commented at 5:02 pm on May 12, 2021: member
    It seem this PR needs translation comments only :)
  18. promag commented at 5:07 pm on May 12, 2021: contributor
    Honest opinion here, could be empty. Otherwise ID or # LGTM.
  19. RandyMcMillan commented at 6:15 pm on May 12, 2021: contributor

    In this old PR #135 “ID” looked ok…

  20. jarolrod commented at 3:00 am on May 22, 2021: member

    Updated from 73a91c63ec72e62ef76fbc857baff14b099a1358 -> b405f19c953d9cd5aa90b66001c31cc58230fb78 (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
  21. hebasto added the label Translations on May 25, 2021
  22. in src/qt/peertablemodel.h:82 in b405f19c95 outdated
    78+    const QStringList columns{
    79+        /*: Title of Peers Table column which contains a
    80+            unique number used to identify a connection. */
    81+        tr("Peer"),
    82+        /*: Title of Peers Table column which contains the
    83+            IP/Onion/I2P address we used to connect to the peer. */
    


    hebasto commented at 9:24 pm on May 25, 2021:
    “we used to connect to the peer” – looks like it is about outgoing connections only.

    jarolrod commented at 9:35 pm on May 25, 2021:
    what do you think about this rephrasing: Title of the Peers Table column which contains the IP/Onion/I2P address of the connected peer

    hebasto commented at 9:36 pm on May 25, 2021:
    lgtm

    jonatack commented at 10:14 pm on May 25, 2021:

    “column for the peer address” ?

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

  23. in src/qt/peertablemodel.h:85 in b405f19c95 outdated
    81+        tr("Peer"),
    82+        /*: Title of Peers Table column which contains the
    83+            IP/Onion/I2P address we used to connect to the peer. */
    84+        tr("Address"),
    85+        /*: Title of Peers Table column which contains a value for
    86+            the type of connection we have established with the peer.
    


    hebasto commented at 9:25 pm on May 25, 2021:
    “a value for the type” – sounds unusual for me.

    jonatack commented at 10:10 pm on May 25, 2021:

    agree that “we have established” sounds like outbound

    “which describes the type of peer connection” ?

  24. in src/qt/peertablemodel.h:89 in b405f19c95 outdated
    85+        /*: Title of Peers Table column which contains a value for
    86+            the type of connection we have established with the peer.
    87+            Type is a term denoting what the connection is for. */
    88+        tr("Type"),
    89+        /*: Title of Peers Table column which contains a value for
    90+            the network the peer resides on. */
    


    hebasto commented at 9:25 pm on May 25, 2021:
    “a value for the network” – sounds unusual for me.

    jonatack commented at 10:11 pm on May 25, 2021:
    “column for the network the peer connected through” ?
  25. in src/qt/peertablemodel.h:95 in b405f19c95 outdated
    91+        tr("Network"),
    92+        /*: Title of Peers Table column which contains a value for
    93+            the latency of the connection established with the peer. */
    94+        tr("Ping"),
    95+        /*: Title of Peers Table column which contains a value for
    96+            the total amount of bytes we have sent to the peer. */
    


    hebasto commented at 9:26 pm on May 25, 2021:
    “bytes” – could the exact name of the unit be avoided? (two places)
  26. in src/qt/peertablemodel.h:102 in b405f19c95 outdated
     98+        /*: Title of Peers Table column which contains a value for
     99+            the total amount of bytes we have received from the peer. */
    100+        tr("Received"),
    101+        /*: Title of Peers Table column which contains the peer's
    102+            User Agent string. A peer can configure this value to
    103+            allow itself to be identifiable. */
    


    hebasto commented at 9:29 pm on May 25, 2021:
    I assume there could be more reasons to use -uacomment, maybe avoid this particular pattern to make the comment more general?
  27. hebasto approved
  28. hebasto commented at 9:30 pm on May 25, 2021: member

    ACK b405f19c953d9cd5aa90b66001c31cc58230fb78, 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.

  29. qt: add translator comments for peers table columns
    Adds Qt Translator Comments to each Peers Table column to aid translators by providing context.
    657b33ef2d
  30. jarolrod force-pushed on May 26, 2021
  31. jarolrod commented at 1:16 am on May 26, 2021: member

    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:

     0diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
     1index 268ae013e..3d195342f 100644
     2--- a/src/qt/peertablemodel.h
     3+++ b/src/qt/peertablemodel.h
     4@@ -79,27 +79,25 @@ private:
     5             unique number used to identify a connection. */
     6         tr("Peer"),
     7         /*: Title of Peers Table column which contains the
     8-            IP/Onion/I2P address we used to connect to the peer. */
     9+            IP/Onion/I2P address of the connected peer. */
    10         tr("Address"),
    11-        /*: Title of Peers Table column which contains a value for
    12-            the type of connection we have established with the peer.
    13-            Type is a term denoting what the connection is for. */
    14+        /*: Title of Peers Table column which describes the type of
    15+            peer connection. The "type" describes why the connection exists. */
    16         tr("Type"),
    17-        /*: Title of Peers Table column which contains a value for
    18-            the network the peer resides on. */
    19+        /*: Title of Peers Table column which states the network the peer
    20+            connected through. */
    21         tr("Network"),
    22-        /*: Title of Peers Table column which contains a value for
    23-            the latency of the connection established with the peer. */
    24+        /*: Title of Peers Table column which indicates the current latency
    25+            of the connection with the peer. */
    26         tr("Ping"),
    27-        /*: Title of Peers Table column which contains a value for
    28-            the total amount of bytes we have sent to the peer. */
    29+        /*: Title of Peers Table column which indicates the total amount of
    30+            network information we have sent to the peer. */
    31         tr("Sent"),
    32-        /*: Title of Peers Table column which contains a value for
    33-            the total amount of bytes we have received from the peer. */
    34+        /*: Title of Peers Table column which indicates the total amount of
    35+            network information we have received from the peer. */
    36         tr("Received"),
    37         /*: Title of Peers Table column which contains the peer's
    38-            User Agent string. A peer can configure this value to
    39-            allow itself to be identifiable. */
    40+            User Agent string. */
    41         tr("User Agent")};
    42     std::unique_ptr<PeerTablePriv> priv;
    43     QTimer *timer;
    
  32. jonatack commented at 1:15 pm on May 26, 2021: contributor
    utACK 657b33ef2de77acd1061cdf4d1d64d0e086d75df
  33. hebasto approved
  34. hebasto commented at 9:11 pm on May 26, 2021: member
    re-ACK 657b33ef2de77acd1061cdf4d1d64d0e086d75df
  35. hebasto merged this on May 26, 2021
  36. hebasto closed this on May 26, 2021

  37. sidhujag referenced this in commit 527de1c174 on May 27, 2021
  38. gwillen referenced this in commit 6d8ad49505 on Jun 1, 2022
  39. bitcoin-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-12-22 01:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me