bWordCountReport
bWordCountReport
#Overview
name: bWordCountReport
The value of this variable can be defined or overridden in .ini config files. 12
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bWordCountReport is to control the generation of word count reports in Unreal Engine’s localization system. This setting variable is used to enable or disable the creation of word count reports during the localization process.
This setting variable is primarily used in the Localization and UnrealEd modules of Unreal Engine. Specifically, it is utilized in the localization configuration script generation and the GenerateTextLocalizationReportCommandlet.
The value of this variable is typically set in configuration files or scripts that define localization tasks. It can be set to “true” or “false” to enable or disable word count report generation, respectively.
bWordCountReport interacts with other localization-related variables, such as WordCountReportName, which specifies the filename for the generated word count report.
Developers should be aware that enabling this variable will result in additional processing time during localization tasks, as the engine will generate word count reports. This may impact build times for projects with extensive localization requirements.
Best practices when using this variable include:
- Enable it only when word count reports are necessary, such as during localization review phases or when tracking translation progress.
- Ensure that the WordCountReportName is properly set when bWordCountReport is enabled.
- Consider the performance impact on large projects and disable it for routine development builds if not needed.
- Use the generated word count reports to optimize localization efforts and track progress in translation work.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Localization/Category.ini:70, section: [GatherTextStep6]
- INI Section:
GatherTextStep6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/Editor.ini:114, section: [GatherTextStep8]
- INI Section:
GatherTextStep8
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/EditorTutorials.ini:70, section: [GatherTextStep6]
- INI Section:
GatherTextStep6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/Engine.ini:92, section: [GatherTextStep7]
- INI Section:
GatherTextStep7
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/Keywords.ini:65, section: [GatherTextStep6]
- INI Section:
GatherTextStep6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/PropertyNames.ini:70, section: [GatherTextStep6]
- INI Section:
GatherTextStep6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/ToolTips.ini:73, section: [GatherTextStep6]
- INI Section:
GatherTextStep6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Localization/WordCount.ini:2, section: [CommonSettings]
- INI Section:
CommonSettings
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/EngineOverrides_Gather.ini:44, section: [GatherTextStep3]
- INI Section:
GatherTextStep3
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/EngineOverrides_GenerateReports.ini:25, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/Game_Gather.ini:66, section: [GatherTextStep4]
- INI Section:
GatherTextStep4
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/Game_GenerateReports.ini:25, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocalizationConfigurationScript.cpp:485
Scope (from outer to inner):
file
namespace LocalizationConfigurationScript
function FLocalizationConfigurationScript GenerateGatherTextConfigFile
Source code excerpt:
ConfigSection.Add( TEXT("CommandletClass"), TEXT("GenerateTextLocalizationReport") );
ConfigSection.Add( TEXT("bWordCountReport"), TEXT("true") );
ConfigSection.Add( TEXT("WordCountReportName"), GetWordCountCSVFileName(Target) );
ConfigSection.Add( TEXT("bConflictReport"), TEXT("true") );
ConfigSection.Add( TEXT("ConflictReportName"), GetConflictReportFileName(Target) );
Script.AddGatherTextStep(GatherTextStepIndex++, MoveTemp(ConfigSection));
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocalizationConfigurationScript.cpp:1106
Scope (from outer to inner):
file
namespace LocalizationConfigurationScript
function FLocalizationConfigurationScript GenerateWordCountReportConfigFile
Source code excerpt:
ConfigSection.Add( TEXT("CommandletClass"), TEXT("GenerateTextLocalizationReport") );
ConfigSection.Add( TEXT("bWordCountReport"), TEXT("true") );
ConfigSection.Add( TEXT("WordCountReportName"), GetWordCountCSVFileName(Target) );
Script.AddGatherTextStep(0, MoveTemp(ConfigSection));
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/GenerateTextLocalizationReportCommandlet.cpp:62
Scope (from outer to inner):
file
function int32 UGenerateTextLocalizationReportCommandlet::Main
Source code excerpt:
// Settings for generating/appending to word count report file
bool bWordCountReport = false;
// Settings for generating loc conflict report file
bool bConflictReport = false;
// Get source path.
if( !( GetPathFromConfig( *SectionName, TEXT("SourcePath"), SourcePath, GatherTextConfigPath ) ) )
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/GenerateTextLocalizationReportCommandlet.cpp:88
Scope (from outer to inner):
file
function int32 UGenerateTextLocalizationReportCommandlet::Main
Source code excerpt:
}
GetBoolFromConfig( *SectionName, TEXT("bWordCountReport"), bWordCountReport, GatherTextConfigPath );
GetBoolFromConfig( *SectionName, TEXT("bConflictReport"), bConflictReport, GatherTextConfigPath );
if( bWordCountReport )
{
if( !ProcessWordCountReport( SourcePath, DestinationPath ) )
{
UE_LOG(LogGenerateTextLocalizationReportCommandlet, Error, TEXT("Failed to generate word count report."));
return -1;
}