Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/EasyLocalizationToolEditor/Private/ELTCommandlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ int32 UELTCommandlet::Main(const FString& Params)
FString Fallback = TEXT("NONE");
FParse::Value(*Params, TEXT("-Fallback="), Fallback);

bool bGenerateStringTables = FParse::Param(*Params, TEXT("-GenStringTables"));

const FString LocName = FPaths::GetBaseFilename(LocPath);

// Run generation of loc files implementation. Get the output message and display it the localization fails.
FString OutMessage;
if (UELTEditor::GenerateLocFilesImpl(CSVPath, LocPath, LocName, Namespace, Separator, Fallback, OutMessage) == false)
if (UELTEditor::GenerateLocFilesImpl(CSVPath, LocPath, LocName, Namespace, Separator, Fallback, bGenerateStringTables, OutMessage) == false)
{
UE_LOG(ELTCommandletLog, Log, TEXT("+++ Failed to generate Localization: %s"), *OutMessage);
return 1;
Expand Down
465 changes: 359 additions & 106 deletions Source/EasyLocalizationToolEditor/Private/ELTEditor.cpp

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Source/EasyLocalizationToolEditor/Private/ELTEditorSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ void UELTEditorSettings::SetReimportAtEditorStartup(bool bNewReimportAtEditorSta
ELTE_SET_SETTING(bReimportAtEditorStartup, bNewReimportAtEditorStartup);
}

bool UELTEditorSettings::GetGenerateKeyReferenceStringTable()
{
ELTE_GET_SETTING(bGenerateKeyReferenceStringTable);
}

void UELTEditorSettings::SetGenerateKeyReferenceStringTable(bool bNewGenerateKeyReferenceStringTable)
{
ELTE_SET_SETTING(bGenerateKeyReferenceStringTable, bNewGenerateKeyReferenceStringTable);
}

bool UELTEditorSettings::GetPreviewInUIEnabled()
{
ELTE_GET_SETTING(bPreviewInUI);
Expand Down
13 changes: 13 additions & 0 deletions Source/EasyLocalizationToolEditor/Private/ELTEditorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ void UELTEditorWidget::CallSetLocalizationOnFirstRun(bool LocalizationOnFirstRun
#endif
}

void UELTEditorWidget::CallSetGenerateKeyReferenceStringTable(bool bGenerateKeyReferenceStringTable)
{
if (MyWidget.IsValid())
{
MyWidget->SetGenerateKeyReferenceStringTable(bGenerateKeyReferenceStringTable);
}
}

void UELTEditorWidget::CallSetLocalizationOnFirstRunLang(const FString& OnFirstRunLang)
{
#if ELTEDITOR_USE_SLATE_EDITOR_UI
Expand Down Expand Up @@ -281,6 +289,11 @@ void UELTEditorWidget::OnLocalizationOnFirstRunLangChanged(const FString& OnFirs
OnLocalizationOnFirstRunLangChangedDelegate.ExecuteIfBound(OnFirstRunLang);
}

void UELTEditorWidget::OnGenerateKeyReferenceStringTableChanged(bool bGenerateKeyReferenceStringTable)
{
OnGenerateKeyReferenceStringTableChangedDelegate.ExecuteIfBound(bGenerateKeyReferenceStringTable);
}

void UELTEditorWidget::OnGlobalNamespaceChanged(const FString& NewGlobalNamespace)
{
OnGlobalNamespaceChangedDelegate.ExecuteIfBound(NewGlobalNamespace);
Expand Down
Loading