qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.22k stars 3.97k forks source link

'PeX support [%1]' string isn't available for translation #8169

Closed adem4ik closed 6 years ago

adem4ik commented 6 years ago

qBittorrent version and Operating System

v4.0.3 Windows 10 x64

What is the problem

'PeX support [%1]' string isn't available for translation

What is the expected behavior

'PeX support [%1]' string is available for translation on Transifex

Steps to reproduce

1) Options - Bittorent - 'Enable Peer Exchange (PeX) to find more peers' is ticked 2) Change qb language to anything else besides English 3) Restart qb 4) Open Execution Log

Extra info(if any)

image

Chocobo1 commented 6 years ago

Checked and it should be translatable: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/session.cpp#L468

And also checked Transifex, the string is not there! I've no idea what is going on...

adem4ik commented 6 years ago

Sorry for disturbing, I'm not a developer. But after reviewing https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/session.cpp I've noticed that, similar messages like "DHT support [%1]", "Local Peer Discovery support [%1]" or "Anonymous mode [%1]" can be found 2 times, while "PeX support [%1]" is presented there only once. For example:

LSD: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/session.cpp#L475 https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/session.cpp#L574

PeX: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/session.cpp#L476

Chocobo1 commented 6 years ago

I've noticed that, similar messages like "DHT support [%1]", "Local Peer Discovery support [%1]" or "Anonymous mode [%1]" can be found 2 times, while "PeX support [%1]" is presented there only once.

That's normal, the important part is the string should be enclosed by tr() so it gets replaced/translated, which is already done. Lets ping @sledgehammer999.

sledgehammer999 commented 6 years ago

This is probably related to #8220

sledgehammer999 commented 6 years ago

Fixed by https://github.com/qbittorrent/qBittorrent/commit/8f7fda492c17495b7c5812f3f12703dd88763c48 and see https://github.com/qbittorrent/qBittorrent/issues/8220#issuecomment-385712673 on what happened.