-
Notifications
You must be signed in to change notification settings - Fork 887
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
Properly localize numbers #2557
Properly localize numbers #2557
Conversation
I saw this #853 issue from the same author. Is this harder to fix? |
I haven't really looked into that issue |
While working on #2559 I noticed that 'en' will be used to format Like and Dislike numbers if no locale in freetube is set. diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js
index 4746dc55..6cc98007 100644
--- a/src/renderer/components/watch-video-info/watch-video-info.js
+++ b/src/renderer/components/watch-video-info/watch-video-info.js
@@ -219,7 +219,7 @@ export default Vue.extend({
}
const locale = this.currentLocale.replace('_', '-')
- return this.likeCount.toLocaleString([locale, 'en'])
+ return this.likeCount.toLocaleString([locale, 'default'])
},
parsedDislikeCount: function () {
@@ -228,7 +228,7 @@ export default Vue.extend({
}
const locale = this.currentLocale.replace('_', '-')
- return this.dislikeCount.toLocaleString([locale, 'en'])
+ return this.dislikeCount.toLocaleString([locale, 'default'])
},
likePercentageRatio: function () {
|
Sounds like a good idea to me, maybe keep 'en' but move it after default? |
@ChunkyProgrammer You shouldn't need to specify default here as you are getting the locale properly through i18n, so there will always be a locale set, the other PR doesn't currently do that. |
Co-authored-by: Aiz <66974576+Aiz0@users.noreply.github.com>
Properly localize numbers
Pull Request Type
Please select what type of pull request this is:
Related issue
closes #2547
Description
Number seperators (",", "." and " ") were not chosen based on locale and were always shown as ","
Screenshots (if appropriate)
Testing (for code that is not small enough to be easily understandable)
Used search with different locales (had to clear search to test)
Desktop (please complete the following information):