mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Search engine doesn't work in italian from Web UI (maybe other languages besides English) #8350
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#8350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @giuseppe-dandrea on GitHub (Jan 31, 2019).
Please provide the following information
qBittorrent version and Operating System
qBittorrent v4.1.5
Raspbian 9 stretch
(qbittorrent installed from testing repos)
If on linux, libtorrent and Qt version
libtorrent v1.1.11.0
Qt v5.11.3
What is the problem
The search engine in the WebUI doesn't return any results if the language is Italian, but it works fine in the main client.
What is the expected behavior
Return any results from search plugins
Steps to reproduce
Extra info(if any)
Looked in the Network tab of the chrome dev tools and it seems that the first request of the search (a POST request to the
startendpoint) is performed with translated parameters.These are the form data in the english version:
pattern=ubuntu&category=all&plugins=allIn the italian version the params are translated, instead of
all, something like "Tutte le categorie" and "Tutti i plugins" appears.Maybe these parameters are not correctly managed in the api.
To avoid this bug set the language to English.
Hope this helps someone.
@glassez commented on GitHub (Jan 31, 2019):
@Piccirello, please check it.
@Piccirello commented on GitHub (Jan 31, 2019):
This is a tricky one. It doesn't appear any GUI strings are translated when the GUI isn't build. Which means all the Web UI translations using the CONTEXT of a GUI class just show in english.
This very likely isn't the entire issue, but it's making it hard for me to test.
@glassez commented on GitHub (Jan 31, 2019):
@Piccirello, I didn't understand your comment. What about GUI translations? WebUI uses independent translations currently. qBittorrent web application has its own translator so it shouldn't be affected by GUI.
It's an issue itself. Now we should have more appropriate contexts in WebUI.
@Piccirello commented on GitHub (Feb 1, 2019):
The current practice for all Web UI translations is to reference the appropriate GUI class with the same text. The only case where we deviate is when the Web UI contains text not contained in the GUI, in which case we use a context of
HttpServer.In my quick testing Web UI translations that use the Context of a GUI classes aren't translated when the build is configured with
--disable-gui.@glassez commented on GitHub (Feb 2, 2019):
Well, I had to waste my time...
@Piccirello, the problem is how you handle the category menu. Compare it to the plugin menu, which is implemented more correctly. In plugin menu you store both Display names (translated) and values (i.e. identifiers) so "All plugins" ans "Only enabled" items that can be translated always have correct identifiers ("all" and "enabled") stored in "value" attribute. I don't understand why you didn't do the same with the categories.
@glassez commented on GitHub (Feb 2, 2019):
This is a legacy of the outdated approach, when translation from GUI was used in Web UI.
@Piccirello commented on GitHub (Feb 2, 2019):
When did this approach change?
@glassez commented on GitHub (Feb 2, 2019):
#9026
Now Web UI uses independent translations. But context names are still legacy.