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

Translate percentage values for different locales #19643

Closed
wants to merge 1 commit into from

Conversation

multiprogramm
Copy link

@multiprogramm multiprogramm commented Sep 24, 2023

Fix percent formatting style for different languages for all % values (excluding web-ui).

See also #19201, @bitigchi described this problem there.

@bitigchi
Copy link

This is most appreciated. Thank you very much!

@glassez
Copy link
Member

glassez commented Sep 27, 2023

I will not focus on the details of the implementation yet, but will focus on general issues.

The first and most important thing I don't like is delegating the solution of this problem to translators. Having delved into this topic a little, I did not find enough convincing prerequisites to prefer such a generic (but less reliable) solution.
All we need is to select the correct position of the percent sign depending on the selected locale. IIRC, there are not many languages in which it is placed before a number. I doubt there is any other language supported by qBittorrent besides Turkish that uses prefix notation. In any case, it would not be so difficult to find out, or just wait for user feedback, as was the case with Turkish.
@qbittorrent/bug-handlers, what do you think?

@glassez
Copy link
Member

glassez commented Sep 27, 2023

I also created QTBUG-117635.

@xavier2k6
Copy link
Member

I think Qt should handle something like this as well as possibly the upper/lower case issue from #8785

@glassez
Copy link
Member

glassez commented Sep 27, 2023

I also created QTBUG-117635.

Note, it doesn't mean that I want to wait for it to be solved by Qt.

@bitigchi
Copy link

On Qt side there are already several bug reports about this (one of them being mine), thanks for raising the issue once more.

Regarding delegating this issue to translators, the translators of the languages with different notations is generally aware of the issue, and until this is fixed on the Qt side, it's better than leaving it unfixed I guess.

@glassez
Copy link
Member

glassez commented Sep 27, 2023

it's better than leaving it unfixed I guess.

As I said above:

I also created QTBUG-117635.

Note, it doesn't mean that I want to wait for it to be solved by Qt.

I just dislike the suggested workaround with delegating it to translators.

@multiprogramm
Copy link
Author

If they do this in QT, it'll be much better! And I agree that translation and localization are different things.
If we don't want to wait QT solution and don't want to delegate it to translators, is there anything I can do in this PR? Can I hardcode using the current list of languages? Or maybe there is a better solution?

(By the way, it's not just about the position of the percentage, but also separating it with a space or not)

@xavier2k6
Copy link
Member

xavier2k6 commented Oct 5, 2023

@glassez Would Qt::LayoutDirectionAuto be of any benefit?

Copy link

github-actions bot commented Dec 5, 2023

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

@github-actions github-actions bot added the Stale label Dec 5, 2023
Copy link

This PR was closed because it has been stalled for some time with no activity.

@github-actions github-actions bot closed this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants