aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Model/Workflow')
-rw-r--r--core/src/Model/Workflow/Workflow_Main.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/core/src/Model/Workflow/Workflow_Main.cpp b/core/src/Model/Workflow/Workflow_Main.cpp
index a01ab7b..adf944e 100644
--- a/core/src/Model/Workflow/Workflow_Main.cpp
+++ b/core/src/Model/Workflow/Workflow_Main.cpp
@@ -2,9 +2,9 @@
#include "Model/GlobalStates.hpp"
#include "Model/Project.hpp"
-#include "UI/Localization.hpp"
#include "UI/UI.hpp"
#include "Utils/UUID.hpp"
+#include "Utils/I18n.hpp"
#include <imgui.h>
#include <imgui_node_editor.h>
@@ -804,8 +804,6 @@ Workflow* WorkflowAssetList::LoadImpl(const SavedAsset& asset) const
void WorkflowAssetList::DisplayAssetCreator(ListState& state)
{
- auto ls = LocaleStrings::Instance.get();
-
auto ValidateNewName = [&]() -> void {
if (mACNewName.empty()) {
mACNewNameError = NameSelectionError::Empty;
@@ -824,10 +822,10 @@ void WorkflowAssetList::DisplayAssetCreator(ListState& state)
switch (mACNewNameError) {
case NameSelectionError::None: break;
case NameSelectionError::Duplicated:
- ImGui::ErrorMessage(ls->DuplicateNameError.Get());
+ ImGui::ErrorMessage(I18N_TEXT("Duplicate name", L10N_DUPLICATE_NAME_ERROR));
break;
case NameSelectionError::Empty:
- ImGui::ErrorMessage(ls->EmptyNameError.Get());
+ ImGui::ErrorMessage(I18N_TEXT("Name cannot be empty", L10N_EMPTY_NAME_ERROR));
break;
}
};
@@ -841,13 +839,13 @@ void WorkflowAssetList::DisplayAssetCreator(ListState& state)
ValidateNewName();
};
- if (ImGui::InputText(ls->Name.Get(), &mACNewName)) {
+ if (ImGui::InputText(I18N_TEXT("Name", L10N_NAME), &mACNewName)) {
ValidateNewName();
}
ShowNewNameErrors();
- if (ImGui::Button(ls->Confirm.Get(), !IsInputValid())) {
+ if (ImGui::Button(I18N_TEXT("OK", L10N_CONFIRM), !IsInputValid())) {
ImGui::CloseCurrentPopup();
Create(SavedAsset{
@@ -856,18 +854,16 @@ void WorkflowAssetList::DisplayAssetCreator(ListState& state)
ResetState();
}
ImGui::SameLine();
- if (ImGui::Button(ls->Cancel.Get())) {
+ if (ImGui::Button(I18N_TEXT("Cancel", L10N_CANCEL))) {
ImGui::CloseCurrentPopup();
}
}
void WorkflowAssetList::SetupDetailsTable(const char* tableId) const
{
- auto ls = LocaleStrings::Instance.get();
-
ImGui::BeginTable(tableId, 1, ImGuiTableFlags_Borders);
- ImGui::TableSetupColumn(ls->Name.Get());
+ ImGui::TableSetupColumn(I18N_TEXT("Name", L10N_NAME));
ImGui::TableHeadersRow();
}