Skip to content

Commit

Permalink
update traitors addon - a wlakaround to localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
ywgATustcbbs committed Jan 17, 2025
1 parent c335a8f commit b909124
Show file tree
Hide file tree
Showing 11 changed files with 902 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\AddonTranslationTool\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}|AddonTranslationTool\\AddonTranslationTool.vcxproj|C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\AddonTranslationTool\\AddonTranslationTool\\AddonTranslationTool.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
"RelativeMoniker": "D:0:0:{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}|AddonTranslationTool\\AddonTranslationTool.vcxproj|solutionrelative:AddonTranslationTool\\AddonTranslationTool.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "AddonTranslationTool.cpp",
"DocumentMoniker": "C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\AddonTranslationTool\\AddonTranslationTool\\AddonTranslationTool.cpp",
"RelativeDocumentMoniker": "AddonTranslationTool\\AddonTranslationTool.cpp",
"ToolTip": "C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\AddonTranslationTool\\AddonTranslationTool\\AddonTranslationTool.cpp",
"RelativeToolTip": "AddonTranslationTool\\AddonTranslationTool.cpp",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAEwAAAABAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2025-01-17T11:04:25.908Z",
"EditorCaption": ""
}
]
}
]
}
]
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35004.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddonTranslationTool", "AddonTranslationTool\AddonTranslationTool.vcxproj", "{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Debug|x64.ActiveCfg = Debug|x64
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Debug|x64.Build.0 = Debug|x64
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Debug|x86.ActiveCfg = Debug|Win32
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Debug|x86.Build.0 = Debug|Win32
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Release|x64.ActiveCfg = Release|x64
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Release|x64.Build.0 = Release|x64
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Release|x86.ActiveCfg = Release|Win32
{2358CDE3-7C40-4377-B3F5-EF4D550CBB5F}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C638069-2AF6-4D41-9FF5-3558DB5772B5}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#include <iostream>
#include <fstream>
#include <string>
#include <regex>
#include <vector>

using namespace std;

vector<string> languageList = {
"brazilian",
"czech",
"danish",
"dutch",
"english",
"finnish",
"french",
"german",
"hungarian",
"indonesian",
"italian",
"japanese",
"koreana",
"latam",
"norwegian",
"polish",
"portuguese",
"romanian",
"russian",
"schinese",
"spanish",
"swedish",
"tchinese",
"thai",
"turkish",
"ukrainian",
"vietnamese" };


int main()
{
ofstream out("C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\reactivedrop_all.txt");
if (!out.is_open())
{
cout << "Error: " << "reactivedrop_all.txt" << " not found." << endl;
return 0;
}
out << "//This is a file that will be merged into add-on's vscript.
//DO NOT translate this file.\n";
out << "g_localizations <- {\n";
for (string language : languageList)
{
string path = "C:\\Users\\ustcy\\Desktop\\reactivedrop_translations\\addons\\traitors_challenge\\resource\\reactivedrop_" + language + ".txt";
ifstream file(path);
if (!file.is_open())
{
cout << "Error: " << path << " not found." << endl;
continue;
}

out << "\t" << language << " = {\n";
string line;
while (getline(file, line))
{
regex reg(".*\"(challenge_.*?)\".*?\"(.*)\"");
smatch match;
if (regex_match(line, match, reg))
{
out << "\t\t" << match[1] << " = \"" << match[2] << "\",\n";
}
}
out << "\t},\n";
file.close();
}
out << "};";
out.close();
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{2358cde3-7c40-4377-b3f5-ef4d550cbb5f}</ProjectGuid>
<RootNamespace>AddonTranslationTool</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="AddonTranslationTool.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AddonTranslationTool.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Loading

0 comments on commit b909124

Please sign in to comment.