Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Classes/Commandlets/GenerateTextLocalizationReportCommandlet.h
Leon Huang 55f9f49684 Localization conflict reports can now be output as .csv files.
- Introduced EConflictReportFormat to determine the output format of the conflicts report.
- Updated the localization .ini files to specify the requested output format.
#jira: UE-143696
#rb: Jamie.Dale, Vincent.Gauthier
#preflight: 62573db00b7c7f0f38c6405b

[CL 19746764 by Leon Huang in ue5-main branch]
2022-04-13 18:08:19 -04:00

47 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 "GenerateTextLocalizationReportCommandlet.generated.h"
UCLASS()
class UGenerateTextLocalizationReportCommandlet : public UGatherTextCommandletBase
{
GENERATED_UCLASS_BODY()
public:
//~ Begin UCommandlet Interface
virtual int32 Main(const FString& Params) override;
//~ End UCommandlet Interface
virtual bool ShouldRunInPreview(const TArray<FString>& Switches, const TMap<FString, FString>& ParamVals) const
{
return true;
}
private:
/**
* Collects word count info and writes out a report.
* @param SourcePath - Source path to localization files.
* @param DestinationPath - The destination folder the report will be write to.
* @return True if successful; false oterwise.
*/
bool ProcessWordCountReport(const FString& SourcePath, const FString& DestinationPath);
/**
* Writes out a report representing localization conflicts. These are conflicts where the namespace
* and key match but the source text differs.
* @param DestinationPath - The destination folder the report will be write to.
* @return True if successful; false oterwise.
*/
bool ProcessConflictReport(const FString& DestinationPath);
private:
FString GatherTextConfigPath;
FString SectionName;
FString CmdlineTimeStamp;
};