You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
checking out or writing any localization files. This makes dry runs to print all localization warnings much easier for debugging. - Introduced the -Preview arg and -GatherType param to UGatherTextCommandlet. - The -GatherType param can have values of All, Source, Asset or Metadata. Source will only gather source files, Asset will only gather Asset files, Metadata will only gather Metadata and All will gather all 3. - The -GatherType param is only supported in preview mode right now. This is because manifests are updated every single gather and we don't want the manifest to only reflect partial gathers. - Added additional logs to display when the commandlet is run with -Preview and -GatherType - Refactored parts of UGatherTextCommandlet to reduce hard coded switch and param names. - Introduced a virtual function in UGatherTextCommandletBase to allow commandlets to conditionally be skipped in preview mode. #rb: Jamie.Dale, Vincent.Gauthier #jira: UE-143692 #preflight: 62430e4a292f228e09e1e1f8 [CL 19550589 by Leon Huang in ue5-main branch]
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "Commandlets/GatherTextCommandletBase.h"
|
|
#include "GatherTextCommandlet.generated.h"
|
|
|
|
namespace EOutputJson
|
|
{
|
|
enum Format { Manifest, Archive };
|
|
}
|
|
|
|
/**
|
|
* UGatherTextCommandlet: One commandlet to rule them all. This commandlet loads a config file and then calls other localization commandlets. Allows localization system to be easily extendable and flexible.
|
|
*/
|
|
UCLASS()
|
|
class UGatherTextCommandlet : public UGatherTextCommandletBase
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
public:
|
|
//~ Begin UCommandlet Interface
|
|
virtual int32 Main(const FString& Params) override;
|
|
//~ End UCommandlet Interface
|
|
|
|
int32 ProcessGatherConfig(const FString& GatherTextConfigPath, const TSharedPtr<FLocalizationSCC>& CommandletSourceControlInfo, const TArray<FString>& Tokens, const TArray<FString>& Switches, const TMap<FString, FString>& ParamVals);
|
|
|
|
// Helpler function to generate a changelist description
|
|
FText GetChangelistDescription(const TArray<FString>& GatherTextConfigPaths);
|
|
|
|
static const FString UsageText;
|
|
//~ Begin UGatherTextCommandletBase Interface
|
|
virtual bool ShouldRunInPreview(const TArray<FString>& Switches, const TMap<FString, FString>& ParamVals) const override
|
|
{
|
|
// This commandlet is the driver for other commandlet. This should always run even in preview
|
|
return true;
|
|
}
|
|
//~ End UGatherTextCommandletBase Interface
|
|
private:
|
|
|
|
};
|