Script Canvas node translation system and naming consistency

Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
lsemp3d
2021-12-07 15:40:04 -08:00
parent 8d096ebf61
commit 72bfd8bdf8
1515 changed files with 235974 additions and 2095 deletions
@@ -20,6 +20,7 @@
#include <GraphCanvas/Editor/GraphCanvasProfiler.h>
#include <GraphCanvas/tools.h>
#include <GraphCanvas/Styling/StyleHelper.h>
#include <Translation/TranslationBus.h>
namespace GraphCanvas
{
@@ -76,19 +77,11 @@ namespace GraphCanvas
m_hasBorderOverride = false;
}
void GraphCanvasLabel::SetLabel(const AZStd::string& label, const AZStd::string& translationContext, const AZStd::string& translationKey)
void GraphCanvasLabel::SetLabel(const AZStd::string& value)
{
TranslationKeyedString keyedString(label, translationContext, translationKey);
SetLabel(keyedString);
}
void GraphCanvasLabel::SetLabel(const TranslationKeyedString& value)
{
AZStd::string displayString = value.GetDisplayString();
if (m_labelText.compare(QString(displayString.c_str())))
if (m_labelText.compare(QString(value.c_str())))
{
m_labelText = Tools::qStringFromUtf8(displayString);
m_labelText = Tools::qStringFromUtf8(value);
UpdateDisplayText();
RefreshDisplay();