Skip to content

Commit a4ffddf

Browse files
author
LoneWandererProductions
committed
fix two smaller bugs
1 parent f865df6 commit a4ffddf

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

CoreBuilder/ResXtract.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ private static void GenerateResourceFile(Dictionary<string, string> resourceMap,
270270
bool appendToExisting)
271271
{
272272
var resourceEntries = resourceMap.OrderBy(kvp => kvp.Value)
273-
.Select(kvp => $"internal sconst string {kvp.Value} = \"{kvp.Key.Replace("\"", "\\\"")}\";")
273+
.Select(kvp => $"internal const string {kvp.Value} = \"{kvp.Key.Replace("\"", "\\\"")}\";")
274274
.ToList();
275275

276276
if (appendToExisting && File.Exists(outputFilePath))

CoreConsole/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ private static string HandleResxtract(OutCommand package)
278278
}
279279

280280
var ignoreList = new List<string>();
281-
var ignorePatterns = new List<string>();
281+
var ignorePatterns = new List<string>
282+
{
283+
"Resource"
284+
};
285+
282286
IResourceExtractor extractor = new ResXtract(ignoreList, ignorePatterns);
283287
var changedFiles =
284288
extractor.ProcessProject(projectPath, outputResourceFile, replace: true); // `null` is okay here
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
public static class Resource
2+
{
3+
internal const string Resource1 = "{0}{1}";
4+
internal const string Resource10 = "Dictionaries are not equal.";
5+
internal const string Resource11 = "Key: {0}, Category: {1}, Value: {2}";
6+
internal const string Resource12 = "Duplicate key detected: {0}";
7+
internal const string Resource13 = "Key '{0}' not found in lookup.";
8+
internal const string Resource14 = "Stack empty";
9+
internal const string Resource15 = "";
10+
internal const string Resource16 = "Key {0} not found.";
11+
internal const string Resource17 = "No available index found.";
12+
internal const string Resource2 = "Value not found in the dictionary";
13+
internal const string Resource3 = "Values not found in the dictionary";
14+
internal const string Resource4 = "Value is not sane";
15+
internal const string Resource5 = "Key already exists: ";
16+
internal const string Resource6 = "Value already exists: ";
17+
internal const string Resource7 = " , ";
18+
internal const string Resource8 = "One or both dictionaries are null.";
19+
internal const string Resource9 = "Dictionaries are equal.";
20+
}

0 commit comments

Comments
 (0)