Skip to content

ShareRules

Namespace Nfty.Core.Publish.Community in assembly Nfty.Core.

public static class ShareRules

The community gallery's limits and every sentence that refuses a share or a download, so each surface says the same thing.

Fields

MaxAssets

public const int MaxAssets = 1000;

Most assets in a shared Set.

MaxCanvas

public const int MaxCanvas = 512;

Largest canvas side, in pixels.

MaxDescriptionLength

public const int MaxDescriptionLength = 500;

Longest description, in characters.

MaxEntryRatio

public const int MaxEntryRatio = 100;

Largest allowed expansion of one archive entry (uncompressed to compressed).

MaxHistoryKb

public const int MaxHistoryKb = 5120;

Largest repository history, in KB as GitHub reports it.

MaxNameLength

public const int MaxNameLength = 64;

Longest share name, in characters.

MaxPreviewBytes

public const long MaxPreviewBytes = 2097152;

Largest preview picture, in bytes (2 MB).

MaxPreviewSide

public const int MaxPreviewSide = 2048;

Longest preview picture side, in pixels.

MaxSetBytes

public const long MaxSetBytes = 209715200;

Largest packed .set, in bytes (200 MB).

MaxShares

public const int MaxShares = 3;

Most collections one account shares.

MaxTags

public const int MaxTags = 5;

Most tags on a share.

MaxUncompressedBytes

public const long MaxUncompressedBytes = 1073741824;

Most a Set's archive may expand to, in bytes (1 GiB).

MaxZipEntries

public const int MaxZipEntries = 6000;

Most entries in a Set's archive.

MinAccountAgeDays

public const int MinAccountAgeDays = 30;

Youngest GitHub account that may share, in days.

ReasonDuplicateName

public const string ReasonDuplicateName = "a file name appears twice";

Reason: two entries share one name.

ReasonExpandsTooFar

public const string ReasonExpandsTooFar = "it expands too far";

Reason: expands past the limits.

public const string ReasonHoldsLink = "it holds a link";

Reason: a link entry.

ReasonNameLeaves

public const string ReasonNameLeaves = "a file name leaves the archive";

Reason: an entry name escapes the archive.

ReasonTooManyFiles

public const string ReasonTooManyFiles = "too many files";

Reason: too many entries.

Properties

AccountTooYoung

public static string AccountTooYoung { get; }

The GitHub account is too young to share.

AlreadySharedThis

public static string AlreadySharedThis { get; }

The card's note that the account already shares the collection being looked at.

AtShareLimit

public static string AtShareLimit { get; }

The user is at the share limit.

Blocked

public static string Blocked { get; }

The account or Set is on the gallery's block list.

CanvasMismatch

public static string CanvasMismatch { get; }

The canvas disagrees with the pictures.

CountMismatch

public static string CountMismatch { get; }

The Set's asset count disagrees with its files.

DatesMismatch

public static string DatesMismatch { get; }

The entry's dates disagree with its history.

DescriptionLength

public static string DescriptionLength { get; }

The description is too long.

EntryDetailsMismatch

public static string EntryDetailsMismatch { get; }

The entry's facts differ from what the Set says about itself.

EntryFilesNotAllowed

public static string EntryFilesNotAllowed { get; }

A pull request touches files other than its author's own entries.

EntryNameMismatch

public static string EntryNameMismatch { get; }

An entry's slug disagrees with its file name.

EntryOwnerMismatch

public static string EntryOwnerMismatch { get; }

An entry names an owner other than the account that submitted it.

EntryUnreadable

public static string EntryUnreadable { get; }

An entry file the gallery's checker can't read.

FileChanged

public static string FileChanged { get; }

The file was modified while it was being checked.

ForeignBook

public static string ForeignBook { get; }

The CookBook inside is not the one that made the Set.

GitHubRefused

public static string GitHubRefused { get; }

GitHub answered no to a request.

GitHubTooMuch

public static string GitHubTooMuch { get; }

GitHub sent a bigger answer than any real one.

GitHubUnexpected

public static string GitHubUnexpected { get; }

GitHub's answer was not what nfty expects.

HashMismatch

public static string HashMismatch { get; }

A download that doesn't match its listed hash.

IndexTooNew

public static string IndexTooNew { get; }

The index is newer than this build understands.

LinkNotOpened

public static string LinkNotOpened { get; }

A gallery entry's link is not an https address nfty will fetch.

ListDamaged

public static string ListDamaged { get; }

The list or file the gallery fetched is not readable.

ManifestMismatch

public static string ManifestMismatch { get; }

The repository's nfty-public.json does not list the share as submitted.

NameLength

public static string NameLength { get; }

The name is empty or too long.

public static string NoLinks { get; }

A link in a name or description.

NotASet

public static string NotASet { get; }

The file is not a Set.

NotConnected

public static string NotConnected { get; }

Sharing needs a GitHub account and none is connected.

NotSetUp

public static string NotSetUp { get; }

This build has no GitHub OAuth app to sign in with.

OneNewShareADay

public static string OneNewShareADay { get; }

A second new share inside a day.

PreviewBad

public static string PreviewBad { get; }

The preview picture is unusable.

Reconnect

public static string Reconnect { get; }

The GitHub token is gone or refused.

RenamedExport

public static string RenamedExport { get; }

A marketplace export with renamed files.

ReplaceNotChosen

public static string ReplaceNotChosen { get; }

An update needs the replace box ticked.

ReplaceOneToShare

public static string ReplaceOneToShare { get; }

The card's note at the share limit: a swap is the way in, and nothing happens until Share.

RepoChanged

public static string RepoChanged { get; }

The repository changed between the scan and the removal.

RepoExtras

public static string RepoExtras { get; }

The repository holds things the gallery doesn't allow.

RepoManifestDamaged

public static string RepoManifestDamaged { get; }

nfty-public.json lists a share whose Release tag nfty would not have written.

RepoNewerNfty

public static string RepoNewerNfty { get; }

nfty-public.json was written by a newer nfty.

RepoNotOurs

public static string RepoNotOurs { get; }

A repository named nfty-public that nfty did not make.

RepoNotYours

public static string RepoNotYours { get; }

The entry's repository is not the author's nfty-public.

RepoPrivate

public static string RepoPrivate { get; }

The nfty-public repository is private.

SaveFailed

public static string SaveFailed { get; }

The download arrived but could not be written to this machine.

Sealed

public static string Sealed { get; }

A sealed Set.

SignInCanceled

public static string SignInCanceled { get; }

The user refused the GitHub sign-in.

SignInExpired

public static string SignInExpired { get; }

The sign-in code ran out before it was used.

SignInFailed

public static string SignInFailed { get; }

GitHub answered the sign-in in a way nfty doesn't expect.

TimedOut

public static string TimedOut { get; }

GitHub did not answer in time.

TooManyTags

public static string TooManyTags { get; }

The sentence refusing a share that carries more tags than the limit.

Unreachable

public static string Unreachable { get; }

GitHub can't be reached.

UnshareUnavailable

public static string UnshareUnavailable { get; }

Unsharing is not wired on this page (no sharing service).

UploadSourceFailed

public static string UploadSourceFailed { get; }

The file being uploaded could not be read.

Methods

AlreadyListed(string)

public static string AlreadyListed(string login);

Someone already shares this Set.

Parameters

  • login (string) - The GitHub login of the account that already shares the Set.

Returns. The sentence shown to the person, naming that account.

AlreadySharedAs(string)

public static string AlreadySharedAs(string name);

The user already shares this Set.

Parameters

  • name (string) - The name the person already shares the Set under.

Returns. The sentence shown to the person, naming that name.

CanvasTooLarge(int, int)

public static string CanvasTooLarge(int width, int height);

The canvas is past the limit.

Parameters

  • width (int) - The canvas width in pixels.
  • height (int) - The canvas height in pixels.

Returns. The sentence shown to the person, naming both canvas sizes and the limit.

HistoryTooLarge(long)

public static string HistoryTooLarge(long kb);

The repository history is past the limit.

Parameters

  • kb (long) - The repository size in kilobytes.

Returns. The sentence shown to the person, naming the history size in megabytes.

ImageUnreadable(string)

public static string ImageUnreadable(string file);

An asset picture can't be read.

Parameters

  • file (string) - The picture file name.

Returns. The sentence shown to the person, naming the picture.

ImageWrongSize(string)

public static string ImageWrongSize(string file);

An asset picture is not the canvas size.

Parameters

  • file (string) - The picture file name.

Returns. The sentence shown to the person, naming the picture.

ListTooOld(int)

public static string ListTooOld(int version);

The list is older than this nfty reads.

Parameters

  • version (int) - The schema version the list was written against.

Returns. The sentence shown to the person, naming the list as too old for this nfty.

NothingChanged(string, DateTimeOffset)

public static string NothingChanged(string name, DateTimeOffset date);

The share would change nothing.

Parameters

  • name (string) - The name the Set is shared as.
  • date (DateTimeOffset) - When it was last shared.

Returns. The sentence shown to the person, naming the share and the date.

Offline(DateTime)

public static string Offline(DateTime time);

GitHub can't be reached; a cached list is shown.

Parameters

  • time (DateTime) - When the cached list was saved.

Returns. The sentence shown to the person, naming the time of the cached list.

RateLimited(int)

public static string RateLimited(int minutes);

GitHub is limiting requests; says how long to wait.

Parameters

  • minutes (int) - How long to wait, in minutes.

Returns. The sentence shown to the person, naming the wait in minutes.

ReleaseFileMissing(string)

public static string ReleaseFileMissing(string file);

A file the entry points at is not attached to the release.

Parameters

  • file (string) - The file the entry points at.

Returns. The sentence shown to the person, naming the missing file.

RepoDuplicateRelease(string)

public static string RepoDuplicateRelease(string tag);

Two releases carry one tag the repository lists.

Parameters

  • tag (string) - The tag two releases carry.

Returns. The sentence shown to the person, naming that tag.

RepoSubmodule(string)

public static string RepoSubmodule(string path);

A submodule sits in nfty-public; nfty can't delete it.

Parameters

  • path (string) - The submodule path.

Returns. The sentence shown to the person, naming that path.

SetTooLarge(long, long)

public static string SetTooLarge(long bytes, long modelsBytes);

The packed Set is too big; names the 3D models' share when leaving them out would help.

Parameters

  • bytes (long) - The packed Set size in bytes.
  • modelsBytes (long) - The part of it that is 3D models, in bytes; 0 when there are none.

Returns. The sentence shown to the person, naming the size and, when it applies, the models share.

SizeWords(long)

public static string SizeWords(long bytes);

A size as a person reads it against a limit: whole megabytes print whole ("214 MB").

Parameters

  • bytes (long) - The count.

Returns. The size, invariant.

SlugTaken(string)

public static string SlugTaken(string name);

The slug is taken by a different collection of the user's.

Parameters

  • name (string) - The name of the different collection already using the slug.

Returns. The sentence shown to the person, naming that name.

TooManyAssets(int)

public static string TooManyAssets(int count);

The Set has too many assets.

Parameters

  • count (int) - The number of assets in the Set.

Returns. The sentence shown to the person, naming the count and the limit.

UnexpectedFile(string)

public static string UnexpectedFile(string path);

An entry no Set holds.

Parameters

  • path (string) - The path of the entry no Set holds.

Returns. The sentence shown to the person, naming that path.

UnknownTag(string)

public static string UnknownTag(string tag);

A tag outside the list.

Parameters

  • tag (string) - The tag that is not on the list.

Returns. The sentence shown to the person, naming that tag.

UnsafeArchive(string)

public static string UnsafeArchive(string reason);

The archive is unsafe to open.

Parameters

  • reason (string) - What makes the archive unsafe, as a phrase.

Returns. The sentence shown to the person, naming the reason.