translation for 'Trophy earned!'

This commit is contained in:
DanielSvoboda 2025-02-25 23:35:45 -03:00
parent 65f7fa1c31
commit 40491b03f2
3 changed files with 13 additions and 3 deletions

View File

@ -118,7 +118,7 @@ void TrophyUI::Draw() {
ImGui::Indent(60);
}
const std::string combinedString = "Trophy earned!\n%s" + trophy_name;
const std::string combinedString = tr("Trophy earned!").toStdString() + "\n" + trophy_name;
const float wrap_width =
CalcWrapWidthForPos(GetCursorScreenPos(), (window_size.x - (60 * AdjustWidth)));
SetWindowFontScale(1.2 * AdjustHeight);
@ -135,7 +135,7 @@ void TrophyUI::Draw() {
SetCursorPosY((window_size.y - text_height) * 0.5);
}
ImGui::PushTextWrapPos(window_size.x - (60 * AdjustWidth));
TextWrapped("Trophy earned!\n%s", trophy_name.c_str());
TextWrapped("%s", combinedString.c_str());
ImGui::SameLine(window_size.x - (60 * AdjustWidth));
if (trophy_icon) {

View File

@ -13,9 +13,12 @@
#include "imgui/imgui_layer.h"
#include "imgui/imgui_texture.h"
#include <QObject>
namespace Libraries::NpTrophy {
class TrophyUI final : public ImGui::Layer {
class TrophyUI final : public QObject, public ImGui::Layer {
Q_OBJECT
public:
TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName,
const std::string_view& rarity);

View File

@ -887,6 +887,13 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Libraries::NpTrophy::TrophyUI</name>
<message>
<source>Trophy earned!</source>
<translation>Trophy earned!</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>