File tree Expand file tree Collapse file tree 4 files changed +669
-663
lines changed Expand file tree Collapse file tree 4 files changed +669
-663
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public static void ExtractCardText(string directoryPath, string outJsonPath)
1616 foreach ( var filePath in Directory . GetFiles ( directoryPath , "*.xml" , SearchOption . AllDirectories ) )
1717 {
1818 FileInfo fi = new FileInfo ( filePath ) ;
19+ var parentName = fi . Directory . Name ;
1920 var doc = XDocument . Load ( filePath ) ;
2021 var mainClass = doc . Root . Element ( "mainClass" ) ? . Value ;
2122 var name = doc . Root . Element ( "name" ) ? . Value ;
@@ -25,15 +26,15 @@ public static void ExtractCardText(string directoryPath, string outJsonPath)
2526 {
2627 translations . Add ( new Dictionary < string , object >
2728 {
28- { "key" , $ "{ fi . Name } .name" } ,
29+ { "key" , $ "{ parentName } . { fi . Name } .name" } ,
2930 { "original" , name } ,
3031 { "translation" , name } ,
3132 { "context" , null }
3233 } ) ;
3334
3435 translations . Add ( new Dictionary < string , object >
3536 {
36- { "key" , $ "{ fi . Name } .context" } ,
37+ { "key" , $ "{ parentName } . { fi . Name } .context" } ,
3738 { "original" , context } ,
3839 { "translation" , context } ,
3940 { "context" , null }
Original file line number Diff line number Diff line change 1212 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
1313 </ItemGroup >
1414
15+ <ItemGroup >
16+ <Folder Include =" Extracted\" />
17+ </ItemGroup >
18+
1519</Project >
You can’t perform that action at this time.
0 commit comments