summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/BackgroundService.cs6
-rw-r--r--src/SMAPI.Web/Controllers/JsonValidatorController.cs14
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs2
-rw-r--r--src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs2
-rw-r--r--src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs10
-rw-r--r--src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs2
-rw-r--r--src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs4
-rw-r--r--src/SMAPI.Web/Framework/LogParsing/LogParser.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs6
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs2
-rw-r--r--src/SMAPI.Web/Startup.cs2
-rw-r--r--src/SMAPI.Web/ViewModels/LogParserModel.cs2
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/json-validator.js2
-rw-r--r--src/SMAPI.Web/wwwroot/schemas/content-patcher.json6
16 files changed, 33 insertions, 33 deletions
diff --git a/src/SMAPI.Web/BackgroundService.cs b/src/SMAPI.Web/BackgroundService.cs
index dfd2c1b9..cb400fbe 100644
--- a/src/SMAPI.Web/BackgroundService.cs
+++ b/src/SMAPI.Web/BackgroundService.cs
@@ -11,7 +11,7 @@ using StardewModdingAPI.Web.Framework.Caching.Wiki;
namespace StardewModdingAPI.Web
{
/// <summary>A hosted service which runs background data updates.</summary>
- /// <remarks>Task methods need to be static, since otherwise Hangfire will try to serialise the entire instance.</remarks>
+ /// <remarks>Task methods need to be static, since otherwise Hangfire will try to serialize the entire instance.</remarks>
internal class BackgroundService : IHostedService, IDisposable
{
/*********
@@ -94,8 +94,8 @@ namespace StardewModdingAPI.Web
/*********
** Private method
*********/
- /// <summary>Initialise the background service if it's not already initialised.</summary>
- /// <exception cref="InvalidOperationException">The background service is already initialised.</exception>
+ /// <summary>Initialize the background service if it's not already initialized.</summary>
+ /// <exception cref="InvalidOperationException">The background service is already initialized.</exception>
private void TryInit()
{
if (BackgroundService.JobServer != null)
diff --git a/src/SMAPI.Web/Controllers/JsonValidatorController.cs b/src/SMAPI.Web/Controllers/JsonValidatorController.cs
index d82765e7..31471141 100644
--- a/src/SMAPI.Web/Controllers/JsonValidatorController.cs
+++ b/src/SMAPI.Web/Controllers/JsonValidatorController.cs
@@ -79,7 +79,7 @@ namespace StardewModdingAPI.Web.Controllers
[Route("json/{schemaName}/{id}")]
public async Task<ViewResult> Index(string schemaName = null, string id = null)
{
- schemaName = this.NormaliseSchemaName(schemaName);
+ schemaName = this.NormalizeSchemaName(schemaName);
var result = new JsonValidatorModel(this.SectionUrl, id, schemaName, this.SchemaFormats);
if (string.IsNullOrWhiteSpace(id))
@@ -143,8 +143,8 @@ namespace StardewModdingAPI.Web.Controllers
if (request == null)
return this.View("Index", new JsonValidatorModel(this.SectionUrl, null, null, this.SchemaFormats).SetUploadError("The request seems to be invalid."));
- // normalise schema name
- string schemaName = this.NormaliseSchemaName(request.SchemaName);
+ // normalize schema name
+ string schemaName = this.NormalizeSchemaName(request.SchemaName);
// get raw log text
string input = request.Content;
@@ -178,9 +178,9 @@ namespace StardewModdingAPI.Web.Controllers
return response;
}
- /// <summary>Get a normalised schema name, or the <see cref="DefaultSchemaID"/> if blank.</summary>
- /// <param name="schemaName">The raw schema name to normalise.</param>
- private string NormaliseSchemaName(string schemaName)
+ /// <summary>Get a normalized schema name, or the <see cref="DefaultSchemaID"/> if blank.</summary>
+ /// <param name="schemaName">The raw schema name to normalize.</param>
+ private string NormalizeSchemaName(string schemaName)
{
schemaName = schemaName?.Trim().ToLower();
return !string.IsNullOrWhiteSpace(schemaName)
@@ -192,7 +192,7 @@ namespace StardewModdingAPI.Web.Controllers
/// <param name="id">The schema ID.</param>
private FileInfo FindSchemaFile(string id)
{
- // normalise ID
+ // normalize ID
id = id?.Trim().ToLower();
if (string.IsNullOrWhiteSpace(id))
return null;
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index a7398eee..8419b220 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -120,7 +120,7 @@ namespace StardewModdingAPI.Web.Controllers
/// <returns>Returns the mod data if found, else <c>null</c>.</returns>
private async Task<ModEntryModel> GetModData(ModSearchEntryModel search, WikiModEntry[] wikiData, bool includeExtendedMetadata)
{
- // crossreference data
+ // cross-reference data
ModDataRecord record = this.ModDatabase.Get(search.ID);
WikiModEntry wikiEntry = wikiData.FirstOrDefault(entry => entry.ID.Contains(search.ID.Trim(), StringComparer.InvariantCultureIgnoreCase));
UpdateKey[] updateKeys = this.GetUpdateKeys(search.UpdateKeys, record, wikiEntry).ToArray();
diff --git a/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs b/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
index 5dc0feb6..864aa215 100644
--- a/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
+++ b/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
@@ -36,7 +36,7 @@ namespace StardewModdingAPI.Web.Framework
}
/// <summary>Called early in the filter pipeline to confirm request is authorized.</summary>
- /// <param name="context">The authorisation filter context.</param>
+ /// <param name="context">The authorization filter context.</param>
public void OnAuthorization(AuthorizationFilterContext context)
{
IFeatureCollection features = context.HttpContext.Features;
diff --git a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
index 4258cc85..2e7804a7 100644
--- a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
+++ b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
@@ -40,7 +40,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
public bool TryGetMod(ModRepositoryKey site, string id, out CachedMod mod, bool markRequested = true)
{
// get mod
- id = this.NormaliseId(id);
+ id = this.NormalizeId(id);
mod = this.Mods.Find(entry => entry.ID == id && entry.Site == site).FirstOrDefault();
if (mod == null)
return false;
@@ -62,7 +62,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
/// <param name="cachedMod">The stored mod record.</param>
public void SaveMod(ModRepositoryKey site, string id, ModInfoModel mod, out CachedMod cachedMod)
{
- id = this.NormaliseId(id);
+ id = this.NormalizeId(id);
cachedMod = this.SaveMod(new CachedMod(site, id, mod));
}
@@ -83,7 +83,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
/// <param name="mod">The mod data.</param>
public CachedMod SaveMod(CachedMod mod)
{
- string id = this.NormaliseId(mod.ID);
+ string id = this.NormalizeId(mod.ID);
this.Mods.ReplaceOne(
entry => entry.ID == id && entry.Site == mod.Site,
@@ -94,9 +94,9 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
return mod;
}
- /// <summary>Normalise a mod ID for case-insensitive search.</summary>
+ /// <summary>Normalize a mod ID for case-insensitive search.</summary>
/// <param name="id">The mod ID.</param>
- public string NormaliseId(string id)
+ public string NormalizeId(string id)
{
return id.Trim().ToLower();
}
diff --git a/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs b/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
index ad95a975..6a103e37 100644
--- a/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
+++ b/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
@@ -5,7 +5,7 @@ using MongoDB.Bson.Serialization.Serializers;
namespace StardewModdingAPI.Web.Framework.Caching
{
- /// <summary>Serialises <see cref="DateTimeOffset"/> to a UTC date field instead of the default array.</summary>
+ /// <summary>Serializes <see cref="DateTimeOffset"/> to a UTC date field instead of the default array.</summary>
public class UtcDateTimeOffsetSerializer : StructSerializerBase<DateTimeOffset>
{
/*********
diff --git a/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs b/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
index 9471d5fe..385c0c91 100644
--- a/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
+++ b/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
@@ -2,7 +2,7 @@ using Hangfire.Dashboard;
namespace StardewModdingAPI.Web.Framework
{
- /// <summary>Authorises requests to access the Hangfire job dashboard.</summary>
+ /// <summary>Authorizes requests to access the Hangfire job dashboard.</summary>
internal class JobDashboardAuthorizationFilter : IDashboardAuthorizationFilter
{
/*********
@@ -15,7 +15,7 @@ namespace StardewModdingAPI.Web.Framework
/*********
** Public methods
*********/
- /// <summary>Authorise a request.</summary>
+ /// <summary>Authorize a request.</summary>
/// <param name="context">The dashboard context.</param>
public bool Authorize(DashboardContext context)
{
diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
index 595e6b49..66a3687f 100644
--- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
+++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
@@ -221,7 +221,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
}
}
- // finalise log
+ // finalize log
gameMod.Version = log.GameVersion;
log.Mods = new[] { gameMod, smapiMod }.Concat(mods.Values.OrderBy(p => p.Name)).ToArray();
return log;
diff --git a/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
index 94256005..f9f9f47d 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
@@ -34,9 +34,9 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
this.VendorKey = vendorKey;
}
- /// <summary>Normalise a version string.</summary>
- /// <param name="version">The version to normalise.</param>
- protected string NormaliseVersion(string version)
+ /// <summary>Normalize a version string.</summary>
+ /// <param name="version">The version to normalize.</param>
+ protected string NormalizeVersion(string version)
{
if (string.IsNullOrWhiteSpace(version))
return null;
diff --git a/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
index c14fb45d..0945735a 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
@@ -39,7 +39,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
{
var mod = await this.Client.GetModAsync(realID);
return mod != null
- ? new ModInfoModel(name: mod.Name, version: this.NormaliseVersion(mod.Version), url: mod.Url)
+ ? new ModInfoModel(name: mod.Name, version: this.NormalizeVersion(mod.Version), url: mod.Url)
: new ModInfoModel().SetError(RemoteModStatus.DoesNotExist, "Found no Chucklefish mod with this ID.");
}
catch (Exception ex)
diff --git a/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
index e06a2497..c62cb73f 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
@@ -65,7 +65,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
}
// return data
- return result.SetVersions(version: this.NormaliseVersion(latest.Tag), previewVersion: this.NormaliseVersion(preview?.Tag));
+ return result.SetVersions(version: this.NormalizeVersion(latest.Tag), previewVersion: this.NormalizeVersion(preview?.Tag));
}
catch (Exception ex)
{
diff --git a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
index b4791f56..9551258c 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
@@ -48,7 +48,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
return new ModInfoModel().SetError(remoteStatus, mod.Error);
}
- return new ModInfoModel(name: mod.Name, version: this.NormaliseVersion(mod.Version), previewVersion: mod.LatestFileVersion?.ToString(), url: mod.Url);
+ return new ModInfoModel(name: mod.Name, version: this.NormalizeVersion(mod.Version), previewVersion: mod.LatestFileVersion?.ToString(), url: mod.Url);
}
catch (Exception ex)
{
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index de45b8a4..da5c1f1b 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -10,7 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
using MongoDB.Bson.Serialization;
using MongoDB.Driver;
using Newtonsoft.Json;
-using StardewModdingAPI.Toolkit.Serialisation;
+using StardewModdingAPI.Toolkit.Serialization;
using StardewModdingAPI.Web.Framework;
using StardewModdingAPI.Web.Framework.Caching;
using StardewModdingAPI.Web.Framework.Caching.Mods;
diff --git a/src/SMAPI.Web/ViewModels/LogParserModel.cs b/src/SMAPI.Web/ViewModels/LogParserModel.cs
index 41864c99..25493a29 100644
--- a/src/SMAPI.Web/ViewModels/LogParserModel.cs
+++ b/src/SMAPI.Web/ViewModels/LogParserModel.cs
@@ -81,7 +81,7 @@ namespace StardewModdingAPI.Web.ViewModels
.ToDictionary(group => group.Key, group => group.ToArray());
}
- /// <summary>Get a sanitised mod name that's safe to use in anchors, attributes, and URLs.</summary>
+ /// <summary>Get a sanitized mod name that's safe to use in anchors, attributes, and URLs.</summary>
/// <param name="modName">The mod name.</param>
public string GetSlug(string modName)
{
diff --git a/src/SMAPI.Web/wwwroot/Content/js/json-validator.js b/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
index 265e0c5e..5499cef6 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
@@ -120,7 +120,7 @@ smapi.jsonValidator = function (sectionUrl, pasteID) {
};
/**
- * Initialise the JSON validator page.
+ * Initialize the JSON validator page.
*/
var init = function () {
// set initial code formatting
diff --git a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json
index 315a1fb2..e12be408 100644
--- a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json
+++ b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json
@@ -107,7 +107,7 @@
},
"Target": {
"title": "Target asset",
- "description": "The game asset you want to patch (or multiple comma-delimited assets). This is the file path inside your game's Content folder, without the file extension or language (like Animals/Dinosaur to edit Content/Animals/Dinosaur.xnb). This field supports tokens and capitalisation doesn't matter. Your changes are applied in all languages unless you specify a language condition.",
+ "description": "The game asset you want to patch (or multiple comma-delimited assets). This is the file path inside your game's Content folder, without the file extension or language (like Animals/Dinosaur to edit Content/Animals/Dinosaur.xnb). This field supports tokens and capitalization doesn't matter. Your changes are applied in all languages unless you specify a language condition.",
"type": "string",
"not": {
"pattern": "^ *[cC][oO][nN][tT][eE][nN][tT]/|\\.[xX][nN][bB] *$|\\.[a-zA-Z][a-zA-Z]-[a-zA-Z][a-zA-Z](?:.xnb)? *$"
@@ -140,7 +140,7 @@
},
"FromFile": {
"title": "Source file",
- "description": "The relative file path in your content pack folder to load instead (like 'assets/dinosaur.png'). This can be a .json (data), .png (image), .tbin (map), or .xnb file. This field supports tokens and capitalisation doesn't matter.",
+ "description": "The relative file path in your content pack folder to load instead (like 'assets/dinosaur.png'). This can be a .json (data), .png (image), .tbin (map), or .xnb file. This field supports tokens and capitalization doesn't matter.",
"type": "string",
"allOf": [
{
@@ -310,7 +310,7 @@
"then": {
"properties": {
"FromFile": {
- "description": "The relative path to the map in your content pack folder from which to copy (like assets/town.tbin). This can be a .tbin or .xnb file. This field supports tokens and capitalisation doesn't matter.\nContent Patcher will handle tilesheets referenced by the FromFile map for you if it's a .tbin file:\n - If a tilesheet isn't referenced by the target map, Content Patcher will add it for you (with a z_ ID prefix to avoid conflicts with hardcoded game logic). If the source map has a custom version of a tilesheet that's already referenced, it'll be added as a separate tilesheet only used by your tiles.\n - If you include the tilesheet file in your mod folder, Content Patcher will use that one automatically; otherwise it will be loaded from the game's Content/Maps folder."
+ "description": "The relative path to the map in your content pack folder from which to copy (like assets/town.tbin). This can be a .tbin or .xnb file. This field supports tokens and capitalization doesn't matter.\nContent Patcher will handle tilesheets referenced by the FromFile map for you if it's a .tbin file:\n - If a tilesheet isn't referenced by the target map, Content Patcher will add it for you (with a z_ ID prefix to avoid conflicts with hardcoded game logic). If the source map has a custom version of a tilesheet that's already referenced, it'll be added as a separate tilesheet only used by your tiles.\n - If you include the tilesheet file in your mod folder, Content Patcher will use that one automatically; otherwise it will be loaded from the game's Content/Maps folder."
},
"FromArea": {
"description": "The part of the source map to copy. Defaults to the whole source map."