Localized all relevant numbers visible to end-user (#2488)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "singletons/Resources.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "util/Clipboard.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
#include "util/Shortcut.hpp"
|
||||
@@ -611,7 +612,8 @@ void UserInfoPopup::updateUserData()
|
||||
|
||||
this->ui_.nameLabel->setText(user.displayName);
|
||||
this->setWindowTitle(TEXT_TITLE.arg(user.displayName));
|
||||
this->ui_.viewCountLabel->setText(TEXT_VIEWS.arg(user.viewCount));
|
||||
this->ui_.viewCountLabel->setText(
|
||||
TEXT_VIEWS.arg(localizeNumbers(user.viewCount)));
|
||||
this->ui_.createdDateLabel->setText(
|
||||
TEXT_CREATED.arg(user.createdAt.section("T", 0, 0)));
|
||||
this->ui_.userIDLabel->setText(TEXT_USER_ID + user.id);
|
||||
@@ -635,7 +637,7 @@ void UserInfoPopup::updateUserData()
|
||||
return;
|
||||
}
|
||||
this->ui_.followerCountLabel->setText(
|
||||
TEXT_FOLLOWERS.arg(followers.total));
|
||||
TEXT_FOLLOWERS.arg(localizeNumbers(followers.total)));
|
||||
},
|
||||
[] {
|
||||
// on failure
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/TooltipPreviewImage.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/LayoutHelper.hpp"
|
||||
#include "util/StreamerMode.hpp"
|
||||
@@ -47,7 +48,7 @@ namespace {
|
||||
text += "r9k, ";
|
||||
if (modes->slowMode)
|
||||
text +=
|
||||
QString("slow(%1), ").arg(QString::number(modes->slowMode));
|
||||
QString("slow(%1), ").arg(localizeNumbers(modes->slowMode));
|
||||
if (modes->emoteOnly)
|
||||
text += "emote, ";
|
||||
if (modes->submode)
|
||||
@@ -57,7 +58,7 @@ namespace {
|
||||
if (modes->followerOnly != 0)
|
||||
{
|
||||
text += QString("follow(%1m), ")
|
||||
.arg(QString::number(modes->followerOnly));
|
||||
.arg(localizeNumbers(modes->followerOnly));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -131,7 +132,7 @@ namespace {
|
||||
return QString("%1 for %2 with %3 viewers")
|
||||
.arg(s.rerun ? "Vod-casting" : "Live")
|
||||
.arg(s.uptime)
|
||||
.arg(QString::number(s.viewerCount));
|
||||
.arg(localizeNumbers(s.viewerCount));
|
||||
}();
|
||||
|
||||
return QString("<p style=\"text-align: center;\">" + //
|
||||
@@ -163,7 +164,7 @@ namespace {
|
||||
if (settings.headerUptime)
|
||||
title += " - " + s.uptime;
|
||||
if (settings.headerViewerCount)
|
||||
title += " - " + QString::number(s.viewerCount);
|
||||
title += " - " + localizeNumbers(s.viewerCount);
|
||||
if (settings.headerGame && !s.game.isEmpty())
|
||||
title += " - " + s.game;
|
||||
if (settings.headerStreamTitle && !s.title.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user