diff --git a/.github/race-weights b/.github/race-weights index e4e1579f..252fe2ad 100644 --- a/.github/race-weights +++ b/.github/race-weights @@ -14,6 +14,11 @@ # Listed: every test that took 10 s or more. "unlisted" is the mean of the rest. # TestSmallestIsTheSmallestFile came on 2026-11-16: 79.3 s in a part whose # listed tests took 0.61 of their weights, so 130.1. +# The seven site guards that ask the program about every preset share one +# answer per process, so the first of them in a part pays for it: 52 to 61 s +# on 2026-11-18, against 16 to 26 s before, because the picture-sizes preset +# plans its 21 pictures at their smallest twice (tfg preset show, a dry run). +# Each weighs what it took where it paid, the rest the most any of them paid. # # A test that is not here and takes 60 s or more fails its part with the line # to add. A test that is here and no longer exists fails every part. @@ -36,11 +41,18 @@ unlisted 0.58 65.6 TestADamagedFileIsExactlyTheSizeAskedFor 64.6 TestNoTrackedFileCarriesPrivateContent 62.2 TestEveryDamageIsRefusedByTheStructuralCheckInEveryFormat +60.6 TestEveryLanguageDescribesEveryDamage +60.6 TestEveryLinkOnTheSiteLeadsSomewhere +60.6 TestTheSitemapNeedsNoSchemaButItsOwn +60.6 TestTheSocialPictureShowsTheCardAsItIsNow +60.0 TestEveryPageSaysWhichLanguageItIsAndWhereItsTranslationsAre +59.3 TestTheSiteSaysWhatTheToolSays 57.3 TestAFilmSaysItCarriesItsLabelOnlyWhenAPictureShowsItWhole 55.6 TestEveryJxlRungStillFitsInsideItsDeclaredCeiling 55.6 TestTheArchiveScanLooksIntoTheArchivesInside 55.3 TestAFilmOfANamedSizeKeepsEveryPictureInsideItsReserve 52.2 TestChoosingAToolLaysTheScreenOutAsIfItOpenedWithIt +52.0 TestEveryLanguageDescribesEverythingTheProgramCanProduce 38.6 TestAContainerStopsBetweenTheFilesItPlans 37.5 TestEveryPictureNamedAfterARefusalShowsOne 36.7 TestJxlStillFitsWhenTheQualityIsNotTheOneTheCeilingsWereMeasuredAt @@ -49,13 +61,11 @@ unlisted 0.58 34.0 TestOurOwnGeneratorsHaveNotDrifted 29.9 TestTheSameSeedGivesTheSameBytes 27.9 TestTheMinimumStandsWhateverTheSeedIsUnderEveryDeclaredChoice -25.9 TestEveryLinkOnTheSiteLeadsSomewhere 24.9 TestEveryEMLSettingSurvivesItsReferenceTool 24.2 TestAPictureSaysItCarriesItsLabelOnlyWhenItsTextIsWhole 23.2 TestAnAVIFLargerThanOneAV1TileSurvivesItsReferenceTool 23.1 TestACutTakesTheShareOfTheContentItIsAskedFor 22.4 TestTheLadderCeilingIsAboveEveryPictureTheTopRungMakes -22.2 TestTheSiteSaysWhatTheToolSays 20.9 TestAFilmsProgressMovesWithItsPicturesNotItsPadding 20.7 TestAFilmHoldsTheFramesTheManifestDeclares 20.7 TestTheWindowBinaryStartsWithoutAConsole @@ -64,8 +74,6 @@ unlisted 0.58 17.4 TestThePresetScreenKeepsTheNameAFileIsSentUnder 17.0 TestTheSmallestDamagedFileIsTakenAndOneByteLessIsNot 16.9 TestEveryFormatSurvivesItsReferenceTool -16.7 TestEveryLanguageDescribesEverythingTheProgramCanProduce -16.6 TestEveryLanguageDescribesEveryDamage 16.3 TestTheSameWorkDoneAgainLeavesTheWindowAsItWas 16.2 TestABuildWithNoWindowInItSaysSoAndKeepsStandardOutputEmpty 15.4 TestAvifStillFitsWhenTheQualityIsNotTheOneTheCeilingsWereMeasuredAt diff --git a/CHANGELOG.md b/CHANGELOG.md index 463787af..edd38a03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,19 @@ because it turns other people's test suites red. ### Breaking +- **The label drawn in a picture no longer states the size of the file.** It + reads `tfg - png - seed c2a547b2`, with any damage before the seed. A picture + of a given width and height is then the same at every size you ask for, so + the smallest size a refusal names is accepted next time. Before, it could be + refused again. The label also fits narrower pictures than before. + Labelled pictures and films, and mails, HTML pages and RTF documents with + pictures, are not byte for byte what 0.5.0 wrote. Text formats still state + the size. +- **A JPEG XL or a film just above the size where its picture grows gets the + smaller picture.** A JPEG XL now steps up to 256x256 at 7509 B and to + 320x240 at 10213 B, and a WebM or MP4 film to 320x180 at 8697 B, because + the label is drawn larger there. A file between the old step and the new one + is not byte for byte what 0.5.0 wrote. - **A TIFF of an odd size is not byte for byte what 0.5.0 wrote.** Its directory, which says where the pixels are, came last and so started on an odd byte, where the TIFF specification has it start on an even one. Every @@ -39,7 +52,7 @@ because it turns other people's test suites red. wrote. Files with no damage, and files made with `--clean`, are unchanged. - **An AVIF file just above the size where its picture grows gets the smaller picture.** The picture now steps up to 160x120 at 3865 B, to 256x256 at - 5493 B, to 320x240 at 7732 B and to 640x480 at 18722 B, about a tenth above + 6140 B, to 320x240 at 7732 B and to 640x480 at 18722 B, a tenth or more above where it did. A file between the old step and the new one is not byte for byte what 0.5.0 wrote. - **A tar.gz 16 KiB to 64 KiB larger than the files inside it now opens in @@ -59,6 +72,15 @@ because it turns other people's test suites red. ### Added +- **A preset of picture sizes.** `tfg generate --preset picture-sizes` writes + a picture at each of 21 common sizes: HD, Full HD, QHD and 4K screens, + profile pictures, and the covers, posts and thumbnails YouTube, Facebook, X, + LinkedIn, Instagram and Pinterest ask for, read from their help pages in + November 2026. Each is as small as it can be and named by its size, such as + `1920x1080.jpg`. `--groups` picks screens, avatars or social, + `--content placeholder` draws the size on each picture, and `--format` takes + any picture format. A size the format cannot draw is left out and named. + - **Placeholder pictures.** `--set content=placeholder` on `png`, `jpg` and `svg` draws a flat colour with words in the middle, for laying out a page before the real pictures exist. The words are the picture's size unless @@ -66,16 +88,22 @@ because it turns other people's test suites red. `{index:04}` in it become each file's size and number. `background` and `foreground` take a colour such as `cccccc`, and `guides` draws a frame, both diagonals and a circle. In a recipe write a colour without the `#` or - in quotes, because YAML reads `#` as the start of a comment. The test - pattern is unchanged. + in quotes. The window shows these four once Content is placeholder. The + test pattern is unchanged. + +- **`tfg formats` says when a setting changes nothing.** A setting that + changes a file only while another setting has a certain value ends its line + with that, such as `only when content is placeholder`, and `tfg formats + --json` gives it as `only_when`. Such a setting is refused while it would + change nothing, as before. - **`smallest` as a size.** `--size smallest`, or `size: smallest` in a recipe, makes each picture as small as it can be at the `width` and `height` you set, in all ten picture formats, and `--dry-run` still says the - size to the byte. With the label on, the label states the file's size and - its numerals change how a PNG or a JPG compresses, so it can carry up to - about a kilobyte more than its picture needs. With `--clean` the file is the - picture alone. + size to the byte. The file is the picture alone, with nothing added to reach + a size, whether the label is drawn in it or not. In the window it is + Smallest under How the size is given, on Single batch and Several batches, + for pictures, greyed out until the width and height are set. - **Generate into the same folder again.** A run into an output directory that already holds an earlier run is added beside it: every name of the run, @@ -235,6 +263,48 @@ because it turns other people's test suites red. ### Changed +- **A value to type stands out from the words describing it.** In the + explanation behind a field, a value you type as it is - `screens` and `all` + for the groups of `picture-sizes`, `10mb` for a size, `{index:04}` in a file + name, `cccccc` for a colour - is drawn in a code typeface and its own colour. + The site shows it as code, and `tfg preset show` and `tfg formats` print it + between backticks. +- **The mouse wheel scrolls the window as far as the system says.** One notch + moves three lines of text, or as many as Windows is set to under Mouse, + Lines to scroll at a time, where it moved about half as far before. A + setting of one screen at a time is followed too. On Linux a notch is three + lines, and on macOS scrolling is unchanged. + +- **The window names list values and settings in words.** An English list + shows test pattern rather than test, rising tone rather than sweep and file + count limit rather than count_limit. Settings such as PDF version, Bounding + box and Records per line are no longer spelled out of their keys, and the + note under Width and Height calls them that. A recipe and the command line + write values and keys as before. The sentences `tfg formats` prints under + these settings use the same words, and a box for the format of the files + inside reads `such as png or csv`. +- **The window's own sentences say what the screen shows.** Single batch no + longer promises one size. The explanations behind Seed, Label in each file, + Size, Limit to test, Expected outcome and Preset say what each does without + words from inside the program, and About names the tabs and buttons it + means. A switch reads on or off rather than true or false, in the line of a + folded section and behind its button. The memory setting on Preferences is + described in plain words. +- **A refusal in the window names settings and list values as the screen + does.** In English it read "level_mix and entry_format" and "the + apache-combined shape", and now reads "Level mix and Entry format" and "the + Apache combined shape". In Polish the same refusal at the bottom of the form + left the setting's name out entirely. The command line prints every refusal + as before. The Polish label of Entry format now suits a log as well as an + archive. +- **A refusal in the window speaks of batches and boxes, not of a recipe.** + It read "target 1 has no Size ... add size: 2mb, size-range: 1kb-8kb", and now + reads "Batch 1 has no Size ... type a size such as 2mb, or choose another way + under How the size is given". Hints name a box, a list or a tab rather than + a line of a recipe or a `tfg` command. The command line keeps its words, + except a few reasons that spoke of a recipe, such as "so the same settings + give the same files everywhere". + - **On Windows, a path picked with Choose... has backslashes.** It is written the way Windows writes paths, the same text a drop of that folder or file puts in the box. It came with forward slashes before. @@ -293,6 +363,17 @@ because it turns other people's test suites red. ### Fixed +- **The smallest size a refusal names is one every file of the batch takes.** + Three 320x240 PNGs asked for at 1 B named the smallest size of the first + file, and that size was refused again, because each picture needs its own. + The refusal now names the smallest size every file can have, and the button + under it in the window puts that size in the box. Refusing a large batch + takes about as long as planning it. Several pictures with a width and height + also get a second button, for `smallest`, each at its own size. +- **Several batches shows a format's settings the way Single batch does.** + The settings of a PDF stand under their headings there too, and a setting + that is a size, such as Entry size of a ZIP, shows its count of bytes under + the box. The same goes for the settings of a preset a batch builds on. - **Choose... is off while files are being made.** The output directory box was frozen during a run and the button beside it was not, so a folder picked mid run went into the box while the run went on writing into the old one. diff --git a/README.md b/README.md index 46bbae09..176d8618 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,7 @@ for, and the manifest says how your system should react to it: |---|---| | `empty-and-minimal` | Does a file that is valid and as small as the format allows get through? | | `filename-handling` | Will my system store, show and give back a file name it did not expect? | +| `picture-sizes` | Does my system take pictures at the sizes screens and platforms use? | | `size-boundaries` | Is a size limit enforced exactly where it is declared? | | `tabular-import` | Does my table import survive what real tools export? | | `text-encoding` | Does my reader know which encoding a file is in, or is it guessing? | @@ -528,8 +529,11 @@ tfg generate --format zip --size 5mb --damage truncate:missing=30 A damaged file names its damage in its label, beside the size it has on disk: `tfg - txt - 10485760 B - damage truncate:missing=50 - seed c2a547b2`. So two texts cut by different shares can be told apart from their first line, although -the text after it is the same. A long list of damages names the first few and -how many more there are, and the manifest lists every one. The label is still +the text after it is the same. A picture or a film draws its label without the +size, `tfg - png - damage zero-head:bytes=16 - seed c2a547b2`, so a picture of a +given width and height is the same picture at every size you ask for. A long +list of damages names the first few and how many more there are, and the +manifest lists every one. The label is still written before the damage, so the damage can overwrite it, and the manifest does not promise it is there. diff --git a/internal/cli/formats.go b/internal/cli/formats.go index e5806a9b..793b5166 100644 --- a/internal/cli/formats.go +++ b/internal/cli/formats.go @@ -74,6 +74,38 @@ type propertyEntry struct { // is every one a preset, a damage or a tool takes. Added on 2026-11-11, // which widens this output and changes the meaning of no key in it. Extensions map[string]string `json:"extensions,omitempty"` + // OnlyWhen is the setting, and its values, under which this one changes + // anything - a placeholder's colours while content is placeholder. Absent + // for a setting that always does. Added on 2026-11-17, widening this + // output the way extensions did. + OnlyWhen *conditionEntry `json:"only_when,omitempty"` +} + +// conditionEntry is format.Condition as --json writes it. +type conditionEntry struct { + Setting string `json:"setting"` + Values []string `json:"values"` +} + +// conditionOf is a condition for --json, or nothing for a setting that has +// none, so the key is absent rather than empty. +func conditionOf(c format.Condition) *conditionEntry { + if c.IsZero() { + return nil + } + return &conditionEntry{Setting: c.Setting, Values: c.Values} +} + +// allowedWithCondition is what a setting takes, and after it when it changes +// anything, for a setting that does not always: "true or false, default +// false, only when content is placeholder". On the setting's own line rather +// than once over its block, so a line read alone - grep for background - still +// says it. +func allowedWithCondition(p format.Property) string { + if p.OnlyWhen.IsZero() { + return p.Allowed() + } + return p.Allowed() + ", " + p.OnlyWhen.Describe() } // smallestAccepted is the number this command prints as the minimum. @@ -106,7 +138,7 @@ func entryFor(d format.Descriptor) formatEntry { props = append(props, propertyEntry{ Name: p.Name, Kind: string(p.Kind), Min: p.Min, Max: p.Max, Extensions: p.Extensions, Unit: p.Unit, Choices: p.Choices, Default: p.Default, Detail: p.Detail, - Group: p.Group, + Group: p.Group, OnlyWhen: conditionOf(p.OnlyWhen), }) } return formatEntry{ @@ -145,7 +177,7 @@ func describeOne(d format.Descriptor, out io.Writer) { if p.Group != "" && (i == 0 || d.Properties[i-1].Group != p.Group) { fmt.Fprintf(out, "\n %s:\n", p.Group) } - fmt.Fprintf(out, " %-14s %s\n", p.Name, p.Allowed()) + fmt.Fprintf(out, " %-14s %s\n", p.Name, allowedWithCondition(p)) if p.Detail != "" { fmt.Fprintf(out, " %-14s %s\n", "", p.Detail) } diff --git a/internal/core/literal.go b/internal/core/literal.go new file mode 100644 index 00000000..3433658b --- /dev/null +++ b/internal/core/literal.go @@ -0,0 +1,64 @@ +package core + +import "strings" + +// A value somebody types into a box exactly as it is written - a group name, a +// placeholder in a text, a colour, a word a setting takes - stands between two +// backticks in the description of a setting: "Leave it at `all`". Each surface +// shows the marks in its own way, and the text is written once: +// +// - the window draws the value in the type of code, in a colour of its own +// (parts.Explanation), and the backticks go. +// - the site wraps it in . +// - the command line prints the backticks as they are, which is how the help +// of a command marks something to type. +// +// The owner's decision of 2026-11-18, after reading the explanation of the +// groups of the picture sizes preset in the window: screens, avatars, social +// and all stood among the words describing them, and nothing said which of +// them went into the box (docs/SIZE-FIXES-2026-11-16.md section 3.9). +// +// A translation keeps every value between the marks exactly as the English has +// it, since what is typed is the same in every language - +// TestAValueToTypeIsTheSameInEveryLanguage holds every catalogue to that. + +// Backtick is the mark on either side of a value to type. +const Backtick = "`" + +// Piece is one run of a description: a value to type, or the words round it. +type Piece struct { + Text string + Literal bool +} + +// Pieces splits a description at its marks, in order, leaving out the empty +// runs. A mark without a partner is kept as it is written, in the words: an +// odd one is a backtick somebody meant, not the start of a value. +func Pieces(s string) []Piece { + parts := strings.Split(s, Backtick) + if len(parts)%2 == 0 { + // An odd number of marks: the last one has no partner, so it and + // everything after it are words. + last := len(parts) - 2 + parts = append(parts[:last:last], parts[last]+Backtick+parts[last+1]) + } + out := make([]Piece, 0, len(parts)) + for i, p := range parts { + if p == "" { + continue + } + out = append(out, Piece{Text: p, Literal: i%2 == 1}) + } + return out +} + +// Literals is every value to type in a description, in order. +func Literals(s string) []string { + var out []string + for _, p := range Pieces(s) { + if p.Literal { + out = append(out, p.Text) + } + } + return out +} diff --git a/internal/core/refusal.go b/internal/core/refusal.go index 00c5c139..85b87943 100644 --- a/internal/core/refusal.go +++ b/internal/core/refusal.go @@ -29,11 +29,14 @@ func (r *Refusal) Error() string { return r.InTheWordsOf(r.setting) } // InTheWordsOf is the sentence with the setting named the way one surface names // it. The slots are filled in the layout before the values go in, so a value // somebody typed as "{setting}" is printed as typed rather than read as a slot. -func (r *Refusal) InTheWordsOf(name string) string { +func (r *Refusal) InTheWordsOf(name string) string { return r.Reworded(name, nil) } + +// Reworded is InTheWordsOf with the values worded by w - see Said.Reworded. +func (r *Refusal) Reworded(name string, w Wording) string { if name == "" { name = r.setting } - return r.said.InTheWordsOf(name) + return r.said.Reworded(name, w) } // Said is the sentence in parts. @@ -74,17 +77,7 @@ func (r *Refusal) Unwrap() error { // InTheWordsOf is String with the setting slots of the layout filled first, so // a value somebody typed as "{setting}" is printed as typed rather than read as // a slot. -func (s Said) InTheWordsOf(name string) string { - if name == "" { - return s.String() - } - filled := s - filled.layout = InTheWordsOf(s.layout, name) - if s.one != "" { - filled.one = InTheWordsOf(s.one, name) - } - return filled.String() -} +func (s Said) InTheWordsOf(name string) string { return s.Reworded(name, nil) } // wrapped is every value the layout takes with %w. func (s Said) wrapped() []error { diff --git a/internal/core/reworded.go b/internal/core/reworded.go new file mode 100644 index 00000000..d1e2705e --- /dev/null +++ b/internal/core/reworded.go @@ -0,0 +1,135 @@ +package core + +import "fmt" + +// A window in English says the engine's sentences in its own words where the +// command line's words are the recipe's: a value of a list by the name its menu +// shows, a setting by the label above its box, and a thing of the recipe - a +// target, a line of the file, a command to run - by what the screen calls it. +// docs/SIZE-FIXES-2026-11-16.md section 6.1, M3. +// +// The command line and the window render through the one function, render, +// and the command line is the window with nothing reworded. So the values of a +// sentence cannot come out differently between the two, and a guard holds that +// a wording answering for nothing gives the command line's text to the byte for +// every kind of value. + +// Wording is how a surface says the engine's sentences where it does not say +// them as the command line does. Nil is the command line. +type Wording interface { + // Word is a value in the surface's words, and false for every value it + // says the way the command line does. + Word(v any) (string, bool) + // Layout is a sentence's layout in the surface's words. It keeps every + // value and every slot of the command line's layout, in the same order - + // the values are the command line's, so a layout that dropped or moved + // one would print another value in its place. + Layout(layout string) string +} + +// word is what w says a value is, and false where w has nothing to say. +func word(w Wording, v any) (string, bool) { + if w == nil { + return "", false + } + return w.Word(v) +} + +// laidOut is the sentence with its layouts in w's words. +func laidOut(w Wording, s Said) Said { + if w == nil { + return s + } + s.layout = w.Layout(s.layout) + if s.one != "" { + s.one = w.Layout(s.one) + } + return s +} + +// value is v as a sentence reworded by w takes it. +// +// A value w answers for is printed as the answer, without the quotes the +// layout gives a value somebody typed - a name from a list is not something +// typed (the owner's decision of 2026-10-05). A value that holds sentences is +// reworded all the way down and printed with the verb the layout gives it, as +// its own Format would print it. Anything else is the value itself. +func value(w Wording, v any) any { + if w == nil { + return v + } + if said, ok := w.Word(v); ok { + return verbatim(said) + } + switch v := v.(type) { + case Said: + return rendered(laidOut(w, v).render(w)) + case Conjoined: + return rendered(v.joined(w)) + case Sentences: + return rendered(v.joined(w)) + case Lines: + return rendered(v.joined(w)) + case Choices: + return rendered(v.joined(w)) + case error: + return errorValue(w, v) + case interface{ Said() Said }: + // A sentence of ours under a type of its own - the place in a recipe + // a refusal names - reworded where what it prints IS the sentence, so + // a type that adds to it keeps what it adds. + if said := v.Said(); fmt.Sprint(v) == said.String() { + return rendered(laidOut(w, said).render(w)) + } + } + return v +} + +// errorValue is an error inside a sentence: reworded when it can say itself in +// other words, and otherwise left to print its own text. +// +// Asked of the error itself rather than of what it wraps, because the command +// line prints the whole of its text. A sentence of ours whose text IS the +// error's text is reworded too. One whose text differs - an error that adds to +// its sentence - is left as it is, because rewording it would drop what it +// adds. +func errorValue(w Wording, err error) any { + if r, ok := err.(interface{ Reworded(string, Wording) string }); ok { + return rendered(r.Reworded("", w)) + } + if said, ok := err.(interface{ Said() Said }); ok && said.Said().String() == err.Error() { + return rendered(laidOut(w, said.Said()).render(w)) + } + return err +} + +// Reworded is the sentence in w's words, with its setting slots filled with +// name the way InTheWordsOf fills them. The layout is w's before the slots are +// filled, so a name is never read as part of the layout. +func (s Said) Reworded(name string, w Wording) string { + filled := laidOut(w, s) + if name == "" { + return filled.render(w) + } + filled.layout = InTheWordsOf(filled.layout, name) + if filled.one != "" { + filled.one = InTheWordsOf(filled.one, name) + } + return filled.render(w) +} + +// verbatim is a word printed as it is, whatever verb the layout gives it, with +// the width the layout asks for. +type verbatim string + +func (v verbatim) Format(f fmt.State, _ rune) { + fmt.Fprintf(f, fmt.FormatString(f, 's'), string(v)) +} + +// rendered is text a value made of itself, printed with the verb the layout +// gives that value - the way the value's own Format prints its text. +type rendered string + +func (r rendered) Format(f fmt.State, verb rune) { + fmt.Fprintf(f, fmt.FormatString(f, verb), string(r)) +} diff --git a/internal/core/said.go b/internal/core/said.go index 76077aff..0c0df153 100644 --- a/internal/core/said.go +++ b/internal/core/said.go @@ -199,10 +199,15 @@ func asCount(v any) int64 { // // The %w of a wrapping layout is printed the way fmt.Errorf prints it, as the // error's own text. -func (s Said) String() string { +func (s Said) String() string { return s.render(nil) } + +// render is the sentence with each value as w words it, in the layout it +// carries - see Reworded, which lays it out in w's words first. Nil is the +// command line: every value exactly as it was handed in. +func (s Said) render(w Wording) string { values := make([]any, len(s.args)) for i, a := range s.args { - values[i] = a.Value + values[i] = value(w, a.Value) } if s.countUnsaid() { values = values[:len(values)-1] @@ -312,6 +317,9 @@ func (t Term) Format(f fmt.State, verb rune) { // as the label above its box. func LabelTerm(name string) Term { return Term{Key: LabelKey(name), Text: name} } +// Setting is the setting a LabelTerm names, and false for any other word. +func (t Term) Setting() (string, bool) { return strings.CutPrefix(t.Key, LabelKey("")) } + // LabelKey and JointKey are two more of the keys a window keeps words under - // see UnitKey. FormatOwner is whose declaration a format's words are. func LabelKey(name string) string { return "Label." + name } @@ -379,37 +387,42 @@ type Conjoined []Said // Format prints the sentences in English, each pair joined with "and". func (c Conjoined) Format(f fmt.State, verb rune) { - parts := make([]string, len(c)) - for i, s := range c { - parts[i] = s.String() - } - fmt.Fprintf(f, fmt.FormatString(f, verb), strings.Join(parts, " and ")) + fmt.Fprintf(f, fmt.FormatString(f, verb), c.joined(nil)) } +func (c Conjoined) joined(w Wording) string { return joinSaid(c, " and ", w) } + // Sentences is several sentences said as a list, one after another with a // comma between them. type Sentences []Said // Format prints the sentences in English, joined with commas. func (l Sentences) Format(f fmt.State, verb rune) { - parts := make([]string, len(l)) - for i, s := range l { - parts[i] = s.String() - } - fmt.Fprintf(f, fmt.FormatString(f, verb), strings.Join(parts, ", ")) + fmt.Fprintf(f, fmt.FormatString(f, verb), l.joined(nil)) } +func (l Sentences) joined(w Wording) string { return joinSaid(l, ", ", w) } + // Lines is several sentences said one under another, each on a line of its own // and indented by two spaces after the first. type Lines []Said // Format prints the sentences in English, one a line. func (l Lines) Format(f fmt.State, verb rune) { - parts := make([]string, len(l)) - for i, s := range l { - parts[i] = s.String() + fmt.Fprintf(f, fmt.FormatString(f, verb), l.joined(nil)) +} + +func (l Lines) joined(w Wording) string { return joinSaid(l, "\n ", w) } + +// joinSaid is several sentences, each worded by w, joined with sep - the one +// place each list above is joined, for the command line and for a window +// rewording it alike. +func joinSaid(list []Said, sep string, w Wording) string { + parts := make([]string, len(list)) + for i, s := range list { + parts[i] = laidOut(w, s).render(w) } - fmt.Fprintf(f, fmt.FormatString(f, verb), strings.Join(parts, "\n ")) + return strings.Join(parts, sep) } // Choices is several values of one closed list, said as a list - "comma, tab, @@ -422,7 +435,19 @@ type Choices struct { // Format prints the values joined the way the command line always joined // them. func (c Choices) Format(f fmt.State, verb rune) { - fmt.Fprintf(f, fmt.FormatString(f, verb), strings.Join(c.Values, ", ")) + fmt.Fprintf(f, fmt.FormatString(f, verb), c.joined(nil)) +} + +// joined is the values, each worded by w as one Choice of the list. +func (c Choices) joined(w Wording) string { + words := make([]string, len(c.Values)) + for i, v := range c.Values { + words[i] = v + if said, ok := word(w, Choice{Of: c.Of, Value: v}); ok { + words[i] = said + } + } + return strings.Join(words, ", ") } // directivesOf is every value directive of a layout, in the order the values diff --git a/internal/core/size.go b/internal/core/size.go index 3f20a3c6..46ef9912 100644 --- a/internal/core/size.go +++ b/internal/core/size.go @@ -88,7 +88,7 @@ func ParseSize(s string) (int64, error) { // The decimal point stays, because 1.5gib is a real thing people write. if !plainDecimal(digits) { return 0, RefuseAbout(SettingSize, Says("core.SizeNotPlain", - "{setting} %q is not a plain number: write the digits out, as 10mb, 1.5gib or 1048576. Spellings such as 1e5, 0x10 or 1_000 are refused rather than guessed at, the same as in a recipe", A("Value", s))) + "{setting} %q is not a plain number: write the digits out, as 10mb, 1.5gib or 1048576. Spellings such as 1e5, 0x10 or 1_000 are refused rather than guessed at", A("Value", s))) } return parseDecimal(s, digits, multiplier) } diff --git a/internal/damage/damage.go b/internal/damage/damage.go index 0122088a..3d7bc409 100644 --- a/internal/damage/damage.go +++ b/internal/damage/damage.go @@ -245,6 +245,9 @@ func Register(d Descriptor) { panic(fmt.Sprintf("damage: %q declares a policy case with no format or no reason", d.ID)) } } + if format.AnyConditional(d.Parameters) { + panic(fmt.Sprintf("damage: %q declares a parameter with a condition, which only a format keeps", d.ID)) + } for i := range d.Parameters { format.SortChoices(d.Parameters[i].Choices) } diff --git a/internal/engine/batchminimum.go b/internal/engine/batchminimum.go new file mode 100644 index 00000000..a0fb0767 --- /dev/null +++ b/internal/engine/batchminimum.go @@ -0,0 +1,237 @@ +package engine + +import ( + "context" + "errors" + "fmt" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/format" +) + +// A size refused for a batch is answered for the WHOLE batch. +// +// Reported by the owner from the running window on 2026-11-16 +// (docs/SIZE-FIXES-2026-11-16.md): a refusal named the smallest size of the +// first file that refused, the button under it put that number in the box, and +// the next run was refused again. The files of one target are not one file. +// Each picture is drawn from its own seed and codes to its own size - JPG +// 640x480, 24 files, smallest 32 443 to 42 496 B (O353) - and a text format +// that states its size in its label refused the very minimum it had named one +// run before (pdf 3409, then 3415). So the number a refusal names is now the +// smallest size every file of the target accepts, found by asking the files +// rather than by guessing, and both surfaces get the same number (G1). +// +// Only when the run is refused. A run that plans is untouched, so no file of a +// run that worked moves by a byte. + +// refusedForTheBatch is the refusal planning a target ends with: err as it is, +// unless err is a size below what the format makes on a target of one size - +// then the minimum it names is the smallest size every file of the target +// accepts. +// +// The format's own refusal goes out unchanged whenever the batch agrees with +// it, which is every target of one file whose format names a true minimum. Its +// wording is the format's, with the alternatives only the format knows - a +// smaller picture, a lower quality - and that is worth keeping wherever it is +// right. When the batch needs more, the hint is worded here, because every +// hint a format writes carries the numbers of the one file it was asked about. +// +// first is the place in the target of the file that refused, from nought. +func refusedForTheBatch(ctx context.Context, walk batchWalk, first int, err error) error { + var below *format.BelowMinimumError + if !errors.As(err, &below) || below.Minimum <= 0 || !oneSize(walk.t) { + return err + } + got, walkErr := walk.sizeEveryFileTakes(ctx, first, below) + if walkErr != nil { + return walkErr + } + refusal := err + if got.size != below.Minimum { + refusal = got.refusal(below.Requested, len(walk.t.Sizes)) + } + if len(walk.t.Sizes) > 1 && smallestFits(walk.t, walk.desc) { + refusal = &smallestOffered{err: refusal} + } + return refusal +} + +// oneSize says every file of t was asked for one stated number, the one shape +// whose refusal a single number can answer. +// +// The others are answered elsewhere or not at all. A range draws its sizes and +// snaps them to writable ones itself (drawSizes). A boundary set is three sizes +// around a limit, and the smallest LIMIT is a different question that a guard +// keeps without a button (formcolumns_test.go). smallest and a size from the +// contents name no number to refuse. +func oneSize(t *Target) bool { + if t.Smallest || t.SizeFromContents || t.Range.Used || t.BoundaryLimit != 0 || len(t.Sizes) == 0 { + return false + } + for _, s := range t.Sizes[1:] { + if s != t.Sizes[0] { + return false + } + } + return true +} + +// batchWalk is what the walk below asks every file with: the target, its +// format, and the two things every file's request is built from. +type batchWalk struct { + t *Target + desc format.Descriptor + targetSeed uint64 + damaged string +} + +// everyFile is where the walk ended. +type everyFile struct { + // size is the smallest size every file accepts. + size int64 + // last is the refusal that raised the size last. + last *format.BelowMinimumError + // differ says a file other than the first to refuse raised it, so the + // files are not alike and no one file's reason is the batch's. + differ bool +} + +// sizeEveryFileTakes walks the files of the target round and round, from the +// one that refused and the minimum it named, until all of them in a row accept +// one size. +// +// A refusal raises the size to the minimum it names, or one byte past where it +// stands when it names nothing higher - a band the format cannot reach, the +// same step format.Descriptor.PlanSmallest takes. Every file is asked again +// after the last raise, and that is not caution: PNG accepts a picture's exact +// size and refuses the eleven bytes above it, so a file that took a smaller +// size can refuse a larger one. +// +// The cost is planning the batch once and part of it again - every file after +// the last raise, and the ones before it once more. A picture with its width +// and height set encodes while it plans, so ten thousand of them is the time +// their plan takes, measured in docs/SIZE-FIXES-2026-11-16.md. It holds nothing +// per file, so a million files cost time and no memory, and the run's context +// is asked before every plan, so a stop is a stop. +// +// The ceiling is for a generator that never accepts, which would otherwise walk +// one byte at a time without end. A raise never goes down, so nothing cycles, +// and no file raises it more often than its format walks to its own smallest +// size - format.SmallestRounds - so n files may raise it n times that. +func (w batchWalk) sizeEveryFileTakes(ctx context.Context, first int, below *format.BelowMinimumError) (everyFile, error) { + n := len(w.t.Sizes) + got := everyFile{size: max(below.Minimum, below.Requested+1), last: below} + raises, ceiling := 0, format.SmallestRounds*n + for idx, inARow := first, 0; inARow < n; { + if err := ctx.Err(); err != nil { + return everyFile{}, err + } + r := requestFor(w.t, idx, core.FileSeed(w.targetSeed, idx), w.damaged) + r.Bytes = got.size + _, err := planFile(ctx, w.t, w.desc, r) + if err == nil { + inARow++ + idx = (idx + 1) % n + continue + } + var refused *format.BelowMinimumError + if !errors.As(err, &refused) { + // A refusal about something else, or a stop the format noticed + // first. Either is the answer somebody needs, so it goes out as it + // came. + return everyFile{}, err + } + if raises++; raises > ceiling { + return everyFile{}, core.Defect(fmt.Errorf("%s: the size every one of %d files accepts did not settle in %d raises, the last at %d B", + w.desc.ID, n, ceiling, got.size)) + } + got.size = max(refused.Minimum, got.size+1) + got.last, got.differ, inARow = refused, got.differ || idx != first, 0 + } + return got, nil +} + +// refusal is the refusal for a batch whose size moved past the one the first +// file named. +// +// The reason stays the format's while one file did all the raising - a format +// stating its size in its label walks to its own smallest size that way, and +// its reason is still true. Once another file raised it, the reason is that +// the files are not alike, which is what somebody needs in order not to ask for +// the first file's number again. The hint is always this package's, because +// every hint a format writes carries the numbers of the one request it saw. +func (e everyFile) refusal(requested int64, files int) *format.BelowMinimumError { + reason := e.last.Reason + if e.differ { + reason = core.Says("engine.EveryFileIsDifferent", "each of the %d files is different, so each has a smallest size of its own", + core.A("Files", files)) + } + return &format.BelowMinimumError{ + Format: e.last.Format, + Requested: requested, + Minimum: e.size, + Reason: reason, + Hint: askForEveryFile(e.size, files), + } +} + +// askForEveryFile is the hint of a refusal whose number is the batch's rather +// than one file's. +// +// No "or more", which every format's own hint says. Above the size every file +// accepts there can still be a byte count one of them cannot reach, and only +// this one number was asked of every file. +func askForEveryFile(size int64, files int) core.Said { + if files == 1 { + return core.Says("engine.AskForTheSmallestSize", "Ask for %d B.", core.A("Size", size)) + } + return core.Says("engine.AskForTheSmallestSizeOfAll", "Ask for %d B, the smallest size all %d files can have.", + core.A("Size", size), core.A("Files", files)) +} + +// smallestFits says t could ask for smallest instead of a number: a picture +// with its width and height known, the shape checkSmallest accepts - and no +// damage. +// +// Not with a damage, because smallest then has to clear the damage's floor +// too, and each file answers that at its own smallest size. Promising smallest +// there would be promising something only planning every file could keep. +func smallestFits(t *Target, desc format.Descriptor) bool { + if len(t.Damage) != 0 { + return false + } + asked := *t + asked.Smallest = true + return checkSmallest(&asked, desc) == nil +} + +// smallestOffered is a refusal whose target could ask for smallest instead, +// which the window offers as a second way out (OffersSmallest). +// +// Only for a target of more than one file. Then the size every file accepts +// is the largest of their smallest sizes, and smallest makes each file at its +// own. A single file at its smallest size is the file smallest makes - the +// same bytes under the same name, measured for png, jpg and webp at 640x480 +// on 2026-11-18 - so a second button there does what the first does, which +// the owner reported from the window that day. Not "when the smallest sizes +// differ": knowing that would mean planning every file at its smallest, ten +// thousand pictures encoded for the sake of one button. +// +// A wrapper rather than a field on format.BelowMinimumError, because the +// format does not know the target - a picture's width and height can come from +// the format's defaults as well as from the target, and only the engine holds +// both. It answers nothing itself, so every reader that asks the refusal +// underneath through errors.As - the exit code, the sentence, the setting it is +// about - gets exactly what it got before. +type smallestOffered struct{ err error } + +func (s *smallestOffered) Error() string { return s.err.Error() } +func (s *smallestOffered) Unwrap() error { return s.err } + +// OffersSmallest says err refused a size for a target that could ask for +// smallest instead - each file the smallest its own picture makes. +func OffersSmallest(err error) bool { + var s *smallestOffered + return errors.As(err, &s) +} diff --git a/internal/engine/crash.go b/internal/engine/crash.go index 2466c030..47fabe13 100644 --- a/internal/engine/crash.go +++ b/internal/engine/crash.go @@ -44,7 +44,7 @@ func (e *GeneratorCrashError) Error() string { return e.Said().String() } func (e *GeneratorCrashError) Said() core.Said { return core.Says("engine.GeneratorCrash", "the %s generator stopped with an internal error while %s: %v. "+ - "This is a defect in this tool rather than something a recipe can ask for. "+ + "This is a defect in this tool rather than something the settings can ask for. "+ "Please report it with the settings that produced it", core.A("Format", e.Format), core.A("While", e.while()), core.A("Value", fmt.Sprint(e.Value))) } diff --git a/internal/engine/errors.go b/internal/engine/errors.go index 1251d85d..40679e44 100644 --- a/internal/engine/errors.go +++ b/internal/engine/errors.go @@ -59,11 +59,14 @@ func (e *RecipeError) Error() string { // it in Detail and comes out exactly as it did before, so the two states are // not a half finished middle - they are the same sentence written in one piece // or in three. -func (e *RecipeError) InTheWordsOf(name string) string { +func (e *RecipeError) InTheWordsOf(name string) string { return e.Reworded(name, nil) } + +// Reworded is InTheWordsOf with the values worded by w - see core.Said.Reworded. +func (e *RecipeError) Reworded(name string, w core.Wording) string { if name == "" { name = core.LastSettingSegment(e.Setting) } - return core.InTheWordsOf(e.Said().String(), name) + return core.InTheWordsOf(e.Said().Reworded("", w), name) } // Said is the whole refusal, for a window that says it in its own language, diff --git a/internal/engine/filename.go b/internal/engine/filename.go index fa42ff31..d217c8a2 100644 --- a/internal/engine/filename.go +++ b/internal/engine/filename.go @@ -32,7 +32,7 @@ func checkFileName(setting string, where core.Said, name string) error { case strings.ContainsAny(name, `/\`): return &RecipeError{Setting: setting, Detail: core.Says("engine.NameIsAPath", "%s produces the name %q, which is a path rather than a file name", core.A("Where", where), core.A("Name", name)), - Because: core.Says("engine.NameIsAPathWhy", "names stay inside the output directory, and a separator is refused on every system so that a recipe works everywhere"), + Because: core.Says("engine.NameIsAPathWhy", "names stay inside the output directory, and a separator is refused on every system, so the same settings work everywhere"), Remedy: wayOutOfAPath(setting)} // A colon, on every system, for the same reason as a separator. @@ -52,7 +52,7 @@ func checkFileName(setting string, where core.Said, name string) error { case strings.Contains(name, ":"): return &RecipeError{Setting: setting, Detail: core.Says("engine.NameColon", "%s produces the name %q, which holds a colon", core.A("Where", where), core.A("Name", name)), - Because: core.Says("engine.NameColonWhy", "Windows reads that as a drive or as an alternate data stream rather than as part of the name, so the file arrives called something else or not at all. It is refused on every system so that a recipe means one thing everywhere"), + Because: core.Says("engine.NameColonWhy", "Windows reads that as a drive or as an alternate data stream rather than as part of the name, so the file arrives called something else or not at all. It is refused on every system, so the same settings give the same files everywhere"), Remedy: core.Says("engine.NameColonFix", "Take the colon out, or ask for the file inside an archive where the name survives")} // Characters Windows will not put in a file name, refused on every system @@ -78,7 +78,7 @@ func checkFileName(setting string, where core.Said, name string) error { return &RecipeError{Setting: setting, Detail: core.Says("engine.NameForbidden", "%s produces the name %q, which holds %s", core.A("Where", where), core.A("Name", name), core.A("Character", describeForbidden(bad))), - Because: core.Says("engine.NameForbiddenWhy", "Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system so that a recipe means one thing everywhere"), + Because: core.Says("engine.NameForbiddenWhy", "Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system, so the same settings give the same files everywhere"), Remedy: core.Says("engine.NameForbiddenFix", "Take the character out, or ask for the file inside an archive where the name survives")} // Longer than every system this runs on will store, refused on every @@ -96,7 +96,7 @@ func checkFileName(setting string, where core.Said, name string) error { Detail: core.Says("engine.NameTooLong", "%s produces the name %q, which is %d bytes long", core.A("Where", where), core.A("Name", name), core.A("Length", len(name))), Because: core.Says("engine.NameTooLongWhy", "Linux stores at most %d bytes in a file name, and a letter outside ASCII takes two to four of them. "+ - "It is refused on every system so that a recipe means one thing everywhere", core.A("Most", core.MaxNameBytes)), + "It is refused on every system, so the same settings give the same files everywhere", core.A("Most", core.MaxNameBytes)), Remedy: core.Says("engine.NameTooLongFix", "Shorten it to %d bytes or fewer, or ask for the file inside an archive where the name survives", core.A("Most", core.MaxNameBytes))} @@ -123,7 +123,7 @@ func checkFileName(setting string, where core.Said, name string) error { case strings.EqualFold(name, "nul"): return &RecipeError{Setting: setting, Detail: core.Says("engine.NameNul", "%s produces the name %q, which names the null device on Windows rather than a file", core.A("Where", where), core.A("Name", name)), - Because: core.Says("engine.NameNulWhy", "writing there succeeds and the bytes go nowhere, so the run would record a file that is not on the disk. It is refused on every system so that a recipe means one thing everywhere"), + Because: core.Says("engine.NameNulWhy", "writing there succeeds and the bytes go nowhere, so the run would record a file that is not on the disk. It is refused on every system, so the same settings give the same files everywhere"), Remedy: core.Says("engine.NameNulFix", "Give it an extension, nul.txt is an ordinary name, or choose another one")} case name == "." || name == "..": @@ -158,7 +158,7 @@ func checkFileName(setting string, where core.Said, name string) error { case filepath.IsAbs(name) || core.HasVolumeName(name): return &RecipeError{Setting: setting, Detail: core.Says("engine.NameAbsolute", "%s produces the absolute path %q", core.A("Where", where), core.A("Name", name)), - Because: core.Says("engine.NameAbsoluteWhy", "a recipe carries no absolute paths, because then it only works on the machine it was written on"), + Because: core.Says("engine.NameAbsoluteWhy", "a name with an absolute path only works on the machine it was written on, so the same settings would fail anywhere else"), Remedy: chooseTheDirectory()} } return nil diff --git a/internal/engine/plantarget.go b/internal/engine/plantarget.go index a86591ce..9f7c78e1 100644 --- a/internal/engine/plantarget.go +++ b/internal/engine/plantarget.go @@ -46,7 +46,8 @@ func (pl *planning) files(ctx context.Context, t *Target, desc format.Descriptor r.Bytes = size p, err := planFile(ctx, t, desc, r) if err != nil { - return atTarget(position, t, err) + walk := batchWalk{t: t, desc: desc, targetSeed: targetSeed, damaged: damaged} + return atTarget(position, t, refusedForTheBatch(ctx, walk, idx, err)) } // A size drawn from the range that this format cannot write was moved diff --git a/internal/engine/smallest.go b/internal/engine/smallest.go index a607df3c..3facbf55 100644 --- a/internal/engine/smallest.go +++ b/internal/engine/smallest.go @@ -2,7 +2,6 @@ package engine import ( "context" - "strings" "github.com/donislawdev/TestingFilesGenerator/internal/core" "github.com/donislawdev/TestingFilesGenerator/internal/format" @@ -21,24 +20,51 @@ import ( // be the smallest of, and the smallest file of the other formats is an answer // nobody has asked a question for yet. +// TakesSmallest says a target of this format can ask for smallest once its +// width and height are known - the question a window asks before it offers +// smallest as a way of giving the size at all. Whether this target's settings +// already say how large the picture is, is SmallestAnswered. +func TakesSmallest(desc format.Descriptor) bool { + return desc.IsPicture() +} + +// SmallestAnswered says a target of this format with these settings can ask +// for smallest now: a picture whose width and height are set, or declared by +// the format. The rule checkSmallest refuses by, whole, so a window that holds +// smallest back until it is true holds back exactly what a run would refuse. +// +// Asked by the window after every change on the form, so it plans nothing. +func SmallestAnswered(desc format.Descriptor, properties map[string]string) bool { + return TakesSmallest(desc) && sidesKnown(desc, properties) +} + +// sidesKnown says the picture's width and height are both set, or declared by +// the format when nothing sets them. +func sidesKnown(desc format.Descriptor, properties map[string]string) bool { + for _, side := range []string{"width", "height"} { + if properties[side] == "" && declaredDefault(desc, side) == "" { + return false + } + } + return true +} + // checkSmallest refuses smallest for a target it cannot answer. func checkSmallest(t *Target, desc format.Descriptor) error { if !t.Smallest { return nil } - if !strings.HasPrefix(desc.MediaType, "image/") { + if !TakesSmallest(desc) { return &RecipeError{Setting: format.SettingSize, Detail: core.Says("engine.SmallestNotAPicture", "target %q asks for the smallest %s file, and smallest is for pictures", core.A("Target", t.ID), core.A("Format", desc.ID)), Because: core.Says("engine.SmallestNotAPictureWhy", "a picture with its width and height set has one smallest file, the picture with nothing added to reach a size"), Remedy: core.Says("engine.SmallestNotAPictureFix", "Give the target a size such as 2mb, or choose a picture format")} } - for _, side := range []string{"width", "height"} { - if t.Properties[side] == "" && declaredDefault(desc, side) == "" { - return &RecipeError{Setting: format.SettingSize, - Detail: core.Says("engine.SmallestNeedsASize", "target %q asks for the smallest %s and does not say how large the picture is", core.A("Target", t.ID), core.A("Format", desc.ID)), - Because: core.Says("engine.SmallestNeedsASizeWhy", "without a width and a height the picture is chosen to fit the bytes asked for, so there is no picture to be the smallest of"), - Remedy: core.Says("engine.SmallestNeedsASizeFix", "Set width and height, such as width 1920 and height 1080, or give the target a size")} - } + if !sidesKnown(desc, t.Properties) { + return &RecipeError{Setting: format.SettingSize, + Detail: core.Says("engine.SmallestNeedsASize", "target %q asks for the smallest %s and does not say how large the picture is", core.A("Target", t.ID), core.A("Format", desc.ID)), + Because: core.Says("engine.SmallestNeedsASizeWhy", "without a width and a height the picture is chosen to fit the bytes asked for, so there is no picture to be the smallest of"), + Remedy: core.Says("engine.SmallestNeedsASizeFix", "Set width and height, such as width 1920 and height 1080, or give the target a size")} } return nil } diff --git a/internal/format/archive/archive.go b/internal/format/archive/archive.go index d72e9e32..4a45ca7a 100644 --- a/internal/format/archive/archive.go +++ b/internal/format/archive/archive.go @@ -73,6 +73,12 @@ const ( // this format for an empty file. DefaultFormat = "txt" + // FormatShape is what the box of a format for the files inside takes - an + // archive's and a message's alike. Given by example rather than by the + // command that lists formats, because a window has no command line beside + // the box and does have a list of formats at its top. + FormatShape = "the id of a format, such as png or csv" + defaultEntries = 1 // maxEntries is the ceiling on how many files an archive holds. It bounds @@ -137,16 +143,17 @@ var axes = map[string]format.Property{ Name: Entries, Kind: format.PropertyInt, Min: 0, Max: maxEntries, Default: strconv.Itoa(defaultEntries), - Detail: "How many files the archive holds. Use contains instead when the files are not all alike.", + Detail: "How many files the archive holds. When the files are not all alike, describe each kind on its own instead - " + + "with Add files inside on Several batches, or contains in a recipe.", }, EntryFormat: { Name: EntryFormat, Kind: format.PropertyText, - Shape: "the id of a format, as tfg formats lists them", + Shape: FormatShape, // Not a choice, because the allowed values are whatever this build // registered, and a list frozen here would drift away from the // registry the moment a format is added. Default: DefaultFormat, - Detail: "The format of the files inside. Run tfg formats to see what this build supports.", + Detail: "The format of the files inside.", }, EntrySize: { Name: EntrySize, Kind: format.PropertySize, diff --git a/internal/format/avif/avif.go b/internal/format/avif/avif.go index 6945018f..a88ab443 100644 --- a/internal/format/avif/avif.go +++ b/internal/format/avif/avif.go @@ -175,7 +175,7 @@ type memo struct { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("avif") + label = r.PictureLabel("avif") } q, err := quality(r.Properties) @@ -289,15 +289,19 @@ func checkFits(want int64, m memo) error { // who does want them says so - width and height are settings, and 40 megapixels // is the ceiling, which covers 4K and 8K. // -// Ceiling is a tenth above the LARGEST file that rung was seen to produce, the -// free box included, and it is what lets planning choose a picture without -// coding one. Measured on 2026-11-12 by tools/probes/avifladder over 256 seeds -// from zero and 512 far from it, because the label's text moves with the whole -// seed, with the label off and with the label of a file at the edge of the -// rung - a size with the digits of the ceiling, the lightest and the heaviest. -// 640x480 coded to 17020 B, 320x240 to 7029, 256x256 to 4993 and 160x120 to -// 3513. The rungs below draw no label and their picture moves only with the -// low byte of the seed, so their ceiling is the largest of all 256 and no more. +// Ceiling is at least a tenth above the LARGEST file that rung was seen to +// produce, the free box included, and it is what lets planning choose a picture +// without coding one. Measured on 2026-11-16 by tools/probes/avifladder over +// 256 seeds from zero and 512 far from it, because the label's text moves with +// the whole seed, with the label off and on: 640x480 coded to 15896 B, 320x240 +// to 6326, 256x256 to 5581 and 160x120 to 3066. The label a picture draws names +// no size (format.Request.PictureLabel), and that shorter label is drawn twice +// as large across 256 px, so 256x256 needed more than its ceiling held and that +// one was raised. The others stand more than a tenth above and were left where +// they were: a ceiling moved down moves the picture of every file near it, with +// no label too, and buys nothing anybody asked for (D11). The rungs below draw +// no label and their picture moves only with the low byte of the seed, so their +// ceiling is the largest of all 256 and no more. // // The tenth is the margin the video ladder keeps, and it is not caution for its // own sake. The ceilings measured on 2026-08-29 over 256 seeds kept none, and @@ -314,11 +318,11 @@ func checkFits(want int64, m memo) error { // // The second number is the ceiling for a damaged file, whose label names its // damage, by the same rule with the label at the longest length each scale -// still draws: 640x480 coded to 20024 B, 320x240 to 7556 and 256x256 to 6043, -// each above the first number. A rung too narrow to draw a damaged label keeps -// the first number. +// still draws, measured the same day: 640x480 coded to 20280 B, 320x240 to +// 7814, 256x256 to 6311 and 160x120 to 3581, each above the first number. A +// rung too narrow to draw a damaged label keeps the first number. var sizeLadder = []rung{ - {640, 480, 18722, 22027}, {320, 240, 7732, 8312}, {256, 256, 5493, 6648}, {160, 120, 3865, 3865}, + {640, 480, 18722, 22308}, {320, 240, 7732, 8596}, {256, 256, 6140, 6943}, {160, 120, 3865, 3940}, {80, 60, 832, 832}, {40, 30, 549, 549}, {20, 15, 448, 448}, {8, 6, 348, 348}, {4, 3, 344, 344}, {2, 2, 327, 327}, {1, 1, minimumBytes, minimumBytes}, } diff --git a/internal/format/bmp/bmp.go b/internal/format/bmp/bmp.go index ae70fbeb..caef6d51 100644 --- a/internal/format/bmp/bmp.go +++ b/internal/format/bmp/bmp.go @@ -124,7 +124,7 @@ func pixelBytes(width, height int) int64 { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("bmp") + label = r.PictureLabel("bmp") } w, h, err := chooseSize(r) diff --git a/internal/format/condition.go b/internal/format/condition.go new file mode 100644 index 00000000..bce89e21 --- /dev/null +++ b/internal/format/condition.go @@ -0,0 +1,101 @@ +package format + +import ( + "fmt" + "slices" + "strings" +) + +// Condition is a setting that changes a file only while another setting of +// the same declaration has one of a few values: the colours of a placeholder +// change nothing in a picture whose content is the test pattern. +// +// Declared rather than known by the places that care, because three of them +// do. The format refuses such a setting while it would change nothing, since a +// value read and ignored is a colour somebody waits for in silence (rule 6). +// A window hides the field, since a field that cannot change the file is a +// field nobody should have to read past - the owner's decision of 2026-11-17 +// (docs/SIZE-FIXES-2026-11-16.md section 6.5). And tfg formats says so beside +// the setting, so the command line learns it before the refusal does. +type Condition struct { + // Setting is the one this depends on: a choice declared earlier in the + // same list, so a form reads down from the switch to what it shows. + Setting string + // Values are the choices of Setting under which this one applies. + Values []string +} + +// IsZero is whether there is no condition, so the setting always applies. +func (c Condition) IsZero() bool { return c.Setting == "" } + +// Describe is the condition in the words tfg formats prints after what a +// setting takes. +func (c Condition) Describe() string { + return fmt.Sprintf("only when %s is %s", c.Setting, strings.Join(c.Values, " or ")) +} + +// Applies reports whether p changes anything while the settings declared +// beside it have the values value gives. A setting left out, which value +// answers with nothing, has its default - the value a format reads it as. +func (p Property) Applies(declared []Property, value func(name string) string) bool { + c := p.OnlyWhen + if c.IsZero() { + return true + } + v := value(c.Setting) + if v == "" { + v = defaultOf(declared, c.Setting) + } + return slices.Contains(c.Values, v) +} + +// defaultOf is the default of the setting declared under name, or nothing. +func defaultOf(declared []Property, name string) string { + for _, q := range declared { + if q.Name == name { + return q.Default + } + } + return "" +} + +// AnyConditional is whether one of props declares a condition. A damage, a +// preset and a tool declare their settings as Property too, and none of their +// engines refuses a setting that changes nothing - so their registries refuse +// the declaration, rather than letting a window hide a field the command line +// still takes in silence. +func AnyConditional(props []Property) bool { + return slices.ContainsFunc(props, func(p Property) bool { return !p.OnlyWhen.IsZero() }) +} + +// ConditionProblem is what is wrong with a condition in props that nothing +// could keep, or nothing when every one can be kept. A condition on a setting +// declared later, or on one that is not a closed set, is one a window could +// not show and hide by, and one naming a value the setting does not have can +// never hold. One covering every value always holds and says nothing, and one +// on a setting with a condition of its own would hide a field behind a field +// that is itself hidden. +func ConditionProblem(props []Property) string { + for i, p := range props { + c := p.OnlyWhen + if c.IsZero() { + continue + } + at := slices.IndexFunc(props[:i], func(q Property) bool { return q.Name == c.Setting }) + switch { + case at < 0: + return fmt.Sprintf("%s depends on %s, which is not declared before it", p.Name, c.Setting) + case props[at].Kind != PropertyChoice: + return fmt.Sprintf("%s depends on %s, which is not a choice", p.Name, c.Setting) + case !props[at].OnlyWhen.IsZero(): + return fmt.Sprintf("%s depends on %s, which depends on another setting itself", p.Name, c.Setting) + case len(c.Values) == 0 || len(c.Values) >= len(props[at].Choices): + return fmt.Sprintf("%s depends on %s holding some of its values and not all of them", p.Name, c.Setting) + } + choices := props[at].Choices + if bad := slices.IndexFunc(c.Values, func(v string) bool { return !slices.Contains(choices, v) }); bad >= 0 { + return fmt.Sprintf("%s depends on %s being %s, which it cannot be", p.Name, c.Setting, c.Values[bad]) + } + } + return "" +} diff --git a/internal/format/eml/inline.go b/internal/format/eml/inline.go index 472c0cf6..2f3f7fc9 100644 --- a/internal/format/eml/inline.go +++ b/internal/format/eml/inline.go @@ -37,7 +37,7 @@ func pictureProperties() []format.Property { Count: "How many pictures the text shows. With html and alternative each one sits beside the HTML and the HTML points at it through cid:. " + "With plain there is no HTML to point from, so they travel after the text as pictures to show inline. " + "mailparser lists them among the attachments, and so does Python's email package when the HTML is alone. MimeKit never does.", - Format: "The format of the pictures. Any format whose files are pictures, such as png, jpg or gif.", + Format: "The format of the pictures. Any format whose files are pictures, such as `png`, `jpg` or `gif`.", Size: "How big each picture is. Like an attached file it travels in base64, about a third larger.", }) } diff --git a/internal/format/eml/settings.go b/internal/format/eml/settings.go index 93417c5c..8c861061 100644 --- a/internal/format/eml/settings.go +++ b/internal/format/eml/settings.go @@ -223,8 +223,8 @@ func textProperties() []format.Property { Name: Body, Kind: format.PropertyChoice, Choices: []string{Alternative, HTML, Plain}, Default: Plain, - Detail: "Which text the message carries. plain is one text part and html one HTML part. " + - "alternative carries both with the same words, and a mail program shows one of them.", + Detail: "Which text the message carries. With plain text and HTML the same words go in both, " + + "and a mail program shows one of them.", }, layoutProperty(), { @@ -232,7 +232,7 @@ func textProperties() []format.Property { Choices: []string{SevenBit, EightBit, Base64, QuotedPrintable}, Default: SevenBit, Detail: "How the text is written. 7bit keeps it to plain ASCII. " + - "quoted-printable, 8bit and base64 add a line in Polish, and in Japanese when charset is utf-8, because that is what they are for. " + + "quoted-printable, 8bit and base64 add a line in Polish, and in Japanese when the charset is utf-8, because that is what they are for. " + "quoted-printable spells those letters as =C5=BC, 8bit writes them as they are, and base64 writes the whole text in base64. " + "To reach every size base64 ends the text with empty lines, and with crlf an odd size gives the Message-ID one more digit.", }, @@ -280,7 +280,7 @@ func charsetProperty() format.Property { Name: Charset, Kind: format.PropertyChoice, Choices: []string{CharsetLatin2, CharsetUTF8, CharsetWindows1250}, Default: CharsetUTF8, - Detail: "The character set of the text when text_encoding is not 7bit. iso-8859-2 and windows-1250 hold Polish and no Japanese, " + + Detail: "The character set of the text when the text encoding is not 7bit. iso-8859-2 and windows-1250 hold Polish and no Japanese, " + "and they write ą, ś and ź as different bytes, so a program that takes one for the other shows the wrong letters. " + "MimeKit with no code page provider registered tries UTF-8 and then Latin-1, which shows the Polish letters of both wrong, and reads them right once one is. Go's standard library converts no character set at all. " + "With 7bit the text is plain ASCII and says us-ascii, whatever this is set to.", @@ -306,18 +306,19 @@ func attachmentProperties() []format.Property { Name: Attachments, Kind: format.PropertyInt, Min: 0, Max: archive.MaxMembers, Default: strconv.Itoa(defaultAttachments), - Detail: "How many files the message carries. Use contains instead when the files are not all alike. " + + Detail: "How many files the message carries. When the files are not all alike, describe each kind on its own instead - " + + "with Add files inside on Several batches, or contains in a recipe. " + "mailparser refuses a message of more than 1000 MIME entities, and the manifest gives this one's count as mime_entities.", Group: attachmentsGroup, }, { Name: AttachmentFormat, Kind: format.PropertyText, - Shape: "the id of a format, as tfg formats lists them", + Shape: archive.FormatShape, // Not a choice, for the reason the archives give: the allowed // values are whatever this build registered. Default: archive.DefaultFormat, - Detail: "The format of the attached files. Run tfg formats to see what this build supports. " + - "eml attaches a message as it is, the way mail is forwarded, with no base64 around it.", + Detail: "The format of the attached files. " + + "`eml` attaches a message as it is, the way mail is forwarded, with no base64 around it.", Group: attachmentsGroup, }, { @@ -343,7 +344,7 @@ func filenameStyle() format.Property { "both writes the two, and content-type puts the name only where old mail programs looked for it. " + "none writes no name at all, and a program that needs one has to make one up - Thunderbird 157 calls them Part 1.2, Part 1.3 and so on. " + "Go's standard library reads no name from content-type and the encoded text itself from rfc2047. " + - "Unless headers is encoded a name is written as it is and only where it goes changes, " + + "Unless the headers are encoded, a name is written as it is and only where it goes changes, " + "so rfc2047 and both write the same bytes.", Group: attachmentsGroup, } diff --git a/internal/format/format.go b/internal/format/format.go index e1d3e202..a02c62ef 100644 --- a/internal/format/format.go +++ b/internal/format/format.go @@ -190,6 +190,10 @@ type Property struct { // where a block starts and a split block would get two. Group string + // OnlyWhen is the value another setting has to have for this one to + // change anything. The zero value means always. See Condition. + OnlyWhen Condition + // Secret marks a value that is a credential rather than a description of // the file, and there is exactly one of them today: the password an // archive is locked with. @@ -542,16 +546,16 @@ func (d Descriptor) PlanSmallest(ctx context.Context, r Request) (Plan, error) { return d.smallest(func(r Request) (Plan, error) { return PlanWith(ctx, d.Generator, r) }, r) } -// smallestRounds is far more than any format needs: each round either settles +// SmallestRounds is far more than any format needs: each round either settles // or jumps to a number the format itself named. It is here so that a generator // whose refusals ever cycle costs a refusal rather than a run that never ends. -const smallestRounds = 64 +const SmallestRounds = 64 // smallest walks plan from nought to the first size it accepts. func (d Descriptor) smallest(plan func(Request) (Plan, error), r Request) (Plan, error) { r.SizeFromContents = false size := int64(0) - for round := 0; round < smallestRounds; round++ { + for round := 0; round < SmallestRounds; round++ { r.Bytes = size p, err := plan(r) if err == nil { @@ -569,7 +573,18 @@ func (d Descriptor) smallest(plan func(Request) (Plan, error), r Request) (Plan, // size inside a band the format cannot reach. Step past it. size++ } - return Plan{}, core.Defect(fmt.Errorf("%s: the smallest file did not settle in %d rounds, the last at %d B", d.ID, smallestRounds, size)) + return Plan{}, core.Defect(fmt.Errorf("%s: the smallest file did not settle in %d rounds, the last at %d B", d.ID, SmallestRounds, size)) +} + +// IsPicture says this format's files are pictures, from the media type it +// declares rather than from a list kept anywhere. +// +// One rule for every place that asks: the engine takes smallest for a picture, +// a mail message or a page embeds one, and a preset of picture sizes is built +// from them. A preset offering a format the engine then refuses smallest for +// is what a second rule that disagreed with this one would look like. +func (d Descriptor) IsPicture() bool { + return strings.HasPrefix(d.MediaType, "image/") } // PropertyNames is the declared keys, in the order the format listed them. diff --git a/internal/format/gif/gif.go b/internal/format/gif/gif.go index df53da35..1528642a 100644 --- a/internal/format/gif/gif.go +++ b/internal/format/gif/gif.go @@ -195,7 +195,7 @@ func checkJointLimits(w, h int) error { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("gif") + label = r.PictureLabel("gif") } m, err := chooseSize(r, label) diff --git a/internal/format/htmlfile/pictures.go b/internal/format/htmlfile/pictures.go index b1bdf175..fd1f063d 100644 --- a/internal/format/htmlfile/pictures.go +++ b/internal/format/htmlfile/pictures.go @@ -38,7 +38,7 @@ func pictureProperties() []format.Property { return picture.Properties(picturesGroup, picture.Details{ Count: "How many pictures the page shows, each one a real file of its format written into the page as a data: URL, so opening the page fetches nothing. " + "They sit above the blocks, each in a paragraph of its own, and each says which it is in its alt text.", - Format: "The format of the pictures. Any format whose files are pictures, such as png, jpg or gif. Chromium shows every one of them but tiff.", + Format: "The format of the pictures. Any format whose files are pictures, such as `png`, `jpg` or `gif`. Chromium shows every one of them but tiff.", Size: "How big each picture is. Inside the page it is base64 on one line, about a third larger. " + "lxml, and BeautifulSoup on top of it, leave out a picture past about 7.1 MB unless told to read huge trees. " + "On Linux lxml took over 20 seconds over such a page, and with a 15 MB picture it lost the rest of the page as well.", diff --git a/internal/format/ico/ico.go b/internal/format/ico/ico.go index 3c5c6241..e5f3d978 100644 --- a/internal/format/ico/ico.go +++ b/internal/format/ico/ico.go @@ -118,7 +118,7 @@ type memo struct { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("ico") + label = r.PictureLabel("ico") } embed, err := embedding(r.Properties) diff --git a/internal/format/jpg/jpg.go b/internal/format/jpg/jpg.go index 2c7249d3..b7242f42 100644 --- a/internal/format/jpg/jpg.go +++ b/internal/format/jpg/jpg.go @@ -212,7 +212,7 @@ func (generator) Plan(r format.Request) (format.Plan, error) { } label := "" if r.Label { - label = r.LabelText("jpg") + label = r.PictureLabel("jpg") } quality, err := qualityOf(r.Properties) diff --git a/internal/format/jxl/jxl.go b/internal/format/jxl/jxl.go index 63329091..3c62d3ad 100644 --- a/internal/format/jxl/jxl.go +++ b/internal/format/jxl/jxl.go @@ -227,7 +227,7 @@ type memo struct { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("jxl") + label = r.PictureLabel("jxl") } q, err := quality(r.Properties) @@ -340,12 +340,19 @@ func checkFits(want int64, m memo) error { // pictures nobody asked to be that big. Anybody who does want them says so - // width and height are settings, and 40 megapixels is the ceiling. // -// Ceiling is the LARGEST file that rung has ever been seen to produce, the -// container and the skip box header included, and it is what lets planning -// choose a picture without coding one. Measured by tools/probes/jxlladder on -// 2026-08-31 across all 256 seeds, four orders of magnitude of requested size - -// the label carries the byte count, so its length moves with it - and with the -// label on and off. +// Ceiling is at least a tenth above the LARGEST file that rung has been seen +// to produce, the container and the skip box header included, and it is what +// lets planning choose a picture without coding one. Measured on 2026-11-16 by +// tools/probes/jxlladder over 256 seeds from zero and 512 far from it, with the +// label on and off: 640x480 coded to 17875 B, 320x240 to 9284, 256x256 to 6826 +// and 160x120 to 3190. The label a picture draws names no size +// (format.Request.PictureLabel), and that shorter label is drawn larger across +// 256 and 320 px, so those two rungs needed more than their ceilings held and +// were raised to a tenth above it - the margin the AVIF and video ladders keep, +// because a ceiling with none was passed by seeds nobody had tried (O273). The +// others stand more than a tenth above and were left where they were: a ceiling +// moved down moves the picture of every file near it, with no label too, and +// buys nothing anybody asked for (D11). // // A ceiling rather than a floor, and the difference is the whole point. // Planning promises an exact size, so the rung it picks has to be one whose @@ -355,15 +362,14 @@ func checkFits(want int64, m memo) error { // checks and says so rather than trusting this table. // // The second number is the ceiling for a damaged file, whose label names its -// damage. Measured on 2026-11-12 by tools/probes/jxlladder over 768 seeds, with -// the label at the longest length each scale still draws: 640x480 coded to -// 21424 B, 320x240 to 8049 and 256x256 to 6942, the last two above the first -// number. It is a tenth above what was measured and never below the first -// number, the margin the video ladder keeps, because the damage text is +// damage. Measured the same day over the same seeds, with the label at the +// longest length each scale still draws: 640x480 coded to 23973 B, 320x240 to +// 8052, 256x256 to 6933 and 160x120 to 3537. It is at least a tenth above what +// was measured and never below the first number, because the damage text is // whatever the chain names. A rung too narrow to draw a damaged label keeps the // first number. var sizeLadder = []rung{ - {640, 480, 22762, 23567}, {320, 240, 7949, 8854}, {256, 256, 6485, 7637}, {160, 120, 3542, 3542}, + {640, 480, 22762, 26371}, {320, 240, 10213, 10213}, {256, 256, 7509, 7637}, {160, 120, 3542, 3891}, {80, 60, 1267, 1267}, {40, 30, 731, 731}, {20, 15, 452, 452}, {8, 6, 222, 222}, {4, 3, 212, 212}, {2, 2, 206, 206}, {1, 1, minimumBytes, minimumBytes}, } diff --git a/internal/format/label.go b/internal/format/label.go index 3283ea33..ad1e2ef6 100644 --- a/internal/format/label.go +++ b/internal/format/label.go @@ -23,11 +23,30 @@ import ( // size nobody asked for and no damage at all (O333). // LabelText is the self describing label of the file r asks for. Every format -// that carries a label asks this, so the wording cannot drift between them. +// that carries its label as text asks this, so the wording cannot drift between +// them. A picture asks PictureLabel. func (r Request) LabelText(formatID string) string { return r.LabelSized(formatID, r.Bytes) } +// PictureLabel is the label drawn into a picture: into its pixels, into the +// frames of a film, into the text of an SVG drawing. It names the format, the +// damage and the seed, and not the size. +// +// Because a picture is then the same picture whatever size of file it is +// asked for, and only the padding around it moves. Its smallest file is one +// number, so the minimum a refusal names is a size the next run takes. With the +// byte count drawn in, a compressed picture changed its length with the digits: +// JPG 640x480 refused 1 B naming 41549 B, then refused 41549 B naming 42484 B, +// measured on 2026-11-16 (docs/SIZE-FIXES-2026-11-16.md section 2). The size +// stays in the manifest and in the file's own length. +func (r Request) PictureLabel(formatID string) string { + if r.Damage == "" { + return fmt.Sprintf("tfg - %s - seed %s", formatID, core.SeedLabel(r.Seed)) + } + return fmt.Sprintf("tfg - %s - damage %s - seed %s", formatID, r.Damage, core.SeedLabel(r.Seed)) +} + // LabelSized is the label of a file of size bytes, for a generator that works // its size out from its contents and so states a size the request does not // hold yet - zip, eml and targz settle the label and the size against each diff --git a/internal/format/logfile/log.go b/internal/format/logfile/log.go index 46de7069..1df1aa98 100644 --- a/internal/format/logfile/log.go +++ b/internal/format/logfile/log.go @@ -99,7 +99,7 @@ func properties() []format.Property { { Name: "methods", Kind: format.PropertyChoice, Choices: []string{"get", "read", "mixed"}, Default: "get", - Detail: "Which request methods appear. Read is GET and HEAD, mixed adds POST, PUT, PATCH and DELETE.", + Detail: "Which request methods appear: GET only, GET and HEAD, or mixed, which adds POST, PUT, PATCH and DELETE to those two.", }, { Name: "status_mix", Kind: format.PropertyChoice, @@ -109,7 +109,7 @@ func properties() []format.Property { { Name: "level_mix", Kind: format.PropertyChoice, Choices: levelMixIDs, Default: "realistic", - Detail: "Which severities appear. Only the plain and json-lines shapes carry one, and asking for it beside another shape is refused.", + Detail: "Which severities appear. Only the plain and JSON Lines shapes carry one, and asking for it beside another shape is refused.", }, { Name: "ip_version", Kind: format.PropertyChoice, diff --git a/internal/format/otlp/pitfalls.go b/internal/format/otlp/pitfalls.go index f06de24d..51921a37 100644 --- a/internal/format/otlp/pitfalls.go +++ b/internal/format/otlp/pitfalls.go @@ -66,23 +66,23 @@ func pitfallProperties() []format.Property { // 2026-11-10 (docs/OTLP-2026-11-10.md sections 3 and 11.2). var pitfallDetail = map[string]string{ IDEncoding: "How trace and span ids are written. hex is what the OTLP specification asks for. " + - "upper-hex writes the same digits in capitals, which the specification allows, and the OpenTelemetry Collector writes them back in lower case. " + + "Upper-case hex writes the same digits in capitals, which the specification allows, and the OpenTelemetry Collector writes them back in lower case. " + "base64 writes them the way the JSON mapping of protobuf writes bytes, which the specification forbids - the file receiver of the Collector drops every batch that holds an id without a word and its HTTP receiver answers 400. " + "A reader built on the protobuf library reads base64 ids right and hex ids as something else.", EnumEncoding: "How the kind of a span, the code of its status, the severity of a log record and the temporality of a sum or a histogram are written. number is what the OTLP specification asks for. " + "name writes names such as SPAN_KIND_SERVER, which the specification forbids. The OpenTelemetry Collector reads them anyway and writes numbers back, and the Rust crate opentelemetry-proto refuses a span written that way.", - KeyCase: "How the keys of the file are written. camel is what the OTLP specification asks for, such as traceId. " + - "snake writes the names the .proto files give the fields, such as trace_id, which the specification calls not valid. The OpenTelemetry Collector reads them and writes camel case back, and the Rust crate opentelemetry-proto refuses the file.", + KeyCase: "How the keys of the file are written. camelCase is what the OTLP specification asks for, such as traceId. " + + "snake_case writes the names the .proto files give the fields, such as trace_id, which the specification calls not valid. The OpenTelemetry Collector reads them and writes camelCase back, and the Rust crate opentelemetry-proto refuses the file.", LargeNumbers: "How times and the other numbers of 64 bits are written. text is what the OTLP specification asks a writer for, such as \"1785585600000000000\". " + "number writes them as JSON numbers, which a reader is told to take as well, and the OpenTelemetry Collector does. " + "A reader that holds every JSON number as a double, as JavaScript does, gets every time to the nearest 256 nanoseconds.", - TimeOrder: "Whether every trace, log record or collection is dated later than the one before it. out-of-order swaps the times of every two neighbours, so every second one is dated before the one in front of it. " + + TimeOrder: "Whether every trace, log record or collection is dated later than the one before it. Out of order swaps the times of every two neighbours, so every second one is dated before the one in front of it. " + "The specification of the OTLP file promises no order, and the OpenTelemetry Collector reads the file and writes it back unchanged. What the system storing the data does with what comes late is the question this file asks.", EndBeforeStart: "Whether every span is dated with its end before its start, the two times changed places. The OpenTelemetry Collector reads such a span and writes it back unchanged. It shapes spans, and beside signal logs or metrics it is refused.", EmptyEnvelope: "Whether the file opens with a line holding a batch with nothing in it, which the OTLP specification asks senders not to write. " + - "The file receiver of the OpenTelemetry Collector reads the line and writes nothing for it. Only record-per-line has a line to spare, and beside another layout it is refused.", - Body: "What the body of a log record holds. text is a sentence. any-value gives the seven kinds of value OTLP has in turn - text, a boolean, the whole number 2^53 + 1, a fraction, a list, a map and bytes - " + - "and the OpenTelemetry Collector reads them and writes them back unchanged. With large_numbers number, a reader that holds numbers as doubles reads that whole number one less. It shapes log records, and beside signal traces or metrics it is refused.", + "The file receiver of the OpenTelemetry Collector reads the line and writes nothing for it. Only the formatting record per line has a line to spare, and beside other formatting it is refused.", + Body: "What the body of a log record holds. Text is a sentence. Every kind of value gives the seven kinds of value OTLP has in turn - text, a boolean, the whole number 2^53 + 1, a fraction, a list, a map and bytes - " + + "and the OpenTelemetry Collector reads them and writes them back unchanged. With large numbers written as JSON numbers, a reader that holds numbers as doubles reads that whole number one less. It shapes log records, and beside signal traces or metrics it is refused.", NonFinite: "Whether jvm.cpu.recent_utilization reports values that are not numbers: NaN in the second of every four collections, and Infinity and -Infinity in turn in the fourth, written as text the way the JSON mapping of protobuf writes them. " + - "The OpenTelemetry Collector reads them and writes them back unchanged. Beside a metric_kind without that gauge it is refused.", + "The OpenTelemetry Collector reads them and writes them back unchanged. Beside a metric kind without that gauge it is refused.", } diff --git a/internal/format/otlp/properties.go b/internal/format/otlp/properties.go index 4544b2e6..bf0ec8b2 100644 --- a/internal/format/otlp/properties.go +++ b/internal/format/otlp/properties.go @@ -102,8 +102,8 @@ func fileProperties() []format.Property { // tell a reader that picks its parser by the name to read it line // by line. docs/ROZSZERZENIE-UKLADU-2026-11-11.md. Extensions: map[string]string{Indented: ".json", Minified: ".json"}, - Detail: "How the file is laid out. record-per-line puts one batch on each line, which is what the OTLP file exporter writes and the file receiver of the OpenTelemetry Collector reads, and the file name ends in .jsonl. " + - "minified and indented make the whole file one request, the body to post to an OTLP endpoint, and the file name ends in .json. " + + Detail: "How the file is laid out. Record per line puts one batch on each line, which is what the OTLP file exporter writes and the file receiver of the OpenTelemetry Collector reads, and the file name ends in .jsonl. " + + "Minified and indented make the whole file one request, the body to post to an OTLP endpoint, and the file name ends in .json. " + "Posted as a body, a file of several lines loses every line after the first in the Collector, and its file receiver reads nothing from an indented file.", }, // The byte order mark every text format of this tool declares, in the @@ -115,7 +115,8 @@ func fileProperties() []format.Property { Name: Batch, Kind: format.PropertyInt, Min: 1, Max: maxBatch, Default: strconv.Itoa(defaultBatch), - Detail: "How many spans or log records each line holds. 512 is the batch an OpenTelemetry SDK sends by default. Only record-per-line has batches, and beside another layout or beside signal metrics, where a line holds one collection, a batch is refused.", + Detail: "How many spans or log records each line holds. 512 is the batch an OpenTelemetry SDK sends by default. " + + "Only the formatting record per line has batches. Beside other formatting, or beside the signal metrics, where a line holds one collection, a batch is refused.", }, { Name: Start, Kind: format.PropertyText, @@ -180,7 +181,7 @@ func metricProperties() []format.Property { Default: Mixed, Group: metricsGroup, Detail: "Which metrics the file holds. gauge writes jvm.cpu.recent_utilization and shop.orders.pending, sum writes jvm.cpu.time, jvm.class.loaded and jvm.memory.used, " + - "histogram writes http.server.request.duration in the buckets the OpenTelemetry conventions name, exponential-histogram writes jvm.gc.duration in buckets that double every eight, " + + "histogram writes http.server.request.duration in the buckets the OpenTelemetry conventions name, exponential histogram writes jvm.gc.duration in buckets that double every eight, " + "and summary writes http.server.requests as three percentiles, the way Micrometer writes a timer. mixed writes all of them. gauge and sum each hold whole numbers and fractions.", }, { @@ -189,21 +190,21 @@ func metricProperties() []format.Property { Default: Cumulative, Group: metricsGroup, Detail: "Whether a sum or a histogram counts everything since the service started or only what came since the collection before. cumulative is what an SDK sends by default. " + - "delta leaves jvm.memory.used cumulative, as the delta setting of an SDK does. Beside metric_kind gauge or summary it is refused.", + "delta leaves jvm.memory.used cumulative, as the delta setting of an SDK does. Beside the metric kind gauge or summary it is refused.", }, { Name: Exemplars, Kind: format.PropertyBool, Default: "false", Group: metricsGroup, Detail: "Whether the durations of requests name the trace and the span a measurement was taken in, one for each bucket a collection measured in. " + - "The file holds no spans, so those ids match nothing in it. Only http.server.request.duration has them, and beside a metric_kind without it exemplars are refused.", + "The file holds no spans, so those ids match nothing in it. Only http.server.request.duration has them, and beside a metric kind without it they are refused.", }, { Name: Interval, Kind: format.PropertyInt, Min: 1, Max: maxInterval, Unit: "seconds", Default: strconv.Itoa(defaultInterval), Group: metricsGroup, - Detail: "How long a service waits between two collections of its metrics. 60 is what an SDK uses by default. Every point of a collection is dated at the same moment, and in record-per-line a line holds one collection.", + Detail: "How long a service waits between two collections of its metrics. 60 is what an SDK uses by default. Every point of a collection is dated at the same moment, and with the formatting record per line a line holds one collection.", }, } } diff --git a/internal/format/pdf/properties.go b/internal/format/pdf/properties.go index 4966775e..cb0774ec 100644 --- a/internal/format/pdf/properties.go +++ b/internal/format/pdf/properties.go @@ -94,7 +94,7 @@ var properties = []format.Property{ Name: "created", Kind: format.PropertyText, Shape: dateText, Group: documentProperties, Default: defaultCreated, Detail: "When the document says it was created. A time written without a zone is kept without one, " + - "and none leaves the date out.", + "and `none` leaves the date out.", }, { Name: "modified", Kind: format.PropertyText, Shape: dateText, Group: documentProperties, diff --git a/internal/format/picture/picture.go b/internal/format/picture/picture.go index a20a58d9..12ea803c 100644 --- a/internal/format/picture/picture.go +++ b/internal/format/picture/picture.go @@ -11,7 +11,6 @@ package picture import ( "strconv" - "strings" "github.com/donislawdev/TestingFilesGenerator/internal/core" "github.com/donislawdev/TestingFilesGenerator/internal/format" @@ -59,7 +58,7 @@ func Properties(group string, d Details) []format.Property { }, { Name: Format, Kind: format.PropertyText, - Shape: "the id of a picture format, as tfg formats lists them", + Shape: "the id of a picture format, such as png or jpg", Default: DefaultFormat, Detail: d.Format, Group: group, @@ -119,7 +118,7 @@ func Of(id string) (desc format.Descriptor, ok bool, err error) { if err != nil { return format.Descriptor{}, false, err } - return desc, strings.HasPrefix(desc.MediaType, "image/"), nil + return desc, desc.IsPicture(), nil } // Formats are the formats of this build whose files are pictures, from the @@ -127,7 +126,7 @@ func Of(id string) (desc format.Descriptor, ok bool, err error) { func Formats() []string { var out []string for _, d := range format.All() { - if strings.HasPrefix(d.MediaType, "image/") { + if d.IsPicture() { out = append(out, d.ID) } } diff --git a/internal/format/placeholder/settings.go b/internal/format/placeholder/settings.go index 3c71accf..b95a524a 100644 --- a/internal/format/placeholder/settings.go +++ b/internal/format/placeholder/settings.go @@ -57,46 +57,62 @@ const MaxText = 100 // the site translates it as one term. const shapeColour = "a colour such as cccccc or ccc" -// Group is the heading the settings stand under on both surfaces. +// Group is the heading the four settings of a placeholder stand under on both +// surfaces. content stands above it rather than in it, beside the width and +// the height: it chooses between the test pattern and a placeholder, and +// under a heading naming one of the two it read as a setting of that one. const Group = "Placeholder" +// onlyOnAPlaceholder is the condition the four settings of a placeholder +// share: each changes a picture only while content is placeholder. A window +// hides them until then, and Read refuses them on the test pattern - both from +// this one declaration. +var onlyOnAPlaceholder = format.Condition{Setting: SettingContent, Values: []string{ContentPlaceholder}} + +// Content is the setting that chooses between the test pattern and a +// placeholder, on its own. A preset that asks the same question of every +// picture it lays out declares this one rather than a copy, so the values and +// the words cannot differ from the format's. +func Content() format.Property { + return format.Property{ + Name: SettingContent, Kind: format.PropertyChoice, + Choices: []string{ContentTest, ContentPlaceholder}, + Default: ContentTest, + Detail: "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist.", + } +} + // Properties declares the five settings. One declaration for every picture // format, so the names and what they take cannot differ between them. func Properties() []format.Property { return []format.Property{ - { - Name: SettingContent, Kind: format.PropertyChoice, - Choices: []string{ContentTest, ContentPlaceholder}, - Default: ContentTest, - Detail: "What the picture shows. test is a pattern for checking how a file is read. placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist.", - Group: Group, - }, + Content(), { Name: SettingText, Kind: format.PropertyText, Shape: fmt.Sprintf("one line of up to %d characters", MaxText), Default: DefaultText, - Detail: "The words in the middle of a placeholder. {width} and {height} become the size of the picture, {index} the number of the file and {index:04} the same number with four digits.", - Group: Group, + Detail: "The words in the middle of a placeholder. `{width}` and `{height}` become the size of the picture, `{index}` the number of the file and `{index:04}` the same number with four digits.", + Group: Group, OnlyWhen: onlyOnAPlaceholder, }, { Name: SettingBackground, Kind: format.PropertyText, Shape: shapeColour, Default: DefaultBackground, - Detail: "The colour of a placeholder, such as cccccc or ccc. In a recipe write it without # or in quotes, because # starts a comment there.", - Group: Group, + Detail: "The colour of a placeholder, such as `cccccc` or `ccc`. In a recipe write it without `#` or in quotes, because `#` starts a comment there.", + Group: Group, OnlyWhen: onlyOnAPlaceholder, }, { Name: SettingForeground, Kind: format.PropertyText, Shape: shapeColour, Default: DefaultForeground, Detail: "The colour of the words and the guides on a placeholder, written the same way as background.", - Group: Group, + Group: Group, OnlyWhen: onlyOnAPlaceholder, }, { Name: SettingGuides, Kind: format.PropertyBool, Default: "false", Detail: "Draws a frame along the edges of a placeholder, both diagonals and a circle touching its shorter sides, so you can see where a page crops or stretches the picture.", - Group: Group, + Group: Group, OnlyWhen: onlyOnAPlaceholder, }, } } @@ -174,15 +190,22 @@ func allowed(owner, name, v string) error { // read, accepted and ignored, and somebody would wait for a colour that never // comes - a setting that does nothing has to say so. // -// guides is refused only when it asks for guides. A window sends every switch -// in the position it shows (parts.boolField), so guides=false arrives with -// every picture made there, and it asks for exactly what a test picture has. +// Which settings those are is read off the declaration, so the four a window +// hides and the four refused here cannot be two lists. +// +// guides is refused only when it asks for guides. guides=false asks for +// exactly what a test picture has, and a recipe written while the switch was +// on the screen says it. func nothingToChange(owner string, props map[string]string) error { - for _, name := range []string{SettingText, SettingBackground, SettingForeground, SettingGuides} { - v, ok := props[name] - if ok && !(name == SettingGuides && v == "false") { + declared := Properties() + for _, p := range declared { + if p.Applies(declared, func(name string) string { return props[name] }) { + continue + } + v, ok := props[p.Name] + if ok && !(p.Name == SettingGuides && v == "false") { return &format.PropertyValueError{ - Format: owner, Key: name, Value: v, + Format: owner, Key: p.Name, Value: v, Reason: core.Says("placeholder.OnlyOnAPlaceholder", "it only changes a placeholder, and content is test"), Remedy: core.Says("placeholder.SetContentPlaceholder", "Set content to placeholder, or leave the line out"), } diff --git a/internal/format/png/png.go b/internal/format/png/png.go index 36a4cbc3..5b40e944 100644 --- a/internal/format/png/png.go +++ b/internal/format/png/png.go @@ -176,7 +176,7 @@ func (generator) Plan(r format.Request) (format.Plan, error) { } label := "" if r.Label { - label = r.LabelText("png") + label = r.PictureLabel("png") } m, err := chooseSize(r, label, look) diff --git a/internal/format/refusals.go b/internal/format/refusals.go index 8127ce1d..9bd95620 100644 --- a/internal/format/refusals.go +++ b/internal/format/refusals.go @@ -259,11 +259,14 @@ func (e *PropertyValueError) Error() string { // refusal is assembled rather than written out: the key already stands on its // own in the format string. The reason a property gives can still hold slots, // so a declaration that names itself twice needs no special case. -func (e *PropertyValueError) InTheWordsOf(name string) string { +func (e *PropertyValueError) InTheWordsOf(name string) string { return e.Reworded(name, nil) } + +// Reworded is InTheWordsOf with the values worded by w - see core.Said.Reworded. +func (e *PropertyValueError) Reworded(name string, w core.Wording) string { if name == "" { name = e.Key } - return e.said(core.InTheWordsOf(e.Reason.String(), name)).InTheWordsOf(name) + return e.said(core.InTheWordsOf(e.Reason.Reworded("", w), name)).Reworded(name, w) } // AboutSetting is the property this refusal is about, so a window can put the diff --git a/internal/format/registry.go b/internal/format/registry.go index 8846f97e..1c88150d 100644 --- a/internal/format/registry.go +++ b/internal/format/registry.go @@ -39,6 +39,9 @@ func Register(d Descriptor) { if g, split := splitGroup(d.Properties); split { panic(fmt.Sprintf("format: %q declares the group %q in two places", d.ID, g)) } + if why := ConditionProblem(d.Properties); why != "" { + panic(fmt.Sprintf("format: %q: %s", d.ID, why)) + } registry[d.ID] = d } diff --git a/internal/format/rtf/pictures.go b/internal/format/rtf/pictures.go index cf12d877..a1fc927a 100644 --- a/internal/format/rtf/pictures.go +++ b/internal/format/rtf/pictures.go @@ -68,7 +68,7 @@ func pictureProperties() []format.Property { Count: "How many pictures the document shows, each a real file of its format in a paragraph of its own that starts with its name, such as inline_0001.png. " + "They sit above the blocks, at 96 pixels to the inch and never wider than 6 inches. " + "LibreOffice, pandoc and Tika return each file as it was written. RichEdit shows the same picture and writes it out again smaller.", - Format: "The format of the pictures, png or jpg - the two picture formats RTF has a name for. Any other format is refused.", + Format: "The format of the pictures, `png` or `jpg` - the two picture formats RTF has a name for. Any other format is refused.", Size: "How big each picture is. Written in hex it takes twice as many bytes in the document, with a line end every 128 characters. " + "Written binary it takes its own size.", }), format.Property{ @@ -76,7 +76,7 @@ func pictureProperties() []format.Property { Choices: []string{Hex, Binary}, Default: Hex, Group: picturesGroup, - Detail: "How the bytes of each picture are written, which changes nothing while inline is 0. " + + Detail: "How the bytes of each picture are written, which changes nothing while the document has no pictures. " + "hex writes them as text, twice as large, the way LibreOffice writes them. " + "binary writes them as they are, so the document is no longer text, and a program that counts braces or reads it as text loses its place. " + "pandoc changes the line ends inside a binary picture, so no png comes out whole, and it can lose the text after the picture or refuse the whole document. " + diff --git a/internal/format/rtf/settings.go b/internal/format/rtf/settings.go index 5395748a..c7165376 100644 --- a/internal/format/rtf/settings.go +++ b/internal/format/rtf/settings.go @@ -95,13 +95,13 @@ func ownProperties() []format.Property { Name: TextEncoding, Kind: format.PropertyChoice, Choices: []string{Unicode, Both, Codepage, Literal}, Default: Unicode, - Detail: "How the letters outside ASCII are written, which changes nothing while characters is ascii. " + + Detail: "How the letters outside ASCII are written, which changes nothing while the characters are ascii. " + "unicode writes each one as a number with a question mark after it for a reader that does not know numbers. " + - "both puts the letter in the code page of its font after the number, two bytes for Japanese, the way Word writes it. " + - "codepage writes only the code page bytes, and the emoji still as numbers, since no code page holds them. " + + "Unicode and code page also puts the letter in the code page of its font after the number, two bytes for Japanese, the way Word writes it. " + + "Code page writes only the code page bytes, and the emoji still as numbers, since no code page holds them. " + "literal writes the question mark as a plain character. " + "LibreOffice, Tika and the RichEdit control of Windows read all four. " + - "pandoc shows codepage text in the wrong letters. pandoc before 3.13 also drops the character after every letter written literal, and pandoc 3.1 and 3.7 drop the emoji in all four. " + + "pandoc shows code page text in the wrong letters. pandoc before 3.13 also drops the character after every letter written literal, and pandoc 3.1 and 3.7 drop the emoji in all four. " + "striprtf returns an emoji as two halves, which Python refuses to write as UTF-8.", }, { Name: Elements, Kind: format.PropertyChoice, diff --git a/internal/format/svgfile/placeholder.go b/internal/format/svgfile/placeholder.go index 650cc978..017e8a09 100644 --- a/internal/format/svgfile/placeholder.go +++ b/internal/format/svgfile/placeholder.go @@ -50,7 +50,7 @@ const ( func planPlaceholder(r format.Request, w, h int, look placeholder.Settings) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("svg") + label = r.PictureLabel("svg") } text := look.Expand(r.Number, w, h) body, drawn := drawing(w, h, look.Look(text, label)) diff --git a/internal/format/svgfile/svg.go b/internal/format/svgfile/svg.go index 7e7412af..b05620b6 100644 --- a/internal/format/svgfile/svg.go +++ b/internal/format/svgfile/svg.go @@ -299,7 +299,7 @@ func (generator) Plan(r format.Request) (format.Plan, error) { m := memo{seed: r.Seed, width: w, height: h} if r.Label { - switch line := labelOpen(h) + r.LabelText("svg") + textClose; { + switch line := labelOpen(h) + r.PictureLabel("svg") + textClose; { case !labelFits(h): // Room on the page rather than room in the byte count, so it is a // separate sentence from the one below. Both leave the file named diff --git a/internal/format/tiff/tiff.go b/internal/format/tiff/tiff.go index 58e3e5eb..a96f3de9 100644 --- a/internal/format/tiff/tiff.go +++ b/internal/format/tiff/tiff.go @@ -170,7 +170,7 @@ func pixelBytes(width, height int) int64 { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("tiff") + label = r.PictureLabel("tiff") } w, h, err := chooseSize(r) diff --git a/internal/format/video/choose.go b/internal/format/video/choose.go index c129178f..19e8b3ae 100644 --- a/internal/format/video/choose.go +++ b/internal/format/video/choose.go @@ -36,9 +36,9 @@ func (g Rung) bound(r format.Request) int { // 640x360 for the reason AVIF stops at 640x480: a larger picture costs every // file of a run its encoding time, and somebody who wants Full HD says so. // -// Ceiling is a tenth above the largest any picture of a film on the rung -// coded to - all its tiles together - and it is the reserve of every one of -// them. Measured by tools/probes/videoladder at the default quality on +// Ceiling is at least a tenth above the largest any picture of a film on the +// rung coded to - all its tiles together - and it is the reserve of every one +// of them. Measured by tools/probes/videoladder at the default quality on // 2026-10-06 (docs/WIDEO-2026-10-06.md section 15), in three passes, and // again on 2026-10-07 once pictures were cut into tiles // (docs/WEBM-WYDAJNOSC-2026-10-06.md section 10): the four rungs from 640x360 @@ -64,13 +64,20 @@ func (g Rung) bound(r format.Request) int { // The second number is the ceiling for a damaged film, whose label names its // damage, by the same rule: a tenth above the largest picture measured with // the label at the longest length each scale still draws, never below the -// first number. Measured on 2026-11-12 by tools/probes/videoladder, the same -// three passes: on 640x360 a damaged label coded to 16946 B, which left less -// than a fiftieth of the first number above it, and on every other rung it -// coded smaller than the label of a film nothing damages. +// first number. +// +// Both measured again on 2026-11-16 by tools/probes/videoladder, the same three +// passes, once the label a picture draws named no size +// (format.Request.PictureLabel). The shorter label is drawn larger on some +// widths: on 320x180 a film nothing damages coded to 7906 B, and a damaged one +// to 17101 B on 640x360 and 3642 B on 160x90, each closer than a tenth to its +// ceiling. Those three were raised to a tenth above. Every other ceiling stands +// a tenth or more above what was measured and was left where it was, because a +// ceiling moved down moves the picture of every film near it, with no label +// too, and buys nothing anybody asked for (D11). var Ladder = []Rung{ - {640, 360, 17277, 18641}, {426, 240, 11156, 11156}, {320, 180, 8322, 8322}, {256, 144, 6754, 6754}, - {160, 90, 3951, 3951}, {80, 45, 1454, 1454}, {40, 23, 825, 825}, {16, 9, 149, 149}, + {640, 360, 17277, 18812}, {426, 240, 11156, 11156}, {320, 180, 8697, 8697}, {256, 144, 6754, 6754}, + {160, 90, 3951, 4007}, {80, 45, 1454, 1454}, {40, 23, 825, 825}, {16, 9, 149, 149}, {4, 3, 46, 46}, {2, 2, 31, 31}, {1, 1, 6, 6}, } diff --git a/internal/format/video/plan.go b/internal/format/video/plan.go index 2ea75a58..cb51e9a5 100644 --- a/internal/format/video/plan.go +++ b/internal/format/video/plan.go @@ -34,7 +34,7 @@ func (f Film) Stream() Stream { func Plan(formatID string, r format.Request, need func(Stream) int64, refuse func(requested, need int64, c Choice, s Settings) error) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText(formatID) + label = r.PictureLabel(formatID) } s, err := Read(formatID, r.Properties) if err != nil { diff --git a/internal/format/wav/wav.go b/internal/format/wav/wav.go index fb6e2aec..d6626cbd 100644 --- a/internal/format/wav/wav.go +++ b/internal/format/wav/wav.go @@ -119,7 +119,8 @@ func init() { Name: "content", Kind: format.PropertyChoice, Choices: []string{"tone", "silence", "noise", "sweep"}, Default: "tone", - Detail: "What the signal sounds like.", + Detail: "What the sound is. A steady tone holds one pitch between 220 and 1099 Hz, chosen by the seed. " + + "A rising tone starts at such a pitch and climbs as the file plays. Noise is random hiss, and silence is nothing at all.", }, }, GeneratorVersion: generatorVersion, diff --git a/internal/format/webp/webp.go b/internal/format/webp/webp.go index 1faa320b..d4b7edca 100644 --- a/internal/format/webp/webp.go +++ b/internal/format/webp/webp.go @@ -143,7 +143,7 @@ func bareBytes(width, height int) int64 { func (generator) Plan(r format.Request) (format.Plan, error) { label := "" if r.Label { - label = r.LabelText("webp") + label = r.PictureLabel("webp") } w, h, err := chooseSize(r) diff --git a/internal/guard/actionbarheight_test.go b/internal/guard/actionbarheight_test.go index 5d73bfbf..2b3e9e84 100644 --- a/internal/guard/actionbarheight_test.go +++ b/internal/guard/actionbarheight_test.go @@ -285,10 +285,10 @@ func screenInAWindowWithHost(t *testing.T, tab string) (fyne.CanvasObject, fyne. } // scrollIn is the scrolling area a screen puts its form in. -func scrollIn(o fyne.CanvasObject) *container.Scroll { - var found *container.Scroll +func scrollIn(o fyne.CanvasObject) *parts.Scroll { + var found *parts.Scroll walk(o, func(obj fyne.CanvasObject) { - if scroll, ok := obj.(*container.Scroll); ok && found == nil { + if scroll, ok := obj.(*parts.Scroll); ok && found == nil { found = scroll } }) diff --git a/internal/guard/avifladder_test.go b/internal/guard/avifladder_test.go index 9abb9716..8ea5c242 100644 --- a/internal/guard/avifladder_test.go +++ b/internal/guard/avifladder_test.go @@ -93,14 +93,14 @@ var heaviestAvifSeeds = []uint64{ } // Every rung's two ceilings still cover what that rung codes to: the first -// with the label of a file at the edge of the rung, the second with the label +// with no label and with the label a picture draws, the second with the label // of a damaged file. // -// A file at the edge of a rung - asked for at its ceiling, where the picture -// leaves the least room - states a size with the digits of the ceiling, so the -// first ceiling is asked with those. A damaged file's label names its damage, -// and a longer label is more ink until it is too long for its scale, so the -// second is asked with the longest damaged label every scale still draws. +// The label of a picture names no size (format.Request.PictureLabel), so one +// label per seed stands for every file of the rung. A damaged file's label +// names its damage, and a longer label is more ink until it is too long for +// its scale, so the second is asked with the longest damaged label every scale +// still draws. // Asking one byte of a named picture size makes the format state the file // that picture needs, which is what a ceiling is a bound on (2026-11-12, when // both were found too low - O273 and the review of #234). @@ -135,20 +135,8 @@ func TestEveryAvifRungStillFitsInsideItsDeclaredCeilings(t *testing.T) { named := map[string]string{"width": strconv.Itoa(w), "height": strconv.Itoa(h)} over, needs, worst := int64(0), int64(0), ask{} for _, seed := range seeds { - asks := []ask{{format.Request{Bytes: 1, Seed: seed, Properties: named}, rung[2]}} - // The size on disk is what the label states: the ceiling itself, - // a tenth above it, and the lightest and the heaviest number with - // as many digits. - eights, lightest := int64(0), int64(1) - for n := rung[2]; n > 0; n /= 10 { - eights, lightest = eights*10+8, lightest*10 - } - lightest /= 10 - for _, size := range []int64{rung[2], rung[2] + rung[2]/10, lightest, eights} { - asks = append(asks, ask{format.Request{Bytes: 1, Seed: seed, Label: true, OnDisk: size, Properties: named}, rung[2]}) - } - // A damaged file states a size of any length the damage leaves it. - plain := format.Request{Bytes: 1, Seed: seed, Label: true, OnDisk: 1e12, Properties: named} + plain := format.Request{Bytes: 1, Seed: seed, Label: true, Properties: named} + asks := []ask{{format.Request{Bytes: 1, Seed: seed, Properties: named}, rung[2]}, {plain, rung[2]}} for _, damage := range damagesDrawnAtEveryScale(t, plain, "avif", w) { r := plain r.Damage = damage @@ -167,10 +155,10 @@ func TestEveryAvifRungStillFitsInsideItsDeclaredCeilings(t *testing.T) { } } if over > 0 { - t.Errorf("the %dx%d rung declares a ceiling of %d B and its picture needs %d B (seed %d, label %t, size %d, damage %q).\n"+ + t.Errorf("the %dx%d rung declares a ceiling of %d B and its picture needs %d B (seed %d, label %t, damage %q).\n"+ "A ceiling below what its rung produces lets planning pick a picture the file cannot hold, and writing then refuses a size planning accepted.\n"+ "What to do: run tools/probes/avifladder and record what it measures.", - w, h, worst.ceiling, needs, worst.r.Seed, worst.r.Label, worst.r.OnDisk, worst.r.Damage) + w, h, worst.ceiling, needs, worst.r.Seed, worst.r.Label, worst.r.Damage) } } if drawn == 0 { diff --git a/internal/guard/cataloguewords_test.go b/internal/guard/cataloguewords_test.go index 64752db8..033722b1 100644 --- a/internal/guard/cataloguewords_test.go +++ b/internal/guard/cataloguewords_test.go @@ -1,6 +1,7 @@ package guard import ( + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" "testing" "fyne.io/fyne/v2" @@ -83,7 +84,7 @@ func wordsEndingAt(o fyne.CanvasObject, x float32, visit func(*canvas.Text, floa if v.Text != "" { visit(v, x+v.MinSize().Width) } - case *container.Scroll: + case *container.Scroll, *parts.Scroll: case *fyne.Container: for _, child := range v.Objects { wordsEndingAt(child, x, visit) diff --git a/internal/guard/checksumfolder_test.go b/internal/guard/checksumfolder_test.go index 2575d68d..453803c5 100644 --- a/internal/guard/checksumfolder_test.go +++ b/internal/guard/checksumfolder_test.go @@ -81,20 +81,41 @@ func checkedJSON(t *testing.T, sums string) (int, checksum.Checked) { // is, and its -c calls an escaped line improperly formatted - found on the // macos-26 runner on 2026-09-30, where this guard held the file to it as if it // were GNU and went red. +// +// GNU's is asked for as gnusha256sum first. From Ubuntu 25.10 the sha256sum +// on the PATH is uutils, a rewrite, and GNU's is installed beside it under +// that name - so on ubuntu-26.04, which ubuntu-latest became in November 2026 +// (measured in Docker on 2026-11-18: uutils 0.10.0 as sha256sum, GNU 9.7 as +// gnusha256sum, both installed by default). func sha256sumHere(t *testing.T) (program string, gnu bool, major int) { t.Helper() - program, err := exec.LookPath("sha256sum") - if err != nil { - return "", false, 0 + for _, name := range []string{"gnusha256sum", "sha256sum"} { + found, err := exec.LookPath(name) + if err != nil { + continue + } + isGNU, itsMajor := sha256sumVersion(found) + if isGNU { + return found, true, itsMajor + } + if program == "" { + program, major = found, itsMajor + } } + return program, false, major +} + +// sha256sumVersion is whether program says it is GNU coreutils, and the major +// version it says it is. +func sha256sumVersion(program string) (gnu bool, major int) { out, err := exec.Command(program, "--version").Output() if err != nil { - return program, false, 0 + return false, 0 } first, _, _ := strings.Cut(string(out), "\n") fields := strings.Fields(first) if len(fields) == 0 { - return program, false, 0 + return false, 0 } for _, c := range fields[len(fields)-1] { if c < '0' || c > '9' { @@ -102,7 +123,7 @@ func sha256sumHere(t *testing.T) (program string, gnu bool, major int) { } major = major*10 + int(c-'0') } - return program, strings.Contains(first, "GNU coreutils"), major + return strings.Contains(first, "GNU coreutils"), major } // TestTheChecksumFileIsTheOneSha256sumWrites writes a checksum file of a diff --git a/internal/guard/damagelabel_test.go b/internal/guard/damagelabel_test.go index d254b0f6..5ac00c7d 100644 --- a/internal/guard/damagelabel_test.go +++ b/internal/guard/damagelabel_test.go @@ -107,10 +107,12 @@ func TestADamagedFileNeverClaimsItsLabel(t *testing.T) { // Every format whose healthy file carries its label as text is asked, with // junk appended: that damage keeps every byte the generator wrote, so the // label is where the generator put it and can be read back. Which formats -// those are is read from the healthy file, not listed here - a picture draws -// its label in pixels and is left to the guards on pictures. The expected text -// is written out here rather than asked of format.Request, so a wording that -// drops the damage cannot agree with itself. +// those are is read from the healthy file, not listed here. A drawing written +// as text, an SVG, carries the label of a picture, which names no size +// (format.Request.PictureLabel), and is held to naming its damage the same way. +// A picture draws its label in pixels and is left to the guards on pictures. +// The expected text is written out here rather than asked of format.Request, +// so a wording that drops the damage cannot agree with itself. func TestADamagedFileStatesItsSizeOnDiskAndItsDamage(t *testing.T) { chain := damage.Chain{{ID: damage.AppendJunk}} const size = witnessSize @@ -126,8 +128,12 @@ func TestADamagedFileStatesItsSizeOnDiskAndItsDamage(t *testing.T) { t.Fatal("the check took a label naming the size before the damage, and no damage, for the label it asks for") } + if namesItsDamage([]byte(fmt.Sprintf("tfg - svg - seed %s", core.SeedLabel(brokenSeed))), "svg", chain, brokenSeed) == "" { + t.Fatal("the check took the label of a drawing naming no damage for the label it asks for") + } + dir := t.TempDir() - read := 0 + read, drawings := 0, 0 for _, f := range format.All() { good := engine.Target{ID: "good", Format: f.ID, Sizes: engine.Uniform(1, size), Label: true} broken := engine.Target{ID: "broken", Format: f.ID, Sizes: engine.Uniform(1, size), Damage: chain, Label: true} @@ -137,22 +143,45 @@ func TestADamagedFileStatesItsSizeOnDiskAndItsDamage(t *testing.T) { t.Fatal(err) } goodSeed := core.FileSeed(core.TargetSeed(lengthSeed, "good"), 0) - if !bytes.Contains(healthy, fmt.Appendf(nil, "tfg - %s - %d B - seed %s", f.ID, size, core.SeedLabel(goodSeed))) { + text := bytes.Contains(healthy, fmt.Appendf(nil, "tfg - %s - %d B - seed %s", f.ID, size, core.SeedLabel(goodSeed))) + drawing := bytes.Contains(healthy, fmt.Appendf(nil, "tfg - %s - seed %s", f.ID, core.SeedLabel(goodSeed))) + if !text && !drawing { continue } got, err := os.ReadFile(paths["broken"]) if err != nil { t.Fatal(err) } - if why := statesItsDamage(got, f.ID, size, chain, brokenSeed); why != "" { + why := "" + if text { + why = statesItsDamage(got, f.ID, size, chain, brokenSeed) + read++ + } else { + why = namesItsDamage(got, f.ID, chain, brokenSeed) + drawings++ + } + if why != "" { t.Errorf("%s: %s", f.ID, why) } - read++ } if read < 10 { t.Fatalf("only %d format(s) carry their label as text the guard could find - it did not reach the formats it is about", read) } - t.Logf("the label was read back from %d format(s)", read) + if drawings == 0 { + t.Fatal("no format writes the label of a picture as text - the drawing half of this guard reached nothing") + } + t.Logf("the label was read back from %d format(s), and the label of a drawing from %d", read, drawings) +} + +// namesItsDamage says what is wrong with the label of a drawing in got, or +// nothing when it names every entry of chain with its settings resolved, and +// no size. +func namesItsDamage(got []byte, id string, chain damage.Chain, seed uint64) string { + want := fmt.Sprintf("tfg - %s - damage %s - seed %s", id, chain.Label(), core.SeedLabel(seed)) + if !bytes.Contains(got, []byte(want)) { + return fmt.Sprintf("the drawing does not carry the label %q", want) + } + return "" } // TestATruncatedTextSaysHowMuchWasCut is the case the owner met: two texts of @@ -262,16 +291,16 @@ func damagesDrawnAtEveryScale(t *testing.T, r format.Request, id string, width i t.Helper() long := longestDamageLabel(t) r.Damage = "x" - fixed := len(r.LabelText(id)) - len(r.Damage) + fixed := len(r.PictureLabel(id)) - len(r.Damage) var out []string for _, n := range imagelabel.LongestAtEachScale(width) { if n <= fixed { continue // no damaged label is this short } r.Damage = long[:min(n-fixed, len(long))] - if got, want := imagelabel.BandHeight(width, len(r.LabelText(id))), imagelabel.BandHeight(width, n); got != want || got == 0 { + if got, want := imagelabel.BandHeight(width, len(r.PictureLabel(id))), imagelabel.BandHeight(width, n); got != want || got == 0 { t.Fatalf("a %s label of %d characters across %d pixels draws a band %d high where %d was worked out - the guard does not reach the scale it measures", - id, len(r.LabelText(id)), width, got, want) + id, len(r.PictureLabel(id)), width, got, want) } out = append(out, r.Damage) } @@ -509,7 +538,7 @@ func TestEveryCharacterOfADamagedLabelCanBeDrawn(t *testing.T) { } for _, v := range values { chain := damage.Chain{{ID: d.ID, Values: v}, {ID: d.ID, Values: v}} - label := format.Request{Bytes: 1 << 40, Seed: 1, Damage: chain.Label()}.LabelText("png") + label := format.Request{Bytes: 1 << 40, Seed: 1, Damage: chain.Label()}.PictureLabel("png") for _, r := range label { if !imagelabel.HasGlyph(r) { t.Errorf("%s: the picture font has no %q, so the label %q is drawn with a box in its place", d.ID, r, label) diff --git a/internal/guard/detailpopup_test.go b/internal/guard/detailpopup_test.go index e7b2f29c..f206851a 100644 --- a/internal/guard/detailpopup_test.go +++ b/internal/guard/detailpopup_test.go @@ -60,6 +60,8 @@ func TestTheLongerExplanationOpensWhenAsked(t *testing.T) { {text.FieldSeed(), text.DetailSeed()}, {text.FieldLabel(), text.DetailLabel()}, } { + // As the screen draws it: a value to type loses its marks. + field.detail = asDrawn(field.detail) button := detailButtonBeside(screen, field.label) if button == nil { t.Errorf("%q has a longer explanation and no button that opens it", field.label) @@ -166,7 +168,7 @@ func TestTheExplanationNeverUsesTheOverlayLayer(t *testing.T) { // It has to be up before its absence anywhere else means anything. A guard // that checked for an empty overlay without opening the explanation would // pass on a button that does nothing. - if shown := allText(screen); !strings.Contains(shown, text.DetailSize()) { + if shown := allText(screen); !strings.Contains(shown, asDrawn(text.DetailSize())) { t.Fatal("hovering showed nothing, so this guard is measuring a button that does not work") } diff --git a/internal/guard/englishrefusal_test.go b/internal/guard/englishrefusal_test.go new file mode 100644 index 00000000..ccd57fbf --- /dev/null +++ b/internal/guard/englishrefusal_test.go @@ -0,0 +1,261 @@ +package guard + +import ( + "errors" + "os" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/preset" +) + +// The English window says the engine's sentences in the command line's +// English, with a value of a list by its name and a setting by its label - +// docs/SIZE-FIXES-2026-11-16.md section 6.1, M3a. Both surfaces render through +// one function in core, the command line with nothing reworded, so what these +// guards hold is the half a reading cannot: that rewording touches the names +// and the labels and not one other byte. + +// nothingDifferent is a wording that answers for no value and keeps every +// layout. A sentence reworded by it has to be the command line's sentence to +// the byte. +type nothingDifferent struct{} + +func (nothingDifferent) Word(any) (string, bool) { return "", false } +func (nothingDifferent) Layout(layout string) string { return layout } + +// sayNothingDifferent is the wording that says everything as the command line +// does. +var sayNothingDifferent core.Wording = nothingDifferent{} + +// rewordable is an error that says itself in a surface's words. +type rewordable interface { + Reworded(string, core.Wording) string +} + +// TestTheEnglishWindowRewordsOnlyNamesAndLabels. +// +// First every kind of value a sentence can carry, planted, so a kind the +// refusals below happen not to use is still asked: reworded by a wording that +// answers for nothing, each has to come out as the command line prints it. +// Then the same of every refusal the registries give for a bad value. Then the +// window itself, in English: every value of a list a refusal carries is said +// by its name and every setting it names by its label, wherever the two +// differ from what the command line prints. +func TestTheEnglishWindowRewordsOnlyNamesAndLabels(t *testing.T) { + if got := text.AllowedWholeNumber(); got != "whole number" { + t.Fatalf("this process speaks another language (%q), so nothing here is English to ask", got) + } + for _, c := range plantedSentences() { + if got := c.said.Reworded(c.name, sayNothingDifferent); got != c.said.InTheWordsOf(c.name) { + t.Errorf("%s: reworded with nothing to reword it says\n %q\nand the command line\n %q", c.what, got, c.said.InTheWordsOf(c.name)) + } + } + // The canary: the same check has to see a sentence that IS reworded. + canary := core.Says("guard.Canary", "set %s to %q", core.A("Key", core.LabelTerm("bbox")), core.A("Value", core.Choice{Of: "content", Value: "test"})) + window := text.Sentence(canary) + if window == canary.String() || !strings.Contains(window, text.SettingLabel("bbox")) || + !strings.Contains(window, text.ChoiceName("content", "test")) || strings.Contains(window, `"`) { + t.Fatalf("the window says %q for %q, so it rewords nothing and the checks below would be green for nothing", window, canary.String()) + } + // A refusal about a setting, which leaves the place of its name in the + // sentence until a surface fills it, at the foot of the form: its own text + // is not its sentence's, and it is still reworded. + about := core.RefuseAbout("content", core.Says("guard.About", "{setting} cannot be %q here", core.A("Value", core.Choice{Of: "content", Value: "test"}))) + if foot := text.Refusal(about, ""); !strings.Contains(foot, text.ChoiceName("content", "test")) { + t.Errorf("at the foot of the form a refusal about a setting says %q, where the command line says %q", foot, about.Error()) + } + + corpus := refusalCorpus(t) + named := 0 + for _, err := range corpus { + var r rewordable + if errors.As(err, &r) { + if got, cli := r.Reworded("", sayNothingDifferent), r.(error).Error(); got != cli { + t.Errorf("reworded with nothing to reword it, a refusal says\n %q\nand the command line\n %q", got, cli) + } + } + // Where the window puts it: at the foot of the form, and under the box + // of the setting it is about. + shown := []string{text.Refusal(err, "")} + var about interface{ AboutSetting() string } + if errors.As(err, &about) && about.AboutSetting() != "" { + shown = append(shown, text.Refusal(err, text.SettingLabel(core.LastSettingSegment(about.AboutSetting())))) + } + for _, word := range windowWordsIn(err) { + for _, one := range shown { + if !strings.Contains(one, word) { + t.Errorf("the English window does not say %q in\n %q\nwhere the command line says\n %q", word, one, err.Error()) + } + } + named++ + } + } + if len(corpus) < 300 || named < 15 { + t.Fatalf("%d refusal(s), naming %d value(s) or setting(s) the window words differently, so the registries were not swept", len(corpus), named) + } + t.Logf("%d refusal(s), %d name(s) and label(s) the window words differently", len(corpus), named) +} + +// TestARefusalWithNoBoxNamesItsSettingsByTheirLabels asks two settings of a log +// refused together, which the engine keys "level_mix and entry_format" - a key +// no box on any screen has, so the refusal stands at the foot of the form. It +// has to name both settings by their labels: the English window said the two +// keys, and the Polish one left the place empty. Asked in English here and in +// Polish in a process of its own. +func TestARefusalWithNoBoxNamesItsSettingsByTheirLabels(t *testing.T) { + polish := os.Getenv(listWordsPolishChild) == "1" + if polish { + if err := text.LoadBuiltIn("pl"); err != nil { + t.Fatalf("Polish would not load: %v", err) + } + } + _, err := engine.Plan([]engine.Target{{ID: "a", Format: "log", Sizes: engine.Uniform(1, 4096), + Properties: map[string]string{"entry_format": "apache-combined", "level_mix": "errors"}, Label: true}}, + engine.Options{OutDir: t.TempDir(), DryRun: true}) + if err == nil { + t.Fatal("a log of an Apache shape with a mix of levels was planned, so there is no refusal to ask") + } + for _, one := range spreadAll(t, err) { + shown := text.Refusal(one, "") + for _, key := range []string{"level_mix", "entry_format"} { + if label := text.SettingLabel(key); !strings.Contains(shown, label) || strings.Contains(shown, key) { + t.Errorf("at the foot of the form the refusal does not name %s as %q:\n %s", key, label, shown) + } + } + } + if !polish { + runChild(t, "TestARefusalWithNoBoxNamesItsSettingsByTheirLabels", listWordsPolishChild) + } +} + +// plantedSentence is a sentence and the name its slots are filled with. +type plantedSentence struct { + what string + name string + said core.Said +} + +// plantedSentences is a sentence for each kind of value core keeps as it is +// until the sentence is read, and for each way a layout prints one. +func plantedSentences() []plantedSentence { + inner := core.Says("guard.Inner", "the %s shape with %q", core.A("Shape", core.Choice{Of: "entry_format", Value: "json-lines"}), core.A("Typed", "a\tb")) + wrapped := core.RefuseAbout("width", core.Says("guard.Wrapped", "{a} {setting} of %d is too wide", core.A("Value", 9))) + return []plantedSentence{ + {"a value of a list, quoted", "", core.Says("guard.Choice", "expects %q", core.A("Outcome", core.Choice{Of: "expected", Value: "reject"}))}, + {"a setting and its slot", "bbox", core.Says("guard.Label", "{a} {setting} beside %s", core.A("Key", core.LabelTerm("bbox")))}, + {"a sentence inside, quoted and not", "", core.Says("guard.Nested", "%s, then %q", core.A("One", inner), core.A("Two", inner))}, + {"a refusal wrapped", "", core.Says("guard.Wraps", "refused: %w", core.A("Cause", wrapped))}, + {"an error that is not ours", "", core.Says("guard.Plain", "failed: %v", core.A("Cause", errors.New("disk said no")))}, + {"sentences joined three ways", "", core.Says("guard.Lists", "%s / %s / %s", + core.A("And", core.Conjoined{inner, inner}), core.A("Comma", core.Sentences{inner, inner}), core.A("Lines", core.Lines{inner, inner}))}, + {"several values of a list", "", core.Says("guard.Choices", "one of %s", core.A("Values", core.Choices{Of: "time_order", Values: []string{"in-order", "out-of-order"}}))}, + {"names joined", "", core.Says("guard.Joined", "%s", core.A("Names", core.Joined{Items: []string{"a", "b", "c"}}))}, + {"a sentence under a type of its own", "", core.Says("guard.Place", "%s has no %s", core.A("At", placeNamed{said: inner}), core.A("Other", placeNamed{said: inner, adds: " size"}))}, + {"a size and a unit", "", core.Says("guard.Bytes", "%s of %d %s", core.A("Size", core.Bytes(10<<20)), core.A("Count", 3), core.A("Unit", core.UnitTerm("pixels")))}, + {"a width the layout asks for", "", core.Says("guard.Width", "[%-12s|%8q]", core.A("A", core.Choice{Of: "content", Value: "test"}), core.A("B", "x"))}, + {"one of a number", "", core.SaysN("guard.One", "%d file holds it", "%d files hold it", core.A("Count", 1))}, + {"several of a number", "", core.SaysN("guard.Many", "%d file holds it", "%d files hold it", core.A("Count", 2))}, + {"a count not printed", "", core.SaysN("guard.Unsaid", "the folder holds", "the folders hold", core.A("Count", 2))}, + {"no full stop, a capital", "", core.Says("guard.Shaped", "expects %s.", core.A("Outcome", core.Choice{Of: "expected", Value: "accept"})).WithoutFullStop().Capitalized()}, + } +} + +// placeNamed is a sentence of ours under a type of its own, the way the recipe +// names a place in itself - printing its sentence, or adding to it. +type placeNamed struct { + said core.Said + adds string +} + +func (p placeNamed) String() string { return p.said.String() + p.adds } +func (p placeNamed) Said() core.Said { return p.said } + +// refusalCorpus is every refusal the registries give for a value they do not +// take, opened into the ones each carries - what a window is really shown, +// rather than sentences built for the purpose. +func refusalCorpus(t *testing.T) []error { + t.Helper() + var out []error + add := func(err error) { + if err != nil { + out = append(out, spreadAll(t, err)...) + } + } + for _, err := range engineRefusals(t) { + add(err) + } + bad := []string{"zzz", "-1", "0", "99999999999", "1.5"} + for _, d := range format.All() { + for _, p := range d.Properties { + for _, v := range bad { + add(d.CheckProperties(map[string]string{p.Name: v})) + } + } + } + // Settings that are each fine and refused together, planned the way a run + // plans them - which is where a refusal names a value of a list or another + // setting. Each has to be refused, or it asks nothing. + for _, c := range []struct { + format string + size int64 + props map[string]string + }{ + {"log", 4096, map[string]string{"entry_format": "apache-combined", "level_mix": "errors"}}, + {"zip", 20000, map[string]string{"password": "secret", "encryption": "aes-256", "compression": "best"}}, + {"zip", 20000, map[string]string{"depth": "0", "directory_entries": "true"}}, + {"otlp", 20000, map[string]string{"formatting": "indented", "batch": "5"}}, + {"html", 10, map[string]string{"nesting": "5", "styles": "inline"}}, + {"rtf", 10, map[string]string{"nesting": "5"}}, + } { + _, err := engine.Plan([]engine.Target{{ID: "a", Format: c.format, Sizes: engine.Uniform(1, c.size), Properties: c.props, Label: true}}, + engine.Options{OutDir: t.TempDir(), DryRun: true}) + if err == nil { + t.Fatalf("%s with %v was planned, so the refusal it stands for is not asked", c.format, c.props) + } + add(err) + } + for _, p := range preset.All() { + for _, param := range p.Parameters { + _, err := preset.Expand(p.ID, preset.Args{param.Name: "zzz"}) + add(err) + } + } + return out +} + +// windowWordsIn is every name and label a refusal carries that the English +// window says differently from the command line, read off the sentence inside +// it - the one a window rewords. +func windowWordsIn(err error) []string { + var said interface{ Said() core.Said } + if !errors.As(err, &said) { + return nil + } + var out []string + var walk func(s core.Said) + walk = func(s core.Said) { + for _, a := range s.Args() { + switch v := a.Value.(type) { + case core.Choice: + if name := text.ChoiceName(v.Of, v.Value); name != v.Value { + out = append(out, name) + } + case core.Term: + if key, isLabel := v.Setting(); isLabel && text.SettingLabel(key) != key { + out = append(out, text.SettingLabel(key)) + } + case core.Said: + walk(v) + case interface{ Said() core.Said }: + walk(v.Said()) + } + } + } + walk(said.Said()) + return out +} diff --git a/internal/guard/filmahead_test.go b/internal/guard/filmahead_test.go index 813d6a83..de29a383 100644 --- a/internal/guard/filmahead_test.go +++ b/internal/guard/filmahead_test.go @@ -39,7 +39,7 @@ func TestAFilmPaintsOnlyWhatChangesAndGetsTheWholePicture(t *testing.T) { } timelines[name] = tl } - labels := map[string]string{"labelled": format.Request{Bytes: 1 << 20, Seed: 7}.LabelText("webm"), "unlabelled": ""} + labels := map[string]string{"labelled": format.Request{Bytes: 1 << 20, Seed: 7}.PictureLabel("webm"), "unlabelled": ""} compared, clocked, moved := 0, 0, 0 for _, size := range sizes { diff --git a/internal/guard/filmlayout_test.go b/internal/guard/filmlayout_test.go index d1d679b3..3aaac5c4 100644 --- a/internal/guard/filmlayout_test.go +++ b/internal/guard/filmlayout_test.go @@ -65,7 +65,7 @@ func TestEveryFilmLayoutIsOneTheAV1SpecificationAllows(t *testing.T) { t.Fatal(err) } } - labels := [2]string{format.Request{Bytes: 268435456, Seed: 7741}.LabelText("webm"), ""} + labels := [2]string{format.Request{Bytes: 268435456, Seed: 7741}.PictureLabel("webm"), ""} seen := layoutsSeen{} n := 0 for _, w := range sides { diff --git a/internal/guard/filmtiles_test.go b/internal/guard/filmtiles_test.go index d6ed15a4..6e42fbfb 100644 --- a/internal/guard/filmtiles_test.go +++ b/internal/guard/filmtiles_test.go @@ -333,7 +333,7 @@ func tilesOfFilmHold(t *testing.T, props map[string]string, size int64, changes if err != nil { t.Fatal(err) } - label := format.Request{Bytes: size, Seed: seed}.LabelText("webm") + label := format.Request{Bytes: size, Seed: seed}.PictureLabel("webm") var dec av1.Decoder if _, err := dec.DecodeOBUs(append([]byte{0x12, 0x00}, f.blocks[0].data...)); err != nil { t.Fatalf("%v: gav1d does not decode the film's first frame: %v", props, err) diff --git a/internal/guard/formcolumns_test.go b/internal/guard/formcolumns_test.go index 127d3d82..e2c48f67 100644 --- a/internal/guard/formcolumns_test.go +++ b/internal/guard/formcolumns_test.go @@ -29,9 +29,14 @@ import ( // was turned down. // TestShortFieldsShareARowAndTakeOneColumnEach asks the first row of the -// single batch screen: the format, the size, how many and the damage stand in -// one row, one column each, the same width - and the output directory, a path -// nobody can predict the length of, takes more than one. +// single batch screen: the format, the size and how many stand in one row, +// one column each, the same width - and the output directory, a path nobody +// can predict the length of, takes more than one. +// +// The screen opens on a picture, so the way of giving the size stands in that +// row too, between the format and the size, and the damage starts the second +// row (2026-11-17). The switch is asked for its row and not its width: it is +// as wide as its words, like the switch on the batch screen. // // The defect it keeps away is the one the owner reported twice: a box holding // "1" as wide as half the form, and a form one field tall per row. @@ -40,7 +45,7 @@ func TestShortFieldsShareARowAndTakeOneColumnEach(t *testing.T) { content, _ := laidOutWindow(t) screen := tabContent(t, content, text.TabOneTarget()) - labels := []string{text.FieldFormat(), text.FieldSize(), text.FieldCount(), text.FieldDamage()} + labels := []string{text.FieldFormat(), text.FieldSize(), text.FieldCount()} var first band for i, label := range labels { box, ok := objectBox(screen, controlUnder(screen, label)) @@ -62,6 +67,14 @@ func TestShortFieldsShareARowAndTakeOneColumnEach(t *testing.T) { t.Errorf("%q starts at x=%.1f, not to the right of %q at x=%.1f", label, box.X, labels[0], first.X) } } + way, ok := objectBox(screen, controlUnder(screen, text.FieldSizeWay())) + if !ok { + t.Fatalf("the screen opens on %s and there is no %q to lay out", format.IDs()[0], text.FieldSizeWay()) + } + if off := way.Y - first.Y; off > 1 || off < -1 { + t.Errorf("%q stands at y=%.1f and %q at y=%.1f - the way of giving the size is not in the row of the size", + text.FieldSizeWay(), way.Y, labels[0], first.Y) + } path, ok := objectBox(screen, entryUnder(t, screen, text.FieldOutputDir())) if !ok { t.Fatal("the output directory is not laid out") @@ -92,10 +105,13 @@ func TestASizeBelowTheMinimumOffersTheSmallestSize(t *testing.T) { if field == nil || field.Saying() == "" { t.Fatal("a size of 1 B was not refused under the size box, so there is nothing to offer a fix for") } - offered := field.Offered() - if offered == "" { + all := field.Offered() + if len(all) == 0 { t.Fatalf("the size box says %q and offers no button to put it right", field.Saying()) } + // The first is the number. A picture with its width and height known + // gets a second, smallest, which picturefixes_test.go presses. + offered := all[0] press(t, content, offered) join(host) @@ -145,7 +161,7 @@ func TestALimitBelowTheMinimumOffersNoButtonThatLeadsBackToItself(t *testing.T) t.Fatalf("a limit of %d B builds a file of %d B for a format whose smallest is %d B and was not refused, "+ "so there is nothing to offer a fix for.\n%s", minimum, minimum-1, minimum, allSaid(fields)) } - if offered := field.Offered(); offered != "" { + if offered := field.Offered(); len(offered) != 0 { t.Errorf("the limit box offers %q under a refusal about the file one byte below the limit.\n"+ "Reason: the button puts the format's smallest size in the box, the box is the LIMIT, and\n"+ "the file under it is refused again - measured, the button led back to itself.", offered) @@ -198,7 +214,7 @@ func TestARefusalAboutWhatIsInTheDirectoryStandsUnderItAndOpensIt(t *testing.T) t.Fatalf("a manifest already in the directory was not refused under the output directory box - it says %q", field.Saying()) } - if got := field.Offered(); got != text.ButtonOpenFolder() { + if got := field.Offered(); len(got) != 1 || got[0] != text.ButtonOpenFolder() { t.Fatalf("the refusal about the directory offers %q, not the way to the directory", got) } // The one on the screen: the bar keeps a button of the same name, hidden diff --git a/internal/guard/generatewindow_test.go b/internal/guard/generatewindow_test.go index 2901d31f..daad3648 100644 --- a/internal/guard/generatewindow_test.go +++ b/internal/guard/generatewindow_test.go @@ -204,7 +204,7 @@ func saysWhatItTakes(t *testing.T, shown, owner string, p format.Property) { t.Helper() want := p.Allowed() - if p.Kind == format.PropertyChoice { + if p.Kind == format.PropertyChoice || p.Kind == format.PropertyBool { want = p.Detail } if want != "" && !strings.Contains(shown, want) { @@ -214,6 +214,12 @@ func saysWhatItTakes(t *testing.T, shown, owner string, p format.Property) { t.Errorf("the field for %s.%s lists its values in prose (%q) as well as in the "+ "menu above them", owner, p.Name, p.Allowed()) } + // A switch is its two values the same way a menu is its list, and they are + // the recipe's words besides. What it starts on is asked, with the folded + // line, by TestTheWindowSaysASwitchAsOnOrOff. + if p.Kind == format.PropertyBool && strings.Contains(shown, text.AllowedTrueOrFalse()) { + t.Errorf("the field for %s.%s says %q beside a switch that shows both", owner, p.Name, text.AllowedTrueOrFalse()) + } } // wrongKindOfControl says when a declaration got a control that cannot express diff --git a/internal/guard/guitext_test.go b/internal/guard/guitext_test.go index fb2d76bf..34ab57bc 100644 --- a/internal/guard/guitext_test.go +++ b/internal/guard/guitext_test.go @@ -126,6 +126,8 @@ var notWords = map[string]string{ `"user32.dll"`: "a Windows library this program loads for the dialog it shows when it has no window, a file name and not a word", `"GetProcAddress"`: "the Win32 entry point looked up by name, an identifier and not a word", `"MessageBoxW"`: "the Win32 entry point that shows a system dialog, looked up by name, an identifier and not a word", + `"SystemParametersInfoW"`: "the Win32 entry point that says how far a notch of the wheel scrolls, looked up by name, " + + "an identifier and not a word", `"Cause:"`: "the word the toolkit's logger puts in front of the error it was handed, read as an anchor " + "to find the toolkit's own sentence and never shown - see CauseFrom in opening.go", `"windows"`: "a system name asked of the compiler", @@ -142,6 +144,8 @@ var notWords = map[string]string{ `"panel"`: "our name for a colour, in the palette the toolkit asks by name", `"label"`: "our name for the ink of a field's name, a colour the palette holds", `"tipshade"`: "our name for the shade under an explanation, a colour the palette holds", + `"held"`: "our name for the ink of a choice that cannot be made yet, a colour the palette holds", + `"literal"`: "our name for the ink of a value to type inside an explanation, a colour the palette holds", `"lift"`: "our name for what the pointer does to the filled button, a colour the palette holds", `"shade"`: "our name for what a press does to the filled button, a colour the palette holds", `"fyneDo"`: "a migration flag the toolkit reads, never shown", diff --git a/internal/guard/jxlladder_test.go b/internal/guard/jxlladder_test.go index 01e20c4f..1ff31bce 100644 --- a/internal/guard/jxlladder_test.go +++ b/internal/guard/jxlladder_test.go @@ -93,19 +93,18 @@ var heaviestJxlSeeds = map[int][]uint64{ } // Every rung's two ceilings still cover what that rung produces: the first -// with the label of a file at the edge of the rung, the second with the label +// with no label and with the label a picture draws, the second with the label // of a damaged file. // // The guard above walks the ladder the way a run does, so it only ever sees // the rung each size happens to select, at one seed. This one asks each rung // directly, across seeds, which is the question the ceiling is an answer to. // -// A file at the edge of a rung - asked for at its ceiling, where the picture -// leaves the least room - states a size with the digits of the ceiling, so the -// first ceiling is asked with those. A label with more digits is a file with -// far more room than its picture needs. A damaged file's label names its -// damage, and a longer label is more ink until it is too long for its scale, so -// the second is asked with the longest damaged label every scale still draws. +// The label of a picture names no size (format.Request.PictureLabel), so one +// label per seed stands for every file of the rung. A damaged file's label +// names its damage, and a longer label is more ink until it is too long for its +// scale, so the second is asked with the longest damaged label every scale +// still draws. // // A handful of seeds from zero and the heaviest the thorough sweep found // (heaviestJxlSeeds): this is the version that runs on every push and would @@ -143,26 +142,15 @@ func TestEveryJxlRungStillFitsInsideItsDeclaredCeiling(t *testing.T) { for seed := range first { seeds = append(seeds, seed) } - // The size the label states: the ceiling itself, a tenth above it, - // and the lightest and the heaviest number with as many digits. - eights, lightest := int64(0), int64(1) - for n := r[2]; n > 0; n /= 10 { - eights, lightest = eights*10+8, lightest*10 - } - lightest /= 10 var worst ask over, size, worstSeed := int64(0), int64(0), uint64(0) for _, seed := range seeds { - asks := []ask{{"", r[2]}} - for _, want := range []int64{r[2], r[2] + r[2]/10, lightest, eights} { - asks = append(asks, ask{format.Request{Bytes: want, Seed: seed}.LabelText("jxl"), r[2]}) - } - // A damaged file states a size of any length the damage leaves it. - plain := format.Request{Bytes: 1e12, Seed: seed} + plain := format.Request{Seed: seed} + asks := []ask{{"", r[2]}, {plain.PictureLabel("jxl"), r[2]}} for _, damage := range damagesDrawnAtEveryScale(t, plain, "jxl", w) { damaged := plain damaged.Damage = damage - asks = append(asks, ask{damaged.LabelText("jxl"), r[3]}) + asks = append(asks, ask{damaged.PictureLabel("jxl"), r[3]}) drawn++ } for _, a := range asks { diff --git a/internal/guard/labelclaim_test.go b/internal/guard/labelclaim_test.go index 26bd4cb5..bf5a7f63 100644 --- a/internal/guard/labelclaim_test.go +++ b/internal/guard/labelclaim_test.go @@ -76,7 +76,7 @@ func TestAPictureSaysItCarriesItsLabelOnlyWhenItsTextIsWhole(t *testing.T) { // drawn at. The guard above asks the lowest height and one with room, and an // answer one row out at the boundary passed it (found by review, 2026-10-27). func TestALabelIsReadableFromTheFirstHeightThatHoldsItsText(t *testing.T) { - label := format.Request{Bytes: 2048, Seed: 1}.LabelText("bmp") + label := format.Request{Bytes: 2048, Seed: 1}.PictureLabel("bmp") across := len(label)*4 + 4 // a glyph and its gap is four columns at scale 1, with the padding either side for scale := 1; scale <= 4; scale++ { width := across * scale @@ -117,7 +117,7 @@ func TestALabelIsReadableFromTheFirstHeightThatHoldsItsText(t *testing.T) { // edges it can move at, and each series has to give both answers. func TestAFilmSaysItCarriesItsLabelOnlyWhenAPictureShowsItWhole(t *testing.T) { const seed, tall = 7, 256 - label := format.Request{Bytes: 1 << 20, Seed: seed}.LabelText("webm") + label := format.Request{Bytes: 1 << 20, Seed: seed}.PictureLabel("webm") across := len(label)*4 + 4 // the width that draws it at scale 1, as in the guard above timeline := func(changes int64) video.Timeline { tl, err := video.NewTimeline("webm", changes*1000, 60_000, 1000, 30) diff --git a/internal/guard/literals_test.go b/internal/guard/literals_test.go new file mode 100644 index 00000000..384ac93f --- /dev/null +++ b/internal/guard/literals_test.go @@ -0,0 +1,326 @@ +package guard + +import ( + "encoding/json" + "fmt" + "io/fs" + "os" + "path/filepath" + "slices" + "strings" + "testing" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/widget" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" + "github.com/donislawdev/TestingFilesGenerator/internal/preset" +) + +// Values to type, marked with backticks in the description of a setting and +// drawn as code (core.Pieces, docs/SIZE-FIXES-2026-11-16.md section 3.9). The +// owner's report of 2026-11-18: in the explanation of the groups of the +// picture sizes preset, nothing told the names to type from the words round +// them. These hold the marks to two promises - a value is the same in every +// language, and every surface that shows one shows it as a value. + +// TestAValueToTypeIsTheSameInEveryLanguage reads every catalogue of the window +// and every word list of the site, and asks each translation of a text to +// carry exactly the values its English carries. +// +// A value is what somebody types, so it is the same in every language - a +// translator who put `all` into their own language would send the reader to +// type a word the program refuses. Both ways: a value the translation lost or +// changed, and a value it marked that the English does not have. +func TestAValueToTypeIsTheSameInEveryLanguage(t *testing.T) { + if got := literalDisagreements(map[string]string{"x": "Leave it at `all`."}, + map[string]string{"x": "Leave it at `every`."}); len(got) == 0 { + t.Fatal("canary: a translation that changed `all` into `every` agreed with the English, so this compares nothing") + } + + root := repoRoot(t) + marked := 0 + for _, dir := range []string{"", "registry", "said", "toolkit"} { + base := filepath.Join(root, "internal", "gui", "text", "locale", dir) + english := catalogueTexts(t, filepath.Join(base, "en.json")) + marked += countMarked(english) + entries, err := os.ReadDir(base) + if err != nil { + t.Fatal(err) + } + for _, e := range entries { + if e.IsDir() || e.Name() == "en.json" || !strings.HasSuffix(e.Name(), ".json") { + continue + } + other := catalogueTexts(t, filepath.Join(base, e.Name())) + for _, wrong := range literalDisagreements(english, other) { + t.Errorf("internal/gui/text/locale/%s %s: %s", dir, e.Name(), wrong) + } + } + } + site := filepath.Join(root, "web", "content") + english := siteTexts(t, filepath.Join(site, "en", "site.json")) + siteMarked := countMarked(english) + languages, err := os.ReadDir(site) + if err != nil { + t.Fatal(err) + } + for _, l := range languages { + if !l.IsDir() || l.Name() == "en" { + continue + } + other := siteTexts(t, filepath.Join(site, l.Name(), "site.json")) + for _, wrong := range literalDisagreements(english, other) { + t.Errorf("web/content/%s/site.json: %s", l.Name(), wrong) + } + } + // Reached, not assumed: catalogues with no marked text at all would leave + // this green while comparing nothing. + if marked < 10 || siteMarked < 2 { + t.Fatalf("the window's English names values to type in %d texts and the site's in %d - fewer than were marked "+ + "on 2026-11-18, so the files read are not the ones that carry them", marked, siteMarked) + } +} + +// literalDisagreements is every text of a translation whose values differ from +// its English, by key. A text the translation has not got is the business of +// the guards of missing translations, not this one. +func literalDisagreements(english, other map[string]string) []string { + var out []string + for key, said := range other { + want, ok := english[key] + if !ok { + continue + } + if a, b := sortedLiterals(want), sortedLiterals(said); !slices.Equal(a, b) { + out = append(out, fmt.Sprintf("%s names %q to type where the English names %q", key, b, a)) + } + } + slices.Sort(out) + return out +} + +func sortedLiterals(s string) []string { + l := core.Literals(s) + slices.Sort(l) + return l +} + +func countMarked(texts map[string]string) int { + n := 0 + for _, s := range texts { + if len(core.Literals(s)) > 0 { + n++ + } + } + return n +} + +// catalogueTexts is every text of one catalogue of the window, by key and form. +func catalogueTexts(t *testing.T, path string) map[string]string { + t.Helper() + var raw map[string]map[string]any + readJSON(t, path, &raw) + out := map[string]string{} + for key, entry := range raw { + for form, v := range entry { + if s, ok := v.(string); ok && form != "hash" && form != "description" { + out[key+"/"+form] = s + } + } + } + return out +} + +// siteTexts is every string of one word list of the site, by its path. +func siteTexts(t *testing.T, path string) map[string]string { + t.Helper() + var raw any + readJSON(t, path, &raw) + out := map[string]string{} + var walk func(at string, v any) + walk = func(at string, v any) { + switch it := v.(type) { + case map[string]any: + for k, x := range it { + walk(at+"/"+k, x) + } + case []any: + for i, x := range it { + walk(fmt.Sprintf("%s/%d", at, i), x) + } + case string: + out[at] = it + } + } + walk("", raw) + return out +} + +func readJSON(t *testing.T, path string, into any) { + t.Helper() + b, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if err := json.Unmarshal(b, into); err != nil { + t.Fatalf("%s: %v", path, err) + } +} + +// TestEveryValueToTypeIsShownAsAValue asks the three surfaces that draw a +// marked description to draw its values as values and its marks nowhere. +// +// The window, through the very explanation the button beside the size box +// opens, and through parts.Explanation for every description a setting +// declares - each value in the type of code in the literal ink, the words +// round it as they are, and no backtick left on the screen. The site, through +// every published preset page: the values in , no backtick. The command +// line prints the marks as they are, which is what the CLI guards already +// read. +func TestEveryValueToTypeIsShownAsAValue(t *testing.T) { + // The canary: plain Prose of a marked text draws no value as code, and + // the check below has to say so. + if problems := drawnAsValues(parts.Prose("Leave it at `all`."), "Leave it at `all`."); len(problems) == 0 { + t.Fatal("canary: a paragraph drawing the backticks as they are passed, so this reads nothing") + } + + descriptions := declaredDescriptions() + if countMarked(descriptions) < 8 { + t.Fatalf("%d declared descriptions name a value to type - fewer than were marked on 2026-11-18", countMarked(descriptions)) + } + for where, said := range descriptions { + for _, p := range drawnAsValues(parts.Explanation(said), said) { + t.Errorf("%s: %s", where, p) + } + } + + // The real button: the explanation of the size box on Single batch. + g := window.NewGenerate(newFakeHost(t)) + button := explanationBeside(t, g.Object(), text.FieldSize()) + button.Tapped(&fyne.PointEvent{}) + if button.Shown() == nil { + t.Fatal("the explanation of the size box did not open") + } + for _, p := range drawnAsValues(button.Shown(), text.DetailSize()) { + t.Errorf("the explanation of the size box: %s", p) + } + button.Tapped(&fyne.PointEvent{}) + + // The site splits the marks itself, since it imports nothing of ours, so + // every published page of a preset whose description names values is held + // to the values core.Literals reads out of the program's own words. + wanted := map[string][]string{} + for _, p := range preset.All() { + for _, param := range p.Parameters { + wanted[p.ID] = append(wanted[p.ID], core.Literals(param.Detail)...) + } + } + published := map[string]int{} + root := filepath.Join(repoRoot(t), "web", "public") + err := filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { + if err != nil || d.IsDir() || filepath.Base(path) != "index.html" { + return err + } + id := filepath.Base(filepath.Dir(path)) + if len(wanted[id]) == 0 { + return nil + } + b, err := os.ReadFile(path) + if err != nil { + return err + } + page, rel := string(b), filepath.ToSlash(strings.TrimPrefix(path, root)) + published[id]++ + if strings.Contains(page, core.Backtick) { + t.Errorf("%s: a backtick is published on the page", rel) + } + for _, v := range wanted[id] { + if !strings.Contains(page, ""+v+"") { + t.Errorf("%s: %q is not published as a value, in ", rel, v) + } + } + return nil + }) + if err != nil { + t.Fatal(err) + } + for id, values := range wanted { + if len(values) > 0 && published[id] == 0 { + t.Errorf("no published page of the %s preset was read, so the site was not asked about %q", id, values) + } + } + if len(published) < 2 { + t.Fatalf("published pages of %d preset(s) naming values were read - two name them since 2026-11-18", len(published)) + } +} + +// drawnAsValues is what is wrong with how o draws said: a backtick on the +// screen, a value not drawn in the type of code in the literal ink, or words +// that are not the description's. +func drawnAsValues(o fyne.CanvasObject, said string) []string { + var values, words []string + var problems []string + walk(o, func(obj fyne.CanvasObject) { + // A description naming no value is drawn as Prose, a label. + if label, ok := obj.(*widget.Label); ok { + if strings.Contains(label.Text, core.Backtick) { + problems = append(problems, fmt.Sprintf("%q draws its backticks", label.Text)) + } + words = append(words, label.Text) + return + } + rich, ok := obj.(*widget.RichText) + if !ok { + return + } + for _, seg := range rich.Segments { + ts, ok := seg.(*widget.TextSegment) + if !ok { + continue + } + if strings.Contains(ts.Text, core.Backtick) { + problems = append(problems, fmt.Sprintf("%q draws its backticks", ts.Text)) + } + words = append(words, ts.Text) + if ts.Style.TextStyle.Monospace && ts.Style.ColorName == parts.ColorNameLiteral { + values = append(values, ts.Text) + } + } + }) + if want := core.Literals(said); !slices.Equal(values, want) { + problems = append(problems, fmt.Sprintf("draws %q as values where the description names %q", values, want)) + } + if plain := strings.ReplaceAll(said, core.Backtick, ""); !strings.Contains(strings.Join(words, ""), plain) { + problems = append(problems, "does not draw the words of the description") + } + return problems +} + +// declaredDescriptions is the description of every setting a format or a +// preset declares, and of every box of the two batch screens, by where it is. +func declaredDescriptions() map[string]string { + out := map[string]string{ + "Size": text.DetailSize(), + "Size range": text.DetailSizeRange(), + "Boundary": text.DetailBoundary(), + "File names": text.DetailNameTemplate(), + "Seed": text.DetailSeed(), + "Smallest why": text.SmallestNeedsTheSides(), + } + for _, d := range format.All() { + for _, p := range d.Properties { + out[d.ID+"."+p.Name] = p.Detail + } + } + for _, p := range preset.All() { + for _, param := range p.Parameters { + out["preset "+p.ID+"."+param.Name] = param.Detail + } + } + return out +} diff --git a/internal/guard/mutation/entries.py b/internal/guard/mutation/entries.py index dfe65695..113c3091 100644 --- a/internal/guard/mutation/entries.py +++ b/internal/guard/mutation/entries.py @@ -1825,8 +1825,8 @@ ( "a menu spells its values out in prose as well as offering them, on a screen that already does not fit", "internal/gui/parts/property.go", - "if p.Kind == format.PropertyChoice {", - "if p.Kind == format.PropertyChoice && false {", + "case p.Kind == format.PropertyChoice:", + "case p.Kind == format.PropertyChoice && false:", "TestTheWindowDrawsAFieldForEveryDeclaredProperty", ), ( @@ -2096,8 +2096,8 @@ ( "a run's messages push the form instead of scrolling inside their own room", "internal/gui/parts/parts.go", - " inside := container.NewVScroll(content)", - " inside := content", + "\tinside := VScroll(content)", + "\tinside := content", "TestTheFormDoesNotMoveWhenARunStarts", ), ( @@ -2251,12 +2251,13 @@ "TestABoxIsWideEnoughForItsOwnPlaceholder", ), ( - # Two screens draw a field from the same declaration through different - # code, and only one of them got the width on the first try. + # The batch screen draws its settings through DeclaredRows, as the + # format's own section does, so the width is decided in one place and + # this is the guard that sees the batch screen lose it. "the batch screen draws a number in one column of the grid, too narrow for the words it shows when left alone", - "internal/gui/window/recipefolds.go", - " parts.ShapedFor(b.declared[i], f.Control))", - " f.Control)", + "internal/gui/parts/property.go", + ", shapedFor(p, f.Control, text.IsTool(owner)))", + ", f.Control)", "TestABoxForANumberIsNotAsWideAsTheFormOnTheBatchScreen", ), ( @@ -2265,8 +2266,8 @@ # at the same size. "a declared setting wears its recipe key as its label again", "internal/gui/parts/property.go", - " field := into.Add(p.Name, text.SettingLabel(p.Name), PropertyDetail(owner, p),", - " field := into.Add(p.Name, p.Name, PropertyDetail(owner, p),", + "\t\trow := into.Add(at, text.SettingLabel(p.Name), PropertyDetail(owner, p),", + "\t\trow := into.Add(at, p.Name, PropertyDetail(owner, p),", "TestNoSettingWearsItsRecipeKeyAsALabel", ), ( @@ -4545,8 +4546,8 @@ "a marked field is found and never told", "internal/gui/parts/fields.go", # Repointed 2026-09-23, when a refusal started offering its own fix. - "\tf.Say(inTheWordsOnScreen(f, err))\n\tif label, apply := fixFor(f, err)", - "\t_ = f\n\tif label, apply := fixFor(f, err)", + "\tf.Say(inTheWordsOnScreen(f, err))\n\tf.area.Offer(", + "\tf.area.Offer(", "TestEveryRegisteredFieldCanBeMarkedAndUnmarked", ), ( @@ -4555,8 +4556,8 @@ # ones a refusal cannot reach. Fourteen of them across thirteen formats. "the settings a format declares are drawn outside the registry", "internal/gui/parts/property.go", - "field := into.Add(p.Name, text.SettingLabel(p.Name), PropertyDetail(owner, p),", - 'field := into.Add("", text.SettingLabel(p.Name), PropertyDetail(owner, p),', + "row := into.Add(at, text.SettingLabel(p.Name), PropertyDetail(owner, p),", + "row := into.Add(\"\", text.SettingLabel(p.Name), PropertyDetail(owner, p),", "TestEveryFormatsOwnSettingsCanBeMarked", ), ( @@ -4965,10 +4966,10 @@ # assigned once and never returns to nil, so the live check died after # the first Generate and a bad value said nothing until a button was # pressed. - "the live check asks the stop handle whether a run is going", + "the live check asks the run's handle, which outlives the run, whether a run is going", "internal/gui/window/runrefuse.go", "\tif r.busy.occupied {\n\t\treturn\n\t}", - "\tif r.stop != nil {\n\t\treturn\n\t}", + "\tif r.work != nil {\n\t\treturn\n\t}", "TestTypingIsStillCheckedAfterARunHasFinished", ), ( @@ -5047,8 +5048,8 @@ # to be written twice. "a declared setting that holds a size stops carrying its count", "internal/gui/parts/property.go", - " if p.Kind == format.PropertySize {\n into.InBytes(p.Name)\n }", - " if false && p.Kind == format.PropertySize {\n into.InBytes(p.Name)\n }", + "\t\tif p.Kind == format.PropertySize {\n\t\t\tinto.InBytes(at)\n\t\t}", + "\t\tif false && p.Kind == format.PropertySize {\n\t\t\tinto.InBytes(at)\n\t\t}", "TestADeclaredSizeSaysWhatItComesToOnEveryScreenThatDrawsOne", ), ( @@ -5548,7 +5549,7 @@ ( "a refusal of the engine stops saying why the rule is there", "internal/engine/filename.go", - "Because: core.Says(\"engine.NameForbiddenWhy\", \"Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system so that a recipe means one thing everywhere\"),", + "Because: core.Says(\"engine.NameForbiddenWhy\", \"Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system, so the same settings give the same files everywhere\"),", "Because: core.Said{},", "TestARefusalFromBelowTheReaderArrivesInItsThreeParts", ), @@ -7422,8 +7423,8 @@ ( "the AVIF ladder claims a picture fits a file far too small to hold it, so the size it promised cannot be met", "internal/format/avif/avif.go", - "\t{640, 480, 18722, 22027}, {320, 240, 7732, 8312}, {256, 256, 5493, 6648}, {160, 120, 3865, 3865},", - "\t{640, 480, 311, 22027}, {320, 240, 7732, 8312}, {256, 256, 5493, 6648}, {160, 120, 3865, 3865},", + "\t{640, 480, 18722, 22308}, {320, 240, 7732, 8596}, {256, 256, 6140, 6943}, {160, 120, 3865, 3940},", + "\t{640, 480, 311, 22308}, {320, 240, 7732, 8596}, {256, 256, 6140, 6943}, {160, 120, 3865, 3940},", "TestAvifDrawsAPictureThatGrowsWithTheFileAndAlwaysFits", ), ( @@ -7520,8 +7521,8 @@ ( "the JPEG XL ladder claims a picture fits a file far too small to hold it, so the size it promised cannot be met", "internal/format/jxl/jxl.go", - " {640, 480, 22762, 23567}, {320, 240, 7949, 8854}, {256, 256, 6485, 7637}, {160, 120, 3542, 3542},", - " {640, 480, 147, 23567}, {320, 240, 7949, 8854}, {256, 256, 6485, 7637}, {160, 120, 3542, 3542},", + "\t{640, 480, 22762, 26371}, {320, 240, 10213, 10213}, {256, 256, 7509, 7637}, {160, 120, 3542, 3891},", + "\t{640, 480, 147, 26371}, {320, 240, 10213, 10213}, {256, 256, 7509, 7637}, {160, 120, 3542, 3891},", "TestJxlDrawsAPictureThatGrowsWithTheFileAndAlwaysFits", ), ( @@ -10653,8 +10654,8 @@ ( "the button under a size refusal says the smallest size and puts nothing in the box", "internal/gui/parts/fixes.go", - "func() { box.SetText(value) }", - "func() { _, _ = box, value }", + "func() { box.SetText(r.Value) }", + "func() { _, _ = box, r }", "TestASizeBelowTheMinimumOffersTheSmallestSize", ), # --- the list of formats grouped by kind, with a filter (2026-09-23, @@ -10705,8 +10706,8 @@ ( "the smallest-size button comes back under a limit, where it leads to the same refusal", "internal/gui/parts/fixes.go", - "parsed != nil || held != below.Requested {", - "parsed != nil || held < 0 {", + "parsed != nil || asked != below.Requested {", + "parsed != nil || asked < 0 {", "TestALimitBelowTheMinimumOffersNoButtonThatLeadsBackToItself", ), ( @@ -12945,15 +12946,15 @@ ( "the machine readable list stops saying which block a setting is in", "internal/cli/formats.go", - "\t\t\tGroup: p.Group,\n", - "\t\t\tGroup: \"\",\n", + "Group: p.Group, OnlyWhen: conditionOf(p.OnlyWhen),", + "Group: \"\", OnlyWhen: conditionOf(p.OnlyWhen),", "TestASettingsBlockIsNamedWhereItStartsOnBothOutputs", ), ( "the window stops drawing the name of a block of settings", "internal/gui/parts/property.go", - "\t\t\tobjects = append(objects, Subheading(text.SettingGroup(owner, p.Group)))\n", - "\t\t\t_ = Subheading\n", + "\t\t\tobjects = append(objects, heading)\n", + "\t\t\t_ = heading\n", "TestEveryScreenStillDrawsItsStoredPicture", ), ( @@ -13279,8 +13280,8 @@ ( "a value declared long gets a box as narrow as a name again", "internal/gui/parts/property.go", - "\t\t\tfield = Wide(field)\n", - "\t\t\t_ = field\n", + "\t\t\trow = Wide(row)\n", + "\t\t\t_ = row\n", "TestALongValueTakesTheRowAndOnTheToolsTabNothingElseButAPathDoes", ), ( @@ -14300,8 +14301,8 @@ ( "any format is taken as a picture in the text", "internal/format/picture/picture.go", - 'return desc, strings.HasPrefix(desc.MediaType, "image/"), nil', - 'return desc, true, nil', + "return desc, desc.IsPicture(), nil", + "return desc, true, nil", "TestAPictureInTheTextHasToBeAPicture", ), ( diff --git a/internal/guard/mutationcoverage_test.go b/internal/guard/mutationcoverage_test.go index ad0efa26..eb80e6cf 100644 --- a/internal/guard/mutationcoverage_test.go +++ b/internal/guard/mutationcoverage_test.go @@ -215,7 +215,85 @@ var provenByProbe = map[string]string{ "by taking damage.Chain.Check out of engine.prepareDamage: red, every value went through.", "TestADamageSettingOutsideItsRangeIsRefusedUnderItsBox": "broken on 2026-11-12 by taking damage.Chain.Check out of engine.prepareDamage: red, the window wrote the file and the box said nothing.", "TestADamagedFileStatesItsSizeOnDiskAndItsDamage": "its own canary - the label it was written against, naming the size before the damage and no damage, rejected by its check - and broken on 2026-11-12 " + - "twice: Request.LabelSized ignoring OnDisk, and leaving the damage out. Red both times.", + "twice: Request.LabelSized ignoring OnDisk, and leaving the damage out. Red both times. A second canary for the label of a drawing, " + + "and broken on 2026-11-16 by leaving the damage out of Request.PictureLabel: red, the SVG did not carry it.", + // The label of a picture without its size (docs/SIZE-FIXES-2026-11-16.md section 3.1). + "TestAPictureIsTheSameWhateverSizeItIsAskedFor": "three canaries of its own - the same picture behind different padding, two pictures a byte apart, " + + "and two drawings whose labels differ - and red on 2026-11-16 in all fifteen of its cases on the code before the change, " + + "where the label drawn into a picture stated the size.", + "TestEveryFixUnderASizeRefusalLeadsToARunThatIsAccepted": "a canary of its own - the button as it was, the first file's minimum, " + + "has to be refused for a batch of three pictures - a reach check that some case is refused and some offers smallest, and " + + "broken by hand on 2026-11-16 three times: the batch walk off (every picture with its size set, pdf and a film red), only " + + "the number left at the first file's (batches of gif, jpg, png and mp4, and pdf, targz and wav red), and smallest never " + + "offered (every picture with its width and height set red).", + "TestSmallestWithTheLabelIsThePictureAlone": "a canary of its own - a hundred bytes over the smallest png has to fail - a " + + "reach check that some format drew its label, and broken by hand on 2026-11-16 by giving the picture label its size " + + "again: red, avif, gif, jpg and jxl among the first lines (O350).", + "TestBothButtonsUnderABatchOfSmallPicturesAreAcceptedInTheWindow": "broken by hand on 2026-11-16 by leaving the number at the " + + "first file's minimum: red, the preview refused 1573 B for three PNGs needing 1574 B. Broken again on 2026-11-17 by " + + "leaving the switch where it was when smallest is typed into the box: red, the switch read One size.", + "TestSmallestIsOfferedForExactlyTheFormatsTheEngineTakesItFor": "a canary of its own - a window offering smallest for every " + + "format has to disagree with the engine - a reach check that the engine both took and refused smallest, and broken by " + + "hand on 2026-11-17 by offering smallest for every format: red on both screens.", + "TestAValueToTypeIsTheSameInEveryLanguage": "a canary of its own - a translation that changed `all` into `wszystko` " + + "has to disagree - a reach check of how many marked texts the catalogues and the site carry, and broken by hand on " + + "2026-11-18 by changing one value in the Polish registry and by making no value ever a value: red both times.", + "TestEveryValueToTypeIsShownAsAValue": "a canary of its own - Prose of a marked text, drawing the backticks, has to be " + + "told apart - a reach check of the declared descriptions that name a value, and broken by hand on 2026-11-18 three " + + "ways: the explanation box drawing Prose, a value without the type of code, the published preset page without " + + ": red each time.", + "TestSmallestCannotBeChosenUntilTheWidthAndHeightAreSet": "a canary of its own - a switch holding Smallest for every picture " + + "has to disagree with the engine, which takes it for svg at its defaults - a reach check that the engine both took and " + + "refused it, and broken by hand on 2026-11-18 six ways: never held, a press choosing a held option, the keys stepping " + + "onto it, no reason under the pointer, the batch screen not following what is typed, the declared sides ignored - red " + + "each time (the press only after each way of reaching it was asked on its own: End stepped back off it).", + "TestAPlaceholderSettingIsOnTheScreenExactlyWhileItApplies": "the bad background is refused while it is shown, so the " + + "preview is known to reach the box, and broken by hand on 2026-11-17 four ways - every row always shown, a hidden value " + + "sent, the menu not wired to show the rows again, the heading never hidden: red each time.", + "TestASettingThatChangesNothingIsRefusedRatherThanIgnored": "a canary of its own - a png that drops background before " + + "planning has to be found silent - the same plan without the setting taken first, and broken by hand on 2026-11-17 by " + + "letting text through on the test pattern: red, png, jpg and svg.", + "TestARegistryRefusesAConditionItCannotKeep": "a canary of its own - a condition on a choice declared before it has to be " + + "taken - beside one declaration for each way a condition cannot be kept.", + "TestEveryNameWrittenByHandBelongsToADeclaredValue": "a canary of its own - a name for a value nothing declares has to be " + + "found - and a floor on how many names there are.", + "TestNoListShowsAValueSpelledAsARecipeKey": "a canary of its own - a list showing record-per-line as it is has to be found " + + "- and each standard token let through has to still be a declared value.", + "TestTheEnglishWindowShowsAListValueByItsName": "broken by hand on 2026-11-17 twice, ChoiceName saying the value and the " + + "folded summary saying the value: red both times. It reads the window, so a stale registry/en.json cannot hide either.", + "TestTheEnglishWindowRewordsOnlyNamesAndLabels": "a canary of its own - a planted sentence has to come out reworded, " + + "names and labels in and no quotes - a floor on the refusals and the names they carry, and broken by hand on " + + "2026-11-17 six ways (names, labels, a sentence inside, quotes, a wrapper at the foot, a join): red every time.", + "TestTheWindowSaysNoWordOfTheRecipe": "a canary of its own - a sentence made of the recipe's words has to be found " + + "to carry each kind, and a layout that dropped a value has to be told from one that keeps them - floors on the " + + "keys, the values and the refusals a window was asked about, and broken by hand on 2026-11-17 seven ways (no " + + "phrases, a sentence inside not laid out, a place of the recipe not reworded, the sentence itself not laid out, " + + "a phrase dropping a value, Polish saying a key, a listed sentence shown): red every time.", + "TestEveryScrollingAreaMovesAsFarAsTheSystemSays": "a canary of its own - the toolkit's bare scroll turned " + + "one notch has to be told apart from the system's distance - every screen asserted to have something below " + + "its fold, and broken by hand on 2026-11-17 three ways (the wheel left at the toolkit's step, a screen on " + + "the toolkit's own area, a whole view at a time ignored): red every time.", + "TestTheWheelStepIsTheToolkitsStep": "a canary of its own - a declared step of 31 has to be read as 31 - and " + + "broken by hand on 2026-11-17 by taking the toolkit's step for 20: red.", + "TestTheWheelLinesAreWhatWindowsIsSetTo": "a canary of its own - reg.exe's line for a setting of 7 has to read " + + "as 7 - and broken by hand on 2026-11-17 by reading the system's answer one too high: red.", + "TestEveryPictureOfTheSizesSetIsTheSizeItIsNamed": "a canary of its own - a picture named for another size has " + + "to be caught and one named for its own size let through - a floor on the pictures read back, and broken by " + + "hand on 2026-11-17 two ways (width and height swapped, a size with two uses made two files): red both times.", + "TestThePictureSizesSetSaysWhatTheFormatCannotDraw": "broken by hand on 2026-11-17 two ways (the placeholder let " + + "through for a format without one, the sizes left out not said): red both times, the first by naming the " + + "wrong setting to change.", + "TestThePresetScreenBuildsThePictureSizesTheCommandLineBuilds": "asserts the count of pictures it compared, and " + + "broken by hand on 2026-11-17 by the preset screen not sending its menu: red, the pictures differ.", + "TestARefusalWithNoBoxNamesItsSettingsByTheirLabels": "broken by hand on 2026-11-17 by giving the foot of the form " + + "no name to put in: red in English (the two keys) and in Polish (the empty place) alike.", + "TestTheWindowSaysASwitchAsOnOrOff": "a canary of its own - the line it was written against, Guides true, has to be " + + "found - a floor on how many switches are asked, and broken by hand on 2026-11-17 three ways (the folded line, " + + "the explanation saying true or false, the explanation naming the wrong start): red every time.", + "TestTheSizeSwitchAndTheSizeBoxNeverSayDifferentThings": "a refusal at the size box asked before the acceptance, so the " + + "preview is known to be able to refuse, and broken by hand on 2026-11-17 four ways - typing smallest leaving the switch, " + + "choosing Smallest writing nothing, leaving Smallest putting nothing back, a switch losing its choice saying nothing: red " + + "each time.", "TestATruncatedTextSaysHowMuchWasCut": "broken on 2026-11-12 twice: Request.LabelSized ignoring OnDisk, and leaving the damage out. Red both times.", "TestALongDamageLabelLeavesEveryFormatWhole": "broken on 2026-11-12 by letting damage.Chain.Label return the whole chain past LabelLimit: red, " + "its own reach check says forty damages no longer fit the limit (docs/REVIEW-234-2026-11-12.md).", diff --git a/internal/guard/notelemetry_test.go b/internal/guard/notelemetry_test.go index 29c5a894..79ad65ad 100644 --- a/internal/guard/notelemetry_test.go +++ b/internal/guard/notelemetry_test.go @@ -204,7 +204,7 @@ var allowedURLs = map[string]string{ var allowedLibraries = map[string]string{ "kernel32.dll": "free disk space, and GetProcAddress for the call below", "uxtheme.dll": "the dark window menu, called by ordinal - see darkmenus_windows.go", - "user32.dll": "the system dialog shown when the toolkit could not open a window - see dialog_windows.go", + "user32.dll": "the system dialog shown when the toolkit could not open a window - see dialog_windows.go - and how far a notch of the mouse wheel scrolls, see wheel_windows.go", } // socketCalls are the low level calls that open or use a socket. syscall itself diff --git a/internal/guard/onlywhen_test.go b/internal/guard/onlywhen_test.go new file mode 100644 index 00000000..825b6ea3 --- /dev/null +++ b/internal/guard/onlywhen_test.go @@ -0,0 +1,272 @@ +package guard + +import ( + "errors" + "fmt" + "maps" + "slices" + "strings" + "testing" + + "fyne.io/fyne/v2" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" + "github.com/donislawdev/TestingFilesGenerator/internal/recipe" +) + +// A setting that changes a file only while another setting has some values +// (format.Condition) - a placeholder's colours, while the content is not the +// test pattern. The owner's decision of 2026-11-17 hides it in the window +// until it applies (docs/SIZE-FIXES-2026-11-16.md section 6.5). These hold the +// three things that decision rests on. The command line, which hides nothing, +// is told no in words rather than ignored. The window shows exactly the rows +// that apply. And a value left in a hidden box never reaches the run. + +// TestASettingThatChangesNothingIsRefusedRatherThanIgnored asks every format +// that declares a condition to plan each such setting while the setting it +// depends on is somewhere the condition does not hold. A recipe can say that, +// and a value read and then ignored is a colour somebody waits for in silence +// (rule 6), so each has to come back refused, about that setting. +func TestASettingThatChangesNothingIsRefusedRatherThanIgnored(t *testing.T) { + asked := 0 + for _, d := range format.All() { + for _, p := range d.Properties { + if p.OnlyWhen.IsZero() { + continue + } + asked++ + if wrong := ignoredWhileItChangesNothing(d, p); wrong != "" { + t.Error(wrong) + } + } + } + // The four settings of a placeholder in each of png, jpg and svg. + if asked < 12 { + t.Fatalf("%d settings declare a condition, where twelve were known on 2026-11-17 - the "+ + "declaration has moved, and this guard asks less than it did", asked) + } + + // The canary: the same question of a png that drops the colour of a + // placeholder before planning has to find the silence. + png, err := format.Get("png") + if err != nil { + t.Fatal(err) + } + for _, p := range png.Properties { + if p.Name == "background" { + png.Generator = dropping{Generator: png.Generator, name: p.Name} + if ignoredWhileItChangesNothing(png, p) == "" { + t.Fatal("canary: a png that ignores background on the test pattern passed, so this " + + "guard cannot tell a refusal from silence") + } + return + } + } + t.Fatal("canary: png declares no background, so the canary never ran") +} + +// ignoredWhileItChangesNothing plans d with p asked for and the setting p +// depends on at a value under which p changes nothing, and says what is wrong +// when that is not refused about p. +func ignoredWhileItChangesNothing(d format.Descriptor, p format.Property) string { + elsewhere := "" + for _, q := range d.Properties { + if q.Name == p.OnlyWhen.Setting { + for _, v := range q.Choices { + if !slices.Contains(p.OnlyWhen.Values, v) { + elsewhere = v + break + } + } + } + } + if elsewhere == "" { + return fmt.Sprintf("%s: %s depends on %s and no value of it leaves the condition unmet", + d.ID, p.Name, p.OnlyWhen.Setting) + } + // The same plan without p is taken first, so the refusal below is about + // p and not about anything else the request asks. + ask := format.Request{Bytes: 64 << 10, Seed: 1, Label: true, + Properties: map[string]string{p.OnlyWhen.Setting: elsewhere}} + if _, err := d.Generator.Plan(ask); err != nil { + return fmt.Sprintf("%s: 64 KiB with %s=%s and nothing else was refused, so nothing here "+ + "asks about %s: %v", d.ID, p.OnlyWhen.Setting, elsewhere, p.Name, err) + } + props := map[string]string{p.OnlyWhen.Setting: elsewhere, p.Name: askingFor(p)} + ask.Properties = props + _, err := d.Generator.Plan(ask) + var refused *format.PropertyValueError + if !errors.As(err, &refused) || refused.Key != p.Name { + return fmt.Sprintf("%s: %s=%s with %s=%s, where it changes nothing, came back %v - "+ + "not a refusal about %s", d.ID, p.Name, props[p.Name], p.OnlyWhen.Setting, elsewhere, err, p.Name) + } + return "" +} + +// askingFor is a value of p that asks for something: the other position of +// a switch, a value of a list other than its default, and for the rest the +// default itself, which a box only holds when somebody wrote it there. +func askingFor(p format.Property) string { + switch p.Kind { + case format.PropertyBool: + if p.Default == "true" { + return "false" + } + return "true" + case format.PropertyChoice: + for _, v := range p.Choices { + if v != p.Default { + return v + } + } + default: + // A number, a size, a duration or a text asks for its default below. + } + if p.Default != "" { + return p.Default + } + return "1" +} + +// dropping is a generator that throws one setting away before planning, which +// is what a format that forgot the refusal would do. +type dropping struct { + format.Generator + name string +} + +func (g dropping) Plan(r format.Request) (format.Plan, error) { + r.Properties = maps.Clone(r.Properties) + delete(r.Properties, g.name) + return g.Generator.Plan(r) +} + +// TestARegistryRefusesAConditionItCannotKeep asks the check every format's +// declaration passes through, with one declaration for each way a condition +// can be one nothing could keep, and one it can. +func TestARegistryRefusesAConditionItCannotKeep(t *testing.T) { + content := format.Property{Name: "content", Kind: format.PropertyChoice, Choices: []string{"placeholder", "test"}} + on := func(setting string, values ...string) format.Property { + return format.Property{Name: "background", Kind: format.PropertyText, + OnlyWhen: format.Condition{Setting: setting, Values: values}} + } + chained := on("content", "placeholder") + chained.Name, chained.Kind, chained.Choices = "guides", format.PropertyChoice, []string{"on", "off"} + cases := []struct { + name string + props []format.Property + }{ + {"declared after", []format.Property{on("content", "placeholder"), content}}, + {"not declared", []format.Property{content, on("contents", "placeholder")}}, + {"not a choice", []format.Property{{Name: "content", Kind: format.PropertyText}, on("content", "placeholder")}}, + {"no values", []format.Property{content, on("content")}}, + {"every value", []format.Property{content, on("content", "placeholder", "test")}}, + {"a value it cannot have", []format.Property{content, on("content", "picture")}}, + {"a chain", []format.Property{content, chained, on("guides", "on")}}, + } + for _, c := range cases { + if format.ConditionProblem(c.props) == "" { + t.Errorf("%s: the declaration was taken, and no window could keep its condition", c.name) + } + } + // The canary: one it can keep is taken, or a check refusing everything + // would pass every case above. + if problem := format.ConditionProblem([]format.Property{content, on("content", "placeholder")}); problem != "" { + t.Errorf("a condition on a choice declared before it was refused: %s", problem) + } +} + +// TestAPlaceholderSettingIsOnTheScreenExactlyWhileItApplies walks both +// screens through the content of a png and asks, after each step, which rows +// are on the screen - read off the declaration, not off a list of names - and +// what the run is told. +// +// One value in the background box all the way through, and a bad one: with +// the content on placeholder the run refuses it, which proves the refusal +// reaches the box, and with the content on the test pattern the same value +// has to reach nothing at all. Back on placeholder the box still holds it. +func TestAPlaceholderSettingIsOnTheScreenExactlyWhileItApplies(t *testing.T) { + png, err := format.Get("png") + if err != nil { + t.Fatal(err) + } + heading := "" + for _, p := range png.Properties { + if p.Group != "" && !p.OnlyWhen.IsZero() { + heading = text.SettingGroup(text.FormatOwner("png"), p.Group) + } + } + if heading == "" { + t.Fatal("png declares no block of settings with a condition, so this guard asks nothing") + } + + single := window.NewGenerate(newFakeHost(t)) + several := window.NewRecipe(newFakeHost(t)) + for _, s := range []struct { + name string + object fyne.CanvasObject + fields *parts.Fields + format string + at func(string) string + settled func() + }{ + {"the single batch screen", single.Object(), single.Fields(), engine.SettingFormat, + func(name string) string { return name }, single.Settled}, + {"the batch screen", several.Object(), several.Fields(), recipe.TargetAddress(1, recipe.KeyFormat), + func(name string) string { return recipe.TargetAddress(1, core.KeyProperties+"."+name) }, several.Settled}, + } { + chooserIn(t, s.fields, s.format).SetSelected("png") + openFold(t, s.object, "", text.SettingsFor("png")) + content := chooserIn(t, s.fields, s.at("content")) + rows := func(step, value string) { + t.Helper() + for _, p := range png.Properties { + want := p.Applies(png.Properties, func(name string) string { + if name == "content" { + return value + } + return "" + }) + if got := s.fields.Lookup(s.at(p.Name)).Object().Visible(); got != want { + t.Errorf("%s, %s: the row of %s is shown=%v, where %v was due", s.name, step, p.Name, got, want) + } + } + shown := slices.Contains(strings.Split(shownText(s.object), "\n"), heading) + if want := value == "placeholder"; shown != want { + t.Errorf("%s, %s: the heading %q is shown=%v, where %v was due", s.name, step, heading, shown, want) + } + } + preview := func() string { + t.Helper() + pressNamed(t, s.object, text.ButtonPreview()) + s.settled() + return anyRefusal(s.object) + } + + rows("the format just chosen", "test") + content.SetSelected("placeholder") + rows("the content on placeholder", "placeholder") + setBox(t, s.fields, s.at("background"), "zzz") + if saidBy(t, s.fields, s.at("background")) == "" && preview() == "" { + t.Fatalf("%s: the background zzz on a placeholder was not refused, so nothing below can "+ + "tell a value sent from a value kept", s.name) + } + content.SetSelected("test") + rows("the content back on the test pattern", "test") + if said := preview(); said != "" { + t.Errorf("%s: with the background box hidden the run was refused, so what it held was "+ + "sent:\n%s", s.name, said) + } + content.SetSelected("placeholder") + rows("the content on placeholder again", "placeholder") + if got := boxText(t, s.fields, s.at("background")); got != "zzz" { + t.Errorf("%s: the background box came back holding %q - what was typed in it went with "+ + "the row", s.name, got) + } + } +} diff --git a/internal/guard/parity_test.go b/internal/guard/parity_test.go index 7a610fac..aee8f07a 100644 --- a/internal/guard/parity_test.go +++ b/internal/guard/parity_test.go @@ -96,6 +96,15 @@ var reachableFromTheWindow = []string{ "preset:filename-handling", "preset:filename-handling.format", + // The preset of picture sizes, 2026-11-17, with every parameter and the + // global flag it gives jpg to. Run from the screen with all three stated + // by TestThePresetScreenBuildsThePictureSizesTheCommandLineBuilds, which + // compares the pictures with the command line's byte for byte. + "preset:picture-sizes", + "preset:picture-sizes.groups", + "preset:picture-sizes.content", + "preset:picture-sizes.format", + // A recipe that builds on a preset, since 2026-09-22: the switch and the // menu on the batch screen are the extends key, and the chosen preset's // parameters under it are the with section, drawn from the declaration diff --git a/internal/guard/picturecontent_test.go b/internal/guard/picturecontent_test.go new file mode 100644 index 00000000..1bee84c3 --- /dev/null +++ b/internal/guard/picturecontent_test.go @@ -0,0 +1,166 @@ +package guard + +import ( + "bytes" + "errors" + "slices" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/format" + _ "github.com/donislawdev/TestingFilesGenerator/internal/format/all" +) + +// What this defends. A picture of a given width and height, seed and settings +// is the same picture whatever size of file it is asked for: only the padding +// around it moves (docs/SIZE-FIXES-2026-11-16.md section 3.1). +// +// Why it matters to somebody using the tool. The smallest file a picture fits +// in is then one number, so the size a refusal names is a size the next run +// takes - the button under a refusal in the window puts exactly that number in +// the field. While the label drawn into the picture stated the byte count, the +// picture changed with the size asked for, a compressed one changed its length +// with it, and asking for the minimum a refusal named was refused again with a +// new one: JPG 640x480 named 41549 B, then 42484 B, measured on 2026-11-16 in +// ten formats of thirty two. +// +// How. Every format that declares both a width and a height draws a picture - +// read from the registry, so a new picture format is checked the day it is +// registered. Each writes a file at two sizes far enough apart that a size in +// the label would differ in its number of digits, and what the two files draw +// has to be equal: the bytes the file map marks as content. A drawing written +// as text, an SVG, has no padding apart from its content - its test drawing +// takes more shapes for a larger file, by design - so there it is the label +// written into the drawing that has to be equal. The plans have to say the +// label is drawn, because a picture with no label proves nothing here. +func TestAPictureIsTheSameWhateverSizeItIsAskedFor(t *testing.T) { + cases := picturesBySize(t) + if len(cases) == 0 { + t.Fatal("no registered format declares a width and a height - this guard would pass without checking anything") + } + askThePictureCanaries(t) + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + floor := minimumAtOneByte(t, c) + small := floor*2 + 1000 + large := small*10 + 7 + a, b := drawnAt(t, c, small), drawnAt(t, c, large) + if !bytes.Equal(a, b) { + t.Errorf("a %d B file and a %d B file draw different pictures (%d and %d B compared) - the picture depends on the size asked for, so a refusal's minimum is not a size the next run takes", + small, large, len(a), len(b)) + } + }) + } +} + +// askThePictureCanaries plants what each half of the comparison has to tell +// apart: the same picture behind different padding, two pictures a byte apart, +// and a drawing written as text whose label differs. +func askThePictureCanaries(t *testing.T) { + t.Helper() + content := []format.Region{{Role: format.RoleStructure, At: 0, Length: 1}, {Role: format.RoleContent, At: 1, Length: 3}, {Role: format.RolePadding, At: 4, Length: 2}} + if !bytes.Equal(drawnPart([]byte("abcdef"), content, "png"), drawnPart([]byte("abcdyy"), content, "png")) { + t.Fatal("canary: the same picture behind different padding was taken for two pictures") + } + if bytes.Equal(drawnPart([]byte("abcdef"), content, "png"), drawnPart([]byte("abXdef"), content, "png")) { + t.Fatal("canary: two pictures a byte apart were taken for the same picture") + } + whole := []format.Region{{Role: format.RoleContent, At: 0, Length: -1}} + if bytes.Equal(drawnPart([]byte("tfg - svg - 1 B - seed 7"), whole, "svg"), drawnPart([]byte("tfg - svg - 10 B - seed 7"), whole, "svg")) { + t.Fatal("canary: two drawings whose labels differ were taken for the same drawing") + } +} + +// drawnPicture is one picture format with the settings it is written with. +type drawnPicture struct { + name string + format format.Descriptor + setting map[string]string +} + +// picturesBySize is every registered format that declares a width and a +// height, at 160x120, and once more drawing a placeholder where the format +// offers one - at 320x240, because a placeholder lays its label out beside its +// own words and needs the room. 160 px is the narrowest width of the ladders +// whose label is drawn. +func picturesBySize(t *testing.T) []drawnPicture { + t.Helper() + var out []drawnPicture + for _, d := range format.All() { + props := map[string]format.Property{} + for _, p := range d.Properties { + props[p.Name] = p + } + _, w := props["width"] + _, h := props["height"] + if !w || !h { + continue + } + out = append(out, drawnPicture{name: d.ID, format: d, setting: map[string]string{"width": "160", "height": "120"}}) + if content, ok := props["content"]; ok && slices.Contains(content.Choices, "placeholder") { + out = append(out, drawnPicture{name: d.ID + "-placeholder", format: d, + setting: map[string]string{"width": "320", "height": "240", "content": "placeholder"}}) + } + } + return out +} + +// minimumAtOneByte is the minimum a request for 1 B is refused with. +func minimumAtOneByte(t *testing.T, c drawnPicture) int64 { + t.Helper() + _, err := c.format.Generator.Plan(format.Request{Bytes: 1, Label: true, Seed: 7, Properties: c.setting}) + var below *format.BelowMinimumError + if !errors.As(err, &below) { + t.Fatalf("asking for 1 B gave %v, where a refusal naming the minimum was due", err) + } + return below.Minimum +} + +// drawnAt writes the file of size bytes and returns what it draws. +func drawnAt(t *testing.T, c drawnPicture, size int64) []byte { + t.Helper() + p, err := c.format.Generator.Plan(format.Request{Bytes: size, Label: true, Seed: 7, Properties: c.setting}) + if err != nil { + t.Fatalf("planning %d B: %v", size, err) + } + if drawn, _ := p.Properties[format.PropertyLabelEmbedded].(bool); !drawn { + t.Fatalf("a %d B file says it carries no label, so comparing it says nothing about the label", size) + } + var buf bytes.Buffer + rec := &format.MapRecorder{W: &buf} + if err := c.format.Generator.Write(t.Context(), rec, p); err != nil { + t.Fatalf("writing %d B: %v", size, err) + } + if int64(buf.Len()) != size { + t.Fatalf("asked for %d B and wrote %d B", size, buf.Len()) + } + part := drawnPart(buf.Bytes(), rec.Map(size, true), c.format.ID) + if len(part) == 0 { + t.Fatalf("a %d B file has neither content marked apart from its padding nor its label written as text, so there is nothing to compare", size) + } + return part +} + +// drawnPart is what a file draws: the bytes its map marks as content where +// the map marks padding apart from them, or else the label written into the +// drawing as text, up to the markup that closes it. +func drawnPart(data []byte, regions []format.Region, id string) []byte { + padded := slices.ContainsFunc(regions, func(r format.Region) bool { return r.Role == format.RolePadding && r.Length > 0 }) + if !padded { + at := bytes.Index(data, []byte("tfg - "+id+" - ")) + if at < 0 { + return nil + } + end := bytes.IndexByte(data[at:], '<') + if end < 0 { + return nil + } + return data[at : at+end] + } + var out []byte + for _, r := range regions { + if r.Role == format.RoleContent && r.Length > 0 && r.At+r.Length <= int64(len(data)) { + out = append(out, data[r.At:r.At+r.Length]...) + } + } + return out +} diff --git a/internal/guard/picturefixes_test.go b/internal/guard/picturefixes_test.go new file mode 100644 index 00000000..08a19b08 --- /dev/null +++ b/internal/guard/picturefixes_test.go @@ -0,0 +1,222 @@ +package guard + +import ( + "fmt" + "slices" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + _ "github.com/donislawdev/TestingFilesGenerator/internal/format/all" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" +) + +// What this defends. Every button under a refusal of a size puts in the box a +// value the next run accepts, for every file of the batch. +// +// Why it matters to somebody using the tool. Reported by the owner from the +// running window on 2026-11-16 (docs/SIZE-FIXES-2026-11-16.md): a JPG with its +// width and height set, asked for 1 B, offered "Use the smallest size", and +// pressing it and generating was refused again. Measured that day in ten +// formats of thirty two. A button that promises the smallest size and leads to +// another refusal is worse than none, and the owner's words were that this must +// not happen again. +// +// How. Every registered format, at its defaults, at 160x120 where it declares a +// width and a height, and drawing a placeholder where it offers one - each as +// one file and as three, because the files of a batch are not alike and the +// first one to refuse is not the one that needs the most. Each is planned at +// 1 B. The values the buttons would put in the box come from parts.Remedies, +// the function the window's buttons are made from, and each value is planned +// again and has to be accepted. A batch of more than one picture with their +// width and height set has to be offered smallest as well (section 3.3), and +// one picture must not be: there the second button makes the very file the +// first one does (owner, 2026-11-18, section 3.9). +func TestEveryFixUnderASizeRefusalLeadsToARunThatIsAccepted(t *testing.T) { + theFirstFilesMinimumIsCaught(t) + cases := fixCases(t) + refused, offeredSmallest := 0, 0 + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + err := planFixCase(t, c, "1") + if err == nil { + // 1 B is a size this format makes, so there is nothing to put + // right. txt is such a format. + return + } + remedies := parts.Remedies(err, "1") + if len(remedies) == 0 { + t.Fatalf("1 B was refused and no button is offered:\n%v", err) + } + refused++ + smallest := slices.ContainsFunc(remedies, func(r parts.Remedy) bool { return r.Value == core.SizeSmallest }) + if smallest { + offeredSmallest++ + } + if c.wantsSmallest && !smallest { + t.Errorf("%d pictures with their width and height set are offered %v, without smallest", c.count, remedies) + } + if !c.wantsSmallest && smallest { + t.Errorf("%d file(s) are offered %v - smallest beside the smallest size, where the two make the same file", c.count, remedies) + } + for _, r := range remedies { + if err := planFixCase(t, c, r.Value); err != nil { + t.Errorf("the button %q puts %q in the box, and the run is refused again:\n%v", r.Label, r.Value, err) + } + } + }) + } + // Asserted rather than assumed: a registry where every format took 1 B, or + // an engine that stopped marking a picture, would leave this green while + // pressing nothing. + if refused == 0 || offeredSmallest == 0 { + t.Fatalf("of %d cases %d were refused at 1 B and %d offered smallest - this guard pressed nothing it exists to press", + len(cases), refused, offeredSmallest) + } +} + +// theFirstFilesMinimumIsCaught plants the button as it was before 2026-11-16 - +// the minimum of the first file of the batch, which is what a target of one +// file names - and asks that the check above refuses it for at least one +// batch of three pictures. Without that, the check could be accepting +// everything. +func theFirstFilesMinimumIsCaught(t *testing.T) { + t.Helper() + for _, c := range fixCases(t) { + if c.count != 3 || !c.wantsSmallest { + continue + } + one := c + one.count = 1 + remedies := parts.Remedies(planFixCase(t, one, "1"), "1") + if len(remedies) == 0 { + continue + } + if planFixCase(t, c, remedies[0].Value) != nil { + return + } + } + t.Fatal("canary: no batch of three pictures refuses the minimum of its first file, so the check above cannot tell the button that was reported from one that works") +} + +// fixCase is one target a size refusal is asked about. +type fixCase struct { + name string + format string + setting map[string]string + count int + // wantsSmallest is more than one picture with their width and height set, + // which section 3.3 promises a second button. + wantsSmallest bool +} + +// fixCases is every format at its defaults, at 160x120 where it declares a +// width and a height, and drawing a placeholder at 320x240 where it offers +// one, each as one file and as three. 160x120 because one format of them, ico, +// stops at 256 pixels. +func fixCases(t *testing.T) []fixCase { + t.Helper() + var out []fixCase + for _, d := range format.All() { + props := map[string]format.Property{} + for _, p := range d.Properties { + props[p.Name] = p + } + _, w := props["width"] + _, h := props["height"] + picture := strings.HasPrefix(d.MediaType, "image/") + // At its defaults a picture still has a width and a height when the + // format declares both - svg does - and smallest takes those. + sized := w && h && props["width"].Default != "" && props["height"].Default != "" + shapes := []fixCase{{name: d.ID, wantsSmallest: picture && sized}} + if w && h { + shapes = append(shapes, fixCase{name: d.ID + "-160x120", setting: map[string]string{"width": "160", "height": "120"}, wantsSmallest: picture}) + } + if content, ok := props["content"]; ok && slices.Contains(content.Choices, "placeholder") { + shapes = append(shapes, fixCase{name: d.ID + "-placeholder", + setting: map[string]string{"width": "320", "height": "240", "content": "placeholder"}, wantsSmallest: picture}) + } + for _, shape := range shapes { + for _, n := range []int{1, 3} { + c := shape + c.name, c.format, c.count = fmt.Sprintf("%s-x%d", shape.name, n), d.ID, n + c.wantsSmallest = shape.wantsSmallest && n > 1 + out = append(out, c) + } + } + } + return out +} + +// planFixCase plans c with the size box holding value, read the way the +// window reads it - smallest by name, anything else as a size - and answers +// the refusal, or nothing when the run is accepted. +func planFixCase(t *testing.T, c fixCase, value string) error { + t.Helper() + target := engine.Target{ID: "fix", Format: c.format, Label: true, Properties: c.setting} + if value == core.SizeSmallest { + target.Smallest, target.Sizes = true, engine.Uniform(c.count, 0) + } else { + bytes, err := core.ParseSize(value) + if err != nil { + t.Fatalf("the button put %q in the box, which is not a size: %v", value, err) + } + target.Sizes = engine.Uniform(c.count, bytes) + } + _, err := engine.Plan([]engine.Target{target}, engine.Options{OutDir: t.TempDir(), Seed: 7, Command: "guard", ManifestName: "manifest.json"}) + return err +} + +// TestBothButtonsUnderABatchOfSmallPicturesAreAcceptedInTheWindow presses both +// buttons on the screen the owner reported from: three PNGs of 320x240 asked +// for 1 B. The function the buttons are made from is asked for every format +// above. This asks that the window shows both, in that order, and that what +// each puts in the box is accepted by the next preview. +func TestBothButtonsUnderABatchOfSmallPicturesAreAcceptedInTheWindow(t *testing.T) { + screen := window.NewGenerate(newFakeHost(t)) + body := screen.Object() + fields := screen.Fields() + chooserIn(t, fields, "format").SetSelected("png") + setBox(t, fields, "width", "320") + setBox(t, fields, "height", "240") + setBox(t, fields, engine.SettingCount, "3") + + refused := func() []string { + t.Helper() + setBox(t, fields, core.SettingSize, "1") + pressNamed(t, body, text.ButtonPreview()) + screen.Settled() + offered := fields.Lookup(core.SettingSize).Offered() + if len(offered) != 2 || offered[1] != text.UseSmallestForEach() { + t.Fatalf("three 320x240 PNGs at 1 B offer %q, where the smallest size and %q were due.\n%s", + offered, text.UseSmallestForEach(), allSaid(fields)) + } + return offered + } + // Refused afresh before each press, so the second button is pressed under + // a refusal of its own rather than after the first one has put it right. + for i := 0; i < 2; i++ { + label := refused()[i] + pressNamed(t, body, label) + put := boxText(t, fields, core.SettingSize) + pressNamed(t, body, text.ButtonPreview()) + screen.Settled() + if said := saidBy(t, fields, core.SettingSize); said != "" { + t.Errorf("the button %q put %q in the size box and the preview refused it: %q", label, put, said) + } + // The switch beside the box follows what the button put in it, so + // the screen does not say one size while the run makes the smallest. + want := text.SizeWayExact() + if put == core.SizeSmallest { + want = text.SizeWaySmallest() + } + if got := sizeWaySwitch(t, body).Selected; got != want { + t.Errorf("the button %q put %q in the size box and the switch beside it reads %q, where %q was due", + label, put, got, want) + } + } +} diff --git a/internal/guard/picturesizes_test.go b/internal/guard/picturesizes_test.go new file mode 100644 index 00000000..ca614d7a --- /dev/null +++ b/internal/guard/picturesizes_test.go @@ -0,0 +1,250 @@ +package guard + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "image" + _ "image/jpeg" + _ "image/png" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/cli" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/preset" +) + +// The promise of the preset of picture sizes is in the name of every file: +// 1920x1080.jpg is a picture 1920 wide and 1080 high. A set whose names and +// pictures disagree would test somebody's system against sizes nobody asked +// for, and every one of its expectations would read as certain. +// +// So the set at its defaults is written and every file is read back by the +// standard library's own decoder - a reader this tool did not write - and its +// size compared with its name. The manifest is asked as well, because an +// expectation is half of what a preset hands over (PR4). +func TestEveryPictureOfTheSizesSetIsTheSizeItIsNamed(t *testing.T) { + // The canary: a picture whose name says another size has to be told + // apart, or the loop below could pass by comparing nothing with nothing. + if misnamed := sizeDisagrees("100x100.jpg", 98, 98); misnamed == "" { + t.Fatal("canary: a picture of 98 x 98 named 100x100 was not caught, so this guard cannot fail") + } + if fine := sizeDisagrees("98x98.jpg", 98, 98); fine != "" { + t.Fatalf("canary: a picture of 98 x 98 named 98x98 was refused: %s", fine) + } + + dir := t.TempDir() + var out, errOut bytes.Buffer + if code := cli.Run(context.Background(), []string{ + "generate", "--preset", "picture-sizes", "--out", dir, + }, &out, &errOut); code != cli.ExitOK { + t.Fatalf("the preset at its defaults was refused: exit %d\n%s", code, errOut.String()) + } + + pictures := 0 + for _, name := range namesIn(t, dir) { + if isRecord(name) { + continue + } + f, err := os.Open(filepath.Join(dir, name)) + if err != nil { + t.Fatalf("opening %s: %v", name, err) + } + cfg, kind, err := image.DecodeConfig(f) + _ = f.Close() + if err != nil { + t.Errorf("%s does not read as a picture: %v", name, err) + continue + } + if kind != "jpeg" { + t.Errorf("%s reads as %s, and the set at its defaults is JPEG", name, kind) + } + if bad := sizeDisagrees(name, cfg.Width, cfg.Height); bad != "" { + t.Error(bad) + } + pictures++ + } + // The set has a size for every screen, avatar and platform it names, so a + // run that wrote a handful would still pass the loop. Twenty-one files at + // the defaults on 2026-11-17 - a floor below that rather than the number, + // so a size added from a platform's page is not a red guard. + const floor = 20 + if pictures < floor { + t.Fatalf("the set at its defaults wrote %d pictures, and it holds at least %d", pictures, floor) + } + + var m struct { + Files []struct { + Path string `json:"path"` + Purpose string `json:"purpose"` + Expected struct { + Outcome string `json:"outcome"` + Reason string `json:"reason"` + } `json:"expected"` + } `json:"files"` + } + if err := json.Unmarshal([]byte(manifestText(t, dir)), &m); err != nil { + t.Fatalf("the manifest does not read: %v", err) + } + if len(m.Files) != pictures { + t.Fatalf("the manifest lists %d files and %d pictures were written", len(m.Files), pictures) + } + for _, f := range m.Files { + if f.Expected.Outcome != "accept" || f.Expected.Reason != "dimensions_limit" { + t.Errorf("%s expects %q with %q, and every picture of a common size expects accept with dimensions_limit", + f.Path, f.Expected.Outcome, f.Expected.Reason) + } + w, h, _ := sizeInName(filepath.Base(f.Path)) + if !strings.Contains(f.Purpose, fmt.Sprintf("%d x %d", w, h)) { + t.Errorf("%s says what it is for without saying its size: %q", f.Path, f.Purpose) + } + } + t.Logf("%d pictures, each the size its name says, read by the standard library", pictures) +} + +// sizeDisagrees is why a picture of w by h does not match its name, or +// nothing when it does. +func sizeDisagrees(name string, w, h int) string { + nw, nh, ok := sizeInName(name) + if !ok { + return fmt.Sprintf("%s does not say its size in its name", name) + } + if nw != w || nh != h { + return fmt.Sprintf("%s is a picture of %d x %d", name, w, h) + } + return "" +} + +// sizeInName reads WIDTHxHEIGHT from the front of a file name. +func sizeInName(name string) (w, h int, ok bool) { + stem := strings.TrimSuffix(name, filepath.Ext(name)) + if _, err := fmt.Sscanf(stem, "%dx%d", &w, &h); err != nil { + return 0, 0, false + } + return w, h, fmt.Sprintf("%dx%d", w, h) == stem +} + +// A size the format cannot draw is left out of the set and said out loud, +// and a set left with nothing is refused - PR7, a set missing what it was +// about still looking like a set. Asked of the format rather than of a list: +// an icon is at most 256 pixels a side, which leaves three avatars. +func TestThePictureSizesSetSaysWhatTheFormatCannotDraw(t *testing.T) { + icons, err := preset.Expand("picture-sizes", preset.Args{"format": "ico"}) + if err != nil { + t.Fatalf("a set of icons was refused, and its smallest avatars fit an icon: %v", err) + } + notes := strings.Join(icons.Notes(), "\n") + if !strings.Contains(notes, "1920x1080") || !strings.Contains(notes, "256") { + t.Errorf("a set of icons left the large sizes out without saying which, or why. It says:\n%s", notes) + } + src := string(icons.Source) + if strings.Contains(src, "1920x1080") { + t.Error("a set of icons holds a size an icon cannot be") + } + if !strings.Contains(src, "98x98") { + t.Errorf("a set of icons lost the avatar an icon can be:\n%s", src) + } + + // Each refusal names the setting to change. An avif placeholder refused + // as "no size fits" would be true and would send somebody to the groups. + for _, refused := range []struct { + args preset.Args + setting string + }{ + {preset.Args{"format": "ico", "groups": "screens"}, "groups"}, + {preset.Args{"format": "pdf"}, "format"}, + {preset.Args{"format": "avif", "content": "placeholder"}, "content"}, + } { + _, err := preset.Expand("picture-sizes", refused.args) + var value *format.PropertyValueError + if !errors.As(err, &value) { + t.Errorf("%v was answered with %v, and a value the set cannot be built from is the caller's to change", refused.args, err) + continue + } + if value.Key != refused.setting { + t.Errorf("%v was refused about %s, and the value to change is %s: %v", refused.args, value.Key, refused.setting, err) + } + } + + // The default content says nothing about content, so a format with no + // placeholder still builds the set. + if _, err := preset.Expand("picture-sizes", preset.Args{"format": "avif", "groups": "avatars"}); err != nil { + t.Errorf("a set of AVIF avatars with the test pattern was refused: %v", err) + } +} + +// One preset, both surfaces, the same bytes - with every parameter stated on +// the screen, because the defaults are the one value a box that drops what was +// typed into it cannot be told apart by. +func TestThePresetScreenBuildsThePictureSizesTheCommandLineBuilds(t *testing.T) { + root := t.TempDir() + fromCLI := filepath.Join(root, "cli") + fromWindow := filepath.Join(root, "window") + + var out, errOut bytes.Buffer + if code := cli.Run(context.Background(), []string{ + "generate", "--preset", "picture-sizes", "--groups", "avatars", "--content", "placeholder", + "--format", "png", "--out", fromCLI, + }, &out, &errOut); code != cli.ExitOK { + t.Fatalf("the command line refused the preset: exit %d\n%s", code, errOut.String()) + } + + host, content := presetScreen(t) + choosePreset(t, content, "picture-sizes") + fill(t, content, text.FieldOutputDir(), fromWindow) + fill(t, content, text.SettingLabel("groups"), "avatars") + choose(t, content, text.SettingLabel("content"), "placeholder") + choose(t, content, text.SettingLabel("format"), "png") + press(t, content, "Generate") + waitForManifest(t, host, fromWindow) + join(host) + + cliNames, windowNames := namesIn(t, fromCLI), namesIn(t, fromWindow) + if strings.Join(cliNames, " ") != strings.Join(windowNames, " ") { + t.Fatalf("the two surfaces produced different files.\n command line: %v\n window: %v", + cliNames, windowNames) + } + // Five avatars on 2026-11-17. Asserted rather than logged, because an + // equality between two empty sets proves nothing. + const wanted = 5 + if len(cliNames) != wanted+2 { + t.Fatalf("the preset produced %d thing(s), %d pictures, a manifest and its instructions were expected: %v", + len(cliNames), wanted, cliNames) + } + compared := 0 + for _, name := range cliNames { + if name == "manifest.json" { + continue + } + a, err := os.ReadFile(filepath.Join(fromCLI, name)) + if err != nil { + t.Fatalf("reading %s from the command line run: %v", name, err) + } + b, err := os.ReadFile(filepath.Join(fromWindow, name)) + if err != nil { + t.Fatalf("reading %s from the window run: %v", name, err) + } + if !bytes.Equal(a, b) { + t.Errorf("%s differs between the surfaces: %d B from the command line, %d B from the window", + name, len(a), len(b)) + } + if !isRecord(name) { + compared++ + } + } + if compared != wanted { + t.Fatalf("%d pictures were compared and %d were expected", compared, wanted) + } + if a, b := presetBlock(manifestText(t, fromCLI)), presetBlock(manifestText(t, fromWindow)); a != b { + t.Errorf("the preset blocks differ.\n command line: %s\n window: %s", a, b) + } + if !strings.Contains(manifestText(t, fromWindow), `"content": "placeholder"`) { + t.Error("the window's manifest does not record the placeholder chosen on the screen") + } +} diff --git a/internal/guard/placeholder_test.go b/internal/guard/placeholder_test.go index 6a6302cb..0f93fd9e 100644 --- a/internal/guard/placeholder_test.go +++ b/internal/guard/placeholder_test.go @@ -153,6 +153,72 @@ func TestSmallestIsTheSmallestFile(t *testing.T) { "find a format that still has one") } +// TestSmallestWithTheLabelIsThePictureAlone asks the same of a picture large +// enough to have its label drawn in it: the smallest file is the picture and +// nothing added to reach a size. +// +// Not true until 2026-11-16 (O350). The label stated the size of the file, so +// the walk to the smallest size stopped at the first size it accepted, with up +// to about 900 B of padding in a PNG of 1200x630, because the numerals of each +// size compressed differently. The label no longer states the size +// (docs/SIZE-FIXES-2026-11-16.md section 3.1), and that is what this holds. +// +// Too large to walk every size below, so the question is the one that answers +// it for a picture that no longer changes with the size: a byte less is +// refused, and the refusal names the smallest file as its minimum. A file that +// still carried padding would have the byte below it planned, which the +// canary plants - a hundred bytes over the smallest has to fail. +func TestSmallestWithTheLabelIsThePictureAlone(t *testing.T) { + props := map[string]string{"width": "160", "height": "120"} + png, err := format.Get("png") + if err != nil { + t.Fatal(err) + } + canary := format.Request{Label: true, Seed: 1, Properties: props} + p, err := png.PlanSmallest(t.Context(), canary) + if err != nil { + t.Fatalf("png: smallest at 160x120 with the label was refused: %v", err) + } + if aByteLessNamesIt(png, canary, p.Bytes+100) { + t.Fatalf("canary - %d B is a hundred over the smallest png and was called the picture alone, so this check cannot fail", p.Bytes+100) + } + drawn := 0 + for _, id := range pictures.Formats() { + d, err := format.Get(id) + if err != nil { + t.Fatal(err) + } + for seed := uint64(0); seed < 3; seed++ { + r := format.Request{Label: true, Seed: seed, Properties: props} + p, err := d.PlanSmallest(t.Context(), r) + if err != nil { + t.Errorf("%s seed %d: smallest at 160x120 with the label was refused: %v", id, seed, err) + continue + } + if embedded, _ := p.Properties[format.PropertyLabelEmbedded].(bool); embedded { + drawn++ + } + if !aByteLessNamesIt(d, r, p.Bytes) { + t.Errorf("%s seed %d: smallest is %d B, and a byte less is planned or refused with another minimum - the file carries more than its picture", id, seed, p.Bytes) + } + } + } + // Asserted rather than assumed: a ladder that stopped drawing the label at + // 160x120 would leave this asking about pictures with none. + if drawn == 0 { + t.Fatal("no picture format drew its label at 160x120, so this guard asked about none") + } +} + +// aByteLessNamesIt says a request of r one byte under size is refused with +// size as its minimum. +func aByteLessNamesIt(d format.Descriptor, r format.Request, size int64) bool { + r.Bytes = size - 1 + _, err := d.Generator.Plan(r) + var below *format.BelowMinimumError + return errors.As(err, &below) && below.Minimum == size +} + // smallestSide is the picture these checks ask about. func smallestSide() map[string]string { return map[string]string{"width": "8", "height": "8"} } diff --git a/internal/guard/placeholderglyphs_test.go b/internal/guard/placeholderglyphs_test.go index 6c443251..db91c673 100644 --- a/internal/guard/placeholderglyphs_test.go +++ b/internal/guard/placeholderglyphs_test.go @@ -224,13 +224,13 @@ func toSegment(px, py, ax, ay, bx, by float64) float64 { } // placeholderGolden is the hash of one placeholder drawn with every part it -// has: Polish and Cyrillic letters, the label line and the -// guides. Taken on Windows amd64 on 2026-11-16, when curves were cut into -// enough lines to keep the promise of a sixteenth of a pixel. CI draws it on -// Linux and on macOS arm64, and the same hash there is what says the +// has: Polish and Cyrillic letters, the label line in the shape a picture +// draws it, and the guides. Taken on Windows amd64 on 2026-11-16, with curves +// cut into enough lines to keep the promise of a sixteenth of a pixel. CI draws +// it on Linux and on macOS arm64, and the same hash there is what says the // arithmetic is the same everywhere (D11, docs/PLACEHOLDER-2026-11-14.md // section 5). -const placeholderGolden = "25156d5898e4e18526a161a503b36b247da7435cc506452d15b95f98d00ed0ee" +const placeholderGolden = "9c6fd0062fec85d3832de4c9f4da60f0e7f4e2741ee6b92027b6b35c6fc52ad8" // TestAPlaceholderIsTheSamePixelsOnEverySystem draws one placeholder and // holds its pixels to a hash. @@ -239,7 +239,7 @@ func TestAPlaceholderIsTheSamePixelsOnEverySystem(t *testing.T) { img := image.NewRGBA(image.Rect(0, 0, 1200, 630)) d := placeholder.Draw(img, placeholder.Look{ Text: text, - Label: "tfg - png - 41891 B - seed 8dc2d18c", + Label: "tfg - png - seed 8dc2d18c", Background: color.RGBA{0xcc, 0xcc, 0xcc, 255}, Foreground: color.RGBA{0x55, 0x55, 0x55, 255}, Guides: true, diff --git a/internal/guard/planreserve_test.go b/internal/guard/planreserve_test.go index db70579d..11da0931 100644 --- a/internal/guard/planreserve_test.go +++ b/internal/guard/planreserve_test.go @@ -18,15 +18,22 @@ import ( // allocated, with a margin the two answers cannot cross: the reserved list is // 440 MB, everything else here a few. Only two guards in this package run in // parallel, so the neighbours do not reach that margin. +// +// A size ABOVE what the format can make, since 2026-11-17. A size below it is +// no longer refused at the first file: the engine asks every file of the +// batch for the size all of them take (internal/engine/batchminimum.go), which +// holds nothing per file and allocates as it plans - a million plans of +// garbage, which this sum cannot tell from a reservation. A BMP over 4 GiB is +// refused by the format at the first file and walks nothing. func TestARunRefusedAtItsFirstFileReservesNothing(t *testing.T) { const n = 1_000_000 - targets := []engine.Target{{ID: "files", Format: "png", Sizes: engine.Uniform(n, 10)}} + targets := []engine.Target{{ID: "files", Format: "bmp", Sizes: engine.Uniform(n, 5<<30)}} var before, after runtime.MemStats runtime.ReadMemStats(&before) _, err := engine.Plan(targets, engine.Options{OutDir: t.TempDir(), ManifestName: "manifest.json"}) runtime.ReadMemStats(&after) - if err == nil || !strings.Contains(err.Error(), "smaller than") { - t.Fatalf("a PNG of 10 B was not refused for its size at the first file, so this is not the case it names: %v", err) + if err == nil || !strings.Contains(err.Error(), "larger than") { + t.Fatalf("a BMP of 5 GiB was not refused for its size at the first file, so this is not the case it names: %v", err) } if took := after.TotalAlloc - before.TotalAlloc; took > 100<<20 { t.Errorf("planning %d files refused at the first one allocated %d MB. "+ diff --git a/internal/guard/prefmemory_test.go b/internal/guard/prefmemory_test.go index 8a20d1b4..b99edff9 100644 --- a/internal/guard/prefmemory_test.go +++ b/internal/guard/prefmemory_test.go @@ -34,9 +34,12 @@ func TestTheMemorySettingIsChosenOnPreferencesAndKept(t *testing.T) { } // And the floor the plan keeps under it, from the constant that sets it - // review on #208: without it a machine of four gigabytes or less reads a - // refusal the run would never give. - if said := textIn(prefs); !strings.Contains(said, "a plan of up to "+text.HumanBytes(core.MaxPlanBytes)+" is never refused") { - t.Errorf("the screen does not say the floor of the plan under Automatic:\n%s", said) + // refusal the run would never give. Asked as the number inside the sentence + // the screen shows rather than as a wording, so rewriting the sentence does + // not take the question away. + scope, floor := text.PreferencesMemoryScope(), text.HumanBytes(core.MaxPlanBytes) + if said := textIn(prefs); !strings.Contains(scope, floor) || !strings.Contains(said, scope) { + t.Errorf("the screen does not say the floor of the list under Automatic, %s:\n%s", floor, said) } // Custom keeps the size as it is typed, and a size that is not one is diff --git a/internal/guard/presetbytes_test.go b/internal/guard/presetbytes_test.go index f94b599a..bfbef4e8 100644 --- a/internal/guard/presetbytes_test.go +++ b/internal/guard/presetbytes_test.go @@ -125,6 +125,13 @@ func TestEjectingAPresetGivesTheBytesItAlwaysGave(t *testing.T) { // since the names about length are made to a length with it. {id: "filename-handling", args: preset.Args{}, bytes: 18983, sum: "f720c4a54c5fc17fea553a084fd13aaff4150c2fce5a4d953b10aee137ebe021"}, {id: "filename-handling", args: preset.Args{"format": "docx"}, bytes: 19077, sum: "94a40d97bf549cbdd3e7ccaafe3372d7962ad542f358d37a2d945445c95d6f43"}, + // The preset of picture sizes, measured 2026-11-17 on its first build: + // the default, a format that leaves most sizes out, every parameter + // stated, and the refusal of a format that is not a picture. + {id: "picture-sizes", args: preset.Args{}, bytes: 9920, sum: "fe6ef552ddc82dc343963743c4f2968ba53ff55ef0114767f35d1395a6d14ff0"}, + {id: "picture-sizes", args: preset.Args{"format": "ico"}, bytes: 1630, sum: "8b7db325966dd636bd2c654c3d4c5e80b46cedeeb234b2fdf6f1147ff837031b"}, + {id: "picture-sizes", args: preset.Args{"groups": "social,avatars", "content": "placeholder", "format": "png"}, bytes: 9896, sum: "fd93c41bc9620a0e7e7bfa840a95d838b30f6badc61ce9976b9b732e86330abd"}, + {id: "picture-sizes", args: preset.Args{"format": "pdf"}, refused: "picture-sizes: format cannot be \"pdf\" - pdf files are not pictures, and every file of this set is one. The picture formats of this build: avif, bmp, gif, ico, jpg, jxl, png, svg, tiff, webp"}, } for _, want := range pinned { diff --git a/internal/guard/recipewords_test.go b/internal/guard/recipewords_test.go new file mode 100644 index 00000000..020cf27b --- /dev/null +++ b/internal/guard/recipewords_test.go @@ -0,0 +1,390 @@ +package guard + +import ( + "regexp" + "sort" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/damage" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/preset" + "github.com/donislawdev/TestingFilesGenerator/internal/recipe" + "github.com/donislawdev/TestingFilesGenerator/internal/tool" +) + +// The window says the engine's sentences without the recipe's words - no +// target, no line of a file, no key written as key: value, no command to run. +// docs/SIZE-FIXES-2026-11-16.md section 6.1, M3b. The English window rewords +// them with the phrases of internal/gui/text/recipewords.go, and a translation +// says them in its own words. + +// TestTheWindowSaysNoWordOfTheRecipe holds every sentence the code says: +// +// - in English, as the window lays it out, it carries the values and the +// slots of the command line's layout in the same order - a phrase that +// dropped or moved one would print another value in its place; +// - in English and in every translation, no sentence a window can show +// carries a word of the recipe. A sentence only a recipe file can bring +// about - the file's version, its sections, its separators, keys no screen +// writes - is listed in notOnAScreen with the reason; +// - every phrase of the table rewords some sentence, and every sentence of +// the list still carries a word of the recipe on the command line - a list +// nothing compares with the code goes stale while staying green. +func TestTheWindowSaysNoWordOfTheRecipe(t *testing.T) { + sentences := engineSentences(t) + words := recipeWordsOf(t) + + // The canary: the check has to find each kind of word in a sentence made + // of them, and the layout check has to see a value dropped. + planted := `target %q: leave the line out, or add size: 2mb or compression=none to the recipe, then run "tfg formats" for a dry run` + if found := words.in(planted, text.English); len(found) < 7 { + t.Fatalf("a sentence made of the recipe's words is found to carry only %v, so the check below would pass a sentence that carries them", found) + } + if keepsTheValues("target %q of %d", "batch %d") { + t.Fatal("a layout that dropped a value is taken for one that keeps them, so a phrase could move a value unseen") + } + // A sentence said on its own - a note of a run, a refusal about a setting - + // rather than inside a refusal of the recipe's, which every refusal below + // is: the window lays its own layout out as well. + own := core.Says("guard.Own", "target %q asks for 0 files", core.A("Target", "a")) + for _, said := range []string{text.Sentence(own), text.Refusal(core.RefuseAbout("count", own), "")} { + if found := words.in(said, text.English); len(found) > 0 { + t.Errorf("a sentence said on its own reads %q in the English window, which carries %v", said, found) + } + } + + used := map[string]bool{} + for _, id := range sortedIDs(sentences) { + c := sentences[id] + for _, layout := range layoutsOf(c) { + window := text.InTheScreensWords(layout) + if !keepsTheValues(layout, window) { + t.Errorf("%s: the window lays %q out as %q, which does not keep its values and slots in order", id, layout, window) + } + for _, p := range text.RecipePhrases() { + if standsWhole(layout, p) { + used[p] = true + } + } + if _, fileOnly := notOnAScreen[id]; fileOnly { + continue + } + if found := words.in(window, text.English); len(found) > 0 { + t.Errorf("%s: the English window says %q, which carries %v", id, window, found) + } + } + } + for _, p := range text.RecipePhrases() { + if !used[p] { + t.Errorf("the phrase %q rewords no sentence the code says, so it is a rule about nothing", p) + } + } + for id, why := range notOnAScreen { + c, known := sentences[id] + switch { + case !known: + t.Errorf("notOnAScreen lists %s (%s), which the code no longer says", id, why) + case len(words.in(c.other, text.English)) == 0: + t.Errorf("notOnAScreen lists %s (%s), which carries no word of the recipe any more", id, why) + } + } + + // Then the window itself, in English: refusals of recipes written the way + // Several batches writes them, and of batches handed over the way Single + // batch hands them, said at the foot of the form and under a box - where + // the place a refusal names is a sentence inside a type of the recipe's. + shown := 0 + for _, err := range refusalsAWindowGets(t) { + for _, label := range []string{"", text.FieldSize()} { + said := text.Refusal(err, label) + if testing.Verbose() && label == "" { + t.Logf("the window says: %s", said) + } + if found := words.in(said, text.English); len(found) > 0 { + t.Errorf("the English window says\n %q\nwhich carries %v", said, found) + } + shown++ + } + } + if shown < 20 { + t.Fatalf("the window was asked %d time(s), so the refusals below were not reached", shown) + } + + translations := catalogueFilesIn(t, saidDir) + if len(translations) < 2 { + t.Fatal("no language but English has the engine's sentences, so no translation is asked") + } + for tag, entries := range translations { + if tag == text.English { + continue + } + for _, id := range sortedIDs(sentences) { + if _, fileOnly := notOnAScreen[id]; fileOnly { + continue + } + for form, said := range entries[id] { + if form == "hash" || form == "description" { + continue + } + if found := words.in(said, tag); len(found) > 0 { + t.Errorf("%s %s (%s) says %q, which carries %v", tag, id, form, said, found) + } + } + } + } +} + +// refusalsAWindowGets is refusals a screen gets back: of documents written the +// way Several batches writes them, read the way it reads them, and of batches +// planned the way Single batch plans them. Each has to be refused. +func refusalsAWindowGets(t *testing.T) []error { + t.Helper() + png := func(id, size string) recipe.TargetDraft { return recipe.TargetDraft{ID: id, Format: "png", Size: size} } + documents := []recipe.Document{ + {Targets: []recipe.TargetDraft{{Format: "png"}}}, + {Targets: []recipe.TargetDraft{png("a", "1kb"), png("a", "1kb")}}, + {Seed: "abc", Targets: []recipe.TargetDraft{{ID: "a", Format: "png", Size: "1kb", Count: "abc"}}}, + {Targets: []recipe.TargetDraft{{ID: "a", Format: "png", Count: "0", Size: "1kb"}}}, + {Targets: []recipe.TargetDraft{{ID: "a", Format: "png", SizeRange: "zz"}}}, + {Targets: []recipe.TargetDraft{{ID: "a", Format: "png", Boundary: "zz"}}}, + {Targets: []recipe.TargetDraft{{ID: "a", Format: "zip", Size: "1kb", Contains: []recipe.ContentDraft{{Count: "x"}, {Format: "txt", Count: "-1"}}}}}, + {Targets: []recipe.TargetDraft{{ID: "a", Format: "png", Size: "1kb", Purpose: "a\x01b"}}}, + } + var out []error + for _, d := range documents { + src, err := recipe.Compose(d) + if err == nil { + _, err = preset.ReadRecipe(src, text.TabRecipe()) + } + if err == nil { + t.Fatalf("%+v was read without a refusal, so the refusal it stands for is not asked", d) + } + out = append(out, spreadAll(t, err)...) + } + for _, targets := range [][]engine.Target{ + {{ID: "files", Format: "png", Sizes: engine.Uniform(0, 1024)}}, + {{Format: "png", Sizes: engine.Uniform(1, 1024)}}, + {{ID: "a", Format: "txt", Sizes: engine.Uniform(1, 10), NameTmpl: "same.txt"}, {ID: "b", Format: "txt", Sizes: engine.Uniform(1, 10), NameTmpl: "same.txt"}}, + {{ID: "a", Format: "txt", Sizes: engine.Uniform(1, 10), Smallest: true}}, + } { + _, err := engine.Plan(targets, engine.Options{OutDir: t.TempDir(), DryRun: true}) + if err == nil { + t.Fatalf("%+v was planned, so the refusal it stands for is not asked", targets) + } + out = append(out, spreadAll(t, err)...) + } + return out +} + +// notOnAScreen is every sentence that carries a word of the recipe and that no +// screen can bring about, with the reason. A screen writes its recipe through +// recipe.Compose, which writes the version, the sections and the separators +// itself and only the keys of recipe.Document, one value to a key - and Single +// batch and Presets write no recipe at all. +var notOnAScreen = map[string]string{ + "placeholder.ColourIsEmpty": commentCutIt, + + "preset.ARecipeCanBuildOnlyOn": presetFromAList, + "preset.RunTfgPresetListForThe": presetFromAList, + "preset.RunTfgFormatsForTheList": "with.format naming a format this build lacks - a screen picks the format from a list", + "preset.RunTfgFormatsToSeeWhat": "a build in which no format carries an encoding or a line ending, which this build is not", + + "recipe.ARecipeCanBuildOnA": presetFromAList, + "recipe.AddExtendsPresetIdAboveIt": presetFromAList, + "recipe.ReadTheFileWithParseOr": presetFromAList, + "recipe.WriteExtendsPresetIdAndRun": presetFromAList, + + "recipe.APresetSTargetsWereSupplied": readerMisused, + "recipe.ARecipeThatBuildsOnA": readerMisused, + "recipe.ReadTheFileWithTfgGenerate": readerMisused, + "recipe.ThisRecipeBuildsOnPresetAnd": readerMisused, + "recipe.ThisRecipeDoesNotBuildOn": readerMisused, + + "recipe.PresetCarries": presetAtFault, + "recipe.ThisIsAMistakeInThe": presetAtFault, + + "recipe.ARecipeIsOneDocumentAnd": theFileItself, + "recipe.RemoveTheSeparatorsOrSplitThe": theFileItself, + "recipe.SettlingItTwiceGivesTwoDifferent": theFileItself, + "recipe.Unreadable": theFileItself, + + "recipe.EveryRecipeDeclaresTheSchemaVersion": theVersion, + "recipe.TheRecipeHasNoVersion": theVersion, + "recipe.UpgradeTheToolOrWriteThe": theVersion, + + "recipe.ARecipeWithoutTargetsHasNothing": "no batch at all - Several batches keeps its last batch unless a preset brings the files", + "recipe.TheRecipeAsksForNoFiles": "no batch at all - Several batches keeps its last batch unless a preset brings the files", + + "recipe.AllowNondeterministicTrueHasNothingTo": "allow_nondeterministic, a key no screen writes", + "recipe.TheToolVersionThisRecipeRequires": "engine, a key no screen writes", + "recipe.UseExpectedAcceptOrABlock": "expected in a shape of its own - a screen writes the outcome from a list", + "recipe.UseFormatPdfOrRunTfg": "a format that is not a name - a screen writes the format from a list", + "recipe.UseSize2mbOrSize2097152": "a size that is not text - a screen writes every box as text", + "recipe.GiveItOneValueForExample": oneValueABox, + "recipe.GiveItOneValueForExample2": oneValueABox, + + "format.RemoveTheLine": "a setting the format does not have - a screen offers only the settings a format declares", + "preset.RemoveTheLine": "with naming a parameter the preset does not take - a screen writes only the preset's own", + "recipe.RemoveTheKeyOrMoveIt": "a key inside contains other than its format, count and size - a screen writes only those three", + "recipe.RemoveTheLineOrPutThe": "expected with keys of its own - a screen writes the outcome and the reason only", + "recipe.RemoveTheLine": "output.split_threshold, a key no screen writes", + "recipe.RemoveTheLineContentIsGenerated": "fill, a key no screen writes", + "recipe.RemoveTheLineItWillBe": "allow_nondeterministic, a key no screen writes", + "recipe.RemoveTheLineTheManifestRecords": "engine, a key no screen writes", + "recipe.RemoveTheSectionTheExpectedField": "policy, a key no screen writes", + "recipe.UseLocaleEnOrLeaveThe": "locale, a key no screen writes", + "recipe.AddAtLeastOneEntryUnder": "no batch at all - Several batches keeps its last batch unless a preset brings the files", + "recipe.APresetContributesTargetsAndNothing": presetAtFault, + "recipe.ATargetThatDamagesNothingProduces": damageInARecipe, + "recipe.NameADamageOrRemoveThe": damageInARecipe, + "recipe.TooDeep": theFileItself, + "damage.UnknownInsteadRemove": "a damage this build does not have - Single batch offers the damages from a list", +} + +// The reasons notOnAScreen gives more than once. +const ( + commentCutIt = "a colour cut off by #, which starts a comment only in a recipe file - a screen hands the colour over whole" + presetFromAList = "extends or with written by hand - a screen writes extends from its list of this build's presets, and with only beside it" + readerMisused = "a recipe handed to the reader that does not expand presets, or presets to one that does not build on them - a fault of the code calling it" + presetAtFault = "a preset whose own recipe carries more than targets, or is refused - a fault of the preset, and every preset of this build is read by the guards" + theFileItself = "the file as a document - a screen writes one document of its own boxes, settled, through recipe.Compose" + theVersion = "the version of the file - a screen writes the version this build reads" + oneValueABox = "a setting written as a list - a screen writes one value to a box" + damageInARecipe = "a damage in a recipe - Several batches offers none, and Single batch writes no recipe" +) + +// layoutsOf is every layout of a sentence: the one form, or both. +func layoutsOf(c saidCall) []string { + if c.plural { + return []string{c.one, c.other} + } + return []string{c.other} +} + +// sortedIDs is every id, in order, so a failure reads the same each time. +func sortedIDs(sentences map[string]saidCall) []string { + out := make([]string, 0, len(sentences)) + for id := range sentences { + out = append(out, id) + } + sort.Strings(out) + return out +} + +// keepsTheValues is whether window takes the values of layout in the same +// order and the same way. It may leave out a slot the setting's name goes in - +// a window says that name in a box's label - and may not add one, which would +// stand in the sentence unfilled wherever no name is given. +func keepsTheValues(layout, window string) bool { + return strings.Join(core.DirectivesOf(layout), " ") == strings.Join(core.DirectivesOf(window), " ") && + strings.Count(window, core.SettingSlot) <= strings.Count(layout, core.SettingSlot) && + strings.Count(window, core.ArticleSlot) <= strings.Count(layout, core.ArticleSlot) +} + +// recipeWords is what a sentence may not carry in a window, by language. +type recipeWords struct { + // keyed is a key followed by ": " or "=", and what stands after it. + keyed *regexp.Regexp + // values is every value a key can be written with, so "a size: write one" + // is prose and "size: 2mb" is the recipe. + values map[string]bool + words map[string][]*regexp.Regexp +} + +// in is every word of the recipe a layout or a translation carries, in a +// language. The fields of a translation are names of values, not words, and +// are left out. +func (w recipeWords) in(said, lang string) []string { + said = fieldFound.ReplaceAllString(said, " ") + var out []string + for _, m := range w.keyed.FindAllStringSubmatch(said, -1) { + if w.isAValue(m[1], strings.TrimRight(m[2], `.,"`)) { + out = append(out, m[0]) + } + } + for _, rx := range append(w.words["*"], w.words[lang]...) { + out = append(out, rx.FindAllString(said, -1)...) + } + return out +} + +// isAValue is whether what stands after a key is a value written for it: a +// number or a size, a value some list declares, a preset named by its id, or +// any word given as an id. +func (w recipeWords) isAValue(key, v string) bool { + return v != "" && (v[0] >= '0' && v[0] <= '9' || w.values[v] || strings.HasPrefix(v, "preset:") || key == "id") +} + +// recipeWordsOf is the words, with the keys and their values read out of the +// registries: every key a recipe accepts and every setting a format, a damage, +// a preset or a tool declares. +func recipeWordsOf(t *testing.T) recipeWords { + t.Helper() + keys, values := map[string]bool{}, map[string]bool{"true": true, "false": true} + for _, k := range recipe.Keys() { + keys[k[strings.LastIndex(k, ".")+1:]] = true + } + add := func(props []format.Property) { + for _, p := range props { + keys[p.Name] = true + for _, c := range p.Choices { + values[c] = true + } + } + } + for _, d := range format.All() { + values[d.ID] = true + add(d.Properties) + } + for _, d := range damage.All() { + values[d.ID] = true + add(d.Parameters) + } + for _, p := range preset.All() { + add(p.Parameters) + } + for _, d := range tool.All() { + add(d.Settings) + } + for _, v := range append(recipe.Outcomes(), recipe.Reasons()...) { + values[v] = true + } + if len(keys) < 100 || len(values) < 100 { + t.Fatalf("%d key(s) and %d value(s) read out of the registries, so the check for key: value would find almost nothing", len(keys), len(values)) + } + quoted := make([]string, 0, len(keys)) + for k := range keys { + quoted = append(quoted, regexp.QuoteMeta(k)) + } + sort.Slice(quoted, func(i, j int) bool { return len(quoted[i]) > len(quoted[j]) }) + return recipeWords{ + keyed: regexp.MustCompile(`\b(` + strings.Join(quoted, "|") + `)(?:: |=)(\S+)`), + values: values, + words: map[string][]*regexp.Regexp{ + "*": {regexp.MustCompile(`\btfg\b`)}, + text.English: { + regexp.MustCompile(`(?i)\btargets?\b`), + regexp.MustCompile(`(?i)\brecipes?\b`), + regexp.MustCompile(`(?i)\bthe line\b|\b(remove|leave) the \w+ line\b`), + regexp.MustCompile(`(?i)\bdry[ -]run\b`), + }, + // Go's \b is a boundary of ASCII words, and these end in a letter + // outside it. + "pl": { + regexp.MustCompile(`(?i)\bprzepis\p{L}*`), + regexp.MustCompile(`(?i)\b(usuń|pomiń) (ten |tę )?(wiersz|linię)`), + regexp.MustCompile(`(?i)\bprzebieg\p{L}* próbn`), + }, + }, + } +} + +// standsWhole is whether phrase stands in layout with no letter or digit right +// before or right after it - the way the window replaces one. +func standsWhole(layout, phrase string) bool { + return regexp.MustCompile(`(?:^|[^A-Za-z0-9])` + regexp.QuoteMeta(phrase) + `(?:$|[^A-Za-z0-9])`).MatchString(layout) +} diff --git a/internal/guard/registrywords_test.go b/internal/guard/registrywords_test.go index 508400b6..a9571f5d 100644 --- a/internal/guard/registrywords_test.go +++ b/internal/guard/registrywords_test.go @@ -222,7 +222,9 @@ func TestOneEnglishSentenceIsOneSentenceInEveryLanguage(t *testing.T) { // puts the same sentence together out of its catalogue - and a second way of // saying one thing is the start of two surfaces describing one setting // differently (D1). In English the two have to agree to the letter, for every -// setting, every limit on two settings, and the sizes of a run. +// setting, every limit on two settings, and the sizes of a run. A limit on two +// settings is the one difference allowed, and only in how the two are called: +// the window's note stands under their boxes and calls them by their labels. func TestTheWindowDescribesASettingAsTheCommandLineDoes(t *testing.T) { if got := text.AllowedWholeNumber(); got != "whole number" { t.Fatalf("this process speaks another language (%q), so nothing here is English to compare", got) @@ -239,8 +241,14 @@ func TestTheWindowDescribesASettingAsTheCommandLineDoes(t *testing.T) { for _, d := range format.All() { each(text.FormatOwner(d.ID), d.Properties) for _, j := range d.JointLimits { - if got, want := parts.JointLimit(text.FormatOwner(d.ID), j), j.Describe(); got != want { - t.Errorf("%s: the window says %q and tfg formats says %q", d.ID, got, want) + labelled := j + labelled.Of, labelled.By = text.SettingLabel(j.Of), text.SettingLabel(j.By) + if labelled.Of == j.Of || labelled.By == j.By { + t.Fatalf("%s: %s and %s are labelled as they are keyed, so nothing here tells a label "+ + "from a key", d.ID, j.Of, j.By) + } + if got, want := parts.JointLimit(text.FormatOwner(d.ID), j), labelled.Describe(); got != want { + t.Errorf("%s: the window says %q and tfg formats, with labels for keys, says %q", d.ID, got, want) } } } diff --git a/internal/guard/sizechoice_test.go b/internal/guard/sizechoice_test.go index 1e4a4359..9b2dd477 100644 --- a/internal/guard/sizechoice_test.go +++ b/internal/guard/sizechoice_test.go @@ -76,7 +76,11 @@ func chooseSizeWayIn(t *testing.T, o fyne.CanvasObject, position int, way string } // TestEveryWayOfStatingASizeIsOfferedAndOnlyOneIsOnTheScreen is the first half: -// all three are reachable, and never two at once. +// all of them are reachable, and never two boxes at once. +// +// Four ways and three boxes since 2026-11-17: smallest fills the box of one +// size with its word, so choosing it leaves that box on the screen. The screen +// opens on a picture, which is the format smallest is offered for. // // Reachable matters as much as exclusive. A switch that offered one way and hid // the other two behind nothing would make the invalid state unreachable by @@ -87,6 +91,7 @@ func TestEveryWayOfStatingASizeIsOfferedAndOnlyOneIsOnTheScreen(t *testing.T) { text.SizeWayExact(): text.FieldSize(), text.SizeWayRange(): text.FieldSizeRange(), text.SizeWayBoundary(): text.FieldBoundary(), + text.SizeWaySmallest(): text.FieldSize(), } content, _ := laidOutWindow(t) @@ -112,7 +117,7 @@ func TestEveryWayOfStatingASizeIsOfferedAndOnlyOneIsOnTheScreen(t *testing.T) { t.Errorf("the switch is on %q and the screen has no box called %q", way, box) } for other, hidden := range ways { - if other == way { + if other == way || hidden == box { continue } if shown[hidden] { diff --git a/internal/guard/smallestheld_test.go b/internal/guard/smallestheld_test.go new file mode 100644 index 00000000..874a9241 --- /dev/null +++ b/internal/guard/smallestheld_test.go @@ -0,0 +1,166 @@ +package guard + +import ( + "slices" + "testing" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/driver/desktop" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" +) + +// Smallest held back until the picture has a width and a height, on both +// screens (docs/SIZE-FIXES-2026-11-16.md section 3.9). Reported by the owner +// from the window on 2026-11-18: Smallest could be chosen with neither set, +// and the run then refused it - and nothing on the screen said that smallest +// needs them. The owner chose to keep it on the switch, greyed, with the +// reason under the pointer, rather than to hide it. + +// TestSmallestCannotBeChosenUntilTheWidthAndHeightAreSet asks two things on +// both screens. +// +// First, for every picture format at its defaults, whether Smallest is held - +// against the engine asked by a PLAN at those defaults, not by the function +// the window calls, so a window holding it back where a run would take it (svg +// declares its width and height) or letting it go where a run refuses turns +// this red. +// +// Then, on a png, everything a person can do to it: press it, reach it with +// the keys, hover it for the reason, set one side and then the other, and +// empty a side again with Smallest chosen - which keeps it chosen, because a +// switch that moved itself would change what the run makes without a word. +func TestSmallestCannotBeChosenUntilTheWidthAndHeightAreSet(t *testing.T) { + refused := map[string]bool{} + for _, d := range format.All() { + if engine.TakesSmallest(d) { + refused[d.ID] = !engineTakesSmallestAtDefaults(t, d) + } + } + // Both answers have to occur: svg declares its sides and png does not. + if !slices.Contains(mapValues(refused), true) || !slices.Contains(mapValues(refused), false) { + t.Fatalf("the engine refused smallest at the defaults for %v - one of the two answers never came", refused) + } + for _, s := range sizeScreens(t) { + held := map[string]bool{} + for id := range refused { + chooserIn(t, s.fields, s.format).SetSelected(id) + held[id] = s.way(t).Held.Has(text.SizeWaySmallest()) + } + for _, wrong := range heldDisagreements(held, refused) { + t.Errorf("%s: %s", s.name, wrong) + } + pressingSmallest(t, s) + } + + // The canary: a switch holding Smallest for every picture has to be told + // apart from the engine, which takes it for svg at its defaults. + always := map[string]bool{} + for id := range refused { + always[id] = true + } + if len(heldDisagreements(always, refused)) == 0 { + t.Error("a switch holding Smallest for every picture agreed with the engine, so this compares nothing") + } +} + +// pressingSmallest drives one screen on a png through every way a person +// reaches Smallest, before and after the width and height are set. +func pressingSmallest(t *testing.T, s sizeScreen) { + t.Helper() + chooserIn(t, s.fields, s.format).SetSelected("png") + setBox(t, s.fields, s.width, "") + setBox(t, s.fields, s.height, "") + way := s.way(t) + way.SetSelected(text.SizeWayExact()) + smallest := text.SizeWaySmallest() + if !way.Held.Has(smallest) { + t.Fatalf("%s: a png with no width and no height offers Smallest to be chosen", s.name) + } + + // Each asked on its own: End steps back off a held last option, so a + // press that chose it would be undone by the key after it and read as + // held. + reaches := []struct { + how string + move func() + }{ + {"a press", func() { way.Tapped(&fyne.PointEvent{Position: parts.SegmentMiddle(way, smallest)}) }}, + {"End", func() { way.TypedKey(&fyne.KeyEvent{Name: fyne.KeyEnd}) }}, + {"the right arrow", func() { + for range way.Options { + way.TypedKey(&fyne.KeyEvent{Name: fyne.KeyRight}) + } + }}, + } + for _, r := range reaches { + way.SetSelected(text.SizeWayExact()) + r.move() + if way.Selected == smallest || boxText(t, s.fields, s.size) == core.SizeSmallest { + t.Errorf("%s: Smallest held back was chosen by %s - the switch says %q, the box %q", + s.name, r.how, way.Selected, boxText(t, s.fields, s.size)) + } + } + + way.MouseMoved(&desktop.MouseEvent{PointEvent: fyne.PointEvent{Position: parts.SegmentMiddle(way, smallest)}}) + if way.Held.Telling() == nil { + t.Errorf("%s: the pointer over Smallest held back opens no reason", s.name) + } + way.MouseOut() + if way.Held.Telling() != nil { + t.Errorf("%s: the reason stays open after the pointer left", s.name) + } + + setBox(t, s.fields, s.width, "160") + if !way.Held.Has(smallest) { + t.Errorf("%s: Smallest let go with a width and no height, which the run refuses", s.name) + } + setBox(t, s.fields, s.height, "120") + if way.Held.Has(smallest) { + t.Fatalf("%s: Smallest still held with a width and a height set", s.name) + } + way.Tapped(&fyne.PointEvent{Position: parts.SegmentMiddle(way, smallest)}) + if way.Selected != smallest || boxText(t, s.fields, s.size) != core.SizeSmallest { + t.Errorf("%s: a press on Smallest with the sides set left the switch on %q and the box holding %q", + s.name, way.Selected, boxText(t, s.fields, s.size)) + } + + setBox(t, s.fields, s.width, "") + if !way.Held.Has(smallest) { + t.Errorf("%s: Smallest not held again once the width was emptied", s.name) + } + if way.Selected != smallest || boxText(t, s.fields, s.size) != core.SizeSmallest { + t.Errorf("%s: emptying the width moved the switch to %q and the box to %q - what the run makes changed without a word", + s.name, way.Selected, boxText(t, s.fields, s.size)) + } +} + +// engineTakesSmallestAtDefaults plans one file of d at its smallest with +// nothing set - the form as a screen opens on it. +func engineTakesSmallestAtDefaults(t *testing.T, d format.Descriptor) bool { + t.Helper() + target := engine.Target{ID: "smallest", Format: d.ID, Smallest: true, Sizes: engine.Uniform(1, 0), Properties: map[string]string{}} + _, err := engine.Plan([]engine.Target{target}, + engine.Options{OutDir: t.TempDir(), Seed: 7, Command: "guard", ManifestName: "manifest.json"}) + return err == nil +} + +// heldDisagreements is every picture format where a switch holding Smallest +// back and the engine refusing it differ. +func heldDisagreements(held, refused map[string]bool) []string { + var out []string + for id, no := range refused { + switch { + case held[id] && !no: + out = append(out, id+" holds Smallest back and the engine takes smallest for it at its defaults") + case !held[id] && no: + out = append(out, id+" lets Smallest be chosen and the engine refuses smallest for it at its defaults") + } + } + slices.Sort(out) + return out +} diff --git a/internal/guard/smallestway_test.go b/internal/guard/smallestway_test.go new file mode 100644 index 00000000..1ea27510 --- /dev/null +++ b/internal/guard/smallestway_test.go @@ -0,0 +1,250 @@ +package guard + +import ( + "slices" + "testing" + + "fyne.io/fyne/v2" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" + "github.com/donislawdev/TestingFilesGenerator/internal/recipe" +) + +// Smallest as a way of giving the size, on both screens since 2026-11-17 +// (docs/SIZE-FIXES-2026-11-16.md section 3.5). The owner could not find it: it +// was a word to type into the size box, named only behind the button beside +// it. These ask two things of the switch that offers it now - that it offers +// it where a run would take it and nowhere else, and that it never says one +// thing while the box beside it sends another. + +// TestSmallestIsOfferedForExactlyTheFormatsTheEngineTakesItFor chooses every +// format on both screens and asks the switch whether it offers Smallest, and +// asks the engine, by planning, whether it takes smallest for that format. +// +// The engine is asked by a plan and not by the function the window calls, so +// a format the window offers it for and the engine then refuses - a picture +// that needs something else first, say - turns this red rather than passing +// because both sides read one rule. +func TestSmallestIsOfferedForExactlyTheFormatsTheEngineTakesItFor(t *testing.T) { + takes := map[string]bool{} + for _, d := range format.All() { + takes[d.ID] = engineTakesSmallest(t, d) + } + // Both answers have to occur, or the comparison below holds nothing to + // tell apart. + if !slices.Contains(mapValues(takes), true) || !slices.Contains(mapValues(takes), false) { + t.Fatalf("the engine took smallest for %v - one of the two answers never came, so nothing here is compared", takes) + } + + single := window.NewGenerate(newFakeHost(t)) + several := window.NewRecipe(newFakeHost(t)) + offered := map[string]map[string]bool{"the single batch screen": {}, "the batch screen": {}} + for _, d := range format.All() { + chooserIn(t, single.Fields(), engine.SettingFormat).SetSelected(d.ID) + offered["the single batch screen"][d.ID] = offersSmallest(single.Object()) + chooserIn(t, several.Fields(), recipe.TargetAddress(1, recipe.KeyFormat)).SetSelected(d.ID) + offered["the batch screen"][d.ID] = offersSmallest(several.Object()) + } + for screen, there := range offered { + for _, wrong := range smallestDisagreements(there, takes) { + t.Errorf("%s: %s", screen, wrong) + } + } + + // The canary: a window offering smallest for every format has to be told + // apart from the engine. + everywhere := map[string]bool{} + for id := range takes { + everywhere[id] = true + } + if len(smallestDisagreements(everywhere, takes)) == 0 { + t.Error("a window offering smallest for every format agreed with the engine, so this compares nothing") + } +} + +// engineTakesSmallest plans one file of d at its smallest, with a width and a +// height where d declares them - 160x120, because ico stops at 256 pixels. +func engineTakesSmallest(t *testing.T, d format.Descriptor) bool { + t.Helper() + props := map[string]string{} + for _, p := range d.Properties { + if p.Name == "width" { + props["width"] = "160" + } + if p.Name == "height" { + props["height"] = "120" + } + } + target := engine.Target{ID: "smallest", Format: d.ID, Smallest: true, Sizes: engine.Uniform(1, 0), Properties: props} + _, err := engine.Plan([]engine.Target{target}, + engine.Options{OutDir: t.TempDir(), Seed: 7, Command: "guard", ManifestName: "manifest.json"}) + return err == nil +} + +// smallestDisagreements is every format where a screen offering smallest and +// the engine taking it differ. +func smallestDisagreements(offered, takes map[string]bool) []string { + var out []string + for id, taken := range takes { + switch { + case offered[id] && !taken: + out = append(out, id+" offers Smallest and the engine refuses smallest for it") + case !offered[id] && taken: + out = append(out, id+" does not offer Smallest and the engine takes smallest for it") + } + } + slices.Sort(out) + return out +} + +func mapValues(m map[string]bool) []bool { + out := make([]bool, 0, len(m)) + for _, v := range m { + out = append(out, v) + } + return out +} + +// offersSmallest says a switch a person can see offers Smallest. +func offersSmallest(o fyne.CanvasObject) bool { + for _, s := range shownSwitches(o) { + if slices.Contains(s.Options, text.SizeWaySmallest()) { + return true + } + } + return false +} + +// shownSwitches is every switch on the screen that nothing hides - built like +// shownText, with the same walk twice: everything, then everything under +// something hidden. +func shownSwitches(o fyne.CanvasObject) []*parts.Segments { + var hidden []fyne.CanvasObject + walk(o, func(obj fyne.CanvasObject) { + if obj != nil && !obj.Visible() { + hidden = append(hidden, obj) + } + }) + under := map[fyne.CanvasObject]bool{} + for _, root := range hidden { + walk(root, func(obj fyne.CanvasObject) { under[obj] = true }) + } + var out []*parts.Segments + walk(o, func(obj fyne.CanvasObject) { + if s, ok := obj.(*parts.Segments); ok && !under[s] { + out = append(out, s) + } + }) + return out +} + +// sizeScreen is one of the two screens as the steps below drive it: the +// addresses of its format and size, and its one switch. +type sizeScreen struct { + name string + object fyne.CanvasObject + fields *parts.Fields + format string + size string + width string + height string + settle func() +} + +func (s sizeScreen) way(t *testing.T) *parts.Segments { + t.Helper() + all := sizeWaySwitches(s.object) + if len(all) != 1 { + t.Fatalf("%s: %d switches for the way of giving the size, where one was due", s.name, len(all)) + } + return all[0] +} + +func sizeScreens(t *testing.T) []sizeScreen { + t.Helper() + single := window.NewGenerate(newFakeHost(t)) + several := window.NewRecipe(newFakeHost(t)) + return []sizeScreen{ + {name: "the single batch screen", object: single.Object(), fields: single.Fields(), + format: engine.SettingFormat, size: core.SettingSize, width: "width", height: "height", settle: single.Settled}, + {name: "the batch screen", object: several.Object(), fields: several.Fields(), + format: recipe.TargetAddress(1, recipe.KeyFormat), size: recipe.TargetAddress(1, recipe.KeySize), + width: recipe.TargetAddress(1, core.KeyProperties+".width"), + height: recipe.TargetAddress(1, core.KeyProperties+".height"), settle: several.Settled}, + } +} + +// TestTheSizeSwitchAndTheSizeBoxNeverSayDifferentThings walks every way the two +// can move on both screens and asks both after each step. +// +// The box is what the run reads, so a switch on Smallest over a box holding a +// number - or the other way round - is a screen telling somebody one thing and +// sending another. Each step is one way a person moves one of them: the switch, +// the box typed into, the format changed under them, and the run accepting +// what Smallest sent. The button under a refusal is the fourth way, and +// TestBothButtonsUnderABatchOfSmallPicturesAreAcceptedInTheWindow presses it. +func TestTheSizeSwitchAndTheSizeBoxNeverSayDifferentThings(t *testing.T) { + for _, s := range sizeScreens(t) { + chooserIn(t, s.fields, s.format).SetSelected("png") + setBox(t, s.fields, s.size, "4kb") + way := s.way(t) + + agree := func(step, wantWay, wantBox string) { + t.Helper() + if got := way.Selected; got != wantWay { + t.Errorf("%s, %s: the switch is on %q, where %q was due", s.name, step, got, wantWay) + } + if got := boxText(t, s.fields, s.size); got != wantBox { + t.Errorf("%s, %s: the size box holds %q, where %q was due", s.name, step, got, wantBox) + } + } + + way.SetSelected(text.SizeWaySmallest()) + agree("Smallest chosen", text.SizeWaySmallest(), core.SizeSmallest) + way.SetSelected(text.SizeWayExact()) + agree("One size chosen again", text.SizeWayExact(), "4kb") + setBox(t, s.fields, s.size, core.SizeSmallest) + agree("smallest typed", text.SizeWaySmallest(), core.SizeSmallest) + setBox(t, s.fields, s.size, "8kb") + agree("a size typed over it", text.SizeWayExact(), "8kb") + + // A format that is not a picture cannot be the smallest of anything: + // the switch loses Smallest and the box takes back its size, rather + // than keeping a word the run refuses for it. + way.SetSelected(text.SizeWaySmallest()) + chooserIn(t, s.fields, s.format).SetSelected("csv") + if offersSmallest(s.object) { + t.Errorf("%s: csv is chosen and Smallest is still offered", s.name) + } + agree("csv chosen under Smallest", text.SizeWayExact(), "8kb") + + // Without a width and a height the run refuses smallest, and the + // refusal lands on the size box - which Smallest leaves on the screen + // so that there is a box for it to land on. Asked first, so the + // acceptance below is known to come from a preview that can refuse. + chooserIn(t, s.fields, s.format).SetSelected("png") + way.SetSelected(text.SizeWaySmallest()) + pressNamed(t, s.object, text.ButtonPreview()) + s.settle() + if saidBy(t, s.fields, s.size) == "" { + t.Errorf("%s: a png at Smallest with no width or height was not refused at the size box.\n%s", + s.name, allSaid(s.fields)) + } + + // And the run takes what Smallest sends, for a picture with its width + // and height set. + setBox(t, s.fields, s.width, "160") + setBox(t, s.fields, s.height, "120") + way.SetSelected(text.SizeWaySmallest()) + pressNamed(t, s.object, text.ButtonPreview()) + s.settle() + if refusal := anyRefusal(s.object); refusal != "" { + t.Errorf("%s: a png of 160x120 at Smallest was refused: %s\n%s", s.name, refusal, allSaid(s.fields)) + } + } +} diff --git a/internal/guard/spacingscale_test.go b/internal/guard/spacingscale_test.go index 013f397c..47e18b52 100644 --- a/internal/guard/spacingscale_test.go +++ b/internal/guard/spacingscale_test.go @@ -196,9 +196,12 @@ func TestTheGapBetweenSectionsIsWiderThanTheGapBetweenFields(t *testing.T) { } // The pair is found down a column rather than named, so it follows the // layout (a review of #195): the first field with another under it in - // its own column, the way the guard above walks the form. - names := []string{text.FieldFormat(), text.FieldSize(), text.FieldCount(), text.FieldTargetID(), - text.FieldNameTemplate(), text.FieldOutputDir(), text.FieldSeed()} + // its own column, the way the guard above walks the form. The damage is + // one of them since the way of giving the size took a place in the first + // row (2026-11-17) and moved it under the format - left out, the format's + // next field down its column was the output directory, a section away. + names := []string{text.FieldFormat(), text.FieldSize(), text.FieldCount(), text.FieldDamage(), + text.FieldTargetID(), text.FieldNameTemplate(), text.FieldOutputDir(), text.FieldSeed()} var boxes []band for _, label := range names { _, box := nameAndBox(t, generate, label) @@ -461,6 +464,8 @@ func atAbsolute(root fyne.CanvasObject, visit func(fyne.CanvasObject, fyne.Posit } case *container.Scroll: step(v.Content, at) + case *parts.Scroll: + step(v.Content, at) case *widget.Card: step(v.Content, at) case *container.ThemeOverride: diff --git a/internal/guard/switchwords_test.go b/internal/guard/switchwords_test.go new file mode 100644 index 00000000..6aaa55da --- /dev/null +++ b/internal/guard/switchwords_test.go @@ -0,0 +1,125 @@ +package guard + +import ( + "regexp" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" +) + +// A switch is said as on or off wherever the window puts one into words - +// docs/SIZE-FIXES-2026-11-16.md section 6.3. A recipe writes true and false, +// and the folded settings of a placeholder png said "Guides true" over a +// switch that shows neither word, with "true or false, default false" behind +// its button. + +// recipeBool is true or false standing as a word of its own, the way a recipe +// writes a switch. Asked only of lines made of labels and values, which have +// no other reason to carry either word. +var recipeBool = regexp.MustCompile(`\b(true|false)\b`) + +// TestTheWindowSaysASwitchAsOnOrOff asks every switch anything declares, in the +// two places the window says one in words: the explanation behind its button, +// which says what it starts on, and the line its folded section shows once it +// has been pressed. Then the one screen the defect was seen on, read off the +// screen, so a window that stopped asking parts.SettingsSaid is caught too. +func TestTheWindowSaysASwitchAsOnOrOff(t *testing.T) { + if got := text.AllowedWholeNumber(); got != "whole number" { + t.Fatalf("this process speaks another language (%q), so nothing here is English to ask", got) + } + on, off := text.SwitchState(true), text.SwitchState(false) + if on == off || recipeBool.MatchString(on+" "+off) { + t.Fatalf("a switch is said as %q and %q, so there is no on and off to look for", on, off) + } + // The canary: the check has to see the line this guard was written against, + // and has to let the line it asks for through. + if !recipeBool.MatchString(text.FoldedSummary("Content placeholder", "Guides true")) { + t.Fatal("the check does not see \"Guides true\", so a green below would mean nothing") + } + if recipeBool.MatchString(text.SettingSaid("Guides", on)) { + t.Fatalf("the check refuses %q, the line it asks for", text.SettingSaid("Guides", on)) + } + + asked := 0 + for _, d := range declarations() { + fields := make([]parts.PropertyField, 0, len(d.props)) + for _, p := range d.props { + fields = append(fields, parts.FromProperty(p)) + } + for i, p := range d.props { + if p.Kind != format.PropertyBool { + continue + } + where := string(d.owner) + " " + p.Name + detail := parts.PropertyDetail(d.owner, p) + if strings.Contains(detail, text.AllowedTrueOrFalse()) { + t.Errorf("%s: the explanation of a switch says %q:\n%s", where, text.AllowedTrueOrFalse(), detail) + } + if starts := text.AllowedDefault(text.SwitchState(p.Default == "true")); p.Default != "" && !strings.Contains(detail, starts) { + t.Errorf("%s: the explanation does not say %q:\n%s", where, starts, detail) + } + + toggle, isSwitch := fields[i].Control.(*parts.Toggle) + if !isSwitch { + t.Errorf("%s: declared true or false and drawn as %T rather than a switch", where, fields[i].Control) + continue + } + meetCondition(t, where, fields, p.OnlyWhen) + toggle.SetChecked(!toggle.Checked) + said := parts.SettingsSaid(fields) + want := text.SettingSaid(text.SettingLabel(p.Name), text.SwitchState(toggle.Checked)) + if !strings.Contains(said, want) || recipeBool.MatchString(said) { + t.Errorf("%s: pressed, the folded section says %q, where it should say %q", where, said, want) + } + toggle.SetChecked(!toggle.Checked) + asked++ + } + } + if asked < 15 { + t.Fatalf("asked about %d switch(es), so the registries were not read", asked) + } + + png, err := format.Get("png") + if err != nil { + t.Fatal(err) + } + screen := window.NewGenerate(newFakeHost(t)) + chooserIn(t, screen.Fields(), engine.SettingFormat).SetSelected(png.ID) + settings := text.SettingsFor(png.ID) + openFold(t, screen.Object(), "", settings) + chooserIn(t, screen.Fields(), "content").SetSelected("placeholder") + guides := toggleIn(t, screen.Fields(), "guides") + guides.SetChecked(true) + foldTitled(t, screen.Object(), "", settings).Tapped(nil) + said := shownText(screen.Object()) + want := text.SettingSaid(text.SettingLabel("guides"), on) + if !strings.Contains(said, want) { + t.Errorf("the folded settings of a placeholder png with its guides on do not say %q:\n%s", want, said) + } +} + +// meetCondition sets the setting a switch depends on to the first value under +// which it applies, so the folded line has a reason to name it. +func meetCondition(t *testing.T, where string, fields []parts.PropertyField, c format.Condition) { + t.Helper() + if c.IsZero() { + return + } + for _, f := range fields { + if f.Name != c.Setting { + continue + } + menu, isMenu := f.Control.(*parts.Chooser) + if !isMenu || len(c.Values) == 0 { + t.Fatalf("%s applies only when %s, which this guard cannot set", where, c.Describe()) + } + menu.SetSelected(c.Values[0]) + return + } + t.Fatalf("%s applies only when %s, and nothing beside it declares %s", where, c.Describe(), c.Setting) +} diff --git a/internal/guard/testdata/generator-golden.json b/internal/guard/testdata/generator-golden.json index 3696d7d8..1ca95456 100644 --- a/internal/guard/testdata/generator-golden.json +++ b/internal/guard/testdata/generator-golden.json @@ -20,8 +20,8 @@ }, "bmp_100kib_sized_to_fit": { "bytes": 102400, - "sha256": "07fb4045fd8ec4225f2ada3b93a5c93e7122612db35334cdf5f446dde0775310", - "measured_on": "2026-08-19" + "sha256": "6cd9648eafaa1a8fbef301236899845a3bc3455cfa2c35d8b1978b87c4c80199", + "measured_on": "2026-11-16" }, "bmp_64kib": { "bytes": 65536, @@ -67,7 +67,8 @@ }, "html_32kib_pictures": { "bytes": 32768, - "sha256": "e96131166dc62c8f00bfef915533400d88dfb4891795b4e2673048bd4aae6a50" + "sha256": "113d93b987b8681d1acc5c0b7d069a3a28350ac29ac86d4a4bc5c97c3e20231f", + "measured_on": "2026-11-16" }, "html_64kib_everything": { "bytes": 65536, @@ -105,11 +106,13 @@ }, "html_odd_fragment_inline_international_pictures": { "bytes": 8193, - "sha256": "b142e1fcd7c31e9f66150a274962462ee0782817ffacec47a7dd345bf54f4b54" + "sha256": "0b8772e75ba72200b3ff986b28612d358750e3395430715f8509395a340c5bb9", + "measured_on": "2026-11-16" }, "html_odd_fragment_pictures_svg": { "bytes": 16385, - "sha256": "c654ffeef0bd8f07115f647620c47ca12849d7a26614bf389682fe1e7e3ad5fd" + "sha256": "474aefdf7488df23e23f6198bd407e52eb70515b64c221d5617ce85c3211fdae", + "measured_on": "2026-11-16" }, "html_odd_minified_nested_embedded_international": { "bytes": 8193, @@ -219,7 +222,8 @@ }, "svg_8kib": { "bytes": 8192, - "sha256": "1cfeca2a6632e55c7575115b14e75aa7fff2ad42543f76d46e2199842910e84a" + "sha256": "9f5fc7d95a11d0575ffc9a2ec886b542e01ee1be57d249e8274dcfb829329214", + "measured_on": "2026-11-16" }, "targz_16kib": { "bytes": 16384, @@ -238,8 +242,8 @@ }, "tiff_100kib_sized_to_fit": { "bytes": 102400, - "sha256": "172e2e47dda124de9cdbc122b55d25c2fc20de4c78ab963bbf6c7645da247bbd", - "measured_on": "2026-08-29" + "sha256": "7b79e14e51b6ce587ef91ae7d9f3c7acf174685e9a31bd4d5fac44f74414e7e2", + "measured_on": "2026-11-16" }, "tiff_64kib": { "bytes": 65536, @@ -248,8 +252,8 @@ }, "tiff_64kib_width_only": { "bytes": 65536, - "sha256": "c5c38af41809c7e98333fc2a6bdcca36a955f70ab4413dbfde9b9ec4dd3d0b8f", - "measured_on": "2026-08-29" + "sha256": "7e18f6a4d4696c798d07527d22c06eca147dd99a3e879e859f794119097b45eb", + "measured_on": "2026-11-16" }, "tiff_odd_size": { "bytes": 65537, @@ -393,8 +397,8 @@ }, "webm_64kib": { "bytes": 65536, - "sha256": "9c1ee9c40292c2df4148fb580f8d9cc0c2430b760d390e6d011639542c43820d", - "measured_on": "2026-10-06" + "sha256": "42bd2c0eb75fafdc75c4e59b8efdf5df328e9ee97fe0440b3c0f4bc068e9cb7d", + "measured_on": "2026-11-16" }, "webm_named": { "bytes": 65536, @@ -408,18 +412,18 @@ }, "webm_tiles": { "bytes": 65536, - "sha256": "8ff27de05a089745a6510703c5c593651fc604cf0e3bd30c336adfad484f79b3", - "measured_on": "2026-10-07" + "sha256": "740d67ffd8f17a9be8b3f95c1754467372bfb8bac92751c52d7a3e530698afc7", + "measured_on": "2026-11-16" }, "webm_wide": { "bytes": 524288, - "sha256": "a7b10a755815dfc0082c70318ca72fc890b6b04c3212e67bfab1d691cc36f932", - "measured_on": "2026-11-11" + "sha256": "59b2e9424c2f00c3c2e54a64ac519ad9da5e50758af00fb27f31a5171d80af75", + "measured_on": "2026-11-16" }, "mp4_64kib": { "bytes": 65536, - "sha256": "5b20b432d9e2287ef0f861331d0ddecea22d8e519351794d95d24abbca13ba65", - "measured_on": "2026-10-07" + "sha256": "941e2ee10bd041f35868c5aec5f6fd2675c284897f4c8e1113ce20474306517c", + "measured_on": "2026-11-16" }, "mp4_named": { "bytes": 65536, @@ -433,13 +437,13 @@ }, "mp4_tiles": { "bytes": 65536, - "sha256": "4ca1c1c7d2d018d527da7d6d067573b65d15629dce931b20e1d95402b868a587", - "measured_on": "2026-10-07" + "sha256": "38e1cf1d4e59e048e923b92860afa3331f71cc025f654ad04098d0d2410edda1", + "measured_on": "2026-11-16" }, "mp4_wide": { "bytes": 524288, - "sha256": "f2a09c9a2dacccdb778a8e828b3afa2fdf0b98e4d91f79f41b6488c4a67112bb", - "measured_on": "2026-11-11" + "sha256": "cbe5615e1d335ff71bfacd12d4572b22b079c163db9f5911d13d773ecae8e13f", + "measured_on": "2026-11-16" }, "geojson_8kib": { "bytes": 8192, @@ -518,8 +522,8 @@ }, "eml_64kib_attached_content_type": { "bytes": 65536, - "sha256": "425f762165582768bafa0c687a33f030cc8fc88d3ecd1631716819ebce65c546", - "measured_on": "2026-10-07" + "sha256": "69a7420aa9c329e65a3f118ffc0afbb1d74fdc57f4c0bcea0ea7da2360447111", + "measured_on": "2026-11-16" }, "eml_odd_base64_long_id": { "bytes": 8193, @@ -543,8 +547,8 @@ }, "eml_64kib_pictures_alternative_no_names": { "bytes": 65536, - "sha256": "8b1ad7a9369f7973ae74397eac8a738a6eb470d3ea0b9d30c0a21ae981a7eb78", - "measured_on": "2026-10-13" + "sha256": "ac83a9d64b4bcbc3a1d528e3ffe491226120af105441d07a186001a45b299968", + "measured_on": "2026-11-16" }, "eml_64kib_pictures_beside_plain_lf": { "bytes": 65536, @@ -613,8 +617,8 @@ }, "rtf_16kib_pictures": { "bytes": 16384, - "sha256": "4bc01c58e221c868c20060390f853574b268d34de43509e38a3fd0e616e0bc6d", - "measured_on": "2026-10-15" + "sha256": "0e9e1a51db433e42749bf58f91d9f7771c407ee4edbec84b45ed2c4b36b047ca", + "measured_on": "2026-11-16" }, "rtf_16kib_binary_jpg": { "bytes": 16384, @@ -628,63 +632,63 @@ }, "rtf_64kib_all": { "bytes": 65536, - "sha256": "872b64b301062ec7a49840ecac682f8e5e5c99ba40328bb24a2c0a792b6ca6b1", - "measured_on": "2026-10-15" + "sha256": "ba2cc5ed9b893cf28182b47f29702d318a9eb7af2382cba30a2b8005ef8578cb", + "measured_on": "2026-11-16" }, "avif_label_cut": { "bytes": 16384, - "sha256": "e29cfa93d85aa78adb86b9aa903de4a4f8d6a7704237d50dc12027baf935cbbb", - "measured_on": "2026-10-27" + "sha256": "393f3a08eb44c4c498b880cc94a6eaf76b64fbc69a43158333c79b5405a67da3", + "measured_on": "2026-11-16" }, "bmp_label_cut": { "bytes": 16384, - "sha256": "337c75928b1d9d0afc9ef6d9b5e6c9e4c6f672310f721f4101650d3fd5ce1986", - "measured_on": "2026-10-27" + "sha256": "ed7ca1b829ee0960d80b52c045ac23bd1e5c9d2801e025b2eeed6c0d17c46e8c", + "measured_on": "2026-11-16" }, "gif_label_cut": { "bytes": 16384, - "sha256": "2182f97d89f17befc2978e0c48f02b3b7f69e6ffa1e37c98c7ba7bd02fbfebbb", - "measured_on": "2026-10-27" + "sha256": "1feb6368d5519ff53255545c38ce60c7b3441af03aaa8b876aaca4378669391e", + "measured_on": "2026-11-16" }, "ico_label_cut": { "bytes": 16384, - "sha256": "ee7c50502fadbbac2ce84161775196c69395ee077da2754b832994b772484fab", - "measured_on": "2026-10-27" + "sha256": "65581e6287468b04af31c362c2f1f527340e6bcce7cb6c59966e154a0438d6a9", + "measured_on": "2026-11-16" }, "jpg_label_cut": { "bytes": 16384, - "sha256": "c5c26da34982e5b8a84b62b7367121f796519fac2b3d4aee97df65d77f18a3c1", - "measured_on": "2026-10-27" + "sha256": "35f59cc1f74b70933d5503878e5d4dd93d80e9d6615c12188c1d2cb19175e628", + "measured_on": "2026-11-16" }, "jxl_label_cut": { "bytes": 16384, - "sha256": "04c4b0ffa9b8f631f800f60f0436ae8b2a206266ded04bccab340b6cba75e3dc", - "measured_on": "2026-11-13" + "sha256": "dbb5a216ccfc4b9c5fd24d5180480d47b625b908e2cd9a9e0a465b6235a98db4", + "measured_on": "2026-11-16" }, "mp4_label_cut": { "bytes": 65536, - "sha256": "cacdde2fa7c816644ba26b9421d403a234995c5374530c7e8e8babde7d2770b7", - "measured_on": "2026-10-27" + "sha256": "60737bfbd398e6de3ddaaac849601aa68926597cde828bd450388877a73db305", + "measured_on": "2026-11-16" }, "png_label_cut": { "bytes": 16384, - "sha256": "9efacf3eebe006977a09aa6c0a4c9dcc163fd2dd976c67a9329a1f992521a667", - "measured_on": "2026-10-27" + "sha256": "27f1754a75d916048f081bdc28796ea771c65491935a556bcd332d02cc934400", + "measured_on": "2026-11-16" }, "tiff_label_cut": { "bytes": 16384, - "sha256": "f1087d636104449e15e8f3acace2e8f4bdeb64f78f6906d5b2bc9be340380e69", - "measured_on": "2026-10-27" + "sha256": "88ad645b72de822885c8356903a033ee1ee95fd649d65473547cf72cb59f38fe", + "measured_on": "2026-11-16" }, "webm_label_cut": { "bytes": 65536, - "sha256": "b21ac8d701f5b37bac3cb4f9aa75bc970bed1fe3ae970c69372b854f87fb6c8d", - "measured_on": "2026-10-27" + "sha256": "2cff393a968bf3a5b8215cb5a959c41d8cfb039c82d3b82cdf4f9304d1511860", + "measured_on": "2026-11-16" }, "webp_label_cut": { "bytes": 16384, - "sha256": "aafebff3937203366d88a1af0a14d555176e683ded8cffa67ac05bddafc13733", - "measured_on": "2026-10-27" + "sha256": "ee9954c5c7a526ca1469b4fb53b83c2bf081230183f8b7b63c1d6bb70eb3a0b5", + "measured_on": "2026-11-16" }, "otlp_8kib": { "bytes": 8192, @@ -778,17 +782,17 @@ }, "jpg_placeholder_32kib": { "bytes": 32768, - "sha256": "ff0f9e88ef8cf0e0d4a9aef6e2e90124c584ee366618bac90f2c6bc03d4a4aef", + "sha256": "ab0f443498ce2344b1b1ea11bcbc08ddc5377724485a2e1042852411d01a33d1", "measured_on": "2026-11-16" }, "png_placeholder_64kib": { "bytes": 65536, - "sha256": "3256a7d27759a071d614f3e494a946be4800c85158c212108932273e76b43113", + "sha256": "86e03c19cbe8e64695b4cbe4fdd5482cce3222edc2f51672c847b911ce1d2996", "measured_on": "2026-11-16" }, "png_placeholder_smallest": { - "bytes": 4743, - "sha256": "2c84f3ae0dcae732f5c3373e6e3fac755aff7116b72eafa4ea7b137c49e3f4b4", + "bytes": 4472, + "sha256": "e5211dce218593571954dd21a63c4b289988de35fba6ab02823b158c7a11abe4", "measured_on": "2026-11-16" }, "png_smallest_test_pattern": { @@ -798,13 +802,13 @@ }, "svg_placeholder_32kib": { "bytes": 32768, - "sha256": "2c4754d41d35f22183ae2c438be58af9d3a9da5757b84273b153819f586b4102", - "measured_on": "2026-11-14" + "sha256": "6b4db2cdaca8bdbf45b61243277bad176f806b9ea92a05604d5e82f43508c12f", + "measured_on": "2026-11-16" }, "svg_placeholder_smallest": { - "bytes": 4372, - "sha256": "c5d6bc718ee3c39f5119c4bef8843dd83e3eeb7e6332aac0bcd39bab668eea06", - "measured_on": "2026-11-14" + "bytes": 4363, + "sha256": "dbbb44ad3feae17ed93de8beb9a41dcd0e555d74d0cb57f9bba4e8a5b171db25", + "measured_on": "2026-11-16" } }, "remeasured": [ diff --git a/internal/guard/testdata/screens/about.png b/internal/guard/testdata/screens/about.png index cf56c21c..aa67c41e 100644 Binary files a/internal/guard/testdata/screens/about.png and b/internal/guard/testdata/screens/about.png differ diff --git a/internal/guard/testdata/screens/about.xml b/internal/guard/testdata/screens/about.xml index bca49c33..d7bf5c39 100644 --- a/internal/guard/testdata/screens/about.xml +++ b/internal/guard/testdata/screens/about.xml @@ -39,9 +39,9 @@ - - - + + + @@ -60,34 +60,35 @@ - - - - + + + + How to use it - - + + • - Choose a preset, or fill in one batch on the first screen. + Choose a preset on Presets, or describe the files yourself on Single batch or Several batches. - + • - - - - Press Generate. The files and a manifest land in the output folder. + + + + Press Preview to see what would be written, then Generate. The files and a manifest go into the folder named in + Output directory. - + • @@ -104,7 +105,7 @@ - + @@ -134,7 +135,7 @@ - + @@ -165,7 +166,7 @@ - + @@ -197,7 +198,7 @@ - + @@ -923,7 +924,7 @@ - + @@ -1143,7 +1144,7 @@ - + @@ -1187,8 +1188,8 @@ - - + + diff --git a/internal/guard/testdata/screens/catalogue.png b/internal/guard/testdata/screens/catalogue.png index f434d31c..bbe8f934 100644 Binary files a/internal/guard/testdata/screens/catalogue.png and b/internal/guard/testdata/screens/catalogue.png differ diff --git a/internal/guard/testdata/screens/catalogue.xml b/internal/guard/testdata/screens/catalogue.xml index dccf9243..61ba5e06 100644 --- a/internal/guard/testdata/screens/catalogue.xml +++ b/internal/guard/testdata/screens/catalogue.xml @@ -1,7 +1,7 @@ - + - - + + @@ -1018,12 +1018,12 @@ - - - - + + + + Segments - + @@ -1154,11 +1154,86 @@ + + + + + four ways, the last chosen + + + + + + + + + + + + + Exact + Range + Boundary + Smallest + + + + + + + + + the last one held + + + + + + + + + + + + + Exact + Range + Boundary + Smallest + + + + + + + + + the last one held and chosen + + + + + + + + + + + + + Exact + Range + Boundary + Smallest + + + + - + @@ -1180,7 +1255,7 @@ - + @@ -1218,7 +1293,7 @@ - + @@ -1255,7 +1330,7 @@ - + @@ -1337,7 +1412,7 @@ - + @@ -1423,7 +1498,7 @@ - + @@ -1461,7 +1536,7 @@ - + @@ -1496,7 +1571,7 @@ - + @@ -1768,7 +1843,7 @@ - + @@ -1961,7 +2036,7 @@ - + @@ -1992,7 +2067,7 @@ - + @@ -2186,7 +2261,7 @@ - + @@ -2628,12 +2703,12 @@ - - - - + + + + PropertyField - + @@ -2918,8 +2993,8 @@ - Expected - + Expected checksum + @@ -2950,16 +3025,138 @@ + + + + + a block shown while the choice above it has one value + + + + + + + + + Content + + + + + + + + + + + + + placeholder + + + + + + + + + + + + + + Placeholder + + + + + + + Background + + + + + + + + + + + + + + + default: cccccc + + + + + + + + + + + + + + + + + + + + + + the same block gone while the choice has another + + + + + + + + + Content + + + + + + + + + + + + + test pattern + + + + + + + + + + + + + + + - - - - + + + + ByteCount - + @@ -3080,11 +3277,50 @@ + + + + + smallest, with no number until the run plans it + + + + + + + Size + + + + + + + + + + smallest + + + + + + + + + + + Known after Preview, from the width and height in the format's settings. + + + + + + - + @@ -3198,12 +3434,12 @@ - - - - + + + + ErrorArea - + @@ -3267,19 +3503,56 @@ - - - - Use the smallest size, 311 B + + + + + Use the smallest size, 311 B + + + + + + + + + + offering two ways out + + + + + + PNG cannot be smaller than 1596 B - each of the 3 files is different, so each has a smallest size of its own. Requested: + 1 B. Ask for 1596 B, the smallest size all 3 files can have. + + + + + + + + + Use the smallest size, 1 596 B + + + + + + + Make each picture as small as it can be + + + - + @@ -3339,7 +3612,7 @@ - + @@ -3388,7 +3661,7 @@ - + @@ -3809,12 +4082,12 @@ - - - - + + + + Title - + @@ -3842,7 +4115,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -3866,7 +4139,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -3914,7 +4187,30 @@ - + + + + + an explanation naming values to type + + + + + + Which sizes the set holds: + screens + for the sizes of screens, + avatars + for profile pictures and + social + for covers, + banners, posts and thumbnails. Leave it at + all + for every one of them. + + + + @@ -3930,7 +4226,7 @@ - + @@ -3971,7 +4267,7 @@ - + @@ -4003,7 +4299,7 @@ - + @@ -4019,7 +4315,7 @@ - + @@ -4105,7 +4401,7 @@ - + @@ -4149,7 +4445,7 @@ - + @@ -4660,7 +4956,7 @@ - + @@ -4730,12 +5026,12 @@ - - - - + + + + Palette, as this window draws it - + @@ -4966,14 +5262,33 @@ - + + + + + + + held - a choice on a switch that cannot be made yet, quieter than a hint + + + + + + + #7A7A80 - 3.31:1 on a panel + + + + + + What carries meaning - + @@ -4992,7 +5307,7 @@ - + @@ -5011,7 +5326,7 @@ - + @@ -5030,7 +5345,7 @@ - + @@ -5049,7 +5364,7 @@ - + @@ -5068,7 +5383,7 @@ - + @@ -5087,14 +5402,33 @@ - + + + + + + + literal - a value to type, in the type of code, inside an explanation + + + + + + + #5AB3F2 - 5.01:1 on the card an explanation opens on + + + + + + What the pointer, a press and the keyboard do - + @@ -5113,7 +5447,7 @@ - + @@ -5132,7 +5466,7 @@ - + @@ -5151,7 +5485,7 @@ - + @@ -5170,7 +5504,7 @@ - + @@ -5189,7 +5523,7 @@ - + @@ -5208,7 +5542,7 @@ - + @@ -5227,14 +5561,14 @@ - + What is written on a filled face - + @@ -5253,7 +5587,7 @@ - + @@ -5272,7 +5606,7 @@ - + @@ -5291,7 +5625,7 @@ - + @@ -5314,12 +5648,12 @@ - - - - + + + + Palette, light - computed and not installed - + @@ -5550,14 +5884,33 @@ - + + + + + + + held - a choice on a switch that cannot be made yet, quieter than a hint + + + + + + + #878790 - 3.07:1 on a panel + + + + + + What carries meaning - + @@ -5576,7 +5929,7 @@ - + @@ -5595,7 +5948,7 @@ - + @@ -5614,7 +5967,7 @@ - + @@ -5633,7 +5986,7 @@ - + @@ -5652,7 +6005,7 @@ - + @@ -5671,14 +6024,33 @@ - + + + + + + + literal - a value to type, in the type of code, inside an explanation + + + + + + + #286893 - 4.40:1 on the card an explanation opens on + + + + + + What the pointer, a press and the keyboard do - + @@ -5697,7 +6069,7 @@ - + @@ -5716,7 +6088,7 @@ - + @@ -5735,7 +6107,7 @@ - + @@ -5754,7 +6126,7 @@ - + @@ -5773,7 +6145,7 @@ - + @@ -5792,7 +6164,7 @@ - + @@ -5811,14 +6183,14 @@ - + What is written on a filled face - + @@ -5837,7 +6209,7 @@ - + @@ -5856,7 +6228,7 @@ - + @@ -5875,7 +6247,7 @@ - + @@ -5898,13 +6270,13 @@ - - - - + + + + Not drawn, and why - - + + • @@ -6016,18 +6388,60 @@ + + • + + + + Fix - a value: the words on one button under a refusal and what pressing it does, drawn by ErrorArea + + + + + + • + + + + Remedy - a value: what one button under a refusal puts in the box, read by a guard without a window + + + + + + • + + + + Scroll - the toolkit's scrolling area with the wheel moving it as far as the system says - the bars and the shadows are + the toolkit's, this catalogue stands in one, and how far a notch moves it is no picture + + + + + + • + + + + Held - the choices of a switch that cannot be made yet, and why - drawn by the Segments that carries it, in its two + held states + + + + - - - - + + + + Layout only, and why - - + + • @@ -6198,6 +6612,16 @@ + + • + + + + VScroll - the area every screen and this catalogue scroll up and down in - see Scroll under Not drawn + + + + diff --git a/internal/guard/testdata/screens/generate-chosen-by-key.png b/internal/guard/testdata/screens/generate-chosen-by-key.png index 99a68b90..b9d74421 100644 Binary files a/internal/guard/testdata/screens/generate-chosen-by-key.png and b/internal/guard/testdata/screens/generate-chosen-by-key.png differ diff --git a/internal/guard/testdata/screens/generate-chosen-by-key.xml b/internal/guard/testdata/screens/generate-chosen-by-key.xml index 871eda84..b668e401 100644 --- a/internal/guard/testdata/screens/generate-chosen-by-key.xml +++ b/internal/guard/testdata/screens/generate-chosen-by-key.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-chosen.png b/internal/guard/testdata/screens/generate-chosen.png index af9799f5..4e0b8130 100644 Binary files a/internal/guard/testdata/screens/generate-chosen.png and b/internal/guard/testdata/screens/generate-chosen.png differ diff --git a/internal/guard/testdata/screens/generate-chosen.xml b/internal/guard/testdata/screens/generate-chosen.xml index 7da6012c..5c13978b 100644 --- a/internal/guard/testdata/screens/generate-chosen.xml +++ b/internal/guard/testdata/screens/generate-chosen.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-empty.png b/internal/guard/testdata/screens/generate-empty.png index 8a835453..21e24bf8 100644 Binary files a/internal/guard/testdata/screens/generate-empty.png and b/internal/guard/testdata/screens/generate-empty.png differ diff --git a/internal/guard/testdata/screens/generate-empty.xml b/internal/guard/testdata/screens/generate-empty.xml index d2de9bac..2b6824a1 100644 --- a/internal/guard/testdata/screens/generate-empty.xml +++ b/internal/guard/testdata/screens/generate-empty.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,17 +201,17 @@ - + - target "files" asks for 0 files. Ask for at least one + batch "files" asks for 0 files. Ask for at least one - + Damage @@ -218,7 +238,7 @@ - + Batch name @@ -249,7 +269,7 @@ - + File names @@ -491,7 +511,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-focused.png b/internal/guard/testdata/screens/generate-focused.png index 006ee027..68e1bd01 100644 Binary files a/internal/guard/testdata/screens/generate-focused.png and b/internal/guard/testdata/screens/generate-focused.png differ diff --git a/internal/guard/testdata/screens/generate-focused.xml b/internal/guard/testdata/screens/generate-focused.xml index c7e3d6e3..fcb6db2a 100644 --- a/internal/guard/testdata/screens/generate-focused.xml +++ b/internal/guard/testdata/screens/generate-focused.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -156,7 +176,7 @@ - + How many files @@ -182,7 +202,7 @@ - + Damage @@ -209,7 +229,7 @@ - + Batch name @@ -240,7 +260,7 @@ - + File names @@ -482,7 +502,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-hovered.png b/internal/guard/testdata/screens/generate-hovered.png index acac1976..90a0e157 100644 Binary files a/internal/guard/testdata/screens/generate-hovered.png and b/internal/guard/testdata/screens/generate-hovered.png differ diff --git a/internal/guard/testdata/screens/generate-hovered.xml b/internal/guard/testdata/screens/generate-hovered.xml index 288eaf4a..ad732ee5 100644 --- a/internal/guard/testdata/screens/generate-hovered.xml +++ b/internal/guard/testdata/screens/generate-hovered.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + @@ -518,20 +538,19 @@ - - - + + + - - - - - - Exact size of every file. Units count in 1024s, so - 10mb is 10485760 bytes. A plain number is a count - of bytes. smallest makes a picture with its width and - height set as small as it can be. - + + + + + Exact size of every file. Units count in 1024s, so + + 10mb + is 10485760 bytes. A plain number is a count + of bytes. diff --git a/internal/guard/testdata/screens/generate-menu-hovered.png b/internal/guard/testdata/screens/generate-menu-hovered.png index 87235a2a..a68a0162 100644 Binary files a/internal/guard/testdata/screens/generate-menu-hovered.png and b/internal/guard/testdata/screens/generate-menu-hovered.png differ diff --git a/internal/guard/testdata/screens/generate-menu-hovered.xml b/internal/guard/testdata/screens/generate-menu-hovered.xml index 8d31fbdc..cf27f10e 100644 --- a/internal/guard/testdata/screens/generate-menu-hovered.xml +++ b/internal/guard/testdata/screens/generate-menu-hovered.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + @@ -533,7 +553,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-menu-keyed.png b/internal/guard/testdata/screens/generate-menu-keyed.png index fca90153..bab66016 100644 Binary files a/internal/guard/testdata/screens/generate-menu-keyed.png and b/internal/guard/testdata/screens/generate-menu-keyed.png differ diff --git a/internal/guard/testdata/screens/generate-menu-keyed.xml b/internal/guard/testdata/screens/generate-menu-keyed.xml index b5bcd70a..f470a27e 100644 --- a/internal/guard/testdata/screens/generate-menu-keyed.xml +++ b/internal/guard/testdata/screens/generate-menu-keyed.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + @@ -533,7 +553,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-menu.png b/internal/guard/testdata/screens/generate-menu.png index 9ec76990..2f9ee461 100644 Binary files a/internal/guard/testdata/screens/generate-menu.png and b/internal/guard/testdata/screens/generate-menu.png differ diff --git a/internal/guard/testdata/screens/generate-menu.xml b/internal/guard/testdata/screens/generate-menu.xml index 41938bba..9b59c87f 100644 --- a/internal/guard/testdata/screens/generate-menu.xml +++ b/internal/guard/testdata/screens/generate-menu.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + @@ -533,7 +553,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-pdf-settings.png b/internal/guard/testdata/screens/generate-pdf-settings.png index 030f01a9..8c2dd58b 100644 Binary files a/internal/guard/testdata/screens/generate-pdf-settings.png and b/internal/guard/testdata/screens/generate-pdf-settings.png differ diff --git a/internal/guard/testdata/screens/generate-pdf-settings.xml b/internal/guard/testdata/screens/generate-pdf-settings.xml index caf9c61d..c66d8790 100644 --- a/internal/guard/testdata/screens/generate-pdf-settings.xml +++ b/internal/guard/testdata/screens/generate-pdf-settings.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -390,8 +390,8 @@ - Rotate - + Rotation + @@ -403,7 +403,7 @@ - 0 + 0 degrees @@ -417,8 +417,8 @@ - Pdf version - + PDF version + @@ -877,7 +877,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-refused-both.png b/internal/guard/testdata/screens/generate-refused-both.png index a15dbfdd..11d744de 100644 Binary files a/internal/guard/testdata/screens/generate-refused-both.png and b/internal/guard/testdata/screens/generate-refused-both.png differ diff --git a/internal/guard/testdata/screens/generate-refused-both.xml b/internal/guard/testdata/screens/generate-refused-both.xml index 63ae7b63..9b3eb73d 100644 --- a/internal/guard/testdata/screens/generate-refused-both.xml +++ b/internal/guard/testdata/screens/generate-refused-both.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + @@ -165,7 +185,7 @@ - + How many files @@ -190,7 +210,7 @@ - + @@ -200,7 +220,7 @@ - + Damage @@ -227,7 +247,7 @@ - + Batch name @@ -258,7 +278,7 @@ - + File names @@ -500,7 +520,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-refused-setting.png b/internal/guard/testdata/screens/generate-refused-setting.png index 03bde995..d5ab9ff1 100644 Binary files a/internal/guard/testdata/screens/generate-refused-setting.png and b/internal/guard/testdata/screens/generate-refused-setting.png differ diff --git a/internal/guard/testdata/screens/generate-refused-setting.xml b/internal/guard/testdata/screens/generate-refused-setting.xml index ed0821d5..eee5748f 100644 --- a/internal/guard/testdata/screens/generate-refused-setting.xml +++ b/internal/guard/testdata/screens/generate-refused-setting.xml @@ -41,7 +41,7 @@ - + @@ -56,16 +56,16 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. - - - - + + + + @@ -88,7 +88,7 @@ - + @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -270,15 +290,15 @@ - - - - - - + + + + + + - - + + @@ -301,7 +321,7 @@ - + @@ -371,14 +391,7 @@ - - - - Placeholder - - - - + Content @@ -394,7 +407,7 @@ - test + test pattern @@ -405,125 +418,10 @@ - - - - Text - - - - - - - - - - - - - - - default: {width} × {height} - - - - - - - - - - - - - - - - Background - - - - - - - - - - - - - - - default: cccccc - - - - - - - - - - - - - - - - Foreground - - - - - - - - - - - - - - - default: 555555 - - - - - - - - - - - - - - - - - - - - - - Guides - - - - - - - - - - - - - + - width times height cannot pass 40 megapixels, because the picture is held in memory while it is encoded + Width times Height cannot pass 40 megapixels, because the picture is held in memory while it is encoded @@ -539,7 +437,7 @@ - + @@ -708,7 +606,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-refused.png b/internal/guard/testdata/screens/generate-refused.png index 0075b7ad..c187cd66 100644 Binary files a/internal/guard/testdata/screens/generate-refused.png and b/internal/guard/testdata/screens/generate-refused.png differ diff --git a/internal/guard/testdata/screens/generate-refused.xml b/internal/guard/testdata/screens/generate-refused.xml index 079bb19d..f8404586 100644 --- a/internal/guard/testdata/screens/generate-refused.xml +++ b/internal/guard/testdata/screens/generate-refused.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + @@ -166,15 +186,17 @@ - - - - Use the smallest size, 311 B - + + + + + Use the smallest size, 311 B + + - + How many files @@ -200,7 +222,7 @@ - + Damage @@ -227,7 +249,7 @@ - + Batch name @@ -258,7 +280,7 @@ - + File names @@ -500,7 +522,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-switch-by-key.png b/internal/guard/testdata/screens/generate-switch-by-key.png index 7cca8ec8..b8f6163f 100644 Binary files a/internal/guard/testdata/screens/generate-switch-by-key.png and b/internal/guard/testdata/screens/generate-switch-by-key.png differ diff --git a/internal/guard/testdata/screens/generate-switch-by-key.xml b/internal/guard/testdata/screens/generate-switch-by-key.xml index 4fe57f94..649202a4 100644 --- a/internal/guard/testdata/screens/generate-switch-by-key.xml +++ b/internal/guard/testdata/screens/generate-switch-by-key.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-typed.png b/internal/guard/testdata/screens/generate-typed.png index 7a507e52..7d1acc0e 100644 Binary files a/internal/guard/testdata/screens/generate-typed.png and b/internal/guard/testdata/screens/generate-typed.png differ diff --git a/internal/guard/testdata/screens/generate-typed.xml b/internal/guard/testdata/screens/generate-typed.xml index 345e9a69..bfb22833 100644 --- a/internal/guard/testdata/screens/generate-typed.xml +++ b/internal/guard/testdata/screens/generate-typed.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -154,7 +174,7 @@ - + @@ -164,7 +184,7 @@ - + How many files @@ -190,7 +210,7 @@ - + Damage @@ -217,7 +237,7 @@ - + Batch name @@ -248,7 +268,7 @@ - + File names @@ -490,7 +510,7 @@ - + diff --git a/internal/guard/testdata/screens/generate-unchecked.png b/internal/guard/testdata/screens/generate-unchecked.png index 0a70d3e9..1b2ce239 100644 Binary files a/internal/guard/testdata/screens/generate-unchecked.png and b/internal/guard/testdata/screens/generate-unchecked.png differ diff --git a/internal/guard/testdata/screens/generate-unchecked.xml b/internal/guard/testdata/screens/generate-unchecked.xml index d3de7cf6..1e67b6bf 100644 --- a/internal/guard/testdata/screens/generate-unchecked.xml +++ b/internal/guard/testdata/screens/generate-unchecked.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -480,7 +500,7 @@ - + diff --git a/internal/guard/testdata/screens/generate.png b/internal/guard/testdata/screens/generate.png index a55b5638..78652cf8 100644 Binary files a/internal/guard/testdata/screens/generate.png and b/internal/guard/testdata/screens/generate.png differ diff --git a/internal/guard/testdata/screens/generate.xml b/internal/guard/testdata/screens/generate.xml index 5ab8a1ae..730dec61 100644 --- a/internal/guard/testdata/screens/generate.xml +++ b/internal/guard/testdata/screens/generate.xml @@ -41,7 +41,7 @@ - + @@ -56,7 +56,7 @@ - Files of one format and one size, with a manifest that says how the system under test should react to them. + Files of one format, with a manifest that says how the system under test should react to them. @@ -117,7 +117,27 @@ - + + + + How the size is given + + + + + + + + + + + One size + Smallest + + + + + Size @@ -155,7 +175,7 @@ - + How many files @@ -181,7 +201,7 @@ - + Damage @@ -208,7 +228,7 @@ - + Batch name @@ -239,7 +259,7 @@ - + File names @@ -481,7 +501,7 @@ - + diff --git a/internal/guard/testdata/screens/preferences-chosen.png b/internal/guard/testdata/screens/preferences-chosen.png index d375de12..c24241fa 100644 Binary files a/internal/guard/testdata/screens/preferences-chosen.png and b/internal/guard/testdata/screens/preferences-chosen.png differ diff --git a/internal/guard/testdata/screens/preferences-chosen.xml b/internal/guard/testdata/screens/preferences-chosen.xml index faa41ec1..639deeb6 100644 --- a/internal/guard/testdata/screens/preferences-chosen.xml +++ b/internal/guard/testdata/screens/preferences-chosen.xml @@ -39,7 +39,7 @@ - + @@ -54,8 +54,8 @@ - How this window speaks, how much memory its runs may take, and what it keeps between runs. Nothing here - changes the files it makes. + How this window speaks, how much memory its runs may take, and what it remembers for the next time it opens. + Nothing here changes the files it makes. @@ -142,11 +142,11 @@ - How much memory one run may take, the plan and the files being written together. Pictures wait for room rather than - all being held at once, and a plan larger than this is refused before anything is written. When a run gets close to this - amount, the program frees memory more often, which makes the run slower. A run that needs more memory than this - still gets it. Under Automatic, a plan of up to 2.0 GB is never refused. It applies from the next run, and nothing in the - files changes. + How much memory one run may take. A run first works out the whole list of files and keeps that list while it writes, so a + list that needs more memory than this is refused before anything is written. Files that need a lot of memory, such as + large pictures, are then written in turn rather than all at once. Close to this amount the program frees memory more + often, which makes the run slower, and a file that needs more than all of it is still written, on its own. Under Automatic, + a list needing up to 2.0 GB is never refused. It applies from the next run, and nothing in the files changes. @@ -161,35 +161,36 @@ - - - - + + + + What this window remembers - - - - - Between runs this window keeps four things: the output directory, the size of the window, and the language and the - memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer. + + + + + For the next time it opens, this window keeps four things: the output directory, the size of the window, and the + language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this + computer. - + They are kept in this folder: - + C:\settings\of\the\window - + @@ -203,7 +204,7 @@ - + Forget clears the four things above. This window then keeps nothing when it closes, and the next one opens the way diff --git a/internal/guard/testdata/screens/preferences.png b/internal/guard/testdata/screens/preferences.png index 6c4ec2be..06743406 100644 Binary files a/internal/guard/testdata/screens/preferences.png and b/internal/guard/testdata/screens/preferences.png differ diff --git a/internal/guard/testdata/screens/preferences.xml b/internal/guard/testdata/screens/preferences.xml index 1f799392..9da079ab 100644 --- a/internal/guard/testdata/screens/preferences.xml +++ b/internal/guard/testdata/screens/preferences.xml @@ -39,7 +39,7 @@ - + @@ -54,8 +54,8 @@ - How this window speaks, how much memory its runs may take, and what it keeps between runs. Nothing here - changes the files it makes. + How this window speaks, how much memory its runs may take, and what it remembers for the next time it opens. + Nothing here changes the files it makes. @@ -142,11 +142,11 @@ - How much memory one run may take, the plan and the files being written together. Pictures wait for room rather than - all being held at once, and a plan larger than this is refused before anything is written. When a run gets close to this - amount, the program frees memory more often, which makes the run slower. A run that needs more memory than this - still gets it. Under Automatic, a plan of up to 2.0 GB is never refused. It applies from the next run, and nothing in the - files changes. + How much memory one run may take. A run first works out the whole list of files and keeps that list while it writes, so a + list that needs more memory than this is refused before anything is written. Files that need a lot of memory, such as + large pictures, are then written in turn rather than all at once. Close to this amount the program frees memory more + often, which makes the run slower, and a file that needs more than all of it is still written, on its own. Under Automatic, + a list needing up to 2.0 GB is never refused. It applies from the next run, and nothing in the files changes. @@ -161,35 +161,36 @@ - - - - + + + + What this window remembers - - - - - Between runs this window keeps four things: the output directory, the size of the window, and the language and the - memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer. + + + + + For the next time it opens, this window keeps four things: the output directory, the size of the window, and the + language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this + computer. - + They are kept in this folder: - + C:\settings\of\the\window - + @@ -203,7 +204,7 @@ - + Forget clears the four things above. This window then keeps nothing when it closes, and the next one opens the way diff --git a/internal/guard/testdata/screens/preset-many-settings.png b/internal/guard/testdata/screens/preset-many-settings.png index 6f011ed9..c958d363 100644 Binary files a/internal/guard/testdata/screens/preset-many-settings.png and b/internal/guard/testdata/screens/preset-many-settings.png differ diff --git a/internal/guard/testdata/screens/preset-many-settings.xml b/internal/guard/testdata/screens/preset-many-settings.xml index a031f77f..23a8e9ec 100644 --- a/internal/guard/testdata/screens/preset-many-settings.xml +++ b/internal/guard/testdata/screens/preset-many-settings.xml @@ -41,7 +41,7 @@ - + @@ -277,8 +277,8 @@ - Allow - + Allowed types + @@ -308,8 +308,8 @@ - Deny - + Denied extensions + @@ -339,8 +339,8 @@ - Far-over - + Far over the limit + @@ -366,8 +366,8 @@ - Bulk - + Mass upload + @@ -545,7 +545,7 @@ - + diff --git a/internal/guard/testdata/screens/preset-menu-setting.png b/internal/guard/testdata/screens/preset-menu-setting.png index ae72e80e..f8ed2afa 100644 Binary files a/internal/guard/testdata/screens/preset-menu-setting.png and b/internal/guard/testdata/screens/preset-menu-setting.png differ diff --git a/internal/guard/testdata/screens/preset-menu-setting.xml b/internal/guard/testdata/screens/preset-menu-setting.xml index f9221e28..0681be1b 100644 --- a/internal/guard/testdata/screens/preset-menu-setting.xml +++ b/internal/guard/testdata/screens/preset-menu-setting.xml @@ -41,7 +41,7 @@ - + @@ -234,38 +234,38 @@ - - - - Spread - + + + + Distances from the limit + - - - - - - - - + + + + + + + + default: 1B,1kb,1mb - + - + - + Format @@ -444,7 +444,7 @@ - + @@ -487,7 +487,7 @@ - + @@ -496,7 +496,7 @@ - + diff --git a/internal/guard/testdata/screens/preset-menu.png b/internal/guard/testdata/screens/preset-menu.png index ac97d057..409e1c55 100644 Binary files a/internal/guard/testdata/screens/preset-menu.png and b/internal/guard/testdata/screens/preset-menu.png differ diff --git a/internal/guard/testdata/screens/preset-menu.xml b/internal/guard/testdata/screens/preset-menu.xml index f8028361..20897529 100644 --- a/internal/guard/testdata/screens/preset-menu.xml +++ b/internal/guard/testdata/screens/preset-menu.xml @@ -41,7 +41,7 @@ - + @@ -388,7 +388,7 @@ - + @@ -431,16 +431,16 @@ - - - - - - + + + + + + - - - + + + @@ -453,21 +453,26 @@ File name handling + + picture-sizes + Picture sizes + + size-boundaries Size boundaries - + tabular-import Tabular import - + text-encoding Text encoding - + upload-validation Upload validation diff --git a/internal/guard/testdata/screens/preset-refused.png b/internal/guard/testdata/screens/preset-refused.png index 1a9fdd74..cb91db54 100644 Binary files a/internal/guard/testdata/screens/preset-refused.png and b/internal/guard/testdata/screens/preset-refused.png differ diff --git a/internal/guard/testdata/screens/preset-refused.xml b/internal/guard/testdata/screens/preset-refused.xml index 2d3ca145..d6c87b3b 100644 --- a/internal/guard/testdata/screens/preset-refused.xml +++ b/internal/guard/testdata/screens/preset-refused.xml @@ -41,7 +41,7 @@ - + @@ -243,38 +243,38 @@ - - - - Spread - + + + + Distances from the limit + - - - - - - - - + + + + + + + + default: 1B,1kb,1mb - + - + - + Format @@ -453,7 +453,7 @@ - + diff --git a/internal/guard/testdata/screens/preset.xml b/internal/guard/testdata/screens/preset.xml index e95f38cb..42d31ab5 100644 --- a/internal/guard/testdata/screens/preset.xml +++ b/internal/guard/testdata/screens/preset.xml @@ -41,7 +41,7 @@ - + @@ -388,7 +388,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe-contents.png b/internal/guard/testdata/screens/recipe-contents.png index bf50d9cf..d054e440 100644 Binary files a/internal/guard/testdata/screens/recipe-contents.png and b/internal/guard/testdata/screens/recipe-contents.png differ diff --git a/internal/guard/testdata/screens/recipe-contents.xml b/internal/guard/testdata/screens/recipe-contents.xml index 87b55a55..96915ef2 100644 --- a/internal/guard/testdata/screens/recipe-contents.xml +++ b/internal/guard/testdata/screens/recipe-contents.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -706,7 +706,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe-on-a-preset.png b/internal/guard/testdata/screens/recipe-on-a-preset.png index b9767d54..96a7f919 100644 Binary files a/internal/guard/testdata/screens/recipe-on-a-preset.png and b/internal/guard/testdata/screens/recipe-on-a-preset.png differ diff --git a/internal/guard/testdata/screens/recipe-on-a-preset.xml b/internal/guard/testdata/screens/recipe-on-a-preset.xml index b1836453..4fb3dd7d 100644 --- a/internal/guard/testdata/screens/recipe-on-a-preset.xml +++ b/internal/guard/testdata/screens/recipe-on-a-preset.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -291,12 +291,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -676,7 +679,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.png b/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.png index df855ada..620b8230 100644 Binary files a/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.png and b/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.png differ diff --git a/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.xml b/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.xml index bcfc646e..30d38f3c 100644 --- a/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.xml +++ b/internal/guard/testdata/screens/recipe-refused-with-one-batch-filled.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -232,12 +232,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -285,9 +288,9 @@ - target 1 has no Size - every target declares its Size, which is what lets a dry run report exact numbers before anything + Batch 1 has no Size - every batch declares its Size, which is what lets Preview report exact numbers before anything reaches the disk. - add size: 2mb, size-range: 1kb-8kb, a boundary, contains, or a plain number of bytes. + type a size such as 2mb, or choose another way under How the size is given. @@ -331,9 +334,9 @@ - target 1 has no Batch name - a Batch name anchors the seed of a target, so editing one target never moves the bytes - of another. - give it a Batch name, for example id: invoices. + Batch 1 has no Batch name - a Batch name anchors the seed of a batch, so editing one batch never moves the bytes of + another. + give it a Batch name, such as invoices. @@ -547,12 +550,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -940,7 +946,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe-refused.png b/internal/guard/testdata/screens/recipe-refused.png index 0edb4c53..c9253caa 100644 Binary files a/internal/guard/testdata/screens/recipe-refused.png and b/internal/guard/testdata/screens/recipe-refused.png differ diff --git a/internal/guard/testdata/screens/recipe-refused.xml b/internal/guard/testdata/screens/recipe-refused.xml index ab1b1188..565bc011 100644 --- a/internal/guard/testdata/screens/recipe-refused.xml +++ b/internal/guard/testdata/screens/recipe-refused.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -227,12 +227,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -280,9 +283,9 @@ - target 1 has no Size - every target declares its Size, which is what lets a dry run report exact numbers before anything + Batch 1 has no Size - every batch declares its Size, which is what lets Preview report exact numbers before anything reaches the disk. - add size: 2mb, size-range: 1kb-8kb, a boundary, contains, or a plain number of bytes. + type a size such as 2mb, or choose another way under How the size is given. @@ -326,9 +329,9 @@ - target 1 has no Batch name - a Batch name anchors the seed of a target, so editing one target never moves the bytes - of another. - give it a Batch name, for example id: invoices. + Batch 1 has no Batch name - a Batch name anchors the seed of a batch, so editing one batch never moves the bytes of + another. + give it a Batch name, such as invoices. @@ -641,7 +644,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe-two-batches.png b/internal/guard/testdata/screens/recipe-two-batches.png index ccee3af8..e8552583 100644 Binary files a/internal/guard/testdata/screens/recipe-two-batches.png and b/internal/guard/testdata/screens/recipe-two-batches.png differ diff --git a/internal/guard/testdata/screens/recipe-two-batches.xml b/internal/guard/testdata/screens/recipe-two-batches.xml index 383678c8..c35e0b87 100644 --- a/internal/guard/testdata/screens/recipe-two-batches.xml +++ b/internal/guard/testdata/screens/recipe-two-batches.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -232,12 +232,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -518,12 +521,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -917,7 +923,7 @@ - + diff --git a/internal/guard/testdata/screens/recipe.png b/internal/guard/testdata/screens/recipe.png index efd05eb9..71924515 100644 Binary files a/internal/guard/testdata/screens/recipe.png and b/internal/guard/testdata/screens/recipe.png differ diff --git a/internal/guard/testdata/screens/recipe.xml b/internal/guard/testdata/screens/recipe.xml index 406d3651..3a32144b 100644 --- a/internal/guard/testdata/screens/recipe.xml +++ b/internal/guard/testdata/screens/recipe.xml @@ -41,7 +41,7 @@ - + @@ -93,8 +93,8 @@ - With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole - recipe. + With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are + everything the run makes. @@ -227,12 +227,15 @@ + - + + One size A range Around a limit - + Smallest + @@ -612,7 +615,7 @@ - + diff --git a/internal/guard/testdata/screens/tools-archive-result.xml b/internal/guard/testdata/screens/tools-archive-result.xml index 8eb6b4ac..52c908b3 100644 --- a/internal/guard/testdata/screens/tools-archive-result.xml +++ b/internal/guard/testdata/screens/tools-archive-result.xml @@ -41,7 +41,7 @@ - + @@ -350,7 +350,7 @@ - + diff --git a/internal/guard/testdata/screens/tools-check-result.xml b/internal/guard/testdata/screens/tools-check-result.xml index edc3b73c..58b7ad1e 100644 --- a/internal/guard/testdata/screens/tools-check-result.xml +++ b/internal/guard/testdata/screens/tools-check-result.xml @@ -41,7 +41,7 @@ - + @@ -277,7 +277,7 @@ - + diff --git a/internal/guard/testdata/screens/tools-refused.xml b/internal/guard/testdata/screens/tools-refused.xml index c22cb177..e8849364 100644 --- a/internal/guard/testdata/screens/tools-refused.xml +++ b/internal/guard/testdata/screens/tools-refused.xml @@ -41,7 +41,7 @@ - + @@ -306,7 +306,7 @@ - + diff --git a/internal/guard/testdata/screens/tools-result.png b/internal/guard/testdata/screens/tools-result.png index 9616cc6e..73ff4900 100644 Binary files a/internal/guard/testdata/screens/tools-result.png and b/internal/guard/testdata/screens/tools-result.png differ diff --git a/internal/guard/testdata/screens/tools-result.xml b/internal/guard/testdata/screens/tools-result.xml index 363a8c42..12a0476c 100644 --- a/internal/guard/testdata/screens/tools-result.xml +++ b/internal/guard/testdata/screens/tools-result.xml @@ -41,7 +41,7 @@ - + @@ -228,8 +228,8 @@ - Expected - + Expected checksum + @@ -354,7 +354,7 @@ - + diff --git a/internal/guard/testdata/screens/tools-write.xml b/internal/guard/testdata/screens/tools-write.xml index 4ebf19d6..c3ba7ecb 100644 --- a/internal/guard/testdata/screens/tools-write.xml +++ b/internal/guard/testdata/screens/tools-write.xml @@ -41,7 +41,7 @@ - + @@ -286,7 +286,7 @@ - + diff --git a/internal/guard/testdata/screens/tools.xml b/internal/guard/testdata/screens/tools.xml index 3d52e416..7c8bd400 100644 --- a/internal/guard/testdata/screens/tools.xml +++ b/internal/guard/testdata/screens/tools.xml @@ -41,7 +41,7 @@ - + @@ -297,7 +297,7 @@ - + diff --git a/internal/guard/valuenames_test.go b/internal/guard/valuenames_test.go new file mode 100644 index 00000000..9d934ea5 --- /dev/null +++ b/internal/guard/valuenames_test.go @@ -0,0 +1,177 @@ +package guard + +import ( + "fmt" + "regexp" + "slices" + "strings" + "testing" + + "fyne.io/fyne/v2/test" + + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" +) + +// A list shows its values by names in the language of the window, and English +// is one of those languages - docs/SIZE-FIXES-2026-11-16.md section 6.1 (M1). +// TestNoTranslationNamesAListValueTheListCallsOtherwise holds the sentences +// under a list to its names. These hold the names themselves. + +// TestEveryNameWrittenByHandBelongsToADeclaredValue asks each English name +// written by hand to stand on a value something still declares, and to be the +// name a translator is given for it. +// +// The names are keyed by setting and value, so renaming either leaves the +// entry behind: the list goes back to showing the value, and nothing turns red +// because nothing is wrong with either half on its own. +func TestEveryNameWrittenByHandBelongsToADeclaredValue(t *testing.T) { + declared := map[string]string{} + for _, w := range text.RegistryWords() { + declared[w.Key] = w.English + } + named := text.NamedChoices() + if len(named) < 30 { + t.Fatalf("%d value(s) are named by hand, where 30 or more were on 2026-11-17 - the names "+ + "have moved, and this guard asks less than it did", len(named)) + } + for _, wrong := range namesLeftBehind(named, declared) { + t.Error(wrong) + } + // The canary: a name for a value nothing declares has to be found. + if len(namesLeftBehind([]text.NamedChoice{{Of: "content", Value: "no-such-value"}}, declared)) == 0 { + t.Error("canary: a name for a value nothing declares was taken") + } +} + +// TestTheEnglishWindowShowsAListValueByItsName asks the English window, not +// the catalogue: registry/en.json is written from the names, so a window that +// stopped asking for them would leave every guard reading the file green. +// +// Every value of every list is asked of the function each list and sentence +// draws through, and one value is read off the screen twice - in the closed +// menu, and in the line a folded section of settings says about itself. +func TestTheEnglishWindowShowsAListValueByItsName(t *testing.T) { + if got := text.AllowedWholeNumber(); got != "whole number" { + t.Fatalf("this process speaks another language (%q), so nothing here is English to ask", got) + } + english := registryFiles(t)[text.English] + asked := 0 + for _, l := range declaredLists() { + for _, v := range l.values { + want := english[text.ChoiceKey(l.setting, v)]["other"] + if got := text.ChoiceName(l.setting, v); got != want { + t.Errorf("%s %s: the window calls %s %q and registry/en.json %q", l.owner, l.setting, v, got, want) + } + asked++ + } + } + if asked < 200 { + t.Fatalf("asked about %d value(s), so the lists were not read", asked) + } + + wav, err := format.Get("wav") + if err != nil { + t.Fatal(err) + } + screen := window.NewGenerate(newFakeHost(t)) + chooserIn(t, screen.Fields(), engine.SettingFormat).SetSelected(wav.ID) + settings := text.SettingsFor(wav.ID) + openFold(t, screen.Object(), "", settings) + content := chooserIn(t, screen.Fields(), "content") + test.NewTempWindow(t, content) + content.SetSelected("sweep") + name := text.ChoiceName("content", "sweep") + if name == "sweep" { + t.Fatal("sweep is named as it is written, so nothing here tells a name from a value") + } + if shown := wordsInTheBox(t, content).Text; shown != name { + t.Errorf("the menu of what a wav sounds like shows %q for sweep, where its name is %q", shown, name) + } + if content.Selected != "sweep" { + t.Errorf("the menu hands back %q, and a recipe needs sweep", content.Selected) + } + foldTitled(t, screen.Object(), "", settings).Tapped(nil) + said := shownText(screen.Object()) + if !strings.Contains(said, name) || valueWord("sweep").MatchString(said) { + t.Errorf("the folded settings of a wav do not say %q for sweep:\n%s", name, said) + } +} + +// namesLeftBehind is what is wrong with each named value, read against the +// words the catalogue is written from. +func namesLeftBehind(named []text.NamedChoice, declared map[string]string) []string { + var wrong []string + for _, n := range named { + english, ok := declared[text.ChoiceKey(n.Of, n.Value)] + switch { + case !ok: + wrong = append(wrong, fmt.Sprintf("%s of %s is named by hand and no list declares it", n.Value, n.Of)) + case english != text.EnglishChoice(n.Of, n.Value): + wrong = append(wrong, fmt.Sprintf("%s of %s is named %q by hand and the catalogue gives a translator %q", + n.Value, n.Of, text.EnglishChoice(n.Of, n.Value), english)) + } + } + return wrong +} + +// keyShaped is a value written the way a recipe writes a key: words of letters +// joined by _ or -. +var keyShaped = regexp.MustCompile(`^[a-z]+(?:[_-][a-z]+)+$`) + +// standardTokens are the values shaped like a key that are names somebody +// looks up as they are: a header of a message and a transfer encoding, both +// spelled by RFC 2045. +var standardTokens = []string{"content-type", "quoted-printable"} + +// TestNoListShowsAValueSpelledAsARecipeKey holds every list in every language +// to showing a name, not the key, for a value made of joined words. The +// review of 2026-11-17 found the English lists showing every one of them as a +// recipe writes it - record-per-line, out-of-order, size_zero - and a format +// added tomorrow would bring its own without a word. +func TestNoListShowsAValueSpelledAsARecipeKey(t *testing.T) { + lists := declaredLists() + asked := 0 + for tag, entries := range registryFiles(t) { + wrong, n := valuesShownAsKeys(lists, entries) + asked += n + for _, w := range wrong { + t.Errorf("%s %s", tag, w) + } + } + if asked < 40 { + t.Fatalf("asked about %d value(s) shaped like a key, so the lists were not read", asked) + } + for _, token := range standardTokens { + if !slices.ContainsFunc(lists, func(l declaredList) bool { return slices.Contains(l.values, token) }) { + t.Errorf("%s is let through as a standard token and no list declares it any more", token) + } + } + // The canary: a list of one value shaped like a key and no name for it. + planted := []declaredList{{owner: "format/x", setting: "layout", values: []string{"record-per-line"}}} + if wrong, _ := valuesShownAsKeys(planted, nil); len(wrong) == 0 { + t.Error("canary: a list showing record-per-line as it is was taken") + } +} + +// valuesShownAsKeys is every value shaped like a key that one catalogue shows +// as it is, and how many such values it asked about. +func valuesShownAsKeys(lists []declaredList, entries map[string]map[string]string) ([]string, int) { + var wrong []string + asked := 0 + for _, l := range lists { + for _, v := range l.values { + if !keyShaped.MatchString(v) || slices.Contains(standardTokens, v) { + continue + } + asked++ + shown := entries[text.ChoiceKey(l.setting, v)]["other"] + if shown == "" || shown == v { + wrong = append(wrong, fmt.Sprintf("%s %s shows %s as it is written in a recipe", l.owner, l.setting, v)) + } + } + } + return wrong, asked +} diff --git a/internal/guard/wheel_darwin_test.go b/internal/guard/wheel_darwin_test.go new file mode 100644 index 00000000..fc661db2 --- /dev/null +++ b/internal/guard/wheel_darwin_test.go @@ -0,0 +1,12 @@ +//go:build darwin + +package guard + +// driverNotch is a delta the toolkit's driver might hand over on macOS. There +// the system's own deltas arrive and the window keeps them (parts/wheel_darwin.go), +// so any delta will do. +const driverNotch = 10 + +// notchMoves is the delta itself on macOS, whatever the lines - the window +// leaves the wheel as the system gives it there. +func notchMoves(_ int, _, _ float32) float32 { return driverNotch } diff --git a/internal/guard/wheel_other_test.go b/internal/guard/wheel_other_test.go new file mode 100644 index 00000000..24d963a2 --- /dev/null +++ b/internal/guard/wheel_other_test.go @@ -0,0 +1,72 @@ +//go:build !darwin + +package guard + +import ( + "os" + "os/exec" + "path/filepath" + "regexp" + "strconv" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" +) + +// driverNotch is what the toolkit's driver hands a scrolling area for one +// notch of the wheel on Windows and Linux. +const driverNotch = parts.ToolkitNotch + +// notchMoves is how far one notch should move an area showing view units +// with the system set to lines: that many lines of text, a whole view for a +// negative number, nothing for nought. +func notchMoves(lines int, line, view float32) float32 { + if lines < 0 { + return view + } + return float32(lines) * line +} + +// The window divides what the toolkit hands over by the toolkit's step to +// count the notches turned. That step is a constant inside the toolkit, not +// something it exports, so it is read from the toolkit's own source: a +// toolkit that changes it turns this red, where otherwise every notch would +// quietly move a different distance from the one the system is set to. +func TestTheWheelStepIsTheToolkitsStep(t *testing.T) { + // The canary: the reading has to find a number that is not 25, or it + // could be agreeing with the constant by never reading anything. + if n, ok := scrollSpeedIn("const (\n\tscrollSpeed = float32(31)\n)"); !ok || n != 31 { + t.Fatalf("canary: a declared step of 31 was read as %v (%v)", n, ok) + } + + out, err := exec.Command("go", "list", "-m", "-f", "{{.Dir}}", "fyne.io/fyne/v2").Output() + if err != nil { + t.Fatalf("finding the toolkit's source: %v", err) + } + path := filepath.Join(strings.TrimSpace(string(out)), "internal", "driver", "glfw", "scroll_speed_default.go") + src, err := os.ReadFile(path) + if err != nil { + t.Fatalf("reading the toolkit's wheel step: %v", err) + } + n, ok := scrollSpeedIn(string(src)) + if !ok { + t.Fatalf("%s no longer declares scrollSpeed, so the step the window divides by is unknown", path) + } + if n != parts.ToolkitNotch { + t.Errorf("the toolkit's wheel step is %v and parts.ToolkitNotch says %v, so a notch moves %.2f times what the system is set to", + n, parts.ToolkitNotch, n/parts.ToolkitNotch) + } +} + +var scrollSpeedDecl = regexp.MustCompile(`scrollSpeed\s*=\s*float32\(([0-9.]+)\)`) + +// scrollSpeedIn reads the step out of the toolkit's declaration. +func scrollSpeedIn(src string) (float64, bool) { + m := scrollSpeedDecl.FindStringSubmatch(src) + if m == nil { + return 0, false + } + n, err := strconv.ParseFloat(m[1], 64) + return n, err == nil +} diff --git a/internal/guard/wheel_test.go b/internal/guard/wheel_test.go new file mode 100644 index 00000000..80d32f1d --- /dev/null +++ b/internal/guard/wheel_test.go @@ -0,0 +1,119 @@ +package guard + +import ( + "testing" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/container" + + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/window" +) + +// A notch of the mouse wheel moves every scrolling area of the window as far +// as the system says a notch moves - three lines of text out of the box, as +// many as Windows is set to, a whole view, or nothing - rather than the +// toolkit's own fixed step. Reported by the owner on 2026-11-17 as scrolling +// that "goes slowly": 32 notches down one screen (docs/SIZE-FIXES-2026-11-16.md +// section 3.8). +// +// Asked of every screen, because a screen built around the toolkit's scroll +// instead of parts.Scroll would scroll at the old step and look no different +// in any picture. Each screen is made short, so each has something below its +// fold, and the wheel is turned the way the toolkit's driver turns it. +func TestEveryScrollingAreaMovesAsFarAsTheSystemSays(t *testing.T) { + was := parts.WheelLines + t.Cleanup(func() { parts.WheelLines = was }) + + checked := 0 + for i, tab := range []string{text.TabOneTarget(), text.TabPresets(), text.TabRecipe(), text.TabTools(), text.TabPreferences(), text.TabAbout()} { + content, w := screenInAWindow(t, tab) + w.Resize(fyne.NewSize(window.LargestOpening.Width, 320)) + content.Refresh() + // A line of the window's text, measured once the window's theme is + // in place - measured before it, the toolkit's own font answers, and + // this guard first did exactly that. + line := fyne.MeasureText("Ag", parts.TextBody, fyne.TextStyle{}).Height + if i == 0 { + bareScrollIsCaught(t, line) + } + + var areas []*parts.Scroll + bare := 0 + walk(content, func(o fyne.CanvasObject) { + switch s := o.(type) { + case *parts.Scroll: + areas = append(areas, s) + case *container.Scroll: + bare++ + } + }) + if bare > 0 { + t.Errorf("%s draws %d scrolling area(s) of the toolkit's own, which move at its step and not the system's - use parts.VScroll", tab, bare) + } + form := tallest(areas) + if form == nil { + t.Errorf("%s has no scrolling area", tab) + continue + } + view := form.Size().Height + room := form.Content.MinSize().Height - view + if room <= 0 { + t.Errorf("%s fits a window %0.f high, so the wheel was not tried on it", tab, view) + continue + } + for _, lines := range []int{3, 5, -1, 0} { + parts.WheelLines = func() int { return lines } + form.ScrollToTop() + form.Scrolled(&fyne.ScrollEvent{Scrolled: fyne.NewDelta(0, -driverNotch)}) + want := notchMoves(lines, line, view) + if !movedRight(form.Offset.Y, want, room) { + t.Errorf("%s moved %.1f for a notch with the system set to %d line(s), and %.1f was asked for", + tab, form.Offset.Y, lines, min(want, room)) + } + } + form.ScrollToTop() + checked++ + } + if checked < 6 { + t.Fatalf("the wheel was turned on %d screen(s) of six", checked) + } +} + +// bareScrollIsCaught is the canary: the toolkit's own scroll, turned one +// notch, has to be told apart from what the system asks for - or the guard +// above passes with every area back on the toolkit's step. On macOS the two +// are the same by design (parts/wheel_darwin.go), so there is nothing to tell +// apart there. +func bareScrollIsCaught(t *testing.T, line float32) { + t.Helper() + expected := notchMoves(3, line, 1000) + if expected == driverNotch { + return + } + bare := container.NewVScroll(container.NewGridWrap(fyne.NewSize(10, 5000))) + bare.Resize(fyne.NewSize(100, 200)) + bare.Scrolled(&fyne.ScrollEvent{Scrolled: fyne.NewDelta(0, -driverNotch)}) + if movedRight(bare.Offset.Y, expected, 5000) { + t.Fatalf("canary: the toolkit's own scroll moved %.1f for a notch and the check took it for %.1f", bare.Offset.Y, expected) + } +} + +// movedRight says an area turned one notch moved by want, or to its end when +// want is further than there is room for. +func movedRight(got, want, room float32) bool { + want = min(want, room) + return got > want-0.5 && got < want+0.5 +} + +// tallest is the area holding the most, which on every screen is its form. +func tallest(areas []*parts.Scroll) *parts.Scroll { + var found *parts.Scroll + for _, a := range areas { + if found == nil || a.Content.MinSize().Height > found.Content.MinSize().Height { + found = a + } + } + return found +} diff --git a/internal/guard/wheel_windows_test.go b/internal/guard/wheel_windows_test.go new file mode 100644 index 00000000..5b536886 --- /dev/null +++ b/internal/guard/wheel_windows_test.go @@ -0,0 +1,56 @@ +//go:build windows + +package guard + +import ( + "os/exec" + "strconv" + "strings" + "testing" + + "github.com/donislawdev/TestingFilesGenerator/internal/gui" +) + +// What the window asks Windows for a notch of the wheel is what Windows is +// set to. The answer comes through SystemParametersInfoW, and the same setting +// is kept in the user's registry as text, which reg.exe reads without any of +// the window's code - two roads to one number, so a call asked the wrong +// question, or an answer read the wrong way, is told apart from the setting. +// +// "-1" in the registry is a whole screen at a time, which the window answers +// as -1 too. +func TestTheWheelLinesAreWhatWindowsIsSetTo(t *testing.T) { + // The canary: the reading has to take reg.exe's line apart, or two + // failures to read would agree with each other. + if n, ok := wheelLinesIn(" WheelScrollLines REG_SZ 7\r\n"); !ok || n != 7 { + t.Fatalf("canary: a setting of 7 was read as %d (%v)", n, ok) + } + + out, err := exec.Command("reg", "query", `HKCU\Control Panel\Desktop`, "/v", "WheelScrollLines").Output() + if err != nil { + t.Fatalf("reading the setting with reg.exe: %v", err) + } + set, ok := wheelLinesIn(string(out)) + if !ok { + t.Fatalf("reg.exe answered without the setting:\n%s", out) + } + got, answered := gui.SystemWheelLines() + if !answered { + t.Fatal("Windows did not answer how many lines a notch scrolls") + } + if got != set { + t.Errorf("Windows is set to %d line(s) a notch and the window asked it and got %d", set, got) + } +} + +// wheelLinesIn reads the number out of reg.exe's answer. +func wheelLinesIn(out string) (int, bool) { + for _, line := range strings.Split(out, "\n") { + fields := strings.Fields(line) + if len(fields) == 3 && fields[0] == "WheelScrollLines" { + n, err := strconv.Atoi(fields[2]) + return n, err == nil + } + } + return 0, false +} diff --git a/internal/guard/window_test.go b/internal/guard/window_test.go index 6088befc..307ffa34 100644 --- a/internal/guard/window_test.go +++ b/internal/guard/window_test.go @@ -624,6 +624,8 @@ func walk(o fyne.CanvasObject, visit func(fyne.CanvasObject)) { } case *container.Scroll: walk(v.Content, visit) + case *parts.Scroll: + walk(v.Content, visit) case *widget.Card: // A card is a widget rather than a container, so nothing below it is // reachable without this - and every field moved inside one on diff --git a/internal/guard/windowwords_test.go b/internal/guard/windowwords_test.go index 86fde0ed..93e94798 100644 --- a/internal/guard/windowwords_test.go +++ b/internal/guard/windowwords_test.go @@ -3,6 +3,7 @@ package guard import ( "encoding/json" "errors" + "fmt" "os" "regexp" "sort" @@ -41,27 +42,41 @@ type declaredList struct { func declaredLists() []declaredList { var out []declaredList - add := func(owner string, props []format.Property) { - for _, p := range props { + for _, d := range declarations() { + for _, p := range d.props { if len(p.Choices) > 0 { - out = append(out, declaredList{owner, p.Name, p.Choices}) + out = append(out, declaredList{string(d.owner), p.Name, p.Choices}) } } } + out = append(out, declaredList{"recipe", recipe.KeyExpected, recipe.Outcomes()}, + declaredList{"recipe", recipe.KeyExpectedReason, recipe.Reasons()}) + return out +} + +// declaration is everything one owner declares, under the owner the window +// asks its words for. +type declaration struct { + owner text.Owner + props []format.Property +} + +// declarations is every declaration the window draws settings from: formats, +// presets, tools and damage. +func declarations() []declaration { + var out []declaration for _, d := range format.All() { - add(string(text.FormatOwner(d.ID)), d.Properties) + out = append(out, declaration{text.FormatOwner(d.ID), d.Properties}) } for _, p := range preset.All() { - add(string(text.PresetOwner(p.ID)), append(append([]format.Property{}, p.Parameters...), p.Globals()...)) + out = append(out, declaration{text.PresetOwner(p.ID), append(append([]format.Property{}, p.Parameters...), p.Globals()...)}) } for _, d := range tool.All() { - add(string(text.ToolOwner(d.ID)), d.Settings) + out = append(out, declaration{text.ToolOwner(d.ID), d.Settings}) } for _, d := range damage.All() { - add(string(text.DamageOwner(d.ID)), d.Parameters) + out = append(out, declaration{text.DamageOwner(d.ID), d.Parameters}) } - out = append(out, declaredList{"recipe", recipe.KeyExpected, recipe.Outcomes()}, - declaredList{"recipe", recipe.KeyExpectedReason, recipe.Reasons()}) return out } @@ -107,39 +122,96 @@ func valueWord(value string) *regexp.Regexp { // decision of 2026-10-05: a value of a list is said in a sentence by its name // in the list). Values somebody types - all in a list of format ids, none in // a date - are not on a list and are not asked about. +// +// English too, since its lists have names of their own: a menu offering a test +// pattern under a sentence about test is the same two words for one thing. +// English is the language the values are written in, so one of its sentences +// may use a value as the word it is - LibreOffice reads both - and there a +// value that is a plain word is held only in the sentence of its own setting. +// A value spelled as a key, record-per-line, is held everywhere. func TestNoTranslationNamesAListValueTheListCallsOtherwise(t *testing.T) { byOwner := map[string][]declaredList{} for _, l := range declaredLists() { byOwner[l.owner] = append(byOwner[l.owner], l) } - checked := 0 + checked := map[string]int{} for tag, entries := range registryFiles(t) { - if tag == text.English { + wrong, asked := valuesNamedOtherwise(entries, byOwner, tag == text.English) + checked[tag] = asked + for _, w := range wrong { + t.Errorf("%s %s", tag, w) + } + } + // Each language on its own, English among them: one language asked about + // fifty values would hide another asked about none. + if len(checked) < 2 { + t.Fatalf("%d language(s) read, so no translation was held to a list", len(checked)) + } + for tag, n := range checked { + if n < 20 { + t.Errorf("%s was asked about %d value(s), so its sentences were not held to its lists", tag, n) + } + } + if checked[text.English] == 0 { + t.Error("English was not asked at all, and its lists name values as much as any other language's") + } + + // The canaries, on the png's list of what a picture shows: a sentence + // saying test where the list says test pattern has to be found, and one + // saying the name, which holds the value inside it, must not be. + name := map[string]string{"other": "test pattern"} + said := func(sentence string) map[string]map[string]string { + return map[string]map[string]string{text.ChoiceKey("content", "test"): name, + "Detail.format/png.content": {"other": sentence}} + } + if wrong, _ := valuesNamedOtherwise(said("What the picture shows. test checks a reader."), byOwner, true); len(wrong) == 0 { + t.Error("canary: a sentence saying test under a list saying test pattern passed") + } + if wrong, _ := valuesNamedOtherwise(said("What the picture shows. A test pattern checks a reader."), byOwner, true); len(wrong) != 0 { + t.Errorf("canary: a sentence saying the name was taken for one saying the value: %v", wrong) + } +} + +// valuesNamedOtherwise is every sentence of one catalogue naming a value of a +// list that the catalogue gives another name, and how many values it asked +// about. The names of a list are cut out of a sentence before its values are +// looked for, so a test pattern is not read as test. +func valuesNamedOtherwise(entries map[string]map[string]string, byOwner map[string][]declaredList, english bool) ([]string, int) { + var wrong []string + checked := 0 + for key, entry := range entries { + if !strings.HasPrefix(key, "Detail.") { continue } - for key, entry := range entries { - if !strings.HasPrefix(key, "Detail.") { - continue + owner, setting := ownerOfDetail(key), strings.TrimPrefix(key, "Detail."+ownerOfDetail(key)+".") + for _, l := range byOwner[owner] { + names := map[string]string{} + var longestFirst []string + for _, v := range l.values { + if n := entries[text.ChoiceKey(l.setting, v)]["other"]; n != "" && !strings.EqualFold(n, v) { + names[v] = n + longestFirst = append(longestFirst, n) + } } - owner := ownerOfDetail(key) - for _, l := range byOwner[owner] { - for _, v := range l.values { - named, has := entries[text.ChoiceKey(l.setting, v)] - if !has || named["other"] == v || len(v) < 3 { - continue - } - checked++ - if valueWord(v).MatchString(entry["other"]) { - t.Errorf("%s %s names %q, which the %s list above it calls %q:\n %s", - tag, key, v, l.setting, named["other"], entry["other"]) - } + sort.Slice(longestFirst, func(i, j int) bool { return len(longestFirst[i]) > len(longestFirst[j]) }) + sentence := entry["other"] + for _, n := range longestFirst { + sentence = regexp.MustCompile(`(?i)`+regexp.QuoteMeta(n)).ReplaceAllString(sentence, " ") + } + for v, n := range names { + if len(v) < 3 || english && l.setting != setting && !strings.ContainsAny(v, "_-") { + continue + } + checked++ + if valueWord(v).MatchString(sentence) { + wrong = append(wrong, fmt.Sprintf("%s names %q, which the %s list above it calls %q:\n %s", + key, v, l.setting, n, entry["other"])) } } } } - if checked < 50 { - t.Fatalf("asked about %d value(s), so no sentence was held to a list", checked) - } + sort.Strings(wrong) + return wrong, checked } // ownerOfDetail is the owner part of Detail.., where an owner diff --git a/internal/guard/words_test.go b/internal/guard/words_test.go index b263e341..f2700196 100644 --- a/internal/guard/words_test.go +++ b/internal/guard/words_test.go @@ -1,10 +1,13 @@ package guard import ( + "strings" + "fyne.io/fyne/v2" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/widget" + "github.com/donislawdev/TestingFilesGenerator/internal/core" "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" ) @@ -38,10 +41,26 @@ func wordsOf(o fyne.CanvasObject) (string, bool) { return v.Text, true case *parts.ByteCount: return v.Text, true + case *widget.RichText: + // parts.Explanation since 2026-11-18: an explanation naming a value + // to type is drawn in pieces, the value in the type of code - what + // it says is every piece in order, without the marks (asDrawn). + return v.String(), true } return "", false } +// asDrawn is a description as the window draws it: its values to type without +// the backticks that mark them (core.Pieces), which is what a guard reading +// the screen finds. +func asDrawn(s string) string { + var b strings.Builder + for _, p := range core.Pieces(s) { + b.WriteString(p.Text) + } + return b.String() +} + // boldWordsAt is wordsOf for the guards that read RANK: whether the words are // bold and at what size they are drawn. A label carries its size as a theme // name and a canvas text as a number, so the size comes back in pixels for diff --git a/internal/gui/catalogue/catalogue.go b/internal/gui/catalogue/catalogue.go index b647e755..644e110a 100644 --- a/internal/gui/catalogue/catalogue.go +++ b/internal/gui/catalogue/catalogue.go @@ -100,6 +100,10 @@ func NotDrawn() []Reason { {"Shortcuts", "a keyboard map: nothing to draw, and saying so is the point of this row"}, {"NameTap", "an invisible target over the name beside a box to tick, so pressing the name ticks the box - nothing of its own to draw"}, {"PathTarget", "a value: a path box and the field it stands in, read by the window when something is dropped onto it"}, + {"Fix", "a value: the words on one button under a refusal and what pressing it does, drawn by ErrorArea"}, + {"Remedy", "a value: what one button under a refusal puts in the box, read by a guard without a window"}, + {"Scroll", "the toolkit's scrolling area with the wheel moving it as far as the system says - the bars and the shadows are the toolkit's, this catalogue stands in one, and how far a notch moves it is no picture"}, + {"Held", "the choices of a switch that cannot be made yet, and why - drawn by the Segments that carries it, in its two held states"}, } } @@ -125,6 +129,7 @@ func LayoutOnly() []Reason { {"Grid", "lays a section's fields in columns, each taking the columns its value needs - drawn under Section"}, {"Wide", "marks something that takes a whole row of a Grid"}, {"ButtonRow", "buttons side by side, one gap of the scale apart and centred - drawn under Section"}, + {"VScroll", "the area every screen and this catalogue scroll up and down in - see Scroll under Not drawn"}, } } diff --git a/internal/gui/catalogue/controls.go b/internal/gui/catalogue/controls.go index 18edd8d7..e02cf1a9 100644 --- a/internal/gui/catalogue/controls.go +++ b/internal/gui/catalogue/controls.go @@ -325,5 +325,29 @@ func segments() Entry { {"long words", func() fyne.CanvasObject { return parts.NewSegments([]string{"Exactly this size", "Somewhere in a range", "On a boundary"}, func(string) {}) }}, + {"four ways, the last chosen", func() fyne.CanvasObject { + // The batch screen offers a fourth way for a picture since + // 2026-11-17, and it sits at the end of the row. + s := parts.NewSegments(append(append([]string(nil), ways...), "Smallest"), func(string) {}) + s.SetSelected("Smallest") + return s + }}, + {"the last one held", func() fyne.CanvasObject { + // Smallest before a picture has a width and a height, since + // 2026-11-18: on the switch, out of reach, in the ink of + // something that cannot be used. The reason it opens under the + // pointer needs a screen's sheet, which a catalogue cell has not. + s := parts.NewSegments(append(append([]string(nil), ways...), "Smallest"), func(string) {}) + s.Held.Set("Smallest", parts.NewTips().Say("Set a width and a height first.")) + return s + }}, + {"the last one held and chosen", func() fyne.CanvasObject { + // Chosen before the width was emptied again: it stays chosen, + // drawn as a frozen choice is, and the run says why it refuses. + s := parts.NewSegments(append(append([]string(nil), ways...), "Smallest"), func(string) {}) + s.SetSelected("Smallest") + s.Held.Set("Smallest", parts.NewTips().Say("Set a width and a height first.")) + return s + }}, }} } diff --git a/internal/gui/catalogue/fields.go b/internal/gui/catalogue/fields.go index 2bb1f7ed..8c031bf9 100644 --- a/internal/gui/catalogue/fields.go +++ b/internal/gui/catalogue/fields.go @@ -6,6 +6,7 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/driver/desktop" + "github.com/donislawdev/TestingFilesGenerator/internal/core" "github.com/donislawdev/TestingFilesGenerator/internal/format" "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" ) @@ -125,7 +126,28 @@ func propertyField() Entry { return tips.Over(parts.FieldColumn(objects...)) }}) } - return Entry{Name: "PropertyField", Covers: []string{"FromProperty", "DeclaredFields", "PropertyFields", "ShapedFor", "PropertyDetail"}, States: states} + // A block of settings that changes a file only while a choice above it has + // one value, as a placeholder's colours do: on the screen with the choice + // there, and gone - name and all - with the choice anywhere else. + shown := []format.Property{ + {Name: "content", Kind: format.PropertyChoice, Choices: []string{"placeholder", "test"}, Default: "test", Detail: "What the picture shows."}, + {Name: "background", Kind: format.PropertyText, Shape: "a colour such as cccccc", Default: "cccccc", Detail: "The colour of a placeholder.", + Group: "Placeholder", OnlyWhen: format.Condition{Setting: "content", Values: []string{"placeholder"}}}, + } + for _, c := range []struct{ caption, value string }{ + {"a block shown while the choice above it has one value", "placeholder"}, + {"the same block gone while the choice has another", "test"}, + } { + c := c + states = append(states, State{c.caption, func() fyne.CanvasObject { + s := form() + tips := parts.NewTips() + fields, objects := parts.DeclaredFields("format/catalogue", shown, s, tips) + fields[0].Control.(*parts.Chooser).SetSelected(c.value) + return tips.Over(parts.FieldColumn(objects...)) + }}) + } + return Entry{Name: "PropertyField", Covers: []string{"FromProperty", "DeclaredFields", "DeclaredRows", "PropertyFields", "ShapedFor", "PropertyDetail"}, States: states} } // The count of bytes beside a size, which the row shows when the field is one @@ -142,6 +164,9 @@ func byteCount() Entry { {"a size counted out", func() fyne.CanvasObject { return counted("10mb") }}, {"nothing to count yet", func() fyne.CanvasObject { return counted("") }}, {"a large size", func() fyne.CanvasObject { return counted("2gb") }}, + // A sentence rather than a number, broken at the width of the box - + // the one caption that wraps. + {"smallest, with no number until the run plans it", func() fyne.CanvasObject { return counted(core.SizeSmallest) }}, }} } @@ -189,7 +214,14 @@ func errorArea() Entry { {"offering the fix it asks for", func() fyne.CanvasObject { a := parts.NewErrorArea() a.Say("AVIF cannot be smaller than 311 B. Requested: 1 B") - a.Offer("Use the smallest size, 311 B", func() {}) + a.Offer(parts.Fix{Label: "Use the smallest size, 311 B", Apply: func() {}}) + return a.Object() + }}, + {"offering two ways out", func() fyne.CanvasObject { + a := parts.NewErrorArea() + a.Say("PNG cannot be smaller than 1596 B - each of the 3 files is different, so each has a smallest size of its own. Requested: 1 B. Ask for 1596 B, the smallest size all 3 files can have.") + a.Offer(parts.Fix{Label: "Use the smallest size, 1 596 B", Apply: func() {}}, + parts.Fix{Label: "Make each picture as small as it can be", Apply: func() {}}) return a.Object() }}, }} diff --git a/internal/gui/catalogue/palette.go b/internal/gui/catalogue/palette.go index 2c2e2093..8615d6fb 100644 --- a/internal/gui/catalogue/palette.go +++ b/internal/gui/catalogue/palette.go @@ -193,11 +193,15 @@ var palettePlan = map[fyne.ThemeColorName]paletteRole{ theme.ColorNameInputBackground, "a box to type in", byContrast}, theme.ColorNamePlaceHolder: {inks, "a hint in a box nobody has typed in", theme.ColorNameInputBackground, "a box to type in", byContrast}, + parts.ColorNameHeld: {inks, "a choice on a switch that cannot be made yet, quieter than a hint", + parts.ColorNamePanel, "a panel", byContrast}, theme.ColorNamePrimary: {meaning, "the action a screen is for, and the line round a focused control", theme.ColorNameBackground, "the page", byContrast}, theme.ColorNameHyperlink: {meaning, "a link, the same blue as the action", theme.ColorNameBackground, "the page", byContrast}, + parts.ColorNameLiteral: {meaning, "a value to type, in the type of code, inside an explanation", + theme.ColorNameInputBackground, "the card an explanation opens on", byContrast}, theme.ColorNameError: {meaning, "a refusal, and a file that failed", theme.ColorNameBackground, "the page", byContrast}, theme.ColorNameSuccess: {meaning, "a run that wrote everything it promised", diff --git a/internal/gui/catalogue/screen.go b/internal/gui/catalogue/screen.go index 66c0e431..6a828ec4 100644 --- a/internal/gui/catalogue/screen.go +++ b/internal/gui/catalogue/screen.go @@ -16,7 +16,7 @@ import ( // catalogue that is silent about what it leaves out looks complete, which is // rule 6 of the untouchables from the other side. func Screen() fyne.CanvasObject { - return container.NewVScroll(Page()) + return parts.VScroll(Page()) } // Page is the catalogue before it is put in a scroll: the whole height of diff --git a/internal/gui/catalogue/words.go b/internal/gui/catalogue/words.go index 454757a3..e2be109d 100644 --- a/internal/gui/catalogue/words.go +++ b/internal/gui/catalogue/words.go @@ -13,19 +13,25 @@ import ( // thing a person looks at as a whole, which is why every rank is here once, // one under another, and once more with a long line to see where it wraps. func textRanks() Entry { - return Entry{Name: "Title", Covers: []string{"Subtitle", "Titled", "Heading", "Subheading", "Prose", "Note", "Caption", "QuietText", "Bullets", "Ledger"}, States: []State{ + return Entry{Name: "Title", Covers: []string{"Subtitle", "Titled", "Heading", "Subheading", "Prose", "Explanation", "Note", "Caption", "QuietText", "Bullets", "Ledger"}, States: []State{ {"the title of a screen", func() fyne.CanvasObject { return parts.Title("Single batch") }}, {"the sentence under a title", func() fyne.CanvasObject { - return parts.Subtitle("Files of one format and one size, with a manifest that says how the system under test should react to them.") + return parts.Subtitle("Files of one format, with a manifest that says how the system under test should react to them.") }}, {"a title with its sentence", func() fyne.CanvasObject { - return parts.Titled("Single batch", "Files of one format and one size, with a manifest that says how the system under test should react to them.") + return parts.Titled("Single batch", "Files of one format, with a manifest that says how the system under test should react to them.") }}, {"the name of a field", func() fyne.CanvasObject { return parts.Heading("Output directory") }}, {"the name of a block inside a section", func() fyne.CanvasObject { return parts.Subheading("Typically finds") }}, {"a paragraph", func() fyne.CanvasObject { return parts.Prose("Every file has exactly the size you ask for, to the byte, or the run refuses before writing anything.") }}, + {"an explanation naming values to type", func() fyne.CanvasObject { + // The groups of the picture sizes preset, where the owner could + // not tell the names to type from the words describing them. + return parts.Explanation("Which sizes the set holds: `screens` for the sizes of screens, `avatars` for profile " + + "pictures and `social` for covers, banners, posts and thumbnails. Leave it at `all` for every one of them.") + }}, {"a note that has to stay visible", func() fyne.CanvasObject { return parts.Note("The limit of 100 000 files is this tool's, not the disk's.") }}, diff --git a/internal/gui/parts/applying.go b/internal/gui/parts/applying.go new file mode 100644 index 00000000..5bdb96ac --- /dev/null +++ b/internal/gui/parts/applying.go @@ -0,0 +1,187 @@ +package parts + +import ( + "fyne.io/fyne/v2" + + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" +) + +// A setting that changes a file only while another setting has some values - +// the colours of a placeholder, while the content is not the test pattern - is +// on the screen only while it does, and sends nothing while it does not. The +// owner's decision of 2026-11-17 (docs/SIZE-FIXES-2026-11-16.md section 6.5): +// four boxes that could only lead to a refusal were four boxes too many. +// +// The declaration says which settings these are (format.Condition), so nothing +// here names a format. Hidden rather than disabled, for the reason the switch +// between the ways of giving a size gives: a disabled box holding a value +// still reads as something the run will use. A hidden box keeps what was typed +// in it, so choosing the placeholder again gives it back. + +// applying keeps the rows of one declaration on the screen exactly while +// their settings change anything. One row for each field, in the same order. +type applying struct { + fields []PropertyField + rows []applyingRow +} + +// applyingRow is one field as the form holds it. +type applyingRow struct { + // row is what the form holds for the field - the one the grid skips while + // it is hidden, which for a long text is the cell round the field. + row fyne.CanvasObject + // heading is the name of the block the setting belongs to, or nil. It goes + // when every row under it has gone, since a name over nothing is a + // heading for a block that is not there. + heading fyne.CanvasObject + // field is where a refusal about the setting is shown, taken back when + // the row goes: a refusal about a value that is no longer sent is a + // refusal about nothing, and left on a hidden row it would come back with + // the row and read as a complaint about the choice just made. + field *Field +} + +// wire shows the rows that apply now, and has every setting another one +// depends on show them again whenever it changes. Nothing at all for a +// declaration with no condition, which is every one but a picture's today. +// +// The setting depended on is a menu - format.Register refuses a condition on +// anything else - and the menu is told once where to report (see wiredOnce): +// the batch screen lays the same fields out again on every rebuild, and a +// menu wired at each one would show the rows of every layout it ever had. +func (a *applying) wire() { + depended := map[string]bool{} + for _, f := range a.fields { + if c := f.Declared.OnlyWhen; !c.IsZero() { + depended[c.Setting] = true + } + } + if len(depended) == 0 { + return + } + for _, f := range a.fields { + if menu, ok := f.Control.(*Chooser); ok && depended[f.Name] { + chainOnce(&menu.OnChanged, &menu.shows, a, showAgain) + } + } + a.show() +} + +// showAgain is what a menu other settings depend on does after a choice: the +// rows it is pointed at are shown afresh. +func showAgain(_ string, to *applying) { to.show() } + +// show puts on the screen the rows whose settings apply with the values the +// fields hold now, and takes the others off it. +func (a *applying) show() { + headings := map[fyne.CanvasObject]bool{} + for i, r := range a.rows { + on := appliesAt(a.fields, i) + r.put(on) + if r.heading != nil { + headings[r.heading] = headings[r.heading] || on + } + } + for heading, on := range headings { + if on { + heading.Show() + } else { + heading.Hide() + } + } +} + +// put shows the row, or hides it and takes back what was said about it. +func (r applyingRow) put(on bool) { + if on { + r.row.Show() + return + } + r.row.Hide() + if r.field != nil { + r.field.Clear() + } +} + +// appliesAt is whether the setting of fields[i] changes anything with the +// values the fields hold now. A menu always holds one, so a setting depended +// on is never read as left out. +func appliesAt(fields []PropertyField, i int) bool { + p := fields[i].Declared + if p.OnlyWhen.IsZero() { + return true + } + declared := make([]format.Property, 0, len(fields)) + for _, f := range fields { + declared = append(declared, f.Declared) + } + return p.Applies(declared, func(name string) string { return valueIn(fields, name) }) +} + +// valueIn is what the field of one setting holds, or nothing when no field +// is that setting's. +func valueIn(fields []PropertyField, name string) string { + for _, f := range fields { + if f.Name == name { + return f.Value() + } + } + return "" +} + +// StatedValues is what a declaration's fields ask for, under the keys +// declared: each value somebody left in a field, except an empty one - a +// setting not stated, which a format works its own answer out for - and one +// whose setting changes nothing with the values beside it, which is off the +// screen. Nil when that leaves nothing. +// +// One function for the screens that send a declaration's values, which each +// had a loop of their own until 2026-11-17: the setting that applies only +// under another's value would have had to be remembered in every one. +func StatedValues(fields []PropertyField) map[string]string { + out := map[string]string{} + for i, f := range fields { + if v := f.Value(); v != "" && appliesAt(fields, i) { + out[f.Name] = v + } + } + if len(out) == 0 { + return nil + } + return out +} + +// SettingsSaid is what a folded section of a declaration's fields says about +// itself: each setting somebody chose, by its label and its value as the field +// shows it - a value of a list by its name in the list, since the line names +// what the fold hides and the menu inside says test pattern, not test, and a +// switch as on or off, since the switch inside says neither true nor false. +// +// What was CHOSEN, not what a field started on. A menu opens on its default +// and so always has a value, and listing all of them turned this line into +// every setting the format declares - which for log, with seven, ran off the +// edge of the window. And only what applies, since a section folded from the +// start that named a value nobody can see would be a setting they cannot find. +func SettingsSaid(fields []PropertyField) string { + said := make([]string, 0, len(fields)) + for i, f := range fields { + if f.Chosen != nil && !f.Chosen() { + continue + } + v := f.Value() + if v == "" || !appliesAt(fields, i) { + continue + } + switch f.Declared.Kind { + case format.PropertyChoice: + v = text.ChoiceName(f.Name, v) + case format.PropertyBool: + v = text.SwitchState(v == "true") + default: + // A number, a size, a duration or a text reads as it was written. + } + said = append(said, text.SettingSaid(text.SettingLabel(f.Name), v)) + } + return text.FoldedSummary(said...) +} diff --git a/internal/gui/parts/bytecount.go b/internal/gui/parts/bytecount.go index 89d39234..e8bbab5e 100644 --- a/internal/gui/parts/bytecount.go +++ b/internal/gui/parts/bytecount.go @@ -1,9 +1,11 @@ package parts import ( + "fyne.io/fyne/v2" "fyne.io/fyne/v2/theme" "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" ) // ByteCount says what the size in a box comes to, counted out in bytes. @@ -42,6 +44,9 @@ func newByteCount() *ByteCount { // of thing: something quiet beside a control that the eye should skip until // it wants it. c.SizeName = theme.SizeNameCaptionText + // Broken at the width of the box, for the one caption that is a sentence + // rather than a number - see show. + c.Wrapping = fyne.TextWrapWord return c } @@ -50,7 +55,15 @@ func newByteCount() *ByteCount { // Empty for anything that is not a size, which covers the box somebody is // halfway through typing. A count that guessed at a half-typed value would // change three times per keystroke and be wrong twice. +// +// smallest is a size with no number until the run has planned it, so the +// caption says when it will have one and what it comes from instead of +// staying empty under a box that is not half typed. func (c *ByteCount) show(size string) { + if size == core.SizeSmallest { + c.SetText(text.SmallestCaption()) + return + } bytes, err := core.ParseSize(size) if err != nil { c.SetText("") diff --git a/internal/gui/parts/detail.go b/internal/gui/parts/detail.go index e9c6fb09..5ef6374c 100644 --- a/internal/gui/parts/detail.go +++ b/internal/gui/parts/detail.go @@ -218,7 +218,7 @@ func (t *Tips) open(near fyne.CanvasObject, detail string) fyne.CanvasObject { // On the card an open list floats on, not on a panel's surface - see // floatingCard for the reports that shaped it. - box := container.NewStack(append(floatingCard(), Padded(Inset, Prose(detail)))...) + box := container.NewStack(append(floatingCard(), Padded(Inset, Explanation(detail)))...) // Sized twice, and this is the same finding the render probe records rather // than superstition. A wrapping label reports the height it needs for the diff --git a/internal/gui/parts/explanation.go b/internal/gui/parts/explanation.go new file mode 100644 index 00000000..0b909aba --- /dev/null +++ b/internal/gui/parts/explanation.go @@ -0,0 +1,35 @@ +package parts + +import ( + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/widget" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" +) + +// Explanation is a paragraph of this program's own words that may name values +// to type (core.Pieces): the words as Prose draws them, and each value in the +// type of code in ColorNameLiteral, without its marks. A paragraph naming +// none is Prose itself, drawn exactly as before. +// +// For our own words only. Prose stays plain for whatever comes from outside - +// a tool's result names files out of somebody's archive, and a backtick in one +// of those names is a backtick, not the start of a value. +func Explanation(s string) fyne.CanvasObject { + pieces := core.Pieces(s) + if len(core.Literals(s)) == 0 { + return Prose(s) + } + segments := make([]widget.RichTextSegment, 0, len(pieces)) + for _, p := range pieces { + style := widget.RichTextStyleInline + if p.Literal { + style.TextStyle = fyne.TextStyle{Monospace: true} + style.ColorName = ColorNameLiteral + } + segments = append(segments, &widget.TextSegment{Text: p.Text, Style: style}) + } + rich := widget.NewRichText(segments...) + rich.Wrapping = fyne.TextWrapWord + return inkTight(rich) +} diff --git a/internal/gui/parts/field.go b/internal/gui/parts/field.go index 716d7c46..5f5532f0 100644 --- a/internal/gui/parts/field.go +++ b/internal/gui/parts/field.go @@ -148,12 +148,25 @@ type ErrorArea struct { // edge is the line round the control, if it has one. Marked and cleared // with the sentence, so the two never disagree. edge *Ring - // fix is a button under the sentence that puts right what it is about, - // when the refusal carries the value that would - see Offer. fixRow is - // what is shown and hidden, so a field with nothing to offer keeps no - // room for a button. - fix *Button - fixRow fyne.CanvasObject + // fixes are the buttons under the sentence that put right what it is + // about, one row each - see Offer. fixRows is what is shown and hidden, so + // a field with nothing to offer keeps no room for a button. + fixes []offered + fixRows *fyne.Container +} + +// Fix is one way out of a refusal: the words on its button and what pressing +// it does. +type Fix struct { + Label string + Apply func() +} + +// offered is one button under the sentence and the row it stands in, hidden +// together - see hideFix for why both. +type offered struct { + button *Button + row fyne.CanvasObject } // NewErrorArea builds one that stands on its own, for the line at the foot of @@ -165,11 +178,13 @@ func NewErrorArea() *ErrorArea { // The sentence starts under the control it is about, on the edge the // control starts on - which is the field's edge since the name stands // over the control rather than beside it. - fix := NewButton(Secondary, "", nil) - fix.Hide() - fixRow := container.NewHBox(fix) - area := &ErrorArea{label: label, fix: fix, fixRow: fixRow, - box: Column(GapLabel, inkTight(label), fixRow)} + // + // The buttons stand one under another rather than side by side. Two of + // them side by side are wider than a field's column in a narrow window, + // and this layout has no way to wrap a row. + fixRows := Column(GapLabel) + area := &ErrorArea{label: label, fixRows: fixRows, + box: Column(GapLabel, inkTight(label), fixRows)} area.Clear() return area } @@ -189,31 +204,59 @@ func (a *ErrorArea) Say(text string) { a.mark(true) } -// Offer puts a button under the sentence that does what the sentence asks -// for, so nobody has to copy a number out of a refusal into the box above it. -// Called after Say, and taken away by the next Say or Clear. -func (a *ErrorArea) Offer(label string, apply func()) { - a.fix.SetText(label) - a.fix.OnTapped = apply - a.fix.Show() - a.fixRow.Show() +// Offer puts a button under the sentence for each way out of it, in the order +// given, so nobody has to copy a number out of a refusal into the box above +// it. Called after Say, and taken away by the next Say or Clear. +// +// The buttons are kept between refusals and only the ones in use are shown, +// so a field refused again and again does not grow a new button each time. +func (a *ErrorArea) Offer(fixes ...Fix) { + a.hideFix() + for len(a.fixes) < len(fixes) { + button := NewButton(Secondary, "", nil) + row := container.NewHBox(button) + a.fixes = append(a.fixes, offered{button: button, row: row}) + a.fixRows.Add(row) + } + for i, fix := range fixes { + shown := a.fixes[i] + shown.button.SetText(fix.Label) + shown.button.OnTapped = fix.Apply + shown.button.Show() + shown.row.Show() + } + if len(fixes) > 0 { + a.fixRows.Show() + } + // After the last change to the column, so a row added here is drawn + // now rather than at the next repaint from anywhere. + a.fixRows.Refresh() } -// hideFix takes the button away with its row. The button itself as well, +// hideFix takes every button away with its row. The button itself as well, // because a button still marked visible inside a hidden row is a button a // guard walking the tree counts as there to press, at 0x0. func (a *ErrorArea) hideFix() { - a.fix.Hide() - a.fixRow.Hide() + for _, shown := range a.fixes { + shown.button.Hide() + shown.row.Hide() + } + a.fixRows.Hide() } -// Offered is the words on the button under the sentence, or nothing, for a -// guard. -func (a *ErrorArea) Offered() string { - if !a.fixRow.Visible() { - return "" +// Offered is the words on each button under the sentence, in order, or +// nothing, for a guard. +func (a *ErrorArea) Offered() []string { + if !a.fixRows.Visible() { + return nil + } + var words []string + for _, shown := range a.fixes { + if shown.button.Visible() { + words = append(words, shown.button.Text) + } } - return a.fix.Text + return words } // Clear takes the sentence away and gives the room back. diff --git a/internal/gui/parts/fields.go b/internal/gui/parts/fields.go index aa748259..fe923936 100644 --- a/internal/gui/parts/fields.go +++ b/internal/gui/parts/fields.go @@ -59,11 +59,11 @@ func (f *Field) Clear() { f.area.Clear() } // screen that knows how to put it right - the way to a directory whose // contents a run refused. On the field rather than on Fields, which stands at // its ceiling of methods. -func (f *Field) Offer(label string, apply func()) { f.area.Offer(label, apply) } +func (f *Field) Offer(fixes ...Fix) { f.area.Offer(fixes...) } -// Offered is the words on the button under what this field is complaining +// Offered is the words on each button under what this field is complaining // about, or nothing, for a guard. -func (f *Field) Offered() string { return f.area.Offered() } +func (f *Field) Offered() []string { return f.area.Offered() } // Saying is what this field is currently complaining about, for a guard. func (f *Field) Saying() string { return f.area.Text() } @@ -527,9 +527,7 @@ func (s *Fields) Mark(setting string, err error) bool { return false } f.Say(inTheWordsOnScreen(f, err)) - if label, apply := fixFor(f, err); apply != nil { - f.area.Offer(label, apply) - } + f.area.Offer(fixesFor(f, err)...) return true } diff --git a/internal/gui/parts/fixes.go b/internal/gui/parts/fixes.go index ef3a725a..d610ed8d 100644 --- a/internal/gui/parts/fixes.go +++ b/internal/gui/parts/fixes.go @@ -6,11 +6,12 @@ import ( "strings" "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" "github.com/donislawdev/TestingFilesGenerator/internal/format" "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" ) -// fixFor is the button a refusal can carry under a field, when the refusal +// fixesFor is the buttons a refusal can carry under a field, when the refusal // itself holds the value that would put it right - or nothing. // // One refusal today, and it is the one the owner reported from the running @@ -21,6 +22,19 @@ import ( // only as words, so the button is worked out from the number and not read out // of the sentence. // +// The number holds for every file of the batch. Until 2026-11-16 it was the +// smallest size of the first file that refused, so on a batch of pictures the +// button led to another refusal - each picture codes to its own size - and the +// owner reported exactly that. The engine now answers for the whole batch +// (internal/engine/batchminimum.go), which is G1: the window shows a number, +// it never works one out. +// +// A second button, when the engine says the target could ask for smallest +// instead: a picture with its width and height known. The first makes every +// file the same size, the smallest all of them can have. The second makes each +// picture as small as it can be, so the files come out at different sizes - +// and that is the one a person wanting small pictures is usually after. +// // Nothing is filled in by itself. Untouchable rule 1 says a size is exact or // refused, never quietly rounded, and a button somebody presses is the // opposite of quiet: the value goes in the box, the box is checked again like @@ -45,18 +59,41 @@ import ( // engine can answer it (G1). Until it can, the limit keeps the sentence and // gets no button, because a button that promises the smallest value and does // not deliver it is worse than none. -func fixFor(f *Field, err error) (string, func()) { +func fixesFor(f *Field, err error) []Fix { + boxes := boxesIn(f.Control) + if len(boxes) != 1 { + return nil + } + box := boxes[0] + var fixes []Fix + for _, r := range Remedies(err, box.Text) { + fixes = append(fixes, Fix{Label: r.Label, Apply: func() { box.SetText(r.Value) }}) + } + return fixes +} + +// Remedy is what one button under a refusal puts in the box, and the words on +// it. +type Remedy struct { + Label string + Value string +} + +// Remedies is what the buttons under a refusal put in a box holding held, in +// the order they stand - or nothing. Apart from the widgets so a guard can ask +// the very function the buttons are made from, for every format, without +// building a window for each (picturefixes_test.go). +func Remedies(err error, held string) []Remedy { var below *format.BelowMinimumError - if !errors.As(err, &below) || below.Minimum <= 0 { - return "", nil + if !errors.As(err, &below) || below.Minimum <= 0 || strings.Contains(held, "-") { + return nil } - boxes := boxesIn(f.Control) - if len(boxes) != 1 || strings.Contains(boxes[0].Text, "-") { - return "", nil + if asked, parsed := core.ParseSize(held); parsed != nil || asked != below.Requested { + return nil } - if held, parsed := core.ParseSize(boxes[0].Text); parsed != nil || held != below.Requested { - return "", nil + remedies := []Remedy{{Label: text.UseSmallestSize(core.ExactBytes(below.Minimum)), Value: strconv.FormatInt(below.Minimum, 10)}} + if engine.OffersSmallest(err) { + remedies = append(remedies, Remedy{Label: text.UseSmallestForEach(), Value: core.SizeSmallest}) } - box, value := boxes[0], strconv.FormatInt(below.Minimum, 10) - return text.UseSmallestSize(core.ExactBytes(below.Minimum)), func() { box.SetText(value) } + return remedies } diff --git a/internal/gui/parts/held.go b/internal/gui/parts/held.go new file mode 100644 index 00000000..8f488cf8 --- /dev/null +++ b/internal/gui/parts/held.go @@ -0,0 +1,109 @@ +package parts + +import "fyne.io/fyne/v2" + +// Held is the options of a switch that cannot be chosen now, each with why, +// and the why open on a sheet while the pointer is over one. A switch carries +// one (Segments.Held) and asks it before a press or an arrow chooses anything. +// +// An option held stays on the switch and out of reach: a press or an arrow +// does not choose it, it is drawn in the quietest ink (ColorNameHeld), and the +// pointer over it opens why on the screen's sheet of explanations - the sheet +// the button beside a field opens on. +// +// Kept on the switch rather than taken off it, which is the owner's choice of +// 2026-11-18 for smallest without a width and a height: an option that comes +// and goes moves the words beside it whenever another field is typed in, and +// one that is not there cannot be found by somebody looking for it - which is +// how smallest was reported two days before. +// +// Choosing it by name (Segments.SetSelected) still moves onto it. The switch is +// a view of a box, and the box can hold a value the switch cannot offer now - +// typed, or put there before the field it depends on was emptied. The switch +// then says what the form will send, and the run says why it is refused. +// +// A type of its own rather than methods on Segments, which was at twenty of +// the twenty one methods a type may have before it counts as crowded. +type Held struct { + why map[string]Detail + // telling is the why open on the sheet it was opened on, or nil. + telling fyne.CanvasObject + tellingOn *Tips + // redraw is the switch's own refresh, for a change in what is held. + redraw func() +} + +// Set holds an option back with why, or lets it be chosen again when why is +// NoDetail. +func (h *Held) Set(option string, why Detail) { + was, isHeld := h.why[option] + switch { + case why.Text == "" && !isHeld, why.Text != "" && isHeld && was.Text == why.Text: + return + case why.Text == "": + delete(h.why, option) + default: + if h.why == nil { + h.why = map[string]Detail{} + } + h.why[option] = why + } + h.stop() + if h.redraw != nil { + h.redraw() + } +} + +// Has says an option cannot be chosen now. +func (h *Held) Has(option string) bool { + _, held := h.why[option] + return held +} + +// Telling is the why open on the sheet, or nil - for a guard. +func (h *Held) Telling() fyne.CanvasObject { return h.telling } + +// reachable is the nearest of options from at, stepping by dir, that can be +// chosen - or -1 when there is none that way. +func (h *Held) reachable(options []string, at, dir int) int { + for i := at + dir; i >= 0 && i < len(options); i += dir { + if !h.Has(options[i]) { + return i + } + } + return -1 +} + +// tell opens why an option is held, near the control, when it is - and takes +// away whatever was open before. +func (h *Held) tell(option string, near fyne.CanvasObject) { + h.stop() + why, held := h.why[option] + if !held || why.on == nil { + return + } + h.telling, h.tellingOn = why.on.open(near, why.Text), why.on +} + +// stop takes the why off its sheet. +func (h *Held) stop() { + if h.telling != nil && h.tellingOn != nil { + h.tellingOn.close(h.telling) + } + h.telling, h.tellingOn = nil, nil +} + +// SegmentMiddle is the point in the middle of an option's segment, or the +// origin for an option the switch does not hold - for a guard that presses and +// hovers the way a pointer does. +func SegmentMiddle(s *Segments, option string) fyne.Position { + x := float32(0) + for _, o := range s.Options { + w := s.segmentWidth(o) + if o == option { + return fyne.NewPos(x+w/2, s.MinSize().Height/2) + } + x += w + Hairline + } + return fyne.Position{} +} diff --git a/internal/gui/parts/palette.go b/internal/gui/parts/palette.go index 585aa17e..4a186c8e 100644 --- a/internal/gui/parts/palette.go +++ b/internal/gui/parts/palette.go @@ -138,6 +138,7 @@ var paletteOrder = map[fyne.ThemeColorName]int{ ColorNameLabel: 21, theme.ColorNameDisabled: 22, theme.ColorNamePlaceHolder: 23, + ColorNameHeld: 24, // What carries meaning. theme.ColorNamePrimary: 30, @@ -146,6 +147,7 @@ var paletteOrder = map[fyne.ThemeColorName]int{ theme.ColorNameSuccess: 33, theme.ColorNameWarning: 34, theme.ColorNameSelection: 35, + ColorNameLiteral: 36, // What the pointer, the press and the keyboard do - every one of these is // blended rather than painted. diff --git a/internal/gui/parts/parts.go b/internal/gui/parts/parts.go index c3439f9c..ed68af58 100644 --- a/internal/gui/parts/parts.go +++ b/internal/gui/parts/parts.go @@ -812,7 +812,7 @@ func WithRoomForARun(content fyne.CanvasObject) fyne.CanvasObject { // Scrolled rather than clipped, and vertical only - a status line that // scrolled sideways would hide the start of its own sentence. - inside := container.NewVScroll(content) + inside := VScroll(content) return container.New(&reserving{height: sample.MinSize().Height}, inside) } diff --git a/internal/gui/parts/property.go b/internal/gui/parts/property.go index a703cc98..b48742d0 100644 --- a/internal/gui/parts/property.go +++ b/internal/gui/parts/property.go @@ -40,6 +40,10 @@ type PropertyField struct { // numbers were ours through defaulted, untouchable rule 5 - so hiding a // typed value there would hide a real one. Chosen func() bool + // Declared is the declaration the field was drawn from, so the rows can be + // laid out, and what the fields send worked out, from the fields alone - + // see DeclaredRows and StatedValues. + Declared format.Property } // FromProperty draws the field a declaration describes. @@ -63,14 +67,17 @@ func FromProperty(p format.Property) PropertyField { return fromProperty(p, fals // fromProperty is FromProperty for a setting of a tool, or of anything else. func fromProperty(p format.Property, ofATool bool) PropertyField { + var f PropertyField switch p.Kind { case format.PropertyChoice: - return choiceField(p, ofATool) + f = choiceField(p, ofATool) case format.PropertyBool: - return boolField(p) + f = boolField(p) default: - return textField(p, ofATool) + f = textField(p, ofATool) } + f.Declared = p + return f } // An empty control means "not stated", and no box somebody types in is filled @@ -226,10 +233,14 @@ func PropertyFields(d format.Descriptor, into *Fields, tips *Tips) ([]PropertyFi return fields, objects } -// JointLimit is JointLimit.Describe in the window's language. A guard asks the -// English of the two to agree to the letter, for every limit declared. +// JointLimit is JointLimit.Describe in the window's language, with the two +// settings called by the labels of their boxes rather than by the keys a +// recipe writes, since the note stands under boxes named Width and Height. A +// guard asks the English of the two to agree to the letter once the keys are +// put back, for every limit declared. func JointLimit(owner text.Owner, j format.JointLimit) string { - return text.AllowedJointly(j.Of, j.By, j.Most(), text.Unit(j.Unit), text.JointReason(owner, j.Of, j.By, j.Why)) + return text.AllowedJointly(text.SettingLabel(j.Of), text.SettingLabel(j.By), j.Most(), + text.Unit(j.Unit), text.JointReason(owner, j.Of, j.By, j.Why)) } // DeclaredFields draws every field a list of declared settings describes, in @@ -253,23 +264,46 @@ func JointLimit(owner text.Owner, j format.JointLimit) string { // sentence of it is found under in another language - see text.Owner. func DeclaredFields(owner text.Owner, declared []format.Property, into *Fields, tips *Tips) ([]PropertyField, []fyne.CanvasObject) { fields := make([]PropertyField, 0, len(declared)) - objects := make([]fyne.CanvasObject, 0, len(declared)) + for _, p := range declared { + fields = append(fields, fromProperty(p, text.IsTool(owner))) + } + return fields, DeclaredRows(owner, fields, into, tips, func(name string) string { return name }) +} - for i, p := range declared { +// DeclaredRows lays out fields already drawn from a declaration, each +// registered under the address the screen gives its name. +// +// Apart from DeclaredFields for the batch screen, which keeps its fields +// across a rebuild so that what was typed survives it, and lays them out +// again under addresses naming the batch. It drew them with loops of its own +// until 2026-11-17 - one for a batch's settings and one for the parameters of +// the preset it builds on - and neither had the name of a block nor the count +// of bytes under a size, which is how a difference between two screens +// drawing one declaration starts. A setting shown only while another has some +// values is the third thing, and it lives here once (see applying). +func DeclaredRows(owner text.Owner, fields []PropertyField, into *Fields, tips *Tips, address func(name string) string) []fyne.CanvasObject { + objects := make([]fyne.CanvasObject, 0, len(fields)) + shown := &applying{fields: fields} + var heading fyne.CanvasObject + for i, f := range fields { + p := f.Declared // A block of settings opens with its name, drawn as the name of a block // inside a section - the same heading as the files inside an archive. // tfg formats prints the same name in the same place. - if p.Group != "" && (i == 0 || declared[i-1].Group != p.Group) { - objects = append(objects, Subheading(text.SettingGroup(owner, p.Group))) + switch { + case p.Group == "": + heading = nil + case i == 0 || fields[i-1].Declared.Group != p.Group: + heading = Subheading(text.SettingGroup(owner, p.Group)) + objects = append(objects, heading) } - f := fromProperty(p, text.IsTool(owner)) - fields = append(fields, f) + at := address(p.Name) // A setting the format itself calls a size gets its count of bytes. // Read off the declaration rather than off the name, so a format that // declares a size tomorrow gets this without a line of window code - // the same reason the field is drawn from the declaration at all. if p.Kind == format.PropertySize { - into.InBytes(p.Name) + into.InBytes(at) } // The label is the window's own wording and the key a recipe writes // is behind the button. Until 2026-08-20 the key WAS the label, so a @@ -280,14 +314,16 @@ func DeclaredFields(owner text.Owner, declared []format.Property, into *Fields, // whose window and whose recipe file are two ways into one engine, so // somebody who finds a setting here has to be able to write it down. // For a tool that is a flag rather than a recipe key - see WrittenAs. - field := into.Add(p.Name, text.SettingLabel(p.Name), PropertyDetail(owner, p), + row := into.Add(at, text.SettingLabel(p.Name), PropertyDetail(owner, p), tips.Say(text.WrittenAs(owner, p.Name)), shapedFor(p, f.Control, text.IsTool(owner))) if longText(p) { - field = Wide(field) + row = Wide(row) } - objects = append(objects, field) + objects = append(objects, row) + shown.rows = append(shown.rows, applyingRow{row: row, heading: heading, field: into.Lookup(at)}) } - return fields, objects + shown.wire() + return objects } // longText is free text the declaration calls long, which takes the row the @@ -395,9 +431,19 @@ func PropertyDetail(owner text.Owner, p format.Property) string { // The default is not said here either, and that is not an omission: the menu's // first entry says "not stated" and carries the default in its own words, so // repeating it under the control would be the same duplication one line down. +// +// A switch is the same case: the switch IS its two values, so "true or false" +// says nothing it does not, in the recipe's words rather than the window's. +// What it started on is still said, as on or off, because once it is pressed +// the screen no longer shows it. func allowedOnAScreen(p format.Property) string { - if p.Kind == format.PropertyChoice { + switch { + case p.Kind == format.PropertyChoice: + return "" + case p.Kind == format.PropertyBool && p.Default == "": return "" + case p.Kind == format.PropertyBool: + return text.AllowedDefault(text.SwitchState(p.Default == "true")) } return Allowed(p) } diff --git a/internal/gui/parts/reveal.go b/internal/gui/parts/reveal.go index 984daaf2..1e7e98f1 100644 --- a/internal/gui/parts/reveal.go +++ b/internal/gui/parts/reveal.go @@ -2,7 +2,6 @@ package parts import ( "fyne.io/fyne/v2" - "fyne.io/fyne/v2/container" ) // Reveal scrolls a control into view and puts the keyboard in it. @@ -26,7 +25,7 @@ import ( // // It reports whether it found somewhere to put the keyboard, so a caller can // tell "nothing to reveal" from "revealed". -func Reveal(scroll *container.Scroll, control fyne.CanvasObject) bool { +func Reveal(scroll *Scroll, control fyne.CanvasObject) bool { if control == nil { return false } diff --git a/internal/gui/parts/ring.go b/internal/gui/parts/ring.go index 3130aa70..0acbc75a 100644 --- a/internal/gui/parts/ring.go +++ b/internal/gui/parts/ring.go @@ -212,6 +212,9 @@ type Chooser struct { // reports is the address a choice is told to the screen under - see // wiredOnce in fields.go. reports wiredOnce[string] + // shows is the rows a choice shows and hides, for a menu other settings + // depend on - see applying. + shows wiredOnce[*applying] } // shown is the words one value is drawn as - see ShownAs. diff --git a/internal/gui/parts/rowview.go b/internal/gui/parts/rowview.go index 3c6d6b3a..de79ce7d 100644 --- a/internal/gui/parts/rowview.go +++ b/internal/gui/parts/rowview.go @@ -24,7 +24,7 @@ import ( // the same document). A menu of hundreds of values is where that stops being // true, and the answer then is to build only the rows in sight. type rowView struct { - scroll *container.Scroll + scroll *Scroll stack *fyne.Container // built is every row made so far, kept for the next arrangement, and // shown how many of them the current one uses. @@ -37,7 +37,7 @@ type rowView struct { func newRowView() *rowView { v := &rowView{stack: container.New(rowStack{})} - v.scroll = container.NewVScroll(v.stack) + v.scroll = VScroll(v.stack) return v } diff --git a/internal/gui/parts/scroll.go b/internal/gui/parts/scroll.go new file mode 100644 index 00000000..6b12cdf3 --- /dev/null +++ b/internal/gui/parts/scroll.go @@ -0,0 +1,66 @@ +package parts + +import ( + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/container" +) + +// Scroll is every scrolling area of the window: the toolkit's own, with one +// notch of a mouse wheel moving it as far as the system says a notch moves. +// +// The toolkit moves every area by a fixed step whatever the system is set to +// (ToolkitNotch in wheel_other.go), and on Windows and Linux that step is half +// of the three lines of text a notch moves by default. Measured on 2026-11-17 with +// tools/probes/guilag: the Single batch screen of otlp with its settings open +// took 32 notches top to bottom, and a notch cost less than a frame to draw - +// the window was not slow, the steps were short (docs/SIZE-FIXES-2026-11-16.md +// section 3.8). +// +// An extension of the toolkit's scroll rather than a copy of it: everything a +// scroll does - the bars, the offset, the shadows, a drag on the bar - stays +// the toolkit's, and only the distance a wheel asks for is answered here. One +// type for every area, so a change of how the wheel feels is a change in one +// place. +type Scroll struct { + container.Scroll +} + +// VScroll is a scrolling area that moves up and down only. +func VScroll(content fyne.CanvasObject) *Scroll { + s := &Scroll{} + s.Direction = container.ScrollVerticalOnly + s.Content = content + // Before the toolkit's own constructor would, because the first call + // wins: the area has to be drawn and refreshed as this type, or the wheel + // would reach the toolkit's scroll underneath and never this one. + s.ExtendBaseWidget(s) + return s +} + +// Scrolled moves the area by the system's distance for the notches turned. +func (s *Scroll) Scrolled(ev *fyne.ScrollEvent) { + moved := *ev + moved.Scrolled.DY = wheelDistance(ev.Scrolled.DY, s.Size().Height) + s.Scroll.Scrolled(&moved) +} + +// WheelLines is how many lines one notch of the wheel moves, as the system +// is set: a negative number is a whole view at a time and nought is not at +// all. Package gui answers it from the system where the system has the +// setting - Windows - and the default stands everywhere else. +var WheelLines = func() int { return WheelLinesDefault } + +// wheelLine is one line of the window's text, measured rather than written, +// so a notch keeps its meaning when the text grows or the screen is scaled. +func wheelLine() float32 { + return fyne.MeasureText("Ag", TextBody, fyne.TextStyle{}).Height +} + +// notchDistance is how far one notch moves an area showing view units. +func notchDistance(view float32) float32 { + lines := WheelLines() + if lines < 0 { + return view + } + return float32(lines) * wheelLine() +} diff --git a/internal/gui/parts/segments.go b/internal/gui/parts/segments.go index 15eefb0d..470a7a10 100644 --- a/internal/gui/parts/segments.go +++ b/internal/gui/parts/segments.go @@ -41,6 +41,9 @@ type Segments struct { // from knows whether the keyboard arrived by press or by key - see // PointerFocus and Toggle, which follow the same rule. from PointerFocus + + // Held is the options that cannot be chosen now, each with why - see Held. + Held Held } var ( @@ -55,6 +58,7 @@ func NewSegments(options []string, changed func(string)) *Segments { if len(options) > 0 { s.Selected = options[0] } + s.Held.redraw = s.Refresh s.ExtendBaseWidget(s) return s } @@ -79,6 +83,26 @@ func (s *Segments) SetSelected(value string) { } } +// SetOptions replaces the words the switch offers, for a switch whose choices +// depend on something else on the form - the ways of giving a size, of which +// smallest is offered for pictures only. +// +// The chosen word stays chosen when it is still offered. When it is not, the +// first word is chosen and OnChanged says so, because a switch showing a word +// it no longer holds would be stating a way the form does not send. +func (s *Segments) SetOptions(options []string) { + s.Options = options + if s.indexOf(s.Selected) >= 0 || len(options) == 0 { + s.Refresh() + return + } + s.Selected = options[0] + s.Refresh() + if s.OnChanged != nil { + s.OnChanged(s.Selected) + } +} + func (s *Segments) indexOf(value string) int { for i, o := range s.Options { if o == value { @@ -91,13 +115,14 @@ func (s *Segments) indexOf(value string) int { // Tapped chooses the segment under the pointer and puts the keyboard on the // switch, quietly - the way the toolkit's radio item does (widget/radio_item.go // Tapped), so the arrows step on from what was clicked. See Toggle.Tapped for -// the whole of why, and for what stood here until 2026-09-16. +// the whole of why, and for what stood here until 2026-09-16. A held segment +// is not chosen, and the pointer over it has already said why. func (s *Segments) Tapped(event *fyne.PointEvent) { if s.Disabled() || event == nil { return } s.from.Take(s) - if at := s.segmentAt(event.Position.X); at >= 0 { + if at := s.segmentAt(event.Position.X); at >= 0 && !s.Held.Has(s.Options[at]) { s.SetSelected(s.Options[at]) } } @@ -131,12 +156,19 @@ func (s *Segments) MouseMoved(e *desktop.MouseEvent) { } if at != s.hovered { s.hovered = at + // Why a held option cannot be chosen, under the pointer that is on + // it, and nothing open for the segment the pointer left. + s.Held.stop() + if at >= 0 { + s.Held.tell(s.Options[at], s) + } s.Refresh() } } func (s *Segments) MouseOut() { if s.hovered != -1 { s.hovered = -1 + s.Held.stop() s.Refresh() } } @@ -184,20 +216,26 @@ func (s *Segments) TypedKey(event *fyne.KeyEvent) { if !s.marked { s.mark() } + // Each key steps over a held option to the next one that can be chosen, + // and does nothing when there is none that way. at := s.indexOf(s.Selected) + to := -1 switch event.Name { case fyne.KeyLeft: if at > 0 { - s.SetSelected(s.Options[at-1]) + to = s.Held.reachable(s.Options, at, -1) } case fyne.KeyRight: - if at >= 0 && at < len(s.Options)-1 { - s.SetSelected(s.Options[at+1]) + if at >= 0 { + to = s.Held.reachable(s.Options, at, 1) } case fyne.KeyHome: - s.SetSelected(s.Options[0]) + to = s.Held.reachable(s.Options, -1, 1) case fyne.KeyEnd: - s.SetSelected(s.Options[len(s.Options)-1]) + to = s.Held.reachable(s.Options, len(s.Options), -1) + } + if to >= 0 { + s.SetSelected(s.Options[to]) } } @@ -227,9 +265,10 @@ type segmentsRenderer struct { } // build makes one fill and one word per option, and a rule between each pair. -// The count is fixed once, because a switch does not gain options after it is -// built. +// Made again whenever the count of options changes - see SetOptions - and +// only then, so a refresh of the same switch draws into the same objects. func (r *segmentsRenderer) build() { + r.fills, r.words, r.rules = nil, nil, nil for range r.seg.Options { fill := canvas.NewRectangle(color.Transparent) // Rounded to sit inside the border's own curve. Until 2026-09-16 the @@ -284,12 +323,15 @@ func (r *segmentsRenderer) MinSize() fyne.Size { } func (r *segmentsRenderer) Refresh() { + if len(r.words) != len(r.seg.Options) { + r.build() + } off := r.seg.Disabled() chosen := r.seg.indexOf(r.seg.Selected) for i, word := range r.seg.Options { r.words[i].Text = word r.words[i].TextSize = TextBody - r.fills[i].FillColor, r.words[i].Color = segmentFace(i == chosen, i == r.seg.hovered, off) + r.fills[i].FillColor, r.words[i].Color = segmentFace(i == chosen, i == r.seg.hovered, off, r.seg.Held.Has(word)) redraw(r.fills[i], r.words[i]) } for i := range r.rules { @@ -320,15 +362,23 @@ func (r *segmentsRenderer) Refresh() { // frozen for a run would not have said which way of stating a size it was // running with (O223). It never showed, because the switch was not being // frozen at all, which is the other half of O223. -func segmentFace(chosen, hovered, off bool) (fill, ink color.Color) { +// +// A held option (Hold) takes the quietest ink and lights up under nothing: a +// fill under the pointer says "press here", which it cannot keep. Held and +// chosen - chosen before the field it waits for was emptied - it keeps the +// chosen fill in the ink of a frozen choice, which reads on that fill where +// the held ink would not. +func segmentFace(chosen, hovered, off, held bool) (fill, ink color.Color) { dark := theme.VariantDark fill = color.Transparent switch { - case off: + case off || held && chosen: ink = PaletteColour(theme.ColorNameDisabled, dark) if chosen { fill = PaletteColour(theme.ColorNameSelection, dark) } + case held: + ink = PaletteColour(ColorNameHeld, dark) case chosen: fill = PaletteColour(theme.ColorNameSelection, dark) ink = PaletteColour(theme.ColorNameForeground, dark) diff --git a/internal/gui/parts/theme.go b/internal/gui/parts/theme.go index 85fe5d41..c8a6f372 100644 --- a/internal/gui/parts/theme.go +++ b/internal/gui/parts/theme.go @@ -70,6 +70,22 @@ const ColorNamePanel fyne.ThemeColorName = "panel" // Owner's decision of 2026-09-21 - see docs/GUI-STRUCTURE-2026-09-21.md. const ColorNameLabel fyne.ThemeColorName = "label" +// ColorNameHeld is the ink of a choice that cannot be made yet - Smallest on +// the switch of a picture with no width and height (Segments.Hold). The +// quietest ink, a step below a hint, where the disabled ink is a step above +// it: a frozen value is something somebody typed and wants to re-read during +// a run, a held choice is one they cannot take, and drawn in the disabled ink +// it stood out brighter than the choices beside it that they can (measured +// off the stored screen on 2026-11-18: 161 against 133). +const ColorNameHeld fyne.ThemeColorName = "held" + +// ColorNameLiteral is the ink of a value to type, inside an explanation +// (Explanation, core.Pieces) - drawn in the type of code as well, so it reads +// as "this, exactly" against the words round it. The accent of the palette, +// the owner's choice of 2026-11-18. A name of its own, so the value can move +// away from the accent without touching what the accent means elsewhere. +const ColorNameLiteral fyne.ThemeColorName = "literal" + // ColorNameTipShade is the shade an explanation casts on the form under it. // A name of its own rather than the toolkit's Shadow, which this palette // answers with nothing on purpose (see ColorNameShadow): the toolkit lays its @@ -122,7 +138,11 @@ var ( // made the one thing a person wants to re-read during a run the hardest // thing on the screen to read. A button loses its fill when it is // disabled, so it does not need the text to carry the whole message. - theme.ColorNameDisabled: hex(0xC7, 0xC7, 0xCC), + theme.ColorNameDisabled: hex(0xC7, 0xC7, 0xCC), + // 51.3 in L*, 15.5 below the hint, and 3.9:1 on the page - quieter + // than anything that can be used and still read without effort. + ColorNameHeld: hex(0x7A, 0x7A, 0x80), + ColorNameLiteral: hex(0x5A, 0xB3, 0xF2), theme.ColorNameError: hex(0xF4, 0x8F, 0x8D), theme.ColorNameSuccess: hex(0x42, 0xC2, 0x60), theme.ColorNameWarning: hex(0xDA, 0xA1, 0x31), @@ -333,7 +353,11 @@ var ( // The same three steps the other way up: on a white page "closer to // the value" means darker. 9.3, 25.9 and 37.7 in L*, 16.6 and 11.8 // apart. - theme.ColorNameDisabled: hex(0x3D, 0x3D, 0x42), + theme.ColorNameDisabled: hex(0x3D, 0x3D, 0x42), + // The other way up: 56.2 in L*, 18.5 lighter than the hint, 3.6:1 on + // white. + ColorNameHeld: hex(0x87, 0x87, 0x90), + ColorNameLiteral: hex(0x28, 0x68, 0x93), theme.ColorNameError: hex(0xBB, 0x29, 0x3B), theme.ColorNameSuccess: hex(0x23, 0x71, 0x35), theme.ColorNameWarning: hex(0x80, 0x5D, 0x18), diff --git a/internal/gui/parts/tokens.go b/internal/gui/parts/tokens.go index 1d405bad..5ead2bd9 100644 --- a/internal/gui/parts/tokens.go +++ b/internal/gui/parts/tokens.go @@ -293,6 +293,12 @@ func EdgeWidth() float32 { return edgeWidth } // guard asking whether the words start there or a column later. func RowGutter() float32 { return rowGutter } +// WheelLinesDefault is how many lines of text one notch of a mouse wheel +// moves an area by where the system has no setting for it - the number +// Windows ships with, so a Linux desktop scrolls this window as a Windows one +// does out of the box. +const WheelLinesDefault = 3 + // NoteItemsShown is how many items of one note of a tool's result the window // lists before it says how many more there are. Each item is a line drawn on // the canvas, and a checksum file of a folder that moved can have a hundred diff --git a/internal/gui/parts/wheel_darwin.go b/internal/gui/parts/wheel_darwin.go new file mode 100644 index 00000000..32e867cf --- /dev/null +++ b/internal/gui/parts/wheel_darwin.go @@ -0,0 +1,10 @@ +//go:build darwin + +package parts + +// wheelDistance leaves the wheel as the toolkit hands it over on macOS. There +// the system's own deltas arrive already scaled and accelerated, the way every +// other program on the machine gets them, and the toolkit multiplies them by +// its scrollSpeed of 10 (fyne internal/driver/glfw/scroll_speed_darwin.go, +// v2.8.2) - so a Mac already scrolls this window as it scrolls anything else. +func wheelDistance(dy, _ float32) float32 { return dy } diff --git a/internal/gui/parts/wheel_other.go b/internal/gui/parts/wheel_other.go new file mode 100644 index 00000000..2bb03f07 --- /dev/null +++ b/internal/gui/parts/wheel_other.go @@ -0,0 +1,18 @@ +//go:build !darwin + +package parts + +// ToolkitNotch is the step the toolkit hands over for one notch of a wheel on +// Windows and Linux: GLFW reports a notch as 1 and the toolkit multiplies it +// by scrollSpeed in fyne internal/driver/glfw/scroll_speed_default.go - 25 in +// v2.8.2. TestTheWheelStepIsTheToolkitsStep reads that file, so a toolkit +// that changes its step turns a guard red rather than every notch silently +// moving a different distance. +const ToolkitNotch = 25 + +// wheelDistance is the distance a wheel turned by dy should move an area +// showing view units: the notches dy stands for, each the system's distance. +// A touchpad's fraction of a notch stays a fraction. +func wheelDistance(dy, view float32) float32 { + return dy / ToolkitNotch * notchDistance(view) +} diff --git a/internal/gui/run_cgo.go b/internal/gui/run_cgo.go index 0bfbe9fa..ea07739f 100644 --- a/internal/gui/run_cgo.go +++ b/internal/gui/run_cgo.go @@ -339,6 +339,26 @@ func openPath(path string) { _ = fyne.CurrentApp().OpenURL(address) } +// followTheSystem takes what the system keeps for every program rather than +// for one window. The dark menus are asked for before the window exists, +// because Windows reads the setting when it builds the menus - see +// darkmenus_windows.go for what it is and what it costs. How far a notch of +// the wheel scrolls is asked of the system at every notch - see parts.Scroll +// for why the toolkit's own step is not kept. +func followTheSystem() { + PreferDarkMenus() + parts.WheelLines = wheelLines +} + +// wheelLines is the system's lines for a notch of the wheel, or the default +// where the system has none to give. +func wheelLines() int { + if lines, ok := SystemWheelLines(); ok { + return lines + } + return parts.WheelLinesDefault +} + // run opens a real window. The only file in this tree that reaches the app // package, and therefore the only one that needs a C compiler. func run(launch Launch, errOut io.Writer) int { @@ -377,10 +397,8 @@ func run(launch Launch, errOut io.Writer) int { Migrations: map[string]bool{"fyneDo": true}, }) - // Asked before the window exists, because it is a setting for the whole - // process rather than for one window, and Windows reads it when it builds - // the menus. See darkmenus_windows.go for what it is and what it costs. - PreferDarkMenus() + // Asked before the window exists - see followTheSystem. + followTheSystem() // Where the toolkit says what went wrong when it cannot open its window. // It writes through the standard logger, whose stream a binary built for diff --git a/internal/gui/text/choicenames.go b/internal/gui/text/choicenames.go new file mode 100644 index 00000000..00dd1773 --- /dev/null +++ b/internal/gui/text/choicenames.go @@ -0,0 +1,122 @@ +package text + +import "sort" + +// EnglishChoice is the English ChoiceName falls back to: the value itself, +// except for the values named lists. Exported for the guard that writes the +// words of the registries out for a translator. +// +// A value is what a recipe, the command line and the manifest write. A list on +// the screen names it in the language of the window (the owner's decision of +// 2026-10-05, docs/OKNO-PO-POLSKU-2026-10-05.md section 0), and English is one +// of those languages: test beside placeholder does not say what a picture +// shows, and a menu of reasons a file is refused should not read size_zero. +func EnglishChoice(of, value string) string { + if name, ok := named[of][value]; ok { + return name + } + return value +} + +// named are the values whose English name is not the value: a word that says +// too little on its own (test, sweep, both), and a value written the way a +// recipe writes a key, with its words joined by _ or -. Read off every list on +// 2026-11-17 (docs/SIZE-FIXES-2026-11-16.md section 6.3). +// +// A word that reads by itself - portrait, semicolon, none - stays as it is, and +// so does a token somebody looks up or types elsewhere: utf-8, a4, sha256, 644, +// quoted-printable. +// +// Keyed by the recipe key of the setting the list belongs to, as ChoiceKey is: +// every format declaring one key shares one name for each of its values. +var named = map[string]map[string]string{ + "body": { + "alternative": "plain text and HTML", + "any-value": "every kind of value", + "html": "HTML", + "plain": "plain text", + }, + "content": { + "sweep": "rising tone", + "test": "test pattern", + "tone": "steady tone", + }, + "entry_format": { + "apache-combined": "Apache combined", + "apache-common": "Apache common", + "json-lines": "JSON Lines", + }, + "expected.reason": { + "content_malformed": "malformed content", + "count_limit": "file count limit", + "dimensions_limit": "dimensions limit", + "encoding_invalid": "invalid encoding", + "extension_rule": "extension rule", + "filename_invalid": "invalid file name", + "filename_too_long": "file name too long", + "filename_traversal": "path outside the folder", + "malware_signature": "malware signature", + "mime_mismatch": "type does not match the content", + "nesting_depth": "nesting depth", + "size_limit": "size limit", + "size_zero": "empty file", + }, + "formatting": { + "record-per-line": "record per line", + }, + "id_encoding": { + "upper-hex": "upper-case hex", + }, + "key_case": { + "camel": "camelCase", + "snake": "snake_case", + }, + "methods": { + "get": "GET only", + "read": "GET and HEAD", + }, + "metric_kind": { + "exponential-histogram": "exponential histogram", + }, + "rotate": { + "0": "0 degrees", + "90": "90 degrees", + "180": "180 degrees", + "270": "270 degrees", + }, + "status_mix": { + "client-errors": "client errors", + "server-errors": "server errors", + }, + "text_encoding": { + "both": "unicode and code page", + "codepage": "code page", + }, + "time_order": { + "in-order": "in order", + "out-of-order": "out of order", + }, +} + +// NamedChoice is one value named by hand, for the guards: Of is the recipe key +// of the setting whose list holds it. +type NamedChoice struct{ Of, Value string } + +// NamedChoices are the values EnglishChoice does not say as themselves, sorted, +// for the guard that asks each of them to still be a value something declares +// - a name left behind by a renamed value changes nothing and says nothing. +func NamedChoices() []NamedChoice { + var out []NamedChoice + for of, values := range named { + for value := range values { + out = append(out, NamedChoice{of, value}) + } + } + sort.Slice(out, func(i, j int) bool { + if out[i].Of != out[j].Of { + return out[i].Of < out[j].Of + } + return out[i].Value < out[j].Value + }) + return out +} diff --git a/internal/gui/text/labels.go b/internal/gui/text/labels.go index 4b931108..c2056dfc 100644 --- a/internal/gui/text/labels.go +++ b/internal/gui/text/labels.go @@ -45,16 +45,39 @@ func EnglishLabel(key string) string { // too, and non_finite read "Non finite", which names the values it writes in // no words a reader of OTLP knows. // +// The rest came out of reading every text of the window on 2026-11-17 +// (docs/SIZE-FIXES-2026-11-16.md section 6.3): an abbreviation spelled as a +// word (Pdf, Ip, Bbox, Ids), a verb over a box that holds a list or a number +// (Allow, Deny, Rotate, Missing), and a word that means something else on the +// screen - a batch is a batch of files everywhere else in this window, and a +// sample of the text-encoding preset is the size of each file. +// // Keyed by the recipe key rather than declared on a format's setting, because // a label belongs to the key: every format, preset and tool declaring one key // shares one Label entry in the catalogue. var respelled = map[string]string{ + "allow": "Allowed types", + "batch": "Records per line", + "bbox": "Bounding box", "bom": "BOM", + "bulk": "Mass upload", + "deny": "Denied extensions", + "embed": "Picture inside", + "expected": "Expected checksum", + "far-over": "Far over the limit", "id_encoding": "ID encoding", + "ids": "Feature IDs", "inline": "Pictures", "inline_format": "Picture format", "inline_size": "Picture size", + "ip_version": "IP version", + "missing": "Part cut off", "non_finite": "NaN and Infinity", + "pdf_version": "PDF version", + "rotate": "Rotation", + "sample": "File size", + "spread": "Distances from the limit", + "unlocated": "Features without a place", } // RespelledKeys are the keys EnglishLabel does not spell out of themselves, diff --git a/internal/gui/text/locale/en.json b/internal/gui/text/locale/en.json index 10645cfa..df6821a0 100644 --- a/internal/gui/text/locale/en.json +++ b/internal/gui/text/locale/en.json @@ -206,13 +206,13 @@ }, "DetailBoundary": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-eaf5b74b1f70", - "other": "Give the limit your system declares, as 10mb. Units count in 1024s, and the run prints the number it used." + "hash": "sha256-67ed619061b2", + "other": "Give the limit your system declares, such as `10mb`. Units count in 1024s, so `10mb` is 10485760 bytes." }, "DetailBuildOnPreset": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-5f88fed7a993", - "other": "Unticked, the batches below are the whole recipe. Ticked, the chosen preset's files come first and the batches are added after them." + "hash": "sha256-922af162e408", + "other": "Unticked, the batches below are everything the run makes. Ticked, the chosen preset's files come first and the batches are added after them." }, "DetailDamage": { "description": "The longer explanation behind the button beside a field name.", @@ -225,9 +225,9 @@ "other": "Opens the support page in your browser. The tool is free and stays free - this pays for the time that goes into it." }, "DetailExpected": { - "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-7923af561fdd", - "other": "It reaches the manifest and nothing else reads it. Leave it alone where the right answer depends on the application's own policy." + "description": "The longer explanation behind the button beside a field name. Carries one value, {{.NotStated}}, which has to stay spelled exactly that way.", + "hash": "sha256-5ed3fe511390", + "other": "Left at {{.NotStated}}, the manifest records the outcome as unspecified, or as reject for a file whose damage certainly breaks its format. Leave it at {{.NotStated}} where the right answer depends on the application's own policy." }, "DetailGitHub": { "description": "The longer explanation behind the button beside a field name.", @@ -241,8 +241,8 @@ }, "DetailLabel": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-aeb24fe1804e", - "other": "Writes into the file what it is and how big it was meant to be. Turn it off for a file that has to hold nothing but its content." + "hash": "sha256-64e764692711", + "other": "Writes into each file what it is - its format, its seed, any damage and, except in a picture or a film, its size. Turn it off for a file that has to hold nothing but its content." }, "DetailManifest": { "description": "The longer explanation behind the button beside a field name.", @@ -251,8 +251,8 @@ }, "DetailNameTemplate": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-3e64e80529fb", - "other": "Left empty, the files are named after the batch and numbered, like invoices_0001.pdf. Fill it in and the name is used exactly as written, extension and all. The one placeholder is {index:04}, which becomes 0001, 0002 and so on, and a batch of more than one file needs it." + "hash": "sha256-d535c81644d8", + "other": "Left empty, the files are named after the batch and numbered, like invoices_0001.pdf. Fill it in and the name is used exactly as written, extension and all. The one placeholder is `{index:04}`, which becomes 0001, 0002 and so on, and a batch of more than one file needs it." }, "DetailNumberIfTaken": { "description": "The longer explanation behind the button beside a field name.", @@ -265,9 +265,9 @@ "other": "It is created if it is not there." }, "DetailPreset": { - "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-9c28266cd16b", - "other": "The set is worked out from the answer." + "description": "The longer explanation behind the button beside a field name. Carries one value, {{.Settings}}, which has to stay spelled exactly that way.", + "hash": "sha256-70a71df7ab08", + "other": "Each preset is a ready-made set of files for the question it names. Its files are made from the values under {{.Settings}}." }, "DetailPurpose": { "description": "The longer explanation behind the button beside a field name.", @@ -281,8 +281,8 @@ }, "DetailSeed": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-823564b2ed53", - "other": "On any machine and in any build of this tool. 0 is the seed a run uses when nobody asks for another one. It is a seed like any other rather than a request for random files, which this tool never produces." + "hash": "sha256-d3ce50a025b6", + "other": "On any machine. A new version of this tool may change them, and its release notes then say so. `0` is the seed a run uses when nobody asks for another one. It is a seed like any other rather than a request for random files, which this tool never produces." }, "DetailSendAs": { "description": "The longer explanation behind the button beside a field name.", @@ -291,18 +291,13 @@ }, "DetailSize": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-df450f130c7f", - "other": "Units count in 1024s, so 10mb is 10485760 bytes. A plain number is a count of bytes. smallest makes a picture with its width and height set as small as it can be." + "hash": "sha256-2e35fc88491e", + "other": "Units count in 1024s, so `10mb` is 10485760 bytes. A plain number is a count of bytes." }, "DetailSizeRange": { "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-421d366dbd3e", - "other": "Two sizes with a hyphen, as 1kb-8kb. Each file gets its own size, drawn from the seed, so the run repeats." - }, - "DetailSizeWay": { - "description": "The longer explanation behind the button beside a field name.", - "hash": "sha256-b65673254620", - "other": "One size gives every file the same size. A range draws a different size for each file. Around a limit makes three files: one byte under the limit, one on it, one over." + "hash": "sha256-31f1b9b7ac0f", + "other": "Two sizes with a hyphen, as `1kb-8kb`. Each file gets its own size, drawn from the seed, so the run repeats." }, "DetailTargetID": { "description": "The longer explanation behind the button beside a field name.", @@ -608,14 +603,14 @@ "other": "What you want to find out." }, "HowToUseChoose": { - "description": "Shown in the window.", - "hash": "sha256-d3826a08883e", - "other": "Choose a preset, or fill in one batch on the first screen." + "description": "Shown in the window. Carries these values, each of which has to stay spelled exactly that way: {{.Presets}}, {{.Single}}, {{.Several}}.", + "hash": "sha256-cb062900f4eb", + "other": "Choose a preset on {{.Presets}}, or describe the files yourself on {{.Single}} or {{.Several}}." }, "HowToUsePress": { - "description": "Shown in the window.", - "hash": "sha256-efe55efa1794", - "other": "Press Generate. The files and a manifest land in the output folder." + "description": "Shown in the window. Carries these values, each of which has to stay spelled exactly that way: {{.Preview}}, {{.Generate}}, {{.OutputDir}}.", + "hash": "sha256-f985c5df4062", + "other": "Press {{.Preview}} to see what would be written, then {{.Generate}}. The files and a manifest go into the folder named in {{.OutputDir}}." }, "HowToUseRead": { "description": "Shown in the window.", @@ -704,8 +699,8 @@ }, "MemoryAutoUnknown": { "description": "Shown in the window. Carries one value, {{.Size}}, which has to stay spelled exactly that way.", - "hash": "sha256-c1b8c2b64c84", - "other": "The memory of this computer could not be read, so runs take {{.Size}}, the most every run took before this setting." + "hash": "sha256-2165025c1e3f", + "other": "The memory of this computer could not be read, so runs may take {{.Size}}." }, "MemoryCustomEmpty": { "description": "Shown in the window.", @@ -719,8 +714,8 @@ }, "MemoryOffIs": { "description": "Shown in the window.", - "hash": "sha256-2b45ce57da2e", - "other": "Runs take what they need. Pictures are not held back and the plan has no limit, so a very large run can be ended by the system without a word." + "hash": "sha256-c3c90d0e1a06", + "other": "Runs take as much memory as they need. A very large run can then be ended by the system without a word." }, "MemoryUnreadable": { "description": "Shown in the window. Carries one value, {{.Value}}, which has to stay spelled exactly that way.", @@ -749,8 +744,8 @@ }, "NoteBase": { "description": "Shown in the window.", - "hash": "sha256-e48510060140", - "other": "With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole recipe." + "hash": "sha256-ecc2f89fb3a6", + "other": "With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are everything the run makes." }, "NoteManifestOnly": { "description": "Shown in the window.", @@ -804,8 +799,8 @@ }, "PreferencesKept": { "description": "Shown on the Preferences screen.", - "hash": "sha256-d5cfc5e4bd88", - "other": "Between runs this window keeps four things: the output directory, the size of the window, and the language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer." + "hash": "sha256-c3993e304ac1", + "other": "For the next time it opens, this window keeps four things: the output directory, the size of the window, and the language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer." }, "PreferencesKeptIn": { "description": "Shown on the Preferences screen.", @@ -819,8 +814,8 @@ }, "PreferencesMemoryScope": { "description": "Shown on the Preferences screen. Carries one value, {{.Floor}}, which has to stay spelled exactly that way.", - "hash": "sha256-4c95226d14ae", - "other": "How much memory one run may take, the plan and the files being written together. Pictures wait for room rather than all being held at once, and a plan larger than this is refused before anything is written. When a run gets close to this amount, the program frees memory more often, which makes the run slower. A run that needs more memory than this still gets it. Under Automatic, a plan of up to {{.Floor}} is never refused. It applies from the next run, and nothing in the files changes." + "hash": "sha256-df04093e16d6", + "other": "How much memory one run may take. A run first works out the whole list of files and keeps that list while it writes, so a list that needs more memory than this is refused before anything is written. Files that need a lot of memory, such as large pictures, are then written in turn rather than all at once. Close to this amount the program frees memory more often, which makes the run slower, and a file that needs more than all of it is still written, on its own. Under Automatic, a list needing up to {{.Floor}} is never refused. It applies from the next run, and nothing in the files changes." }, "PreferencesMissing": { "description": "Shown on the Preferences screen. Carries one value, {{.Tag}}, which has to stay spelled exactly that way.", @@ -912,6 +907,26 @@ "hash": "sha256-e40fb5c32602", "other": "this run will hold about {{.Holds}} in memory by its end, more than the {{.Room}} the memory setting gives it, so it will run slower and the system may end it before its record is written. Split the run, or give it more Memory in Preferences if this machine has the room." }, + "SaysSizeWayBoundary": { + "description": "Shown in the window.", + "hash": "sha256-fcf85f6a0ea4", + "other": "Around a limit makes three files: one byte under the limit, one on it, one over." + }, + "SaysSizeWayExact": { + "description": "Shown in the window.", + "hash": "sha256-ddf826f510c4", + "other": "One size gives every file the same size." + }, + "SaysSizeWayRange": { + "description": "Shown in the window.", + "hash": "sha256-6315d292c0fc", + "other": "A range draws a different size for each file." + }, + "SaysSizeWaySmallest": { + "description": "Shown in the window.", + "hash": "sha256-ea0d93e1274a", + "other": "Smallest makes each picture as small as it can be at its width and height, so the files come out at different sizes. It can be chosen once both are set in the format's settings." + }, "SectionBase": { "description": "The heading over a group of fields.", "hash": "sha256-cbef193cc958", @@ -1052,6 +1067,21 @@ "hash": "sha256-8879adb25c7d", "other": "A range" }, + "SizeWaySmallest": { + "description": "Shown in the window.", + "hash": "sha256-b2443d1a486e", + "other": "Smallest" + }, + "SmallestCaption": { + "description": "Shown in the window.", + "hash": "sha256-e2fe0be2508c", + "other": "Known after Preview, from the width and height in the format's settings." + }, + "SmallestNeedsTheSides": { + "description": "Shown in the window.", + "hash": "sha256-51c334c1bae8", + "other": "Smallest needs the picture's width and height. Set both in the format's settings first." + }, "StoppedAfter": { "description": "Shown in the window. Carries one value, {{.Files}}, which has to stay spelled exactly that way.", "hash": "sha256-f08278015581", @@ -1069,13 +1099,13 @@ }, "SubtitleGenerate": { "description": "The sentence under the heading at the top of a screen, saying what the screen is for.", - "hash": "sha256-e7dcd4001e28", - "other": "Files of one format and one size, with a manifest that says how the system under test should react to them." + "hash": "sha256-287c7b75171a", + "other": "Files of one format, with a manifest that says how the system under test should react to them." }, "SubtitlePreferences": { "description": "The sentence under the heading at the top of a screen, saying what the screen is for.", - "hash": "sha256-836103012003", - "other": "How this window speaks, how much memory its runs may take, and what it keeps between runs. Nothing here changes the files it makes." + "hash": "sha256-3cd0e133cd77", + "other": "How this window speaks, how much memory its runs may take, and what it remembers for the next time it opens. Nothing here changes the files it makes." }, "SubtitlePreset": { "description": "The sentence under the heading at the top of a screen, saying what the screen is for.", @@ -1092,6 +1122,16 @@ "hash": "sha256-53bdfa16d586", "other": "Small things to do with files you already have. Every tool here is on the command line too, as tfg tool." }, + "SwitchOff": { + "description": "Shown in the window.", + "hash": "sha256-b4dc66dde806", + "other": "off" + }, + "SwitchOn": { + "description": "Shown in the window.", + "hash": "sha256-b8d31e852725", + "other": "on" + }, "SystemAlreadyThere": { "description": "Shown in the window. Carries one value, {{.Number}}, which has to stay spelled exactly that way.", "hash": "sha256-5907673e30cf", @@ -1242,6 +1282,11 @@ "hash": "sha256-1da20fb189f8", "other": "Stopped before it finished. Nothing was written or changed." }, + "UseSmallestForEach": { + "description": "Shown in the window.", + "hash": "sha256-a09b7491974d", + "other": "Make each picture as small as it can be" + }, "UseSmallestSize": { "description": "Shown in the window. Carries one value, {{.Size}}, which has to stay spelled exactly that way.", "hash": "sha256-c42521834dd8", @@ -1269,8 +1314,8 @@ }, "WorkingOutTheCost": { "description": "Shown in the window.", - "hash": "sha256-76988f639628", - "other": "Working out what this would cost..." + "hash": "sha256-047842be5390", + "other": "Working out the files and their sizes..." }, "WritingTo": { "description": "Shown in the window. Carries one value, {{.Directory}}, which has to stay spelled exactly that way.", diff --git a/internal/gui/text/locale/pl.json b/internal/gui/text/locale/pl.json index c7466e94..7b5eb2e0 100644 --- a/internal/gui/text/locale/pl.json +++ b/internal/gui/text/locale/pl.json @@ -40,26 +40,25 @@ "DecimalMark": { "hash": "sha256-cdb4ee2aea69", "other": "," }, "Defect": { "hash": "sha256-2241be2ea8a6", "other": "W programie coś poszło nie tak, a nie powinno. Zgłoś to razem z tym opisem: {{.Detail}}" }, "DetailBasePreset": { "hash": "sha256-e04b69a605dc", "other": "Ustawienia pod nim należą do presetu. Puste bierze swoją wartość domyślną, a manifest zapisuje, które tak zrobiły." }, - "DetailBoundary": { "hash": "sha256-eaf5b74b1f70", "other": "Podaj limit, który deklaruje twój system, na przykład 10mb. Jednostki liczą się po 1024, a przebieg wypisuje liczbę, której użył." }, - "DetailBuildOnPreset": { "hash": "sha256-5f88fed7a993", "other": "Bez zaznaczenia partie poniżej są całym przepisem. Z zaznaczeniem najpierw idą pliki wybranego presetu, a partie są dodawane po nich." }, + "DetailBoundary": { "hash": "sha256-67ed619061b2", "other": "Podaj limit, który deklaruje twój system, na przykład `10mb`. Jednostki liczą się po 1024, więc `10mb` to 10485760 bajtów." }, + "DetailBuildOnPreset": { "hash": "sha256-922af162e408", "other": "Bez zaznaczenia partie poniżej są wszystkim, co zrobi przebieg. Z zaznaczeniem najpierw idą pliki wybranego presetu, a partie są dodawane po nich." }, "DetailDamage": { "hash": "sha256-96921213f617", "other": "Pliki mają rozmiar, o który prosisz, i żaden czytnik ich nie przyjmie - a właśnie to walidator ma odrzucić. Manifest zapisuje, co zostało zepsute, i mówi, że plik powinien zostać odrzucony." }, "DetailDonate": { "hash": "sha256-8531eb297aaa", "other": "Otwiera stronę wsparcia w przeglądarce. Narzędzie jest darmowe i takie zostanie - to płaci za czas, który w nie idzie." }, - "DetailExpected": { "hash": "sha256-7923af561fdd", "other": "Trafia do manifestu i nic innego go nie czyta. Zostaw puste tam, gdzie właściwa odpowiedź zależy od polityki samej aplikacji." }, + "DetailExpected": { "hash": "sha256-5ed3fe511390", "other": "Gdy zostaje wybór {{.NotStated}}, manifest zapisuje wynik jako unspecified, a dla pliku, którego uszkodzenie na pewno łamie jego format, jako reject. Zostaw ten wybór tam, gdzie właściwa odpowiedź zależy od polityki samej aplikacji." }, "DetailGitHub": { "hash": "sha256-e3cd538a1d71", "other": "Otwiera stronę projektu na GitHubie w przeglądarce - kod źródłowy, wydania i miejsce na zgłoszenie problemu." }, "DetailGroup": { "hash": "sha256-37e7791bbda7", "other": "Trafia do manifestu, więc test może sprawdzić całą klasę przypadków naraz." }, - "DetailLabel": { "hash": "sha256-aeb24fe1804e", "other": "Zapisuje w pliku, czym jest i jaki miał mieć rozmiar. Wyłącz dla pliku, który ma zawierać wyłącznie swoją treść." }, + "DetailLabel": { "hash": "sha256-64e764692711", "other": "Zapisuje w każdym pliku, czym jest - jego format, ziarno, uszkodzenie, jeśli jest, i rozmiar, poza obrazem i filmem. Wyłącz dla pliku, który ma zawierać wyłącznie swoją treść." }, "DetailManifest": { "hash": "sha256-98009d7dd5ba", "other": "Trafia do katalogu wyjściowego obok plików." }, - "DetailNameTemplate": { "hash": "sha256-3e64e80529fb", "other": "Puste - pliki dostają nazwę partii i numer, na przykład invoices_0001.pdf. Wypełnione - nazwa jest użyta dokładnie tak, jak ją napisano, razem z rozszerzeniem. Jedyny znacznik to {index:04}, który staje się 0001, 0002 i tak dalej, a partia z więcej niż jednym plikiem go potrzebuje." }, + "DetailNameTemplate": { "hash": "sha256-d535c81644d8", "other": "Puste - pliki dostają nazwę partii i numer, na przykład invoices_0001.pdf. Wypełnione - nazwa jest użyta dokładnie tak, jak ją napisano, razem z rozszerzeniem. Jedyny znacznik to `{index:04}`, który staje się 0001, 0002 i tak dalej, a partia z więcej niż jednym plikiem go potrzebuje." }, "DetailNumberIfTaken": { "hash": "sha256-3c46d124a296", "other": "Gdy katalog wyjściowy zawiera już wcześniejszy przebieg, ten przebieg trafia obok niego. Jego pliki i manifest dostają w nazwie numer, na przykład files-2_0001.pdf, a nic, co już tam jest, się nie zmienia. Po wyłączeniu przebieg do takiego katalogu zostaje odrzucony, więc każdy przebieg potrzebuje własnego katalogu." }, "DetailOutputDir": { "hash": "sha256-55317cd71eaa", "other": "Zostanie utworzony, jeśli go nie ma." }, - "DetailPreset": { "hash": "sha256-9c28266cd16b", "other": "Zestaw jest wyliczany z odpowiedzi." }, + "DetailPreset": { "hash": "sha256-70a71df7ab08", "other": "Każdy preset to gotowy zestaw plików na pytanie, które nazywa. Jego pliki powstają z wartości w sekcji {{.Settings}}." }, "DetailPurpose": { "hash": "sha256-d3b3309352dc", "other": "Trafia do manifestu i do instrukcji obok niego, które mówią, do czego służy każdy plik przebiegu. Nie zmienia żadnego bajtu żadnego pliku." }, "DetailReason": { "hash": "sha256-d7f3c443d829", "other": "Z zamkniętej listy, żeby raport mógł grupować po powodzie. Nazywa regułę, o którą chodzi, niezależnie od wyniku - plik o bajt mniejszy od limitu powinien zostać przyjęty, a regułą w grze wciąż jest limit rozmiaru. Powód wymaga obok siebie oczekiwanego wyniku." }, - "DetailSeed": { "hash": "sha256-823564b2ed53", "other": "Na każdej maszynie i w każdej wersji tego narzędzia. 0 to ziarno, którego przebieg używa, gdy nikt nie poprosi o inne. To ziarno jak każde inne, a nie prośba o losowe pliki - takich to narzędzie nigdy nie tworzy." }, + "DetailSeed": { "hash": "sha256-d3ce50a025b6", "other": "Na każdej maszynie. Nowa wersja tego narzędzia może je zmienić i wtedy mówi o tym w opisie wydania. `0` to ziarno, którego przebieg używa, gdy nikt nie poprosi o inne. To ziarno jak każde inne, a nie prośba o losowe pliki - takich to narzędzie nigdy nie tworzy." }, "DetailSendAs": { "hash": "sha256-a9163c047566", "other": "Dla nazwy, której nie zapisze żaden dysk, na przykład ../climbed_out.jpg. Pliki zachowują własne nazwy w folderze, a manifest niesie tę, więc test może wysłać każdy plik pod nią. Nie zmienia żadnego bajtu żadnego pliku." }, - "DetailSize": { "hash": "sha256-df450f130c7f", "other": "Jednostki liczą się po 1024, więc 10mb to 10485760 bajtów. Sama liczba to liczba bajtów. smallest robi obrazek z ustawioną szerokością i wysokością tak mały, jak się da." }, - "DetailSizeRange": { "hash": "sha256-421d366dbd3e", "other": "Dwa rozmiary z łącznikiem, na przykład 1kb-8kb. Każdy plik dostaje własny rozmiar wyprowadzony z ziarna, więc przebieg się powtarza." }, - "DetailSizeWay": { "hash": "sha256-b65673254620", "other": "Jeden rozmiar daje każdemu plikowi ten sam rozmiar. Zakres losuje inny rozmiar dla każdego pliku. Wokół limitu tworzy trzy pliki: bajt poniżej limitu, dokładnie na nim i bajt powyżej." }, + "DetailSize": { "hash": "sha256-2e35fc88491e", "other": "Jednostki liczą się po 1024, więc `10mb` to 10485760 bajtów. Sama liczba to liczba bajtów." }, + "DetailSizeRange": { "hash": "sha256-31f1b9b7ac0f", "other": "Dwa rozmiary z łącznikiem, na przykład `1kb-8kb`. Każdy plik dostaje własny rozmiar wyprowadzony z ziarna, więc przebieg się powtarza." }, "DetailTargetID": { "hash": "sha256-1a2680483a4d", "other": "Trafia do manifestu i do nazw plików, więc test odróżni te pliki od reszty przebiegu. Ziarna są z niej wyprowadzane, więc jej zmiana zmienia bajty." }, "DetailTool": { "hash": "sha256-1fdd99516e02", "other": "To, na czym narzędzie pracuje, i jego ustawienia zmieniają się razem z wybranym narzędziem." }, "DirectoryWithFreeSpace": { "hash": "sha256-3e96ff18edeb", "other": "{{.Directory}} (wolne {{.Free}})" }, @@ -120,8 +119,8 @@ "HintSizeRange": { "hash": "sha256-a7f91764d39d", "other": "Inny rozmiar dla każdego pliku." }, "HintTargetID": { "hash": "sha256-16b346acd09e", "other": "Krótka nazwa tej partii." }, "HintTool": { "hash": "sha256-6a3014a90ca2", "other": "Czego chcesz się dowiedzieć." }, - "HowToUseChoose": { "hash": "sha256-d3826a08883e", "other": "Wybierz preset albo wypełnij jedną partię na pierwszym ekranie." }, - "HowToUsePress": { "hash": "sha256-efe55efa1794", "other": "Naciśnij Generuj. Pliki i manifest trafią do katalogu wyjściowego." }, + "HowToUseChoose": { "hash": "sha256-cb062900f4eb", "other": "Wybierz preset na karcie {{.Presets}} albo samodzielnie opisz pliki na karcie {{.Single}} lub {{.Several}}." }, + "HowToUsePress": { "hash": "sha256-f985c5df4062", "other": "Naciśnij {{.Preview}}, żeby zobaczyć, co zostanie zapisane, a potem {{.Generate}}. Pliki i manifest trafią do katalogu podanego w polu {{.OutputDir}}." }, "HowToUseRead": { "hash": "sha256-ef0d5f7632c8", "other": "Skieruj swój test na manifest. Dla każdego pliku mówi, co system pod testem powinien z nim zrobić - przyjąć, odrzucić albo oczyścić - albo zapisuje wynik jako unspecified, gdy właściwa odpowiedź należy do polityki samej aplikacji." }, "InstructionsNotSaved": { "hash": "sha256-bfb2e6c568e3", "other": "Nie udało się zapisać instrukcji do {{.Path}} ({{.Cause}}). Manifest został zapisany i zawiera te same informacje." }, "LanguageName": { "hash": "sha256-ba118bf7fc9c", "other": "Polski" }, @@ -139,16 +138,16 @@ "ManifestNamed": { "hash": "sha256-f9540bb6e465", "other": "Manifest: {{.Name}}" }, "ManifestNotSaved": { "hash": "sha256-bb722052cb9e", "other": "pliki zostały zapisane, a manifestu nie udało się zapisać do {{.Path}}" }, "MemoryAutoIs": { "hash": "sha256-3a039b136e1c", "other": "Przebiegi mogą wziąć {{.Size}}, połowę pamięci, którą ten komputer daje programowi." }, - "MemoryAutoUnknown": { "hash": "sha256-c1b8c2b64c84", "other": "Nie udało się odczytać pamięci tego komputera, więc przebiegi biorą {{.Size}}, czyli najwięcej, ile brał każdy przebieg przed tym ustawieniem." }, + "MemoryAutoUnknown": { "hash": "sha256-2165025c1e3f", "other": "Nie udało się odczytać pamięci tego komputera, więc przebiegi mogą wziąć {{.Size}}." }, "MemoryCustomEmpty": { "hash": "sha256-f021f2e8d953", "other": "Wpisz rozmiar, na przykład 8gb. Dopóki go nie ma, przebiegi używają ustawienia Automatycznie." }, "MemoryCustomIs": { "hash": "sha256-269b4fa95f8d", "other": "Przebiegi mogą wziąć rozmiar podany wyżej." }, - "MemoryOffIs": { "hash": "sha256-2b45ce57da2e", "other": "Przebiegi biorą tyle, ile potrzebują. Obrazy nie są wstrzymywane, a plan nie ma limitu, więc bardzo duży przebieg może zostać zakończony przez system bez słowa." }, + "MemoryOffIs": { "hash": "sha256-c3c90d0e1a06", "other": "Przebiegi biorą tyle pamięci, ile potrzebują. Bardzo duży przebieg może wtedy zostać zakończony przez system bez słowa." }, "MemoryUnreadable": { "hash": "sha256-42d966183e49", "other": "Zapisanego wcześniej ustawienia pamięci, {{.Value}}, nie udało się odczytać. Przebiegi używają ustawienia Automatycznie, dopóki nie wybierzesz ponownie." }, "MemoryWayAuto": { "hash": "sha256-d461a493a375", "other": "Automatycznie" }, "MemoryWayCustom": { "hash": "sha256-494ca78f7374", "other": "Własna" }, "MemoryWayOff": { "hash": "sha256-f7fcff0d8fea", "other": "Bez limitu" }, "NotAWholeNumber": { "hash": "sha256-2537ac57d3c7", "other": "{{.Field}} ma wartość {{.Value}}, która nie jest liczbą całkowitą. Wpisz same cyfry, na przykład 1 albo 500" }, - "NoteBase": { "hash": "sha256-e48510060140", "other": "Z zaznaczonym polem najpierw idą pliki wybranego presetu, a partie poniżej są dodawane po nich. Bez niego partie są całym przepisem." }, + "NoteBase": { "hash": "sha256-ecc2f89fb3a6", "other": "Z zaznaczonym polem najpierw idą pliki wybranego presetu, a partie poniżej są dodawane po nich. Bez niego partie poniżej są wszystkim, co zrobi przebieg." }, "NoteManifestOnly": { "hash": "sha256-794d5d9e2043", "other": "Te pola opisują przypadek. Trafiają do manifestu i niczego nie zmieniają w plikach." }, "NothingProduced": { "hash": "sha256-7d90c4a68d2c", "other": "Nic nie zostało wytworzone." }, "PlaceholderChooseOne": { "hash": "sha256-fdfe6bf17ea5", "other": "(wybierz)" }, @@ -159,10 +158,10 @@ "PlaceholderWorkedOut": { "hash": "sha256-195191b2dc3a", "other": "wyliczane z rozmiaru" }, "PreferencesForgetWhat": { "hash": "sha256-8145d3c07952", "other": "Zapomnij czyści cztery rzeczy wymienione wyżej. To okno nie zapamięta wtedy nic przy zamknięciu, a następne otworzy się tak, jak otworzyło się pierwsze." }, "PreferencesForgotten": { "hash": "sha256-8e950dfcda31", "other": "Zapomniane. Następne okno otworzy się tak jak pierwsze." }, - "PreferencesKept": { "hash": "sha256-d5cfc5e4bd88", "other": "Między przebiegami to okno pamięta cztery rzeczy: katalog wyjściowy, rozmiar okna oraz wybrane wyżej język i pamięć. Okno wyboru folderu pamięta też ostatni pokazany folder. Nic nie opuszcza tego komputera." }, + "PreferencesKept": { "hash": "sha256-c3993e304ac1", "other": "Na następne otwarcie to okno pamięta cztery rzeczy: katalog wyjściowy, rozmiar okna oraz wybrane wyżej język i pamięć. Okno wyboru folderu pamięta też ostatni pokazany folder. Nic nie opuszcza tego komputera." }, "PreferencesKeptIn": { "hash": "sha256-65ceb0c15ff4", "other": "Są przechowywane w tym folderze:" }, "PreferencesLanguageScope": { "hash": "sha256-bc4174717ca7", "other": "Język zmienia tylko okno, a nie pliki, które tworzy, przepisy, manifesty ani linię komend." }, - "PreferencesMemoryScope": { "hash": "sha256-4c95226d14ae", "other": "Ile pamięci może wziąć jeden przebieg, plan i zapisywane pliki razem. Obrazy czekają na miejsce, zamiast trzymać się w pamięci wszystkie naraz, a plan większy niż to ustawienie jest odrzucany, zanim cokolwiek zostanie zapisane. Gdy przebieg zbliża się do tej ilości, program częściej zwalnia pamięć, więc przebieg trwa dłużej. Przebieg, który potrzebuje więcej pamięci, i tak ją dostaje. Przy ustawieniu Automatycznie plan do {{.Floor}} nigdy nie jest odrzucany. Działa od następnego przebiegu i nie zmienia niczego w plikach." }, + "PreferencesMemoryScope": { "hash": "sha256-df04093e16d6", "other": "Ile pamięci może wziąć jeden przebieg. Przebieg najpierw wylicza całą listę plików i trzyma ją, dopóki zapisuje pliki, więc lista, która potrzebuje więcej pamięci niż to ustawienie, jest odrzucana, zanim cokolwiek zostanie zapisane. Pliki, które potrzebują dużo pamięci, na przykład duże obrazy, są potem zapisywane po kolei, a nie wszystkie naraz. Blisko tej ilości program częściej zwalnia pamięć, więc przebieg trwa dłużej, a plik, który potrzebuje więcej niż całe to ustawienie, i tak zostaje zapisany, tylko bez innych plików obok. Przy ustawieniu Automatycznie lista potrzebująca do {{.Floor}} nigdy nie jest odrzucana. Działa od następnego przebiegu i nie zmienia niczego w plikach." }, "PreferencesMissing": { "hash": "sha256-7679a7684a73", "other": "Język wybrany wcześniej, {{.Tag}}, nie jest dostępny w tej wersji. Okno używa języka systemu, dopóki nie wybierzesz ponownie." }, "PreferencesNextStart": { "hash": "sha256-6fee24596599", "other": "Okno mówi wybranym językiem od następnego otwarcia." }, "PreferencesRestartBusy": { "hash": "sha256-1d940383b3e9", "other": "Trwa tworzenie plików. Uruchom ponownie, gdy się skończy." }, @@ -181,6 +180,10 @@ "RendererStartFailed": { "hash": "sha256-3540e225c773", "other": "Ponowne uruchomienie programu z programowym rendererem nie powiodło się: {{.Error}}." }, "RendererStartingAgain": { "hash": "sha256-86c4b674d84e", "other": "Pierwsza próba otwarcia okna nie powiodła się - zwykle to sterownik grafiki bez OpenGL 2.1. Uruchamiam ponownie z programowym rendererem dostarczonym obok programu." }, "RunHoldsMoreThanItsMemory": { "hash": "sha256-e40fb5c32602", "other": "ten przebieg będzie do końca trzymał w pamięci około {{.Holds}}, więcej niż {{.Room}}, które daje mu ustawienie pamięci, więc będzie wolniejszy, a system może go zakończyć, zanim powstanie jego zapis. Podziel przebieg albo daj mu więcej w sekcji Pamięć w Preferencjach, jeśli ta maszyna ma na to miejsce." }, + "SaysSizeWayBoundary": { "hash": "sha256-fcf85f6a0ea4", "other": "Wokół limitu tworzy trzy pliki: bajt poniżej limitu, dokładnie na nim i bajt powyżej." }, + "SaysSizeWayExact": { "hash": "sha256-ddf826f510c4", "other": "Jeden rozmiar daje każdemu plikowi ten sam rozmiar." }, + "SaysSizeWayRange": { "hash": "sha256-6315d292c0fc", "other": "Zakres losuje inny rozmiar dla każdego pliku." }, + "SaysSizeWaySmallest": { "hash": "sha256-ea0d93e1274a", "other": "Najmniejszy robi każdy obraz tak mały, jak się da przy jego szerokości i wysokości, więc pliki mają różne rozmiary. Można go wybrać, gdy obie są ustawione w ustawieniach formatu." }, "SectionBase": { "hash": "sha256-cbef193cc958", "other": "Budowanie na presecie" }, "SectionCarriedBeside": { "hash": "sha256-4cc79104fe33", "other": "Dostarczane obok programu w Windows" }, "SectionCarriedCode": { "hash": "sha256-b0f1aba6039b", "other": "Wkompilowany kod innych autorów" }, @@ -209,14 +212,19 @@ "SizeWayBoundary": { "hash": "sha256-6cea6d4c9fee", "other": "Wokół limitu" }, "SizeWayExact": { "hash": "sha256-225cdeb34c4b", "other": "Jeden rozmiar" }, "SizeWayRange": { "hash": "sha256-8879adb25c7d", "other": "Zakres" }, + "SizeWaySmallest": { "hash": "sha256-b2443d1a486e", "other": "Najmniejszy" }, + "SmallestCaption": { "hash": "sha256-e2fe0be2508c", "other": "Znany po Podglądzie, z szerokości i wysokości w ustawieniach formatu." }, + "SmallestNeedsTheSides": { "hash": "sha256-51c334c1bae8", "other": "Najmniejszy potrzebuje szerokości i wysokości obrazu. Najpierw ustaw obie w ustawieniach formatu." }, "StoppedAfter": { "hash": "sha256-f08278015581", "other": "Zatrzymano. Zapisano: {{.Files}}. Manifest opisuje dokładnie te pliki." }, "Stopping": { "hash": "sha256-823789a4f4b7", "other": "Zatrzymuję - najpierw kończy się bieżący krok, żeby nic nie zostało zapisane do połowy." }, "SubtitleClosing": { "hash": "sha256-e623c2ae70c3", "other": "Okno zamknie się, gdy praca w toku się zatrzyma. Najpierw kończy się bieżący krok, żeby nic nie zostało zapisane do połowy." }, - "SubtitleGenerate": { "hash": "sha256-e7dcd4001e28", "other": "Pliki jednego formatu i jednego rozmiaru, z manifestem, który mówi, jak system pod testem powinien na nie zareagować." }, - "SubtitlePreferences": { "hash": "sha256-836103012003", "other": "Jak to okno mówi, ile pamięci mogą wziąć jego przebiegi i co pamięta między przebiegami. Nic tutaj nie zmienia plików, które tworzy." }, + "SubtitleGenerate": { "hash": "sha256-287c7b75171a", "other": "Pliki jednego formatu, z manifestem, który mówi, jak system pod testem powinien na nie zareagować." }, + "SubtitlePreferences": { "hash": "sha256-3cd0e133cd77", "other": "Jak to okno mówi, ile pamięci mogą wziąć jego przebiegi i co pamięta na następne otwarcie. Nic tutaj nie zmienia plików, które tworzy." }, "SubtitlePreset": { "hash": "sha256-7962df9b6a39", "other": "Gotowe zestawy plików, każdy zbudowany, by odpowiedzieć na jedno pytanie o system pod testem." }, "SubtitleRecipe": { "hash": "sha256-784e4d30ec24", "other": "Partie różnych formatów i rozmiarów, generowane razem w jednym przebiegu." }, "SubtitleTools": { "hash": "sha256-53bdfa16d586", "other": "Drobne czynności na plikach, które już masz. Każde narzędzie z tej zakładki jest też w linii poleceń, jako tfg tool." }, + "SwitchOff": { "hash": "sha256-b4dc66dde806", "other": "wyłączone" }, + "SwitchOn": { "hash": "sha256-b8d31e852725", "other": "włączone" }, "SystemAlreadyThere": { "hash": "sha256-5907673e30cf", "other": "coś już tam jest (błąd systemu {{.Number}})" }, "SystemFailure": { "hash": "sha256-1f0b47895b42", "other": "{{.Path}}: {{.Reason}}" }, "SystemNoPermission": { "hash": "sha256-cbe9b67f544e", "other": "system odmówił dostępu (błąd systemu {{.Number}})" }, @@ -247,12 +255,13 @@ "ToolReading": { "hash": "sha256-d0e0b4b2b81f", "other": "Przeczytano {{.Done}} z {{.Total}}." }, "ToolResultLine": { "hash": "sha256-c8b9b00643c2", "other": "{{.Name}} {{.Value}}" }, "ToolStopped": { "hash": "sha256-1da20fb189f8", "other": "Zatrzymano przed końcem. Nic nie zostało zapisane ani zmienione." }, + "UseSmallestForEach": { "hash": "sha256-a09b7491974d", "other": "Zrób każdy obraz tak mały, jak się da" }, "UseSmallestSize": { "hash": "sha256-c42521834dd8", "other": "Użyj najmniejszego rozmiaru, {{.Size}}" }, "WillGoTo": { "hash": "sha256-88a5bdf9be0b", "other": "zapis do {{.Directory}}" }, "WindowRefused": { "hash": "sha256-1b746ceec688", "other": "Nie udało się otworzyć okna. Rysuje ono przez OpenGL 2.1, a biblioteka graficzna nie zdołała uzyskać go od sterownika na tym komputerze. Komunikat biblioteki: {{.Cause}}. Wszystko, co robi okno, jest też dostępne w linii komend - uruchom „tfg --help” - i ona nie potrzebuje sterownika grafiki. Żeby mieć okno, użyj sterownika grafiki obsługującego OpenGL 2.1." }, "WindowRefusedNoCause": { "hash": "sha256-413b5a197004", "other": "Nie udało się otworzyć okna. Rysuje ono przez OpenGL 2.1, a biblioteka graficzna nie zdołała uzyskać go od sterownika na tym komputerze. Wszystko, co robi okno, jest też dostępne w linii komend - uruchom „tfg --help” - i ona nie potrzebuje sterownika grafiki. Żeby mieć okno, użyj sterownika grafiki obsługującego OpenGL 2.1." }, "WindowRefusedTitle": { "hash": "sha256-304b31204244", "other": "Testing Files Generator nie mógł otworzyć okna" }, - "WorkingOutTheCost": { "hash": "sha256-76988f639628", "other": "Liczę, ile to będzie kosztować..." }, + "WorkingOutTheCost": { "hash": "sha256-047842be5390", "other": "Wyliczam pliki i ich rozmiary..." }, "WritingTo": { "hash": "sha256-57f16f2a6428", "other": "Pliki trafią do {{.Directory}}" }, "Written": { "hash": "sha256-951270031dfe", "other": "Zapisano: {{.Files}}." }, "WrittenWithFailures": { "hash": "sha256-32d2d6f1006a", "other": "Zapisano: {{.Files}}, nie udało się wytworzyć: {{.Failed}}." } diff --git a/internal/gui/text/locale/registry/en.json b/internal/gui/text/locale/registry/en.json index 7c89e97b..325b1fa0 100644 --- a/internal/gui/text/locale/registry/en.json +++ b/internal/gui/text/locale/registry/en.json @@ -34,6 +34,26 @@ "hash": "sha256-c7a8efdaa07d", "other": "a length limit counted in characters where the storage counts bytes" }, + "Catch.picture-sizes.1": { + "description": "One line of what the picture-sizes preset typically finds, on the preset screen.", + "hash": "sha256-0bb5043c2fa4", + "other": "a limit on the width or the height set with one shape in mind that turns away another, such as a profile background 1584 px wide" + }, + "Catch.picture-sizes.2": { + "description": "One line of what the picture-sizes preset typically finds, on the preset screen.", + "hash": "sha256-817785f2eb86", + "other": "a thumbnail cut or squashed because the code expects a landscape picture and a portrait one arrives" + }, + "Catch.picture-sizes.3": { + "description": "One line of what the picture-sizes preset typically finds, on the preset screen.", + "hash": "sha256-22e21f4721d2", + "other": "a picture with an odd height, such as 1200 x 627, refused by a step that only takes even sizes" + }, + "Catch.picture-sizes.4": { + "description": "One line of what the picture-sizes preset typically finds, on the preset screen.", + "hash": "sha256-538591dbed57", + "other": "a 4K picture that runs out of time or memory on its way to a thumbnail, although the file itself is small" + }, "Catch.size-boundaries.1": { "description": "One line of what the size-boundaries preset typically finds, on the preset screen.", "hash": "sha256-1c7f6a00f596", @@ -130,1172 +150,1172 @@ "other": "a name with a path in it, such as ../, used as given, so the file is written outside the upload directory" }, "Choice.algorithm.md5": { - "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write md5, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3ebff31b62c0", "other": "md5" }, "Choice.algorithm.sha1": { - "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write sha1, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b1565820a5cd", "other": "sha1" }, "Choice.algorithm.sha256": { - "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write sha256, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5d5b09f6dcb2", "other": "sha256" }, "Choice.algorithm.sha512": { - "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the algorithm list, as the list shows it. A recipe and the command line write sha512, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a396244643b5", "other": "sha512" }, "Choice.bit_depth.16": { - "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write 16, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b17ef6d19c7a", "other": "16" }, "Choice.bit_depth.24": { - "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write 24, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c2356069e9d1", "other": "24" }, "Choice.bit_depth.32": { - "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write 32, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e29c9c180c62", "other": "32" }, "Choice.bit_depth.8": { - "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the bit_depth list, as the list shows it. A recipe and the command line write 8, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2c624232cdd2", "other": "8" }, "Choice.body.alternative": { - "description": "One entry of the body list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-27747689baf9", - "other": "alternative" + "description": "One entry of the body list, as the list shows it. A recipe and the command line write alternative, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-fab1573b3dd1", + "other": "plain text and HTML" }, "Choice.body.any-value": { - "description": "One entry of the body list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-cc8f80439173", - "other": "any-value" + "description": "One entry of the body list, as the list shows it. A recipe and the command line write any-value, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-aa9cde9613f4", + "other": "every kind of value" }, "Choice.body.html": { - "description": "One entry of the body list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-e5e239560bc1", - "other": "html" + "description": "One entry of the body list, as the list shows it. A recipe and the command line write html, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-07239dbd2a1a", + "other": "HTML" }, "Choice.body.plain": { - "description": "One entry of the body list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-a116c9ed46d6", - "other": "plain" + "description": "One entry of the body list, as the list shows it. A recipe and the command line write plain, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-c9ecf5e54c7b", + "other": "plain text" }, "Choice.body.text": { - "description": "One entry of the body list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the body list, as the list shows it. A recipe and the command line write text, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-982d9e3eb996", "other": "text" }, "Choice.characters.ascii": { - "description": "One entry of the characters list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the characters list, as the list shows it. A recipe and the command line write ascii, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c543ece81605", "other": "ascii" }, "Choice.characters.international": { - "description": "One entry of the characters list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the characters list, as the list shows it. A recipe and the command line write international, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1e3bb894756f", "other": "international" }, "Choice.charset.iso-8859-2": { - "description": "One entry of the charset list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the charset list, as the list shows it. A recipe and the command line write iso-8859-2, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-d7b4209b5c03", "other": "iso-8859-2" }, "Choice.charset.utf-8": { - "description": "One entry of the charset list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the charset list, as the list shows it. A recipe and the command line write utf-8, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5cf1fa8d836a", "other": "utf-8" }, "Choice.charset.windows-1250": { - "description": "One entry of the charset list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the charset list, as the list shows it. A recipe and the command line write windows-1250, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5cfde86a4658", "other": "windows-1250" }, "Choice.compression.best": { - "description": "One entry of the compression list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the compression list, as the list shows it. A recipe and the command line write best, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8f4375ec65c2", "other": "best" }, "Choice.compression.default": { - "description": "One entry of the compression list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the compression list, as the list shows it. A recipe and the command line write default, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-37a8eec1ce19", "other": "default" }, "Choice.compression.fast": { - "description": "One entry of the compression list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the compression list, as the list shows it. A recipe and the command line write fast, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-115dc3606fbf", "other": "fast" }, "Choice.compression.none": { - "description": "One entry of the compression list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the compression list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.content.noise": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the content list, as the list shows it. A recipe and the command line write noise, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-efe2a5c09e6d", "other": "noise" }, "Choice.content.placeholder": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the content list, as the list shows it. A recipe and the command line write placeholder, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4097889236a2", "other": "placeholder" }, "Choice.content.silence": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the content list, as the list shows it. A recipe and the command line write silence, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e6c18fdbe597", "other": "silence" }, "Choice.content.sweep": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-dfd33796972c", - "other": "sweep" + "description": "One entry of the content list, as the list shows it. A recipe and the command line write sweep, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-009bf8c7b1b8", + "other": "rising tone" }, "Choice.content.test": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-9f86d081884c", - "other": "test" + "description": "One entry of the content list, as the list shows it. A recipe and the command line write test, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-4d1f108611d7", + "other": "test pattern" }, "Choice.content.tone": { - "description": "One entry of the content list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-00cf4ce3935c", - "other": "tone" + "description": "One entry of the content list, as the list shows it. A recipe and the command line write tone, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-7cfb96347670", + "other": "steady tone" }, "Choice.delimiter.comma": { - "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write comma, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-f36a4e586705", "other": "comma" }, "Choice.delimiter.pipe": { - "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write pipe, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-400829473916", "other": "pipe" }, "Choice.delimiter.semicolon": { - "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write semicolon, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1e69fcfadd9d", "other": "semicolon" }, "Choice.delimiter.tab": { - "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the delimiter list, as the list shows it. A recipe and the command line write tab, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7508386a2056", "other": "tab" }, "Choice.elements.basic": { - "description": "One entry of the elements list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the elements list, as the list shows it. A recipe and the command line write basic, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-fbb7b5bf4ca3", "other": "basic" }, "Choice.elements.every": { - "description": "One entry of the elements list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the elements list, as the list shows it. A recipe and the command line write every, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-66a424a9a958", "other": "every" }, "Choice.embed.bmp": { - "description": "One entry of the embed list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the embed list, as the list shows it. A recipe and the command line write bmp, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7685a5cb2b57", "other": "bmp" }, "Choice.embed.png": { - "description": "One entry of the embed list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the embed list, as the list shows it. A recipe and the command line write png, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8f8cbb7dcf46", "other": "png" }, "Choice.encoding.utf-16be": { - "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write utf-16be, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-43b2bae67086", "other": "utf-16be" }, "Choice.encoding.utf-16le": { - "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write utf-16le, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4ffbae688018", "other": "utf-16le" }, "Choice.encoding.utf-8": { - "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encoding list, as the list shows it. A recipe and the command line write utf-8, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5cf1fa8d836a", "other": "utf-8" }, "Choice.encryption.aes-128": { - "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write aes-128, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8cf9659cdea5", "other": "aes-128" }, "Choice.encryption.aes-192": { - "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write aes-192, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5498c4450db4", "other": "aes-192" }, "Choice.encryption.aes-256": { - "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write aes-256, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7237b089a3fc", "other": "aes-256" }, "Choice.encryption.none": { - "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.encryption.zipcrypto": { - "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the encryption list, as the list shows it. A recipe and the command line write zipcrypto, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-42ea6e5dc44a", "other": "zipcrypto" }, "Choice.entry_format.apache-combined": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-eb5679006aba", - "other": "apache-combined" + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write apache-combined, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-d0857dd9bd16", + "other": "Apache combined" }, "Choice.entry_format.apache-common": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-5385bfe0ab10", - "other": "apache-common" + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write apache-common, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-fedd364848fa", + "other": "Apache common" }, "Choice.entry_format.json-lines": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-9e26c12b9d04", - "other": "json-lines" + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write json-lines, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-74163645b1b5", + "other": "JSON Lines" }, "Choice.entry_format.nginx": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write nginx, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5be1ecc7935f", "other": "nginx" }, "Choice.entry_format.plain": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write plain, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a116c9ed46d6", "other": "plain" }, "Choice.entry_format.syslog": { - "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_format list, as the list shows it. A recipe and the command line write syslog, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4d75f832ea26", "other": "syslog" }, "Choice.entry_mode.000": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 000, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2ac9a6746aca", "other": "000" }, "Choice.entry_mode.400": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 400, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-26d228663f13", "other": "400" }, "Choice.entry_mode.444": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 444, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3538a1ef2e11", "other": "444" }, "Choice.entry_mode.600": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 600, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-284b7e6d788f", "other": "600" }, "Choice.entry_mode.644": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 644, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-87e50b287059", "other": "644" }, "Choice.entry_mode.664": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 664, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-09eac95eb995", "other": "664" }, "Choice.entry_mode.666": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 666, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c7e616822f36", "other": "666" }, "Choice.entry_mode.700": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 700, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-99ee50221221", "other": "700" }, "Choice.entry_mode.755": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 755, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-86ab8cbe5869", "other": "755" }, "Choice.entry_mode.777": { - "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_mode list, as the list shows it. A recipe and the command line write 777, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-eaf89db71084", "other": "777" }, "Choice.entry_owner.root": { - "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write root, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4813494d137e", "other": "root" }, "Choice.entry_owner.unset": { - "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write unset, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-6cbf83e08093", "other": "unset" }, "Choice.entry_owner.user": { - "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the entry_owner list, as the list shows it. A recipe and the command line write user, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-04f8996da763", "other": "user" }, "Choice.enum_encoding.name": { - "description": "One entry of the enum_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the enum_encoding list, as the list shows it. A recipe and the command line write name, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-82a3537ff0db", "other": "name" }, "Choice.enum_encoding.number": { - "description": "One entry of the enum_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the enum_encoding list, as the list shows it. A recipe and the command line write number, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-12886f9d0005", "other": "number" }, "Choice.expected.accept": { - "description": "One entry of the list of what the system under test should do with a file. The manifest writes the value itself.", + "description": "One entry of the list of what the system under test should do with a file. The manifest writes accept.", "hash": "sha256-c125d0397b60", "other": "accept" }, "Choice.expected.reason.content_malformed": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-14484a3d8ff7", - "other": "content_malformed" + "description": "One entry of the list of the rule a file tests. The manifest writes content_malformed.", + "hash": "sha256-51d22886ab72", + "other": "malformed content" }, "Choice.expected.reason.count_limit": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-636449b3d71c", - "other": "count_limit" + "description": "One entry of the list of the rule a file tests. The manifest writes count_limit.", + "hash": "sha256-80094c926360", + "other": "file count limit" }, "Choice.expected.reason.dimensions_limit": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-539dd060c765", - "other": "dimensions_limit" + "description": "One entry of the list of the rule a file tests. The manifest writes dimensions_limit.", + "hash": "sha256-b3dc71e8df2e", + "other": "dimensions limit" }, "Choice.expected.reason.duplicate": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", + "description": "One entry of the list of the rule a file tests. The manifest writes duplicate.", "hash": "sha256-e24a5a32c9b8", "other": "duplicate" }, "Choice.expected.reason.encoding_invalid": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-1ed4a2806f5f", - "other": "encoding_invalid" + "description": "One entry of the list of the rule a file tests. The manifest writes encoding_invalid.", + "hash": "sha256-126efde45cec", + "other": "invalid encoding" }, "Choice.expected.reason.extension_rule": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-87ad72d63a7f", - "other": "extension_rule" + "description": "One entry of the list of the rule a file tests. The manifest writes extension_rule.", + "hash": "sha256-ea91ae4f758e", + "other": "extension rule" }, "Choice.expected.reason.filename_invalid": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-816b1c0c80ea", - "other": "filename_invalid" + "description": "One entry of the list of the rule a file tests. The manifest writes filename_invalid.", + "hash": "sha256-94d1f4a7e785", + "other": "invalid file name" }, "Choice.expected.reason.filename_too_long": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-394b764c42c4", - "other": "filename_too_long" + "description": "One entry of the list of the rule a file tests. The manifest writes filename_too_long.", + "hash": "sha256-7d00dd68fceb", + "other": "file name too long" }, "Choice.expected.reason.filename_traversal": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-51dbdb34a500", - "other": "filename_traversal" + "description": "One entry of the list of the rule a file tests. The manifest writes filename_traversal.", + "hash": "sha256-a22edd75d23b", + "other": "path outside the folder" }, "Choice.expected.reason.malware_signature": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-adb5581b7ea9", - "other": "malware_signature" + "description": "One entry of the list of the rule a file tests. The manifest writes malware_signature.", + "hash": "sha256-11dfd8a66593", + "other": "malware signature" }, "Choice.expected.reason.mime_mismatch": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-a1c2c3069328", - "other": "mime_mismatch" + "description": "One entry of the list of the rule a file tests. The manifest writes mime_mismatch.", + "hash": "sha256-601dd0fbb437", + "other": "type does not match the content" }, "Choice.expected.reason.nesting_depth": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-ddc6be14fb52", - "other": "nesting_depth" + "description": "One entry of the list of the rule a file tests. The manifest writes nesting_depth.", + "hash": "sha256-f797a19b6d78", + "other": "nesting depth" }, "Choice.expected.reason.none": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", + "description": "One entry of the list of the rule a file tests. The manifest writes none.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.expected.reason.size_limit": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-7fba5810a3a2", - "other": "size_limit" + "description": "One entry of the list of the rule a file tests. The manifest writes size_limit.", + "hash": "sha256-40caef2f118c", + "other": "size limit" }, "Choice.expected.reason.size_zero": { - "description": "One entry of the list of the rule a file tests. The manifest writes the value itself.", - "hash": "sha256-2ccd5d11434a", - "other": "size_zero" + "description": "One entry of the list of the rule a file tests. The manifest writes size_zero.", + "hash": "sha256-9e8c00db8eed", + "other": "empty file" }, "Choice.expected.reject": { - "description": "One entry of the list of what the system under test should do with a file. The manifest writes the value itself.", + "description": "One entry of the list of what the system under test should do with a file. The manifest writes reject.", "hash": "sha256-084e990a49ba", "other": "reject" }, "Choice.expected.sanitize": { - "description": "One entry of the list of what the system under test should do with a file. The manifest writes the value itself.", + "description": "One entry of the list of what the system under test should do with a file. The manifest writes sanitize.", "hash": "sha256-af6a3bb0c72f", "other": "sanitize" }, "Choice.expected.unspecified": { - "description": "One entry of the list of what the system under test should do with a file. The manifest writes the value itself.", + "description": "One entry of the list of what the system under test should do with a file. The manifest writes unspecified.", "hash": "sha256-f416648f8086", "other": "unspecified" }, "Choice.far-over.10x": { - "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write 10x, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-687f5e475cbd", "other": "10x" }, "Choice.far-over.2x": { - "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write 2x, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b595b214b5d4", "other": "2x" }, "Choice.far-over.off": { - "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the far-over list, as the list shows it. A recipe and the command line write off, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b4dc66dde806", "other": "off" }, "Choice.filename_style.both": { - "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write both, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-ff7772053abf", "other": "both" }, "Choice.filename_style.content-type": { - "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write content-type, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-846b3a9229ce", "other": "content-type" }, "Choice.filename_style.none": { - "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.filename_style.rfc2047": { - "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write rfc2047, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1eeb8be955da", "other": "rfc2047" }, "Choice.filename_style.rfc2231": { - "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the filename_style list, as the list shows it. A recipe and the command line write rfc2231, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c4a81dcefb6e", "other": "rfc2231" }, "Choice.format.avif": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write avif, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2f47c57aae31", "other": "avif" }, "Choice.format.bmp": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write bmp, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7685a5cb2b57", "other": "bmp" }, "Choice.format.csv": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write csv, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-53bb9b0b38ac", "other": "csv" }, "Choice.format.docx": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write docx, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-584cb925e6ad", "other": "docx" }, "Choice.format.eml": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write eml, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-13033c0419d0", "other": "eml" }, "Choice.format.geojson": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write geojson, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-64bce794becb", "other": "geojson" }, "Choice.format.gif": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write gif, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3b34c6906f7e", "other": "gif" }, "Choice.format.html": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write html, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e5e239560bc1", "other": "html" }, "Choice.format.ico": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write ico, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c51052ef06b6", "other": "ico" }, "Choice.format.jpg": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write jpg, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-f8146b6cb496", "other": "jpg" }, "Choice.format.json": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write json, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-02bd175f3297", "other": "json" }, "Choice.format.jxl": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write jxl, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-87953914d2ad", "other": "jxl" }, "Choice.format.log": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write log, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-836ff184e7b4", "other": "log" }, "Choice.format.md": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write md, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-21262a3cb533", "other": "md" }, "Choice.format.mp4": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write mp4, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-862c4ec62def", "other": "mp4" }, "Choice.format.otlp": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write otlp, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e81fa7c0883f", "other": "otlp" }, "Choice.format.pdf": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write pdf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c35b21d6ca39", "other": "pdf" }, "Choice.format.png": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write png, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8f8cbb7dcf46", "other": "png" }, "Choice.format.pptx": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write pptx, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1512e97a4b84", "other": "pptx" }, "Choice.format.rtf": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write rtf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b97d62f2e9e5", "other": "rtf" }, "Choice.format.svg": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write svg, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-acdb1373d176", "other": "svg" }, "Choice.format.targz": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write targz, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-fc53fb509109", "other": "targz" }, "Choice.format.tiff": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write tiff, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-904749a4869b", "other": "tiff" }, "Choice.format.toml": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write toml, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-bf0a90221595", "other": "toml" }, "Choice.format.txt": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write txt, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-486b9a6fc855", "other": "txt" }, "Choice.format.wav": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write wav, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-61e25c2cdda1", "other": "wav" }, "Choice.format.webm": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write webm, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-ed55d4a2399b", "other": "webm" }, "Choice.format.webp": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write webp, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a57bb082e728", "other": "webp" }, "Choice.format.xlsx": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write xlsx, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1c980b22bca3", "other": "xlsx" }, "Choice.format.xml": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write xml, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-bf92a04e60b4", "other": "xml" }, "Choice.format.yaml": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write yaml, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-9831daaaa0a9", "other": "yaml" }, "Choice.format.zip": { - "description": "One entry of the format list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the format list, as the list shows it. A recipe and the command line write zip, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4a70fe9aa643", "other": "zip" }, "Choice.formatting.indented": { - "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write indented, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a258f543b0a6", "other": "indented" }, "Choice.formatting.lines": { - "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write lines, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5ea44c3961f1", "other": "lines" }, "Choice.formatting.minified": { - "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write minified, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1ddd424e287f", "other": "minified" }, "Choice.formatting.record-per-line": { - "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-6f0d86374d60", - "other": "record-per-line" + "description": "One entry of the formatting list, as the list shows it. A recipe and the command line write record-per-line, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-a24bb4915137", + "other": "record per line" }, "Choice.frame_rate.1": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 1, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-6b86b273ff34", "other": "1" }, "Choice.frame_rate.10": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 10, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4a44dc153642", "other": "10" }, "Choice.frame_rate.12": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 12, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-6b51d431df5d", "other": "12" }, "Choice.frame_rate.15": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 15, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e629fa6598d7", "other": "15" }, "Choice.frame_rate.24": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 24, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c2356069e9d1", "other": "24" }, "Choice.frame_rate.25": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 25, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b7a56873cd77", "other": "25" }, "Choice.frame_rate.30": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 30, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-624b60c58c9d", "other": "30" }, "Choice.frame_rate.48": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 48, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-98010bd9270f", "other": "48" }, "Choice.frame_rate.5": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 5, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-ef2d127de37b", "other": "5" }, "Choice.frame_rate.50": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 50, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1a6562590ef1", "other": "50" }, "Choice.frame_rate.60": { - "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the frame_rate list, as the list shows it. A recipe and the command line write 60, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-39fa9ec190ee", "other": "60" }, "Choice.geometry.geometrycollection": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write geometrycollection, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c86a75e30348", "other": "geometrycollection" }, "Choice.geometry.linestring": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write linestring, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5f381815f5ce", "other": "linestring" }, "Choice.geometry.mixed": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.geometry.multilinestring": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write multilinestring, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-f1d6790bc746", "other": "multilinestring" }, "Choice.geometry.multipoint": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write multipoint, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-0ebeeffc0a24", "other": "multipoint" }, "Choice.geometry.multipolygon": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write multipolygon, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-d9cfa92a41b7", "other": "multipolygon" }, "Choice.geometry.point": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write point, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-251fecd592e5", "other": "point" }, "Choice.geometry.polygon": { - "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the geometry list, as the list shows it. A recipe and the command line write polygon, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2b3b18120924", "other": "polygon" }, "Choice.headers.ascii": { - "description": "One entry of the headers list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the headers list, as the list shows it. A recipe and the command line write ascii, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c543ece81605", "other": "ascii" }, "Choice.headers.encoded": { - "description": "One entry of the headers list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the headers list, as the list shows it. A recipe and the command line write encoded, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-766adc67b02b", "other": "encoded" }, "Choice.headers.utf8": { - "description": "One entry of the headers list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the headers list, as the list shows it. A recipe and the command line write utf8, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-941b7ecd47e5", "other": "utf8" }, "Choice.id_encoding.base64": { - "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write base64, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-371a286d5872", "other": "base64" }, "Choice.id_encoding.hex": { - "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write hex, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-128df13c1e54", "other": "hex" }, "Choice.id_encoding.upper-hex": { - "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-18b09d853661", - "other": "upper-hex" + "description": "One entry of the id_encoding list, as the list shows it. A recipe and the command line write upper-hex, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-8f531e68f1b1", + "other": "upper-case hex" }, "Choice.ids.mixed": { - "description": "One entry of the ids list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ids list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.ids.none": { - "description": "One entry of the ids list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ids list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.ids.number": { - "description": "One entry of the ids list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ids list, as the list shows it. A recipe and the command line write number, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-12886f9d0005", "other": "number" }, "Choice.ids.string": { - "description": "One entry of the ids list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ids list, as the list shows it. A recipe and the command line write string, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-473287f8298d", "other": "string" }, "Choice.ip_version.mixed": { - "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.ip_version.v4": { - "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write v4, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8e38a1ea5c68", "other": "v4" }, "Choice.ip_version.v6": { - "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the ip_version list, as the list shows it. A recipe and the command line write v6, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3e8286044388", "other": "v6" }, "Choice.key_case.camel": { - "description": "One entry of the key_case list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-4812585e9449", - "other": "camel" + "description": "One entry of the key_case list, as the list shows it. A recipe and the command line write camel, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-987aa078ffa1", + "other": "camelCase" }, "Choice.key_case.snake": { - "description": "One entry of the key_case list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-538d7d9fe78e", - "other": "snake" + "description": "One entry of the key_case list, as the list shows it. A recipe and the command line write snake, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-ffdf29cd20be", + "other": "snake_case" }, "Choice.large_numbers.number": { - "description": "One entry of the large_numbers list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the large_numbers list, as the list shows it. A recipe and the command line write number, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-12886f9d0005", "other": "number" }, "Choice.large_numbers.text": { - "description": "One entry of the large_numbers list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the large_numbers list, as the list shows it. A recipe and the command line write text, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-982d9e3eb996", "other": "text" }, "Choice.layout.newsletter": { - "description": "One entry of the layout list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the layout list, as the list shows it. A recipe and the command line write newsletter, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-dd6f465f6810", "other": "newsletter" }, "Choice.layout.simple": { - "description": "One entry of the layout list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the layout list, as the list shows it. A recipe and the command line write simple, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a7a39b72f297", "other": "simple" }, "Choice.level_mix.debug": { - "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write debug, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-0b8e9e995d8d", "other": "debug" }, "Choice.level_mix.errors": { - "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write errors, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-be4bd5677277", "other": "errors" }, "Choice.level_mix.quiet": { - "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write quiet, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-008f0747f4e2", "other": "quiet" }, "Choice.level_mix.realistic": { - "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the level_mix list, as the list shows it. A recipe and the command line write realistic, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-9d2f45fd706a", "other": "realistic" }, "Choice.line_ending.crlf": { - "description": "One entry of the line_ending list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the line_ending list, as the list shows it. A recipe and the command line write crlf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c613dc516f32", "other": "crlf" }, "Choice.line_ending.lf": { - "description": "One entry of the line_ending list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the line_ending list, as the list shows it. A recipe and the command line write lf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-39e741eddb03", "other": "lf" }, "Choice.line_endings.crlf": { - "description": "One entry of the line_endings list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the line_endings list, as the list shows it. A recipe and the command line write crlf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-c613dc516f32", "other": "crlf" }, "Choice.line_endings.lf": { - "description": "One entry of the line_endings list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the line_endings list, as the list shows it. A recipe and the command line write lf, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-39e741eddb03", "other": "lf" }, "Choice.methods.get": { - "description": "One entry of the methods list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-2998b3232d29", - "other": "get" + "description": "One entry of the methods list, as the list shows it. A recipe and the command line write get, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-00dc16a60bf9", + "other": "GET only" }, "Choice.methods.mixed": { - "description": "One entry of the methods list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the methods list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.methods.read": { - "description": "One entry of the methods list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-3316348dbadf", - "other": "read" + "description": "One entry of the methods list, as the list shows it. A recipe and the command line write read, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-575866d5fc48", + "other": "GET and HEAD" }, "Choice.metric_kind.exponential-histogram": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-9e08a9dd9e02", - "other": "exponential-histogram" + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write exponential-histogram, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-d9efa57e1d07", + "other": "exponential histogram" }, "Choice.metric_kind.gauge": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write gauge, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a90fd9a9a1e6", "other": "gauge" }, "Choice.metric_kind.histogram": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write histogram, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-56f0e5b2847c", "other": "histogram" }, "Choice.metric_kind.mixed": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.metric_kind.sum": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write sum, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-09f5ffef2830", "other": "sum" }, "Choice.metric_kind.summary": { - "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the metric_kind list, as the list shows it. A recipe and the command line write summary, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-761b7ad8ad43", "other": "summary" }, "Choice.orientation.landscape": { - "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write landscape, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-acb955df82b8", "other": "landscape" }, "Choice.orientation.mixed": { - "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.orientation.portrait": { - "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the orientation list, as the list shows it. A recipe and the command line write portrait, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-51c5a8296a03", "other": "portrait" }, "Choice.page_size.a3": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write a3, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-f46dd28a5499", "other": "a3" }, "Choice.page_size.a4": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write a4, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4539e4b48890", "other": "a4" }, "Choice.page_size.a5": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write a5, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-66220e71591b", "other": "a5" }, "Choice.page_size.legal": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write legal, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a708df92c9e4", "other": "legal" }, "Choice.page_size.letter": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write letter, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-f80105efab6d", "other": "letter" }, "Choice.page_size.mixed": { - "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the page_size list, as the list shows it. A recipe and the command line write mixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3f8fee624f43", "other": "mixed" }, "Choice.pdf_version.1.4": { - "description": "One entry of the pdf_version list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the pdf_version list, as the list shows it. A recipe and the command line write 1.4, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-1a948f1b4374", "other": "1.4" }, "Choice.pdf_version.1.7": { - "description": "One entry of the pdf_version list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the pdf_version list, as the list shows it. A recipe and the command line write 1.7, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-8f65223004a7", "other": "1.7" }, "Choice.picture_data.binary": { - "description": "One entry of the picture_data list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the picture_data list, as the list shows it. A recipe and the command line write binary, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-9a3a45d01531", "other": "binary" }, "Choice.picture_data.hex": { - "description": "One entry of the picture_data list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the picture_data list, as the list shows it. A recipe and the command line write hex, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-128df13c1e54", "other": "hex" }, "Choice.quote_style.all": { - "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write all, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5ef5ef0364b6", "other": "all" }, "Choice.quote_style.minimal": { - "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write minimal, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a703788f8320", "other": "minimal" }, "Choice.quote_style.none": { - "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the quote_style list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.rotate.0": { - "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-5feceb66ffc8", - "other": "0" + "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write 0, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-88e62a100a18", + "other": "0 degrees" }, "Choice.rotate.180": { - "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-7b69759630f8", - "other": "180" + "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write 180, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-46621106fbaa", + "other": "180 degrees" }, "Choice.rotate.270": { - "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-d8d1790737d5", - "other": "270" + "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write 270, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-a8cb2ff65791", + "other": "270 degrees" }, "Choice.rotate.90": { - "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-69f59c273b6e", - "other": "90" + "description": "One entry of the rotate list, as the list shows it. A recipe and the command line write 90, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-cd38ccdf1e9a", + "other": "90 degrees" }, "Choice.signal.logs": { - "description": "One entry of the signal list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the signal list, as the list shows it. A recipe and the command line write logs, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-98f38f12db22", "other": "logs" }, "Choice.signal.metrics": { - "description": "One entry of the signal list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the signal list, as the list shows it. A recipe and the command line write metrics, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-177a7ea3611f", "other": "metrics" }, "Choice.signal.traces": { - "description": "One entry of the signal list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the signal list, as the list shows it. A recipe and the command line write traces, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-b5ac69fc467c", "other": "traces" }, "Choice.status_mix.client-errors": { - "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-cc47f4e83c84", - "other": "client-errors" + "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write client-errors, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-1f234ccd9f7f", + "other": "client errors" }, "Choice.status_mix.realistic": { - "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write realistic, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-9d2f45fd706a", "other": "realistic" }, "Choice.status_mix.server-errors": { - "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-af6f28d08a12", - "other": "server-errors" + "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write server-errors, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-be03a2c09cf1", + "other": "server errors" }, "Choice.status_mix.success": { - "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the status_mix list, as the list shows it. A recipe and the command line write success, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-aee408847d35", "other": "success" }, "Choice.structure.document": { - "description": "One entry of the structure list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the structure list, as the list shows it. A recipe and the command line write document, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-43cc23fa52b8", "other": "document" }, "Choice.structure.fragment": { - "description": "One entry of the structure list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the structure list, as the list shows it. A recipe and the command line write fragment, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7587669ca42e", "other": "fragment" }, "Choice.styles.embedded": { - "description": "One entry of the styles list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the styles list, as the list shows it. A recipe and the command line write embedded, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-9289140b1ac2", "other": "embedded" }, "Choice.styles.inline": { - "description": "One entry of the styles list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the styles list, as the list shows it. A recipe and the command line write inline, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-995cf20a9c45", "other": "inline" }, "Choice.styles.none": { - "description": "One entry of the styles list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the styles list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.temporality.cumulative": { - "description": "One entry of the temporality list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the temporality list, as the list shows it. A recipe and the command line write cumulative, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2dfda8e4279b", "other": "cumulative" }, "Choice.temporality.delta": { - "description": "One entry of the temporality list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the temporality list, as the list shows it. A recipe and the command line write delta, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-4f4a9410ffcd", "other": "delta" }, "Choice.text_encoding.7bit": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write 7bit, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-af6ec1d82852", "other": "7bit" }, "Choice.text_encoding.8bit": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write 8bit, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-e318653d2946", "other": "8bit" }, "Choice.text_encoding.base64": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write base64, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-371a286d5872", "other": "base64" }, "Choice.text_encoding.both": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-ff7772053abf", - "other": "both" + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write both, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-5e3237154d6d", + "other": "unicode and code page" }, "Choice.text_encoding.codepage": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-0b653bac8180", - "other": "codepage" + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write codepage, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-ca1ae48a54d8", + "other": "code page" }, "Choice.text_encoding.literal": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write literal, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-829f8d848b44", "other": "literal" }, "Choice.text_encoding.quoted-printable": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write quoted-printable, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-7956a9e2a40b", "other": "quoted-printable" }, "Choice.text_encoding.unicode": { - "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the text_encoding list, as the list shows it. A recipe and the command line write unicode, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-2fcf76a4c3c7", "other": "unicode" }, "Choice.time_order.in-order": { - "description": "One entry of the time_order list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-d733f4e84323", - "other": "in-order" + "description": "One entry of the time_order list, as the list shows it. A recipe and the command line write in-order, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-63be856a06e4", + "other": "in order" }, "Choice.time_order.out-of-order": { - "description": "One entry of the time_order list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", - "hash": "sha256-da48228bd1a4", - "other": "out-of-order" + "description": "One entry of the time_order list, as the list shows it. A recipe and the command line write out-of-order, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "hash": "sha256-2ee32f5ece03", + "other": "out of order" }, "Choice.timestamps.advancing": { - "description": "One entry of the timestamps list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the timestamps list, as the list shows it. A recipe and the command line write advancing, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-3656fa4d5539", "other": "advancing" }, "Choice.timestamps.fixed": { - "description": "One entry of the timestamps list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the timestamps list, as the list shows it. A recipe and the command line write fixed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-992a93455c71", "other": "fixed" }, "Choice.unlocated.all": { - "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write all, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-5ef5ef0364b6", "other": "all" }, "Choice.unlocated.none": { - "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write none, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-140bedbf9c3f", "other": "none" }, "Choice.unlocated.some": { - "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the unlocated list, as the list shows it. A recipe and the command line write some, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-a6b46dd0d1ae", "other": "some" }, "Choice.winding.reversed": { - "description": "One entry of the winding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the winding list, as the list shows it. A recipe and the command line write reversed, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-bc64f64fb479", "other": "reversed" }, "Choice.winding.rfc7946": { - "description": "One entry of the winding list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.", + "description": "One entry of the winding list, as the list shows it. A recipe and the command line write rfc7946, so a token such as utf-8, a4, sha256 or 644 stays as it is.", "hash": "sha256-38755035559d", "other": "rfc7946" }, @@ -1371,8 +1391,8 @@ }, "Detail.format/eml.attachment_format": { "description": "The sentence under the attachment_format setting of the eml format, after what it takes.", - "hash": "sha256-8855c0b55a42", - "other": "The format of the attached files. Run tfg formats to see what this build supports. eml attaches a message as it is, the way mail is forwarded, with no base64 around it." + "hash": "sha256-73f4ca55d9b2", + "other": "The format of the attached files. `eml` attaches a message as it is, the way mail is forwarded, with no base64 around it." }, "Detail.format/eml.attachment_size": { "description": "The sentence under the attachment_size setting of the eml format, after what it takes.", @@ -1381,23 +1401,23 @@ }, "Detail.format/eml.attachments": { "description": "The sentence under the attachments setting of the eml format, after what it takes.", - "hash": "sha256-43c96b5ef075", - "other": "How many files the message carries. Use contains instead when the files are not all alike. mailparser refuses a message of more than 1000 MIME entities, and the manifest gives this one's count as mime_entities." + "hash": "sha256-9eb089191964", + "other": "How many files the message carries. When the files are not all alike, describe each kind on its own instead - with Add files inside on Several batches, or contains in a recipe. mailparser refuses a message of more than 1000 MIME entities, and the manifest gives this one's count as mime_entities." }, "Detail.format/eml.body": { "description": "The sentence under the body setting of the eml format, after what it takes.", - "hash": "sha256-5dc479375b75", - "other": "Which text the message carries. plain is one text part and html one HTML part. alternative carries both with the same words, and a mail program shows one of them." + "hash": "sha256-48c2cdb55b7b", + "other": "Which text the message carries. With plain text and HTML the same words go in both, and a mail program shows one of them." }, "Detail.format/eml.charset": { "description": "The sentence under the charset setting of the eml format, after what it takes.", - "hash": "sha256-636bf249f436", - "other": "The character set of the text when text_encoding is not 7bit. iso-8859-2 and windows-1250 hold Polish and no Japanese, and they write ą, ś and ź as different bytes, so a program that takes one for the other shows the wrong letters. MimeKit with no code page provider registered tries UTF-8 and then Latin-1, which shows the Polish letters of both wrong, and reads them right once one is. Go's standard library converts no character set at all. With 7bit the text is plain ASCII and says us-ascii, whatever this is set to." + "hash": "sha256-459b6c507537", + "other": "The character set of the text when the text encoding is not 7bit. iso-8859-2 and windows-1250 hold Polish and no Japanese, and they write ą, ś and ź as different bytes, so a program that takes one for the other shows the wrong letters. MimeKit with no code page provider registered tries UTF-8 and then Latin-1, which shows the Polish letters of both wrong, and reads them right once one is. Go's standard library converts no character set at all. With 7bit the text is plain ASCII and says us-ascii, whatever this is set to." }, "Detail.format/eml.filename_style": { "description": "The sentence under the filename_style setting of the eml format, after what it takes.", - "hash": "sha256-adf72ea5fcb6", - "other": "How the names of attached files and pictures are written. rfc2231 is the standard way. rfc2047 is the encoded form RFC 2047 forbids inside a name, and many readers decode it anyway. both writes the two, and content-type puts the name only where old mail programs looked for it. none writes no name at all, and a program that needs one has to make one up - Thunderbird 157 calls them Part 1.2, Part 1.3 and so on. Go's standard library reads no name from content-type and the encoded text itself from rfc2047. Unless headers is encoded a name is written as it is and only where it goes changes, so rfc2047 and both write the same bytes." + "hash": "sha256-44eb98e1acc7", + "other": "How the names of attached files and pictures are written. rfc2231 is the standard way. rfc2047 is the encoded form RFC 2047 forbids inside a name, and many readers decode it anyway. both writes the two, and content-type puts the name only where old mail programs looked for it. none writes no name at all, and a program that needs one has to make one up - Thunderbird 157 calls them Part 1.2, Part 1.3 and so on. Go's standard library reads no name from content-type and the encoded text itself from rfc2047. Unless the headers are encoded, a name is written as it is and only where it goes changes, so rfc2047 and both write the same bytes." }, "Detail.format/eml.headers": { "description": "The sentence under the headers setting of the eml format, after what it takes.", @@ -1411,8 +1431,8 @@ }, "Detail.format/eml.inline_format": { "description": "The sentence under the inline_format setting of the eml format, after what it takes.", - "hash": "sha256-fbdd11d7bf9a", - "other": "The format of the pictures. Any format whose files are pictures, such as png, jpg or gif." + "hash": "sha256-fb11a5da4cc7", + "other": "The format of the pictures. Any format whose files are pictures, such as `png`, `jpg` or `gif`." }, "Detail.format/eml.inline_size": { "description": "The sentence under the inline_size setting of the eml format, after what it takes.", @@ -1441,8 +1461,8 @@ }, "Detail.format/eml.text_encoding": { "description": "The sentence under the text_encoding setting of the eml format, after what it takes.", - "hash": "sha256-783ad3f77f90", - "other": "How the text is written. 7bit keeps it to plain ASCII. quoted-printable, 8bit and base64 add a line in Polish, and in Japanese when charset is utf-8, because that is what they are for. quoted-printable spells those letters as =C5=BC, 8bit writes them as they are, and base64 writes the whole text in base64. To reach every size base64 ends the text with empty lines, and with crlf an odd size gives the Message-ID one more digit." + "hash": "sha256-3893e44f3c25", + "other": "How the text is written. 7bit keeps it to plain ASCII. quoted-printable, 8bit and base64 add a line in Polish, and in Japanese when the charset is utf-8, because that is what they are for. quoted-printable spells those letters as =C5=BC, 8bit writes them as they are, and base64 writes the whole text in base64. To reach every size base64 ends the text with empty lines, and with crlf an odd size gives the Message-ID one more digit." }, "Detail.format/geojson.altitude": { "description": "The sentence under the altitude setting of the geojson format, after what it takes.", @@ -1541,8 +1561,8 @@ }, "Detail.format/html.inline_format": { "description": "The sentence under the inline_format setting of the html format, after what it takes.", - "hash": "sha256-0c0288233958", - "other": "The format of the pictures. Any format whose files are pictures, such as png, jpg or gif. Chromium shows every one of them but tiff." + "hash": "sha256-7c58ff8c5727", + "other": "The format of the pictures. Any format whose files are pictures, such as `png`, `jpg` or `gif`. Chromium shows every one of them but tiff." }, "Detail.format/html.inline_size": { "description": "The sentence under the inline_size setting of the html format, after what it takes.", @@ -1586,13 +1606,13 @@ }, "Detail.format/jpg.background": { "description": "The sentence under the background setting of the jpg format, after what it takes.", - "hash": "sha256-f19788fb6882", - "other": "The colour of a placeholder, such as cccccc or ccc. In a recipe write it without # or in quotes, because # starts a comment there." + "hash": "sha256-d8261f6d9243", + "other": "The colour of a placeholder, such as `cccccc` or `ccc`. In a recipe write it without `#` or in quotes, because `#` starts a comment there." }, "Detail.format/jpg.content": { "description": "The sentence under the content setting of the jpg format, after what it takes.", - "hash": "sha256-3fb6c23165c1", - "other": "What the picture shows. test is a pattern for checking how a file is read. placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." + "hash": "sha256-3fdc1bf34bb6", + "other": "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." }, "Detail.format/jpg.foreground": { "description": "The sentence under the foreground setting of the jpg format, after what it takes.", @@ -1616,8 +1636,8 @@ }, "Detail.format/jpg.text": { "description": "The sentence under the text setting of the jpg format, after what it takes.", - "hash": "sha256-7055101b0dd9", - "other": "The words in the middle of a placeholder. {width} and {height} become the size of the picture, {index} the number of the file and {index:04} the same number with four digits." + "hash": "sha256-795954c1effc", + "other": "The words in the middle of a placeholder. `{width}` and `{height}` become the size of the picture, `{index}` the number of the file and `{index:04}` the same number with four digits." }, "Detail.format/jpg.width": { "description": "The sentence under the width setting of the jpg format, after what it takes.", @@ -1656,8 +1676,8 @@ }, "Detail.format/log.level_mix": { "description": "The sentence under the level_mix setting of the log format, after what it takes.", - "hash": "sha256-45f87458cd88", - "other": "Which severities appear. Only the plain and json-lines shapes carry one, and asking for it beside another shape is refused." + "hash": "sha256-0c82bcd0f561", + "other": "Which severities appear. Only the plain and JSON Lines shapes carry one, and asking for it beside another shape is refused." }, "Detail.format/log.line_ending": { "description": "The sentence under the line_ending setting of the log format, after what it takes.", @@ -1666,8 +1686,8 @@ }, "Detail.format/log.methods": { "description": "The sentence under the methods setting of the log format, after what it takes.", - "hash": "sha256-c621eebad3fc", - "other": "Which request methods appear. Read is GET and HEAD, mixed adds POST, PUT, PATCH and DELETE." + "hash": "sha256-5addc1801744", + "other": "Which request methods appear: GET only, GET and HEAD, or mixed, which adds POST, PUT, PATCH and DELETE to those two." }, "Detail.format/log.rate": { "description": "The sentence under the rate setting of the log format, after what it takes.", @@ -1731,13 +1751,13 @@ }, "Detail.format/otlp.batch": { "description": "The sentence under the batch setting of the otlp format, after what it takes.", - "hash": "sha256-793fcaf7d3f2", - "other": "How many spans or log records each line holds. 512 is the batch an OpenTelemetry SDK sends by default. Only record-per-line has batches, and beside another layout or beside signal metrics, where a line holds one collection, a batch is refused." + "hash": "sha256-86925d95718f", + "other": "How many spans or log records each line holds. 512 is the batch an OpenTelemetry SDK sends by default. Only the formatting record per line has batches. Beside other formatting, or beside the signal metrics, where a line holds one collection, a batch is refused." }, "Detail.format/otlp.body": { "description": "The sentence under the body setting of the otlp format, after what it takes.", - "hash": "sha256-483c91e6d770", - "other": "What the body of a log record holds. text is a sentence. any-value gives the seven kinds of value OTLP has in turn - text, a boolean, the whole number 2^53 + 1, a fraction, a list, a map and bytes - and the OpenTelemetry Collector reads them and writes them back unchanged. With large_numbers number, a reader that holds numbers as doubles reads that whole number one less. It shapes log records, and beside signal traces or metrics it is refused." + "hash": "sha256-dfbf231101d0", + "other": "What the body of a log record holds. Text is a sentence. Every kind of value gives the seven kinds of value OTLP has in turn - text, a boolean, the whole number 2^53 + 1, a fraction, a list, a map and bytes - and the OpenTelemetry Collector reads them and writes them back unchanged. With large numbers written as JSON numbers, a reader that holds numbers as doubles reads that whole number one less. It shapes log records, and beside signal traces or metrics it is refused." }, "Detail.format/otlp.bom": { "description": "The sentence under the bom setting of the otlp format, after what it takes.", @@ -1751,8 +1771,8 @@ }, "Detail.format/otlp.empty_envelope": { "description": "The sentence under the empty_envelope setting of the otlp format, after what it takes.", - "hash": "sha256-62ac042d001f", - "other": "Whether the file opens with a line holding a batch with nothing in it, which the OTLP specification asks senders not to write. The file receiver of the OpenTelemetry Collector reads the line and writes nothing for it. Only record-per-line has a line to spare, and beside another layout it is refused." + "hash": "sha256-36033d02b33f", + "other": "Whether the file opens with a line holding a batch with nothing in it, which the OTLP specification asks senders not to write. The file receiver of the OpenTelemetry Collector reads the line and writes nothing for it. Only the formatting record per line has a line to spare, and beside other formatting it is refused." }, "Detail.format/otlp.end_before_start": { "description": "The sentence under the end_before_start setting of the otlp format, after what it takes.", @@ -1766,28 +1786,28 @@ }, "Detail.format/otlp.exemplars": { "description": "The sentence under the exemplars setting of the otlp format, after what it takes.", - "hash": "sha256-ac0f521a7266", - "other": "Whether the durations of requests name the trace and the span a measurement was taken in, one for each bucket a collection measured in. The file holds no spans, so those ids match nothing in it. Only http.server.request.duration has them, and beside a metric_kind without it exemplars are refused." + "hash": "sha256-01d1085a1875", + "other": "Whether the durations of requests name the trace and the span a measurement was taken in, one for each bucket a collection measured in. The file holds no spans, so those ids match nothing in it. Only http.server.request.duration has them, and beside a metric kind without it they are refused." }, "Detail.format/otlp.formatting": { "description": "The sentence under the formatting setting of the otlp format, after what it takes.", - "hash": "sha256-b094d2e4c7a2", - "other": "How the file is laid out. record-per-line puts one batch on each line, which is what the OTLP file exporter writes and the file receiver of the OpenTelemetry Collector reads, and the file name ends in .jsonl. minified and indented make the whole file one request, the body to post to an OTLP endpoint, and the file name ends in .json. Posted as a body, a file of several lines loses every line after the first in the Collector, and its file receiver reads nothing from an indented file." + "hash": "sha256-2863be35bc52", + "other": "How the file is laid out. Record per line puts one batch on each line, which is what the OTLP file exporter writes and the file receiver of the OpenTelemetry Collector reads, and the file name ends in .jsonl. Minified and indented make the whole file one request, the body to post to an OTLP endpoint, and the file name ends in .json. Posted as a body, a file of several lines loses every line after the first in the Collector, and its file receiver reads nothing from an indented file." }, "Detail.format/otlp.id_encoding": { "description": "The sentence under the id_encoding setting of the otlp format, after what it takes.", - "hash": "sha256-76bf0def8c16", - "other": "How trace and span ids are written. hex is what the OTLP specification asks for. upper-hex writes the same digits in capitals, which the specification allows, and the OpenTelemetry Collector writes them back in lower case. base64 writes them the way the JSON mapping of protobuf writes bytes, which the specification forbids - the file receiver of the Collector drops every batch that holds an id without a word and its HTTP receiver answers 400. A reader built on the protobuf library reads base64 ids right and hex ids as something else." + "hash": "sha256-e9a63bebedc7", + "other": "How trace and span ids are written. hex is what the OTLP specification asks for. Upper-case hex writes the same digits in capitals, which the specification allows, and the OpenTelemetry Collector writes them back in lower case. base64 writes them the way the JSON mapping of protobuf writes bytes, which the specification forbids - the file receiver of the Collector drops every batch that holds an id without a word and its HTTP receiver answers 400. A reader built on the protobuf library reads base64 ids right and hex ids as something else." }, "Detail.format/otlp.interval": { "description": "The sentence under the interval setting of the otlp format, after what it takes.", - "hash": "sha256-2ce89e34952b", - "other": "How long a service waits between two collections of its metrics. 60 is what an SDK uses by default. Every point of a collection is dated at the same moment, and in record-per-line a line holds one collection." + "hash": "sha256-826c955891cb", + "other": "How long a service waits between two collections of its metrics. 60 is what an SDK uses by default. Every point of a collection is dated at the same moment, and with the formatting record per line a line holds one collection." }, "Detail.format/otlp.key_case": { "description": "The sentence under the key_case setting of the otlp format, after what it takes.", - "hash": "sha256-4f17fdd9113b", - "other": "How the keys of the file are written. camel is what the OTLP specification asks for, such as traceId. snake writes the names the .proto files give the fields, such as trace_id, which the specification calls not valid. The OpenTelemetry Collector reads them and writes camel case back, and the Rust crate opentelemetry-proto refuses the file." + "hash": "sha256-580a9580e01d", + "other": "How the keys of the file are written. camelCase is what the OTLP specification asks for, such as traceId. snake_case writes the names the .proto files give the fields, such as trace_id, which the specification calls not valid. The OpenTelemetry Collector reads them and writes camelCase back, and the Rust crate opentelemetry-proto refuses the file." }, "Detail.format/otlp.large_numbers": { "description": "The sentence under the large_numbers setting of the otlp format, after what it takes.", @@ -1801,13 +1821,13 @@ }, "Detail.format/otlp.metric_kind": { "description": "The sentence under the metric_kind setting of the otlp format, after what it takes.", - "hash": "sha256-c1a86feb6d4f", - "other": "Which metrics the file holds. gauge writes jvm.cpu.recent_utilization and shop.orders.pending, sum writes jvm.cpu.time, jvm.class.loaded and jvm.memory.used, histogram writes http.server.request.duration in the buckets the OpenTelemetry conventions name, exponential-histogram writes jvm.gc.duration in buckets that double every eight, and summary writes http.server.requests as three percentiles, the way Micrometer writes a timer. mixed writes all of them. gauge and sum each hold whole numbers and fractions." + "hash": "sha256-a10ffb3ec979", + "other": "Which metrics the file holds. gauge writes jvm.cpu.recent_utilization and shop.orders.pending, sum writes jvm.cpu.time, jvm.class.loaded and jvm.memory.used, histogram writes http.server.request.duration in the buckets the OpenTelemetry conventions name, exponential histogram writes jvm.gc.duration in buckets that double every eight, and summary writes http.server.requests as three percentiles, the way Micrometer writes a timer. mixed writes all of them. gauge and sum each hold whole numbers and fractions." }, "Detail.format/otlp.non_finite": { "description": "The sentence under the non_finite setting of the otlp format, after what it takes.", - "hash": "sha256-3cbadc5f5abb", - "other": "Whether jvm.cpu.recent_utilization reports values that are not numbers: NaN in the second of every four collections, and Infinity and -Infinity in turn in the fourth, written as text the way the JSON mapping of protobuf writes them. The OpenTelemetry Collector reads them and writes them back unchanged. Beside a metric_kind without that gauge it is refused." + "hash": "sha256-9982e6fbd68c", + "other": "Whether jvm.cpu.recent_utilization reports values that are not numbers: NaN in the second of every four collections, and Infinity and -Infinity in turn in the fourth, written as text the way the JSON mapping of protobuf writes them. The OpenTelemetry Collector reads them and writes them back unchanged. Beside a metric kind without that gauge it is refused." }, "Detail.format/otlp.rate": { "description": "The sentence under the rate setting of the otlp format, after what it takes.", @@ -1831,13 +1851,13 @@ }, "Detail.format/otlp.temporality": { "description": "The sentence under the temporality setting of the otlp format, after what it takes.", - "hash": "sha256-0f6234dad243", - "other": "Whether a sum or a histogram counts everything since the service started or only what came since the collection before. cumulative is what an SDK sends by default. delta leaves jvm.memory.used cumulative, as the delta setting of an SDK does. Beside metric_kind gauge or summary it is refused." + "hash": "sha256-fbcdfaa5a468", + "other": "Whether a sum or a histogram counts everything since the service started or only what came since the collection before. cumulative is what an SDK sends by default. delta leaves jvm.memory.used cumulative, as the delta setting of an SDK does. Beside the metric kind gauge or summary it is refused." }, "Detail.format/otlp.time_order": { "description": "The sentence under the time_order setting of the otlp format, after what it takes.", - "hash": "sha256-223b0e56bd8a", - "other": "Whether every trace, log record or collection is dated later than the one before it. out-of-order swaps the times of every two neighbours, so every second one is dated before the one in front of it. The specification of the OTLP file promises no order, and the OpenTelemetry Collector reads the file and writes it back unchanged. What the system storing the data does with what comes late is the question this file asks." + "hash": "sha256-a689a5471709", + "other": "Whether every trace, log record or collection is dated later than the one before it. Out of order swaps the times of every two neighbours, so every second one is dated before the one in front of it. The specification of the OTLP file promises no order, and the OpenTelemetry Collector reads the file and writes it back unchanged. What the system storing the data does with what comes late is the question this file asks." }, "Detail.format/otlp.trace_context": { "description": "The sentence under the trace_context setting of the otlp format, after what it takes.", @@ -1851,8 +1871,8 @@ }, "Detail.format/pdf.created": { "description": "The sentence under the created setting of the pdf format, after what it takes.", - "hash": "sha256-76abcd78cc63", - "other": "When the document says it was created. A time written without a zone is kept without one, and none leaves the date out." + "hash": "sha256-c3a8f5b4f263", + "other": "When the document says it was created. A time written without a zone is kept without one, and `none` leaves the date out." }, "Detail.format/pdf.creator": { "description": "The sentence under the creator setting of the pdf format, after what it takes.", @@ -1911,13 +1931,13 @@ }, "Detail.format/png.background": { "description": "The sentence under the background setting of the png format, after what it takes.", - "hash": "sha256-f19788fb6882", - "other": "The colour of a placeholder, such as cccccc or ccc. In a recipe write it without # or in quotes, because # starts a comment there." + "hash": "sha256-d8261f6d9243", + "other": "The colour of a placeholder, such as `cccccc` or `ccc`. In a recipe write it without `#` or in quotes, because `#` starts a comment there." }, "Detail.format/png.content": { "description": "The sentence under the content setting of the png format, after what it takes.", - "hash": "sha256-3fb6c23165c1", - "other": "What the picture shows. test is a pattern for checking how a file is read. placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." + "hash": "sha256-3fdc1bf34bb6", + "other": "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." }, "Detail.format/png.foreground": { "description": "The sentence under the foreground setting of the png format, after what it takes.", @@ -1936,8 +1956,8 @@ }, "Detail.format/png.text": { "description": "The sentence under the text setting of the png format, after what it takes.", - "hash": "sha256-7055101b0dd9", - "other": "The words in the middle of a placeholder. {width} and {height} become the size of the picture, {index} the number of the file and {index:04} the same number with four digits." + "hash": "sha256-795954c1effc", + "other": "The words in the middle of a placeholder. `{width}` and `{height}` become the size of the picture, `{index}` the number of the file and `{index:04}` the same number with four digits." }, "Detail.format/png.width": { "description": "The sentence under the width setting of the png format, after what it takes.", @@ -1966,8 +1986,8 @@ }, "Detail.format/rtf.inline_format": { "description": "The sentence under the inline_format setting of the rtf format, after what it takes.", - "hash": "sha256-929d6bcd9c5e", - "other": "The format of the pictures, png or jpg - the two picture formats RTF has a name for. Any other format is refused." + "hash": "sha256-11b2027132aa", + "other": "The format of the pictures, `png` or `jpg` - the two picture formats RTF has a name for. Any other format is refused." }, "Detail.format/rtf.inline_size": { "description": "The sentence under the inline_size setting of the rtf format, after what it takes.", @@ -1986,23 +2006,23 @@ }, "Detail.format/rtf.picture_data": { "description": "The sentence under the picture_data setting of the rtf format, after what it takes.", - "hash": "sha256-f91b5cd2e506", - "other": "How the bytes of each picture are written, which changes nothing while inline is 0. hex writes them as text, twice as large, the way LibreOffice writes them. binary writes them as they are, so the document is no longer text, and a program that counts braces or reads it as text loses its place. pandoc changes the line ends inside a binary picture, so no png comes out whole, and it can lose the text after the picture or refuse the whole document. LibreOffice, Tika and RichEdit read both." + "hash": "sha256-3f4349029862", + "other": "How the bytes of each picture are written, which changes nothing while the document has no pictures. hex writes them as text, twice as large, the way LibreOffice writes them. binary writes them as they are, so the document is no longer text, and a program that counts braces or reads it as text loses its place. pandoc changes the line ends inside a binary picture, so no png comes out whole, and it can lose the text after the picture or refuse the whole document. LibreOffice, Tika and RichEdit read both." }, "Detail.format/rtf.text_encoding": { "description": "The sentence under the text_encoding setting of the rtf format, after what it takes.", - "hash": "sha256-3766bb620616", - "other": "How the letters outside ASCII are written, which changes nothing while characters is ascii. unicode writes each one as a number with a question mark after it for a reader that does not know numbers. both puts the letter in the code page of its font after the number, two bytes for Japanese, the way Word writes it. codepage writes only the code page bytes, and the emoji still as numbers, since no code page holds them. literal writes the question mark as a plain character. LibreOffice, Tika and the RichEdit control of Windows read all four. pandoc shows codepage text in the wrong letters. pandoc before 3.13 also drops the character after every letter written literal, and pandoc 3.1 and 3.7 drop the emoji in all four. striprtf returns an emoji as two halves, which Python refuses to write as UTF-8." + "hash": "sha256-3daac818c4c7", + "other": "How the letters outside ASCII are written, which changes nothing while the characters are ascii. unicode writes each one as a number with a question mark after it for a reader that does not know numbers. Unicode and code page also puts the letter in the code page of its font after the number, two bytes for Japanese, the way Word writes it. Code page writes only the code page bytes, and the emoji still as numbers, since no code page holds them. literal writes the question mark as a plain character. LibreOffice, Tika and the RichEdit control of Windows read all four. pandoc shows code page text in the wrong letters. pandoc before 3.13 also drops the character after every letter written literal, and pandoc 3.1 and 3.7 drop the emoji in all four. striprtf returns an emoji as two halves, which Python refuses to write as UTF-8." }, "Detail.format/svg.background": { "description": "The sentence under the background setting of the svg format, after what it takes.", - "hash": "sha256-f19788fb6882", - "other": "The colour of a placeholder, such as cccccc or ccc. In a recipe write it without # or in quotes, because # starts a comment there." + "hash": "sha256-d8261f6d9243", + "other": "The colour of a placeholder, such as `cccccc` or `ccc`. In a recipe write it without `#` or in quotes, because `#` starts a comment there." }, "Detail.format/svg.content": { "description": "The sentence under the content setting of the svg format, after what it takes.", - "hash": "sha256-3fb6c23165c1", - "other": "What the picture shows. test is a pattern for checking how a file is read. placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." + "hash": "sha256-3fdc1bf34bb6", + "other": "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." }, "Detail.format/svg.foreground": { "description": "The sentence under the foreground setting of the svg format, after what it takes.", @@ -2021,8 +2041,8 @@ }, "Detail.format/svg.text": { "description": "The sentence under the text setting of the svg format, after what it takes.", - "hash": "sha256-7055101b0dd9", - "other": "The words in the middle of a placeholder. {width} and {height} become the size of the picture, {index} the number of the file and {index:04} the same number with four digits." + "hash": "sha256-795954c1effc", + "other": "The words in the middle of a placeholder. `{width}` and `{height}` become the size of the picture, `{index}` the number of the file and `{index:04}` the same number with four digits." }, "Detail.format/svg.width": { "description": "The sentence under the width setting of the svg format, after what it takes.", @@ -2046,13 +2066,13 @@ }, "Detail.format/targz.entries": { "description": "The sentence under the entries setting of the targz format, after what it takes.", - "hash": "sha256-e8a3f919b300", - "other": "How many files the archive holds. Use contains instead when the files are not all alike." + "hash": "sha256-276a8339f4ae", + "other": "How many files the archive holds. When the files are not all alike, describe each kind on its own instead - with Add files inside on Several batches, or contains in a recipe." }, "Detail.format/targz.entry_format": { "description": "The sentence under the entry_format setting of the targz format, after what it takes.", - "hash": "sha256-f4dab5f30a79", - "other": "The format of the files inside. Run tfg formats to see what this build supports." + "hash": "sha256-c0b9bc30cf28", + "other": "The format of the files inside." }, "Detail.format/targz.entry_mode": { "description": "The sentence under the entry_mode setting of the targz format, after what it takes.", @@ -2101,8 +2121,8 @@ }, "Detail.format/wav.content": { "description": "The sentence under the content setting of the wav format, after what it takes.", - "hash": "sha256-c2baa480c847", - "other": "What the signal sounds like." + "hash": "sha256-526b89878d2e", + "other": "What the sound is. A steady tone holds one pitch between 220 and 1099 Hz, chosen by the seed. A rising tone starts at such a pitch and climbs as the file plays. Noise is random hiss, and silence is nothing at all." }, "Detail.format/wav.sample_rate": { "description": "The sentence under the sample_rate setting of the wav format, after what it takes.", @@ -2196,13 +2216,13 @@ }, "Detail.format/zip.entries": { "description": "The sentence under the entries setting of the zip format, after what it takes.", - "hash": "sha256-e8a3f919b300", - "other": "How many files the archive holds. Use contains instead when the files are not all alike." + "hash": "sha256-276a8339f4ae", + "other": "How many files the archive holds. When the files are not all alike, describe each kind on its own instead - with Add files inside on Several batches, or contains in a recipe." }, "Detail.format/zip.entry_format": { "description": "The sentence under the entry_format setting of the zip format, after what it takes.", - "hash": "sha256-f4dab5f30a79", - "other": "The format of the files inside. Run tfg formats to see what this build supports." + "hash": "sha256-c0b9bc30cf28", + "other": "The format of the files inside." }, "Detail.format/zip.entry_size": { "description": "The sentence under the entry_size setting of the zip format, after what it takes.", @@ -2216,14 +2236,29 @@ }, "Detail.preset/empty-and-minimal.formats": { "description": "The sentence under the formats setting of the empty-and-minimal preset, after what it takes.", - "hash": "sha256-945bbcfdb3cf", - "other": "Which formats the set is built from. Leave it at all for every format this build has, or name the ones your system accepts." + "hash": "sha256-b8636e5b9ead", + "other": "Which formats the set is built from. Leave it at `all` for every format this build has, or name the ones your system accepts." }, "Detail.preset/filename-handling.format": { "description": "The sentence under the format setting of the filename-handling preset, after what it takes.", "hash": "sha256-30738a4e7806", "other": "What kind of file the whole set is made of." }, + "Detail.preset/picture-sizes.content": { + "description": "The sentence under the content setting of the picture-sizes preset, after what it takes.", + "hash": "sha256-3fdc1bf34bb6", + "other": "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." + }, + "Detail.preset/picture-sizes.format": { + "description": "The sentence under the format setting of the picture-sizes preset, after what it takes.", + "hash": "sha256-30738a4e7806", + "other": "What kind of file the whole set is made of." + }, + "Detail.preset/picture-sizes.groups": { + "description": "The sentence under the groups setting of the picture-sizes preset, after what it takes.", + "hash": "sha256-132f33fd1602", + "other": "Which sizes the set holds: `screens` for the sizes of screens, `avatars` for profile pictures and `social` for covers, banners, posts and thumbnails. Leave it at `all` for every one of them." + }, "Detail.preset/size-boundaries.format": { "description": "The sentence under the format setting of the size-boundaries preset, after what it takes.", "hash": "sha256-30738a4e7806", @@ -2596,8 +2631,8 @@ }, "Label.allow": { "description": "The name beside the box of a setting a recipe writes as allow.", - "hash": "sha256-e213c161d5ce", - "other": "Allow" + "hash": "sha256-2b04790e11e9", + "other": "Allowed types" }, "Label.altitude": { "description": "The name beside the box of a setting a recipe writes as altitude.", @@ -2641,13 +2676,13 @@ }, "Label.batch": { "description": "The name beside the box of a setting a recipe writes as batch.", - "hash": "sha256-320b5d80f8cf", - "other": "Batch" + "hash": "sha256-b58f36c0362b", + "other": "Records per line" }, "Label.bbox": { "description": "The name beside the box of a setting a recipe writes as bbox.", - "hash": "sha256-708f44b1bd98", - "other": "Bbox" + "hash": "sha256-c1af2bd9fa64", + "other": "Bounding box" }, "Label.bit_depth": { "description": "The name beside the box of a setting a recipe writes as bit_depth.", @@ -2666,8 +2701,8 @@ }, "Label.bulk": { "description": "The name beside the box of a setting a recipe writes as bulk.", - "hash": "sha256-3140100df131", - "other": "Bulk" + "hash": "sha256-4e0c0bc5be3c", + "other": "Mass upload" }, "Label.bytes": { "description": "The name beside the box of a setting a recipe writes as bytes.", @@ -2731,8 +2766,8 @@ }, "Label.deny": { "description": "The name beside the box of a setting a recipe writes as deny.", - "hash": "sha256-05a2d7332eb9", - "other": "Deny" + "hash": "sha256-15c77d9c11ec", + "other": "Denied extensions" }, "Label.depth": { "description": "The name beside the box of a setting a recipe writes as depth.", @@ -2756,8 +2791,8 @@ }, "Label.embed": { "description": "The name beside the box of a setting a recipe writes as embed.", - "hash": "sha256-7512561d2f68", - "other": "Embed" + "hash": "sha256-be53a02ffd1a", + "other": "Picture inside" }, "Label.empty_envelope": { "description": "The name beside the box of a setting a recipe writes as empty_envelope.", @@ -2816,13 +2851,13 @@ }, "Label.expected": { "description": "The name beside the box of a setting a recipe writes as expected.", - "hash": "sha256-ca99b7f1b14e", - "other": "Expected" + "hash": "sha256-d23e9f8e2ce8", + "other": "Expected checksum" }, "Label.far-over": { "description": "The name beside the box of a setting a recipe writes as far-over.", - "hash": "sha256-874367c30d4e", - "other": "Far-over" + "hash": "sha256-a547261596f8", + "other": "Far over the limit" }, "Label.file": { "description": "The name beside the box of what the checksum tool works on.", @@ -2874,6 +2909,11 @@ "hash": "sha256-fa9da5754ccf", "other": "Geometry" }, + "Label.groups": { + "description": "The name beside the box of a setting a recipe writes as groups.", + "hash": "sha256-39bbb719fa2b", + "other": "Groups" + }, "Label.guides": { "description": "The name beside the box of a setting a recipe writes as guides.", "hash": "sha256-572cd72feb9a", @@ -2906,8 +2946,8 @@ }, "Label.ids": { "description": "The name beside the box of a setting a recipe writes as ids.", - "hash": "sha256-d9aa9d4aca97", - "other": "Ids" + "hash": "sha256-f8f8e0aa3ac3", + "other": "Feature IDs" }, "Label.inline": { "description": "The name beside the box of a setting a recipe writes as inline.", @@ -2931,8 +2971,8 @@ }, "Label.ip_version": { "description": "The name beside the box of a setting a recipe writes as ip_version.", - "hash": "sha256-29016036fada", - "other": "Ip version" + "hash": "sha256-0f9c33e753e5", + "other": "IP version" }, "Label.key_case": { "description": "The name beside the box of a setting a recipe writes as key_case.", @@ -3001,8 +3041,8 @@ }, "Label.missing": { "description": "The name beside the box of a setting a recipe writes as missing.", - "hash": "sha256-6be36ca49ee8", - "other": "Missing" + "hash": "sha256-ca096c3e2581", + "other": "Part cut off" }, "Label.modified": { "description": "The name beside the box of a setting a recipe writes as modified.", @@ -3046,8 +3086,8 @@ }, "Label.pdf_version": { "description": "The name beside the box of a setting a recipe writes as pdf_version.", - "hash": "sha256-3ce7c43387ea", - "other": "Pdf version" + "hash": "sha256-7a4d61286488", + "other": "PDF version" }, "Label.picture_data": { "description": "The name beside the box of a setting a recipe writes as picture_data.", @@ -3086,8 +3126,8 @@ }, "Label.rotate": { "description": "The name beside the box of a setting a recipe writes as rotate.", - "hash": "sha256-c3613b1704f5", - "other": "Rotate" + "hash": "sha256-57b5e2fc1bba", + "other": "Rotation" }, "Label.rows": { "description": "The name beside the box of a setting a recipe writes as rows.", @@ -3096,8 +3136,8 @@ }, "Label.sample": { "description": "The name beside the box of a setting a recipe writes as sample.", - "hash": "sha256-95a2f1edb08a", - "other": "Sample" + "hash": "sha256-ff0442941bd8", + "other": "File size" }, "Label.sample_rate": { "description": "The name beside the box of a setting a recipe writes as sample_rate.", @@ -3116,8 +3156,8 @@ }, "Label.spread": { "description": "The name beside the box of a setting a recipe writes as spread.", - "hash": "sha256-b11fb1f593a8", - "other": "Spread" + "hash": "sha256-3de7c6087466", + "other": "Distances from the limit" }, "Label.start": { "description": "The name beside the box of a setting a recipe writes as start.", @@ -3181,8 +3221,8 @@ }, "Label.unlocated": { "description": "The name beside the box of a setting a recipe writes as unlocated.", - "hash": "sha256-9d9b671e4837", - "other": "Unlocated" + "hash": "sha256-c7016f7ebb1d", + "other": "Features without a place" }, "Label.unpacked_limit": { "description": "The name beside the box of a setting a recipe writes as unpacked_limit.", @@ -3231,13 +3271,13 @@ }, "Note.size-boundaries.limit": { "description": "What a run of the size-boundaries preset says when nobody gave its limit.", - "hash": "sha256-d65173d5db01", - "other": "no limit was given, so this set is built around 10mb - that is our placeholder and not your system's limit. Pass the limit your system declares, or the files say nothing about it." + "hash": "sha256-188ae54516cc", + "other": "no limit was given, so this set is built around 10mb - that is our placeholder and not your system's limit. Give the limit your system declares, or the files say nothing about it." }, "Note.upload-validation.limit": { "description": "What a run of the upload-validation preset says when nobody gave its limit.", - "hash": "sha256-c30ac7e13539", - "other": "no limit was given, so this set is built around 10mb - that is our placeholder and not your form's limit. Pass the limit your form declares, or the files say nothing about it." + "hash": "sha256-e9c953090726", + "other": "no limit was given, so this set is built around 10mb - that is our placeholder and not your form's limit. Give the limit your form declares, or the files say nothing about it." }, "Question.empty-and-minimal": { "description": "The question the empty-and-minimal preset answers, at the top of the preset screen.", @@ -3249,6 +3289,11 @@ "hash": "sha256-e558318318a2", "other": "Will my system store, show and give back a file name it did not expect?" }, + "Question.picture-sizes": { + "description": "The question the picture-sizes preset answers, at the top of the preset screen.", + "hash": "sha256-9a6f545b5c86", + "other": "Does my system take pictures at the sizes screens and platforms use?" + }, "Question.size-boundaries": { "description": "The question the size-boundaries preset answers, at the top of the preset screen.", "hash": "sha256-e26666b8f7a6", @@ -3314,6 +3359,11 @@ "hash": "sha256-48e97c935e5d", "other": "format ids separated by commas, or all" }, + "Shape.group names separated by commas, or all": { + "description": "What the text in a box has to look like, in the sentence under it.", + "hash": "sha256-68f92ad5bd2b", + "other": "group names separated by commas, or all" + }, "Shape.one line of up to 100 characters": { "description": "What the text in a box has to look like, in the sentence under it.", "hash": "sha256-4a7c0c62ca18", @@ -3324,15 +3374,15 @@ "hash": "sha256-f7e5e8c54e6f", "other": "sizes separated by commas" }, - "Shape.the id of a format, as tfg formats lists them": { + "Shape.the id of a format, such as png or csv": { "description": "What the text in a box has to look like, in the sentence under it.", - "hash": "sha256-b6784882fdeb", - "other": "the id of a format, as tfg formats lists them" + "hash": "sha256-776e6545e346", + "other": "the id of a format, such as png or csv" }, - "Shape.the id of a picture format, as tfg formats lists them": { + "Shape.the id of a picture format, such as png or jpg": { "description": "What the text in a box has to look like, in the sentence under it.", - "hash": "sha256-bf30a7c2c3a4", - "other": "the id of a picture format, as tfg formats lists them" + "hash": "sha256-ea19ea70a8b7", + "other": "the id of a picture format, such as png or jpg" }, "Shape.the password, in plain text": { "description": "What the text in a box has to look like, in the sentence under it.", @@ -3349,6 +3399,11 @@ "hash": "sha256-314f9b08db3f", "other": "File name handling" }, + "Title.picture-sizes": { + "description": "What the picture-sizes preset is called, beside its id in the list of presets.", + "hash": "sha256-f8376682bd1a", + "other": "Picture sizes" + }, "Title.size-boundaries": { "description": "What the size-boundaries preset is called, beside its id in the list of presets.", "hash": "sha256-21dd0ecec76d", diff --git a/internal/gui/text/locale/registry/pl.json b/internal/gui/text/locale/registry/pl.json index 03f97d3b..afb55f0d 100644 --- a/internal/gui/text/locale/registry/pl.json +++ b/internal/gui/text/locale/registry/pl.json @@ -6,6 +6,10 @@ "Catch.filename-handling.1": { "hash": "sha256-cd689fee5310", "other": "nazwa, która na ekranie, w logu albo na liście wygląda jak inna" }, "Catch.filename-handling.2": { "hash": "sha256-ba8e95039ea8", "other": "nazwa ucięta, przycięta albo przepisana między przesłaniem a zapisem" }, "Catch.filename-handling.3": { "hash": "sha256-c7a8efdaa07d", "other": "limit długości liczony w znakach tam, gdzie magazyn liczy bajty" }, + "Catch.picture-sizes.1": { "hash": "sha256-0bb5043c2fa4", "other": "limit szerokości albo wysokości ustawiony z myślą o jednym kształcie, który odrzuca inny, na przykład tło profilu szerokie na 1584 px" }, + "Catch.picture-sizes.2": { "hash": "sha256-817785f2eb86", "other": "miniatura przycięta albo spłaszczona, bo kod spodziewa się obrazka poziomego, a przychodzi pionowy" }, + "Catch.picture-sizes.3": { "hash": "sha256-22e21f4721d2", "other": "obrazek o nieparzystej wysokości, na przykład 1200 x 627, odrzucony przez krok, który przyjmuje tylko parzyste wymiary" }, + "Catch.picture-sizes.4": { "hash": "sha256-538591dbed57", "other": "obrazek 4K, któremu w drodze do miniatury kończy się czas albo pamięć, choć sam plik jest mały" }, "Catch.size-boundaries.1": { "hash": "sha256-1c7f6a00f596", "other": "błędy o jeden na samym limicie" }, "Catch.size-boundaries.2": { "hash": "sha256-763425765f30", "other": "pomylone MB i MiB - to 4,8 procent, wystarczy, żeby przepuścić plik, który nie powinien przejść" }, "Catch.size-boundaries.3": { "hash": "sha256-787363b16a1e", "other": "limit sprawdzany w przeglądarce, a nie na serwerze" }, @@ -33,10 +37,10 @@ "Choice.bit_depth.24": { "hash": "sha256-c2356069e9d1", "other": "24" }, "Choice.bit_depth.32": { "hash": "sha256-e29c9c180c62", "other": "32" }, "Choice.bit_depth.8": { "hash": "sha256-2c624232cdd2", "other": "8" }, - "Choice.body.alternative": { "hash": "sha256-27747689baf9", "other": "tekst i html" }, - "Choice.body.any-value": { "hash": "sha256-cc8f80439173", "other": "każdy rodzaj wartości" }, - "Choice.body.html": { "hash": "sha256-e5e239560bc1", "other": "html" }, - "Choice.body.plain": { "hash": "sha256-a116c9ed46d6", "other": "zwykły tekst" }, + "Choice.body.alternative": { "hash": "sha256-fab1573b3dd1", "other": "zwykły tekst i HTML" }, + "Choice.body.any-value": { "hash": "sha256-aa9cde9613f4", "other": "każdy rodzaj wartości" }, + "Choice.body.html": { "hash": "sha256-07239dbd2a1a", "other": "HTML" }, + "Choice.body.plain": { "hash": "sha256-c9ecf5e54c7b", "other": "zwykły tekst" }, "Choice.body.text": { "hash": "sha256-982d9e3eb996", "other": "tekst" }, "Choice.characters.ascii": { "hash": "sha256-c543ece81605", "other": "ascii" }, "Choice.characters.international": { "hash": "sha256-1e3bb894756f", "other": "międzynarodowe" }, @@ -50,9 +54,9 @@ "Choice.content.noise": { "hash": "sha256-efe2a5c09e6d", "other": "szum" }, "Choice.content.placeholder": { "hash": "sha256-4097889236a2", "other": "obraz zastępczy" }, "Choice.content.silence": { "hash": "sha256-e6c18fdbe597", "other": "cisza" }, - "Choice.content.sweep": { "hash": "sha256-dfd33796972c", "other": "przemiatanie" }, - "Choice.content.test": { "hash": "sha256-9f86d081884c", "other": "obraz testowy" }, - "Choice.content.tone": { "hash": "sha256-00cf4ce3935c", "other": "ton" }, + "Choice.content.sweep": { "hash": "sha256-009bf8c7b1b8", "other": "narastający ton" }, + "Choice.content.test": { "hash": "sha256-4d1f108611d7", "other": "obraz testowy" }, + "Choice.content.tone": { "hash": "sha256-7cfb96347670", "other": "stały ton" }, "Choice.delimiter.comma": { "hash": "sha256-f36a4e586705", "other": "przecinek" }, "Choice.delimiter.pipe": { "hash": "sha256-400829473916", "other": "kreska pionowa" }, "Choice.delimiter.semicolon": { "hash": "sha256-1e69fcfadd9d", "other": "średnik" }, @@ -69,9 +73,9 @@ "Choice.encryption.aes-256": { "hash": "sha256-7237b089a3fc", "other": "aes-256" }, "Choice.encryption.none": { "hash": "sha256-140bedbf9c3f", "other": "brak" }, "Choice.encryption.zipcrypto": { "hash": "sha256-42ea6e5dc44a", "other": "zipcrypto" }, - "Choice.entry_format.apache-combined": { "hash": "sha256-eb5679006aba", "other": "apache-combined" }, - "Choice.entry_format.apache-common": { "hash": "sha256-5385bfe0ab10", "other": "apache-common" }, - "Choice.entry_format.json-lines": { "hash": "sha256-9e26c12b9d04", "other": "json-lines" }, + "Choice.entry_format.apache-combined": { "hash": "sha256-d0857dd9bd16", "other": "Apache combined" }, + "Choice.entry_format.apache-common": { "hash": "sha256-fedd364848fa", "other": "Apache common" }, + "Choice.entry_format.json-lines": { "hash": "sha256-74163645b1b5", "other": "JSON Lines" }, "Choice.entry_format.nginx": { "hash": "sha256-5be1ecc7935f", "other": "nginx" }, "Choice.entry_format.plain": { "hash": "sha256-a116c9ed46d6", "other": "zwykły" }, "Choice.entry_format.syslog": { "hash": "sha256-4d75f832ea26", "other": "syslog" }, @@ -91,21 +95,21 @@ "Choice.enum_encoding.name": { "hash": "sha256-82a3537ff0db", "other": "nazwa" }, "Choice.enum_encoding.number": { "hash": "sha256-12886f9d0005", "other": "liczba" }, "Choice.expected.accept": { "hash": "sha256-c125d0397b60", "other": "przyjęcie" }, - "Choice.expected.reason.content_malformed": { "hash": "sha256-14484a3d8ff7", "other": "uszkodzona zawartość" }, - "Choice.expected.reason.count_limit": { "hash": "sha256-636449b3d71c", "other": "limit liczby plików" }, - "Choice.expected.reason.dimensions_limit": { "hash": "sha256-539dd060c765", "other": "limit wymiarów" }, + "Choice.expected.reason.content_malformed": { "hash": "sha256-51d22886ab72", "other": "uszkodzona zawartość" }, + "Choice.expected.reason.count_limit": { "hash": "sha256-80094c926360", "other": "limit liczby plików" }, + "Choice.expected.reason.dimensions_limit": { "hash": "sha256-b3dc71e8df2e", "other": "limit wymiarów" }, "Choice.expected.reason.duplicate": { "hash": "sha256-e24a5a32c9b8", "other": "duplikat" }, - "Choice.expected.reason.encoding_invalid": { "hash": "sha256-1ed4a2806f5f", "other": "niepoprawne kodowanie" }, - "Choice.expected.reason.extension_rule": { "hash": "sha256-87ad72d63a7f", "other": "reguła rozszerzeń" }, - "Choice.expected.reason.filename_invalid": { "hash": "sha256-816b1c0c80ea", "other": "niedozwolona nazwa" }, - "Choice.expected.reason.filename_too_long": { "hash": "sha256-394b764c42c4", "other": "za długa nazwa" }, - "Choice.expected.reason.filename_traversal": { "hash": "sha256-51dbdb34a500", "other": "wyjście poza katalog" }, - "Choice.expected.reason.malware_signature": { "hash": "sha256-adb5581b7ea9", "other": "sygnatura złośliwego kodu" }, - "Choice.expected.reason.mime_mismatch": { "hash": "sha256-a1c2c3069328", "other": "niezgodny typ MIME" }, - "Choice.expected.reason.nesting_depth": { "hash": "sha256-ddc6be14fb52", "other": "głębokość zagnieżdżenia" }, + "Choice.expected.reason.encoding_invalid": { "hash": "sha256-126efde45cec", "other": "niepoprawne kodowanie" }, + "Choice.expected.reason.extension_rule": { "hash": "sha256-ea91ae4f758e", "other": "reguła rozszerzeń" }, + "Choice.expected.reason.filename_invalid": { "hash": "sha256-94d1f4a7e785", "other": "niedozwolona nazwa pliku" }, + "Choice.expected.reason.filename_too_long": { "hash": "sha256-7d00dd68fceb", "other": "za długa nazwa pliku" }, + "Choice.expected.reason.filename_traversal": { "hash": "sha256-a22edd75d23b", "other": "ścieżka poza katalogiem" }, + "Choice.expected.reason.malware_signature": { "hash": "sha256-11dfd8a66593", "other": "sygnatura złośliwego kodu" }, + "Choice.expected.reason.mime_mismatch": { "hash": "sha256-601dd0fbb437", "other": "typ niezgodny z zawartością" }, + "Choice.expected.reason.nesting_depth": { "hash": "sha256-f797a19b6d78", "other": "głębokość zagnieżdżenia" }, "Choice.expected.reason.none": { "hash": "sha256-140bedbf9c3f", "other": "brak" }, - "Choice.expected.reason.size_limit": { "hash": "sha256-7fba5810a3a2", "other": "limit rozmiaru" }, - "Choice.expected.reason.size_zero": { "hash": "sha256-2ccd5d11434a", "other": "pusty plik" }, + "Choice.expected.reason.size_limit": { "hash": "sha256-40caef2f118c", "other": "limit rozmiaru" }, + "Choice.expected.reason.size_zero": { "hash": "sha256-9e8c00db8eed", "other": "pusty plik" }, "Choice.expected.reject": { "hash": "sha256-084e990a49ba", "other": "odrzucenie" }, "Choice.expected.sanitize": { "hash": "sha256-af6a3bb0c72f", "other": "oczyszczenie" }, "Choice.expected.unspecified": { "hash": "sha256-f416648f8086", "other": "nieokreślony" }, @@ -152,7 +156,7 @@ "Choice.formatting.indented": { "hash": "sha256-a258f543b0a6", "other": "z wcięciami" }, "Choice.formatting.lines": { "hash": "sha256-5ea44c3961f1", "other": "w wierszach" }, "Choice.formatting.minified": { "hash": "sha256-1ddd424e287f", "other": "zminifikowany" }, - "Choice.formatting.record-per-line": { "hash": "sha256-6f0d86374d60", "other": "rekord na wiersz" }, + "Choice.formatting.record-per-line": { "hash": "sha256-a24bb4915137", "other": "rekord na wiersz" }, "Choice.frame_rate.1": { "hash": "sha256-6b86b273ff34", "other": "1" }, "Choice.frame_rate.10": { "hash": "sha256-4a44dc153642", "other": "10" }, "Choice.frame_rate.12": { "hash": "sha256-6b51d431df5d", "other": "12" }, @@ -177,7 +181,7 @@ "Choice.headers.utf8": { "hash": "sha256-941b7ecd47e5", "other": "utf8" }, "Choice.id_encoding.base64": { "hash": "sha256-371a286d5872", "other": "base64" }, "Choice.id_encoding.hex": { "hash": "sha256-128df13c1e54", "other": "szesnastkowo" }, - "Choice.id_encoding.upper-hex": { "hash": "sha256-18b09d853661", "other": "szesnastkowo wielkimi literami" }, + "Choice.id_encoding.upper-hex": { "hash": "sha256-8f531e68f1b1", "other": "szesnastkowo wielkimi literami" }, "Choice.ids.mixed": { "hash": "sha256-3f8fee624f43", "other": "mieszane" }, "Choice.ids.none": { "hash": "sha256-140bedbf9c3f", "other": "brak" }, "Choice.ids.number": { "hash": "sha256-12886f9d0005", "other": "liczba" }, @@ -185,8 +189,8 @@ "Choice.ip_version.mixed": { "hash": "sha256-3f8fee624f43", "other": "mieszane" }, "Choice.ip_version.v4": { "hash": "sha256-8e38a1ea5c68", "other": "v4" }, "Choice.ip_version.v6": { "hash": "sha256-3e8286044388", "other": "v6" }, - "Choice.key_case.camel": { "hash": "sha256-4812585e9449", "other": "camelCase" }, - "Choice.key_case.snake": { "hash": "sha256-538d7d9fe78e", "other": "snake_case" }, + "Choice.key_case.camel": { "hash": "sha256-987aa078ffa1", "other": "camelCase" }, + "Choice.key_case.snake": { "hash": "sha256-ffdf29cd20be", "other": "snake_case" }, "Choice.large_numbers.number": { "hash": "sha256-12886f9d0005", "other": "liczba" }, "Choice.large_numbers.text": { "hash": "sha256-982d9e3eb996", "other": "tekst" }, "Choice.layout.newsletter": { "hash": "sha256-dd6f465f6810", "other": "newsletter" }, @@ -199,10 +203,10 @@ "Choice.line_ending.lf": { "hash": "sha256-39e741eddb03", "other": "lf" }, "Choice.line_endings.crlf": { "hash": "sha256-c613dc516f32", "other": "crlf" }, "Choice.line_endings.lf": { "hash": "sha256-39e741eddb03", "other": "lf" }, - "Choice.methods.get": { "hash": "sha256-2998b3232d29", "other": "get" }, + "Choice.methods.get": { "hash": "sha256-00dc16a60bf9", "other": "tylko GET" }, "Choice.methods.mixed": { "hash": "sha256-3f8fee624f43", "other": "mieszane" }, - "Choice.methods.read": { "hash": "sha256-3316348dbadf", "other": "odczyt" }, - "Choice.metric_kind.exponential-histogram": { "hash": "sha256-9e08a9dd9e02", "other": "histogram wykładniczy" }, + "Choice.methods.read": { "hash": "sha256-575866d5fc48", "other": "GET i HEAD" }, + "Choice.metric_kind.exponential-histogram": { "hash": "sha256-d9efa57e1d07", "other": "histogram wykładniczy" }, "Choice.metric_kind.gauge": { "hash": "sha256-a90fd9a9a1e6", "other": "wskaźnik" }, "Choice.metric_kind.histogram": { "hash": "sha256-56f0e5b2847c", "other": "histogram" }, "Choice.metric_kind.mixed": { "hash": "sha256-3f8fee624f43", "other": "wszystkie" }, @@ -224,16 +228,16 @@ "Choice.quote_style.all": { "hash": "sha256-5ef5ef0364b6", "other": "wszystkie" }, "Choice.quote_style.minimal": { "hash": "sha256-a703788f8320", "other": "minimalne" }, "Choice.quote_style.none": { "hash": "sha256-140bedbf9c3f", "other": "brak" }, - "Choice.rotate.0": { "hash": "sha256-5feceb66ffc8", "other": "0" }, - "Choice.rotate.180": { "hash": "sha256-7b69759630f8", "other": "180" }, - "Choice.rotate.270": { "hash": "sha256-d8d1790737d5", "other": "270" }, - "Choice.rotate.90": { "hash": "sha256-69f59c273b6e", "other": "90" }, + "Choice.rotate.0": { "hash": "sha256-88e62a100a18", "other": "0 stopni" }, + "Choice.rotate.180": { "hash": "sha256-46621106fbaa", "other": "180 stopni" }, + "Choice.rotate.270": { "hash": "sha256-a8cb2ff65791", "other": "270 stopni" }, + "Choice.rotate.90": { "hash": "sha256-cd38ccdf1e9a", "other": "90 stopni" }, "Choice.signal.logs": { "hash": "sha256-98f38f12db22", "other": "logi" }, "Choice.signal.metrics": { "hash": "sha256-177a7ea3611f", "other": "metryki" }, "Choice.signal.traces": { "hash": "sha256-b5ac69fc467c", "other": "ślady" }, - "Choice.status_mix.client-errors": { "hash": "sha256-cc47f4e83c84", "other": "błędy klienta" }, + "Choice.status_mix.client-errors": { "hash": "sha256-1f234ccd9f7f", "other": "błędy klienta" }, "Choice.status_mix.realistic": { "hash": "sha256-9d2f45fd706a", "other": "realistycznie" }, - "Choice.status_mix.server-errors": { "hash": "sha256-af6f28d08a12", "other": "błędy serwera" }, + "Choice.status_mix.server-errors": { "hash": "sha256-be03a2c09cf1", "other": "błędy serwera" }, "Choice.status_mix.success": { "hash": "sha256-aee408847d35", "other": "sukcesy" }, "Choice.structure.document": { "hash": "sha256-43cc23fa52b8", "other": "dokument" }, "Choice.structure.fragment": { "hash": "sha256-7587669ca42e", "other": "fragment" }, @@ -245,13 +249,13 @@ "Choice.text_encoding.7bit": { "hash": "sha256-af6ec1d82852", "other": "7bit" }, "Choice.text_encoding.8bit": { "hash": "sha256-e318653d2946", "other": "8bit" }, "Choice.text_encoding.base64": { "hash": "sha256-371a286d5872", "other": "base64" }, - "Choice.text_encoding.both": { "hash": "sha256-ff7772053abf", "other": "oba" }, - "Choice.text_encoding.codepage": { "hash": "sha256-0b653bac8180", "other": "strona kodowa" }, + "Choice.text_encoding.both": { "hash": "sha256-5e3237154d6d", "other": "unicode i strona kodowa" }, + "Choice.text_encoding.codepage": { "hash": "sha256-ca1ae48a54d8", "other": "strona kodowa" }, "Choice.text_encoding.literal": { "hash": "sha256-829f8d848b44", "other": "dosłowny" }, "Choice.text_encoding.quoted-printable": { "hash": "sha256-7956a9e2a40b", "other": "quoted-printable" }, "Choice.text_encoding.unicode": { "hash": "sha256-2fcf76a4c3c7", "other": "unicode" }, - "Choice.time_order.in-order": { "hash": "sha256-d733f4e84323", "other": "po kolei" }, - "Choice.time_order.out-of-order": { "hash": "sha256-da48228bd1a4", "other": "nie po kolei" }, + "Choice.time_order.in-order": { "hash": "sha256-63be856a06e4", "other": "po kolei" }, + "Choice.time_order.out-of-order": { "hash": "sha256-2ee32f5ece03", "other": "nie po kolei" }, "Choice.timestamps.advancing": { "hash": "sha256-3656fa4d5539", "other": "rosnące" }, "Choice.timestamps.fixed": { "hash": "sha256-992a93455c71", "other": "stałe" }, "Choice.unlocated.all": { "hash": "sha256-5ef5ef0364b6", "other": "wszystkie" }, @@ -273,21 +277,21 @@ "Detail.format/csv.line_ending": { "hash": "sha256-d802b082ce8b", "other": "Jak kończy się każdy wiersz. Wybierz crlf, żeby dostać kształt, którego wymaga RFC 4180 i który zapisuje Excel." }, "Detail.format/csv.quote_style": { "hash": "sha256-a2427ed0240b", "other": "Które pola mają cudzysłowy. Gdy wybierzesz brak, opis przestaje też zawierać separatory, bo pole bez cudzysłowu nie może go pomieścić." }, "Detail.format/docx.paragraphs": { "hash": "sha256-5d0141e9b1da", "other": "Ile akapitów tekstu zawiera dokument. Resztę zamówionego rozmiaru niesie niewidoczna część paczki." }, - "Detail.format/eml.attachment_format": { "hash": "sha256-8855c0b55a42", "other": "Format załączonych plików. Uruchom tfg formats, żeby zobaczyć, co obsługuje ta wersja. eml załącza wiadomość tak, jak jest, tak jak przekazuje się pocztę, bez base64 wokół niej." }, + "Detail.format/eml.attachment_format": { "hash": "sha256-73f4ca55d9b2", "other": "Format załączonych plików. `eml` załącza wiadomość tak, jak jest, tak jak przekazuje się pocztę, bez base64 wokół niej." }, "Detail.format/eml.attachment_size": { "hash": "sha256-c6ca8985e21d", "other": "Jak duży jest każdy załączony plik. Wiadomość rośnie o mniej więcej jedną trzecią więcej, bo załączone pliki są przesyłane w base64." }, - "Detail.format/eml.attachments": { "hash": "sha256-43c96b5ef075", "other": "Ile plików niesie wiadomość. Gdy pliki nie są jednakowe, użyj zamiast tego contains. mailparser odmawia wiadomości z więcej niż 1000 encji MIME, a manifest podaje ich liczbę dla tej wiadomości jako mime_entities." }, - "Detail.format/eml.body": { "hash": "sha256-5dc479375b75", "other": "Jaki tekst niesie wiadomość. zwykły tekst to jedna część tekstowa, a html jedna część HTML. tekst i html niesie obie z tymi samymi słowami, a program pocztowy pokazuje jedną z nich." }, - "Detail.format/eml.charset": { "hash": "sha256-636bf249f436", "other": "Zestaw znaków tekstu, gdy kodowanie tekstu nie jest 7bit. iso-8859-2 i windows-1250 mają polski i nie mają japońskiego, a litery ą, ś i ź zapisują innymi bajtami, więc program, który bierze jeden za drugi, pokazuje złe litery. MimeKit bez zarejestrowanego dostawcy stron kodowych próbuje UTF-8, a potem Latin-1, więc w obu pokazuje polskie litery źle, a poprawnie, gdy dostawca jest zarejestrowany. Biblioteka standardowa Go nie przekształca żadnego zestawu znaków. Przy 7bit tekst jest czystym ASCII i mówi us-ascii, bez względu na to ustawienie." }, - "Detail.format/eml.filename_style": { "hash": "sha256-adf72ea5fcb6", "other": "Jak zapisane są nazwy załączonych plików i obrazków. rfc2231 to sposób standardowy. rfc2047 to forma kodowana, której RFC 2047 zabrania wewnątrz nazwy, a wiele czytników i tak ją dekoduje. oba zapisuje obie, a content-type umieszcza nazwę tylko tam, gdzie szukały jej stare programy pocztowe. brak nie zapisuje nazwy wcale, a program, który jej potrzebuje, musi ją wymyślić - Thunderbird 157 nazywa je Part 1.2, Part 1.3 i tak dalej. Biblioteka standardowa Go nie czyta nazwy z content-type, a z rfc2047 oddaje sam zakodowany tekst. Gdy headers nie jest ustawione na kodowane, nazwa jest zapisana tak, jak jest, i zmienia się tylko jej miejsce, więc rfc2047 i oba zapisują te same bajty." }, + "Detail.format/eml.attachments": { "hash": "sha256-9eb089191964", "other": "Ile plików niesie wiadomość. Gdy pliki nie są jednakowe, opisz zamiast tego każdy rodzaj osobno - przyciskiem Dodaj pliki do środka na ekranie Kilka partii albo przez contains w przepisie. mailparser odmawia wiadomości z więcej niż 1000 encji MIME, a manifest podaje ich liczbę dla tej wiadomości jako mime_entities." }, + "Detail.format/eml.body": { "hash": "sha256-48c2cdb55b7b", "other": "Jaki tekst niesie wiadomość. Przy zwykły tekst i HTML te same słowa idą do obu części, a program pocztowy pokazuje jedną z nich." }, + "Detail.format/eml.charset": { "hash": "sha256-459b6c507537", "other": "Zestaw znaków tekstu, gdy kodowanie tekstu nie jest 7bit. iso-8859-2 i windows-1250 mają polski i nie mają japońskiego, a litery ą, ś i ź zapisują innymi bajtami, więc program, który bierze jeden za drugi, pokazuje złe litery. MimeKit bez zarejestrowanego dostawcy stron kodowych próbuje UTF-8, a potem Latin-1, więc w obu pokazuje polskie litery źle, a poprawnie, gdy dostawca jest zarejestrowany. Biblioteka standardowa Go nie przekształca żadnego zestawu znaków. Przy 7bit tekst jest czystym ASCII i mówi us-ascii, bez względu na to ustawienie." }, + "Detail.format/eml.filename_style": { "hash": "sha256-44eb98e1acc7", "other": "Jak zapisane są nazwy załączonych plików i obrazków. rfc2231 to sposób standardowy. rfc2047 to forma kodowana, której RFC 2047 zabrania wewnątrz nazwy, a wiele czytników i tak ją dekoduje. oba zapisuje obie, a content-type umieszcza nazwę tylko tam, gdzie szukały jej stare programy pocztowe. brak nie zapisuje nazwy wcale, a program, który jej potrzebuje, musi ją wymyślić - Thunderbird 157 nazywa je Part 1.2, Part 1.3 i tak dalej. Biblioteka standardowa Go nie czyta nazwy z content-type, a z rfc2047 oddaje sam zakodowany tekst. Gdy nagłówki nie są kodowane, nazwa jest zapisana tak, jak jest, i zmienia się tylko jej miejsce, więc rfc2047 i oba zapisują te same bajty." }, "Detail.format/eml.headers": { "hash": "sha256-5002e2b42e63", "other": "Czy temat, nazwy nadawcy i odbiorcy oraz nazwy załączonych plików mają litery spoza ASCII, i jak są zapisane. kodowane zapisuje je tak, jak każą RFC 2047 i RFC 2231. utf8 zapisuje je tak, jak są (RFC 6532), a pakiet email Pythona czyta to i zgłasza defekt w liniach From i To." }, "Detail.format/eml.inline": { "hash": "sha256-65d689f88414", "other": "Ile obrazków pokazuje tekst. Przy html oraz tekst i html każdy leży obok HTML-a, a HTML wskazuje go przez cid:. Przy zwykłym tekście nie ma HTML-a, z którego można by wskazać, więc obrazki idą za tekstem jako obrazki do pokazania w treści. mailparser wpisuje je na listę załączników, pakiet email Pythona robi to, gdy HTML jest sam, a MimeKit nigdy." }, - "Detail.format/eml.inline_format": { "hash": "sha256-fbdd11d7bf9a", "other": "Format obrazków. Dowolny format, którego pliki są obrazkami, na przykład png, jpg albo gif." }, + "Detail.format/eml.inline_format": { "hash": "sha256-fb11a5da4cc7", "other": "Format obrazków. Dowolny format, którego pliki są obrazkami, na przykład `png`, `jpg` albo `gif`." }, "Detail.format/eml.inline_size": { "hash": "sha256-e9458e263f67", "other": "Jak duży jest każdy obrazek. Tak jak załączony plik jest przesyłany w base64, mniej więcej o jedną trzecią większy." }, "Detail.format/eml.layout": { "hash": "sha256-848dda056f39", "other": "Jak ułożony jest tekst. prosty to sam tekst. newsletter oprawia go tak, jak robi to lista mailingowa - tytuł, przycisk Read more i stopka z odnośnikiem do wypisania się, w tabeli szerokiej na 600 pikseli, ze stylami i w arkuszu stylów, i w atrybutach style, a zwykły tekst wypisuje adresy, które HTML chowa pod odnośnikami. Dodaje List-Id, List-Unsubscribe i List-Unsubscribe-Post, po których systemy pocztowe odróżniają pocztę masową, a manifest podaje adres wypisu jako unsubscribe_url. Wiadomość nie ma podpisu DKIM, więc program pocztowy zgodny z RFC 8058 nie zaproponuje wypisania się jednym kliknięciem. Wiadomości w środku zostają proste." }, "Detail.format/eml.line_endings": { "hash": "sha256-42b29dfbf2d1", "other": "Jak kończy się każda linia pliku. Standardem jest crlf. Python, MimeKit, mailparser i biblioteka standardowa Go czytają też lf, więc różnicę widać w programach, które same dzielą linie." }, "Detail.format/eml.message_depth": { "hash": "sha256-4218baafacad", "other": "Na ile wiadomości w głąb sięga wiadomość. 1 to sama wiadomość. 2 niesie przekazaną wiadomość jako załącznik, a każdy kolejny krok dokłada jedną więcej wewnątrz poprzedniej, każdą najmniejszą, jaka może być. Pakiet email Pythona 3.14 wyczerpuje rekurencję przy około 490, a MimeKit powyżej 513 bez słowa przestaje je rozbierać. Thunderbird 157 pokazuje w całości do 32. Dalej 32. wiadomość w środku pokazuje tylko nagłówki, a nic pod nią się nie pojawia, bez słowa." }, "Detail.format/eml.recipients": { "hash": "sha256-1ed6b4b5d2c1", "other": "Ile adresów niesie linia To, każdy w osobnej linii. mailparser odmawia nagłówka większego niż 1 MiB, do czego wystarcza około 33 800 adresów przy crlf i 34 900 przy lf, a pakiet email Pythona 3.14 potrzebuje minut na kilkadziesiąt tysięcy." }, - "Detail.format/eml.text_encoding": { "hash": "sha256-783ad3f77f90", "other": "Jak zapisany jest tekst. 7bit trzyma go w czystym ASCII. quoted-printable, 8bit i base64 dodają linię po polsku, a po japońsku, gdy zestaw znaków to utf-8, bo do tego służą. quoted-printable zapisuje te litery jako =C5=BC, 8bit tak, jak są, a base64 zapisuje w base64 cały tekst. Żeby osiągnąć każdy rozmiar, base64 kończy tekst pustymi liniami, a przy crlf nieparzysty rozmiar daje Message-ID o jedną cyfrę dłuższy." }, + "Detail.format/eml.text_encoding": { "hash": "sha256-3893e44f3c25", "other": "Jak zapisany jest tekst. 7bit trzyma go w czystym ASCII. quoted-printable, 8bit i base64 dodają linię po polsku, a po japońsku, gdy zestaw znaków to utf-8, bo do tego służą. quoted-printable zapisuje te litery jako =C5=BC, 8bit tak, jak są, a base64 zapisuje w base64 cały tekst. Żeby osiągnąć każdy rozmiar, base64 kończy tekst pustymi liniami, a przy crlf nieparzysty rozmiar daje Message-ID o jedną cyfrę dłuższy." }, "Detail.format/geojson.altitude": { "hash": "sha256-702be3958a4b", "other": "Czy każda pozycja niesie trzecią liczbę, wysokość w metrach od -400 do 8848. Program, który czyta dwie liczby na pozycję, musi ją pominąć albo odrzucić plik." }, "Detail.format/geojson.antimeridian": { "hash": "sha256-e7755a355839", "other": "Czy każda linia i każdy obrys przecina 180. południk bez rozcięcia na dwie części. RFC 7946 każe takie kształty rozcinać, a czytniki się różnią - czytany jako płaskie współrzędne, przecinający obrys przecina sam siebie i biegnie w drugą stronę. Pojedynczy punkt nie może przeciąć i leży obok." }, "Detail.format/geojson.bbox": { "hash": "sha256-2046a38a38a9", "other": "Czy kolekcja i każdy obiekt z położeniem niosą bbox, prostokąt, w którym leżą ich współrzędne. Bbox kolekcji stoi za jej obiektami, bo jej zasięg jest znany dopiero po ostatnim, a prostokąt przecinający antypołudnik ma zachodnią krawędź większą niż wschodnią, jak każe RFC 7946." }, @@ -307,7 +311,7 @@ "Detail.format/html.elements": { "hash": "sha256-ad89039f3061", "other": "Których elementów używa strona. podstawowe to nagłówki, akapity, listy, tabele i cytaty. wszystkie dokłada blok, który używa każdego elementu standardu HTML co najmniej raz, wszystkich 22 rodzajów pola input oraz małych obrazków i dźwięku zapisanych w samej stronie, bez skryptu i bez niczego pobieranego z sieci. Fragment nie ma głowy, więc pomija osiem elementów, które ma tylko cała strona." }, "Detail.format/html.formatting": { "hash": "sha256-6d6322985c6f", "other": "Jak ułożona jest strona. zminifikowany stawia cały plik w jednej linii i kończy go bez znaku nowej linii. z wcięciami stawia przed wierszem dwie spacje za każdy element, w którym wiersz siedzi, a tekst pre zostawia bez zmian. Wszystkie trzy wyglądają tak samo. Program czytający wierszami dostaje stronę zminifikowaną jako jeden wiersz - bufio.Scanner w Go odmawia wiersza dłuższego niż 64 KB, chyba że dostanie większy bufor - a tekst czytany przez łączenie tego, co niosą elementy, skleja ostatnie słowo jednego bloku z pierwszym słowem następnego. Wcięcia razem z zagnieżdżeniem dokładają przed każdym wierszem więcej spacji z każdym poziomem, więc zagnieżdżenie 1000 daje stronę co najmniej 1,9 MB." }, "Detail.format/html.inline": { "hash": "sha256-83c55b41b56a", "other": "Ile obrazków pokazuje strona. Każdy jest prawdziwym plikiem swojego formatu wpisanym w stronę jako adres data:, więc otwarcie strony niczego nie pobiera. Leżą nad blokami, każdy w osobnym akapicie, a każdy mówi w tekście alt, który to obrazek." }, - "Detail.format/html.inline_format": { "hash": "sha256-0c0288233958", "other": "Format obrazków. Dowolny format, którego pliki są obrazkami, na przykład png, jpg albo gif. Chromium pokazuje każdy z nich poza tiff." }, + "Detail.format/html.inline_format": { "hash": "sha256-7c58ff8c5727", "other": "Format obrazków. Dowolny format, którego pliki są obrazkami, na przykład `png`, `jpg` albo `gif`. Chromium pokazuje każdy z nich poza tiff." }, "Detail.format/html.inline_size": { "hash": "sha256-2433610ca9da", "other": "Jak duży jest każdy obrazek. W stronie jest zapisany w base64 w jednej linii, mniej więcej o jedną trzecią większy. lxml, a z nim BeautifulSoup, pomija obrazek większy niż około 7,1 MB, chyba że kazano mu czytać ogromne drzewa. Na Linuksie lxml czytał taką stronę ponad 20 sekund, a przy obrazku 15 MB zgubił też resztę strony." }, "Detail.format/html.links": { "hash": "sha256-c07164812721", "other": "Ile odnośników niesie strona, na liście nad obrazkami i blokami. Przechodzą po kolei przez 18 rodzajów i potem się powtarzają - odnośnik do samej listy, względny, do katalogu wyżej, od korzenia, samo zapytanie, bezwzględny z zapytaniem i fragmentem, http, bez schematu, z kodowaniem procentowym, domena międzynarodowa, port, mailto:, tel:, ftp:, pobranie, nowe okno, nofollow i data: - a tekst każdego mówi, którym jest. Każdy adres leży w domenie zarezerwowanej na przykłady. DOMPurify z ustawieniami domyślnymi wyjmuje adres data: i atrybut target, który otwiera nowe okno, a przy milionie odnośników zabrakło mu 8 GB pamięci, podczas gdy lxml przeczytał je w 3 sekundy. Katalog wszystkich elementów ma sześć własnych odnośników, których to ustawienie nie liczy." }, "Detail.format/html.nesting": { "hash": "sha256-cac70df12b4b", "other": "W ilu elementach div, jeden w drugim, siedzi treść. 0 umieszcza ją wprost w body, a etykieta zostaje na zewnątrz, więc strona dalej mówi, czym jest. Chromium zachowuje 511 poziomów i wyjmuje głębsze na zewnątrz, a Nu HTML Checker uznaje tak głęboką stronę za błąd. lxml gubi treść strony zagnieżdżonej na około 250 poziomów i zostawia tylko etykietę, a jsdom, parse5 i DOMPurify mogą wyczerpać stos przy zapisie strony od około 2 000 poziomów." }, @@ -316,13 +320,13 @@ "Detail.format/ico.embed": { "hash": "sha256-1578534c06bf", "other": "Co jest w środku ikony. Bitmapę czyta każda wersja Windows. PNG daje dużo mniejszy plik i wymaga Windows Vista albo nowszego." }, "Detail.format/ico.height": { "hash": "sha256-e2712d04875d", "other": "Jak wysoka jest ikona. Gdy pole zostaje puste, używany jest największy standardowy rozmiar ikony, który się mieści." }, "Detail.format/ico.width": { "hash": "sha256-1e8b4b7bc765", "other": "Jak szeroka jest ikona. Gdy pole zostaje puste, używany jest największy standardowy rozmiar ikony, który się mieści." }, - "Detail.format/jpg.background": { "hash": "sha256-f19788fb6882", "other": "Kolor obrazu zastępczego, na przykład cccccc albo ccc. W przepisie pisz go bez # albo w cudzysłowie, bo # zaczyna tam komentarz." }, - "Detail.format/jpg.content": { "hash": "sha256-3fb6c23165c1", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, + "Detail.format/jpg.background": { "hash": "sha256-d8261f6d9243", "other": "Kolor obrazu zastępczego, na przykład `cccccc` albo `ccc`. W przepisie pisz go bez `#` albo w cudzysłowie, bo `#` zaczyna tam komentarz." }, + "Detail.format/jpg.content": { "hash": "sha256-3fdc1bf34bb6", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, "Detail.format/jpg.foreground": { "hash": "sha256-57ac35f17b3f", "other": "Kolor napisu i prowadnic na obrazie zastępczym, zapisany tak samo jak Tło." }, "Detail.format/jpg.guides": { "hash": "sha256-7edc1841adb4", "other": "Rysuje ramkę wzdłuż krawędzi obrazu zastępczego, obie przekątne i koło dotykające krótszych boków, żeby było widać, gdzie strona przycina albo rozciąga obrazek." }, "Detail.format/jpg.height": { "hash": "sha256-4b336c279584", "other": "Jak wysoki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, "Detail.format/jpg.quality": { "hash": "sha256-55a9a664be71", "other": "Ile szczegółów przetrwa kompresję, od 1 do 100. JPEG z założenia odrzuca szczegóły, więc niska liczba daje widocznie bardziej miękki obraz. Zmienia to, do jakiego rozmiaru obraz się koduje, a nie rozmiar zamówionego pliku." }, - "Detail.format/jpg.text": { "hash": "sha256-7055101b0dd9", "other": "Napis na środku obrazu zastępczego. {width} i {height} zamieniają się w wymiary obrazka, {index} w numer pliku, a {index:04} w ten sam numer zapisany czterema cyframi." }, + "Detail.format/jpg.text": { "hash": "sha256-795954c1effc", "other": "Napis na środku obrazu zastępczego. `{width}` i `{height}` zamieniają się w wymiary obrazka, `{index}` w numer pliku, a `{index:04}` w ten sam numer zapisany czterema cyframi." }, "Detail.format/jpg.width": { "hash": "sha256-3085ac44f0e0", "other": "Jak szeroki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, "Detail.format/json.formatting": { "hash": "sha256-fc49d1b8da7d", "other": "Jak ułożony jest dokument. Każdy czytnik przyjmuje wszystkie trzy, więc to zmienia to, co spotyka otoczenie parsera, a nie sam parser - zminifikowany stawia cały plik w jednej linii i kończy go bez znaku nowej linii, a z wcięciami robi z tych samych rekordów plik kilka razy większy." }, "Detail.format/jxl.height": { "hash": "sha256-4b336c279584", "other": "Jak wysoki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, @@ -330,9 +334,9 @@ "Detail.format/jxl.width": { "hash": "sha256-3085ac44f0e0", "other": "Jak szeroki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, "Detail.format/log.entry_format": { "hash": "sha256-96bf1c74dcf1", "other": "Jaki rodzaj logu zapisać. Kształty serwera WWW niosą żądanie i status, pozostałe niosą poziom i komunikat." }, "Detail.format/log.ip_version": { "hash": "sha256-870d5b20c405", "other": "Jaki rodzaj adresu klienta się pojawia. Wybierz v6, żeby sprawdzić, czy czytnik go obsługuje." }, - "Detail.format/log.level_mix": { "hash": "sha256-45f87458cd88", "other": "Które poziomy ważności się pojawiają. Niosą je tylko kształty zwykły i json-lines, a prośba o nie przy innym kształcie jest odrzucana." }, + "Detail.format/log.level_mix": { "hash": "sha256-0c82bcd0f561", "other": "Które poziomy ważności się pojawiają. Niosą je tylko kształty zwykły i JSON Lines, a prośba o nie przy innym kształcie jest odrzucana." }, "Detail.format/log.line_ending": { "hash": "sha256-8595ad80ed76", "other": "Jak kończy się każda linia. Wybierz crlf, żeby dostać log zapisany przez usługę Windows." }, - "Detail.format/log.methods": { "hash": "sha256-c621eebad3fc", "other": "Które metody żądań się pojawiają. Odczyt to GET i HEAD, mieszane dodaje POST, PUT, PATCH i DELETE." }, + "Detail.format/log.methods": { "hash": "sha256-5addc1801744", "other": "Które metody żądań się pojawiają: tylko GET, GET i HEAD albo mieszane, które dodaje do tych dwóch POST, PUT, PATCH i DELETE." }, "Detail.format/log.rate": { "hash": "sha256-f8f4b55f9769", "other": "Jak szybko przychodzą wpisy. Ma znaczenie tylko wtedy, gdy znaczniki czasu idą naprzód." }, "Detail.format/log.status_mix": { "hash": "sha256-6555eacaebb2", "other": "Które kody odpowiedzi się pojawiają. Realistycznie daje głównie sukcesy z ogonem błędów." }, "Detail.format/log.timestamps": { "hash": "sha256-b7c69e2424bc", "other": "Czy każdy wpis dzieje się później niż poprzedni. Stałe stawiają każdy wpis w tej samej chwili, tak jak ten format robił, zanim umiał iść naprzód." }, @@ -345,31 +349,31 @@ "Detail.format/mp4.keyframe_interval": { "hash": "sha256-6c717248aaaa", "other": "Jak daleko od siebie są klatki, od których odtwarzacz może zacząć. Krótszy odstęp przyspiesza przewijanie długiego filmu i powiększa plik, bo każda z nich niesie cały obraz dwa razy." }, "Detail.format/mp4.quality": { "hash": "sha256-f6e1c3e1af83", "other": "Ile szczegółów zachowuje obraz. Wyższa wartość wygląda lepiej i zajmuje więcej pliku, zostawiając mniej miejsca na dopełnienie." }, "Detail.format/mp4.width": { "hash": "sha256-3085ac44f0e0", "other": "Jak szeroki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, - "Detail.format/otlp.batch": { "hash": "sha256-793fcaf7d3f2", "other": "Ile spanów albo rekordów logów ma każda linia. 512 to paczka, którą SDK OpenTelemetry wysyła domyślnie. Paczki ma tylko układ rekord na wiersz, a przy innym układzie albo przy sygnale metryki, gdzie linia to jeden zbiór, paczka jest odrzucana." }, - "Detail.format/otlp.body": { "hash": "sha256-483c91e6d770", "other": "Co niesie treść rekordu logu. Przy tekst to zdanie. Przy każdy rodzaj wartości rekordy niosą po kolei siedem rodzajów wartości OTLP - tekst, wartość logiczną, liczbę całkowitą 2^53 + 1, ułamek, listę, mapę i bajty - a OpenTelemetry Collector czyta je i zapisuje z powrotem bez zmian. Gdy duże liczby są zapisane jako liczba, czytnik, który trzyma liczby jako double, odczyta tę liczbę całkowitą o jeden mniejszą. Kształtuje rekordy logów, a przy sygnale ślady albo metryki jest odrzucane." }, + "Detail.format/otlp.batch": { "hash": "sha256-86925d95718f", "other": "Ile spanów albo rekordów logów ma każda linia. 512 to paczka, którą SDK OpenTelemetry wysyła domyślnie. Paczki ma tylko układ rekord na wiersz. Przy innym układzie albo przy sygnale metryki, gdzie linia to jeden zbiór, paczka jest odrzucana." }, + "Detail.format/otlp.body": { "hash": "sha256-dfbf231101d0", "other": "Co niesie treść rekordu logu. Przy tekst to zdanie. Przy każdy rodzaj wartości rekordy niosą po kolei siedem rodzajów wartości OTLP - tekst, wartość logiczną, liczbę całkowitą 2^53 + 1, ułamek, listę, mapę i bajty - a OpenTelemetry Collector czyta je i zapisuje z powrotem bez zmian. Gdy duże liczby są zapisane jako liczby JSON, czytnik, który trzyma liczby jako double, odczyta tę liczbę całkowitą o jeden mniejszą. Kształtuje rekordy logów, a przy sygnale ślady albo metryki jest odrzucane." }, "Detail.format/otlp.bom": { "hash": "sha256-a2d6a88583d6", "other": "Czy plik zaczyna się od znacznika kolejności bajtów (BOM). Czytnik, który musi zgadywać kodowanie, go potrzebuje, a czytnik, który się go nie spodziewa, pokazuje go jako obce znaki na początku pliku." }, "Detail.format/otlp.depth": { "hash": "sha256-569c03730a30", "other": "Ile spanów ma każdy ślad, każdy jako dziecko poprzedniego. 1 zostawia każdy span bez rodzica. Kształtuje spany, a przy sygnale logi albo metryki jest odrzucane." }, - "Detail.format/otlp.empty_envelope": { "hash": "sha256-62ac042d001f", "other": "Czy plik zaczyna się linią z paczką, w której nie ma nic, a specyfikacja OTLP prosi nadawców, żeby takiej nie pisali. Odbiornik plików OpenTelemetry Collectora czyta tę linię i nic za nią nie zapisuje. Linię do oddania ma tylko układ rekord na wiersz, a przy innym układzie jest odrzucane." }, + "Detail.format/otlp.empty_envelope": { "hash": "sha256-36033d02b33f", "other": "Czy plik zaczyna się linią z paczką, w której nie ma nic, a specyfikacja OTLP prosi nadawców, żeby takiej nie pisali. Odbiornik plików OpenTelemetry Collectora czyta tę linię i nic za nią nie zapisuje. Linię do oddania ma tylko układ rekord na wiersz, a przy innym układzie jest odrzucane." }, "Detail.format/otlp.end_before_start": { "hash": "sha256-0a13a989796c", "other": "Czy każdy span ma koniec datowany przed początkiem, czyli oba czasy zamienione miejscami. OpenTelemetry Collector czyta taki span i zapisuje go z powrotem bez zmian. Kształtuje spany, a przy sygnale logi albo metryki jest odrzucane." }, "Detail.format/otlp.enum_encoding": { "hash": "sha256-428ff808c144", "other": "Jak zapisany jest rodzaj spanu, kod jego statusu, poziom ważności rekordu logu i temporalność sumy albo histogramu. Liczba to zapis, którego wymaga specyfikacja OTLP. Nazwa zapisuje nazwy takie jak SPAN_KIND_SERVER, czego specyfikacja zabrania. OpenTelemetry Collector mimo to je czyta i zapisuje z powrotem liczby, a crate Rust opentelemetry-proto odrzuca tak zapisany span." }, - "Detail.format/otlp.exemplars": { "hash": "sha256-ac0f521a7266", "other": "Czy czasy trwania żądań podają ślad i span, w którym zmierzono pomiar, po jednym na każdy kubełek, w który trafił zbiór. Plik nie ma spanów, więc te identyfikatory nie pasują do niczego w nim. Ma je tylko http.server.request.duration, a przy rodzaju metryk bez niego exemplary są odrzucane." }, - "Detail.format/otlp.formatting": { "hash": "sha256-b094d2e4c7a2", "other": "Jak ułożony jest plik. Przy rekord na wiersz każda paczka stoi w osobnej linii, tak jak zapisuje ją eksporter plików OTLP i jak czyta ją odbiornik plików OpenTelemetry Collectora, a nazwa pliku kończy się na .jsonl. Przy zminifikowany i z wcięciami cały plik jest jednym żądaniem, czyli treścią do wysłania na endpoint OTLP, a nazwa pliku kończy się na .json. Wysłany jako treść żądania plik o kilku liniach traci w Collectorze każdą linię po pierwszej, a jego odbiornik plików nie czyta nic z pliku z wcięciami." }, - "Detail.format/otlp.id_encoding": { "hash": "sha256-76bf0def8c16", "other": "Jak zapisane są identyfikatory śladów i spanów. Szesnastkowo to zapis, którego wymaga specyfikacja OTLP. Szesnastkowo wielkimi literami pisze te same cyfry wielkimi literami, na co specyfikacja pozwala, a OpenTelemetry Collector zapisuje je z powrotem małymi. Base64 pisze je tak, jak mapowanie JSON protobuf zapisuje bajty, czego specyfikacja zabrania - odbiornik plików Collectora bez słowa gubi każdą paczkę, w której jest identyfikator, a jego odbiornik HTTP odpowiada 400. Czytnik zbudowany na bibliotece protobuf czyta identyfikatory base64 poprawnie, a szesnastkowe jako coś innego." }, - "Detail.format/otlp.interval": { "hash": "sha256-2ce89e34952b", "other": "Ile czasu usługa czeka między dwoma zbiorami swoich metryk. 60 to wartość, której SDK używa domyślnie. Każdy punkt zbioru ma tę samą datę, a w układzie rekord na wiersz linia to jeden zbiór." }, - "Detail.format/otlp.key_case": { "hash": "sha256-4f17fdd9113b", "other": "Jak zapisane są klucze pliku. camelCase to zapis, którego wymaga specyfikacja OTLP, na przykład traceId. snake_case pisze nazwy, które pliki .proto nadają polom, na przykład trace_id, a specyfikacja nazywa je niepoprawnymi. OpenTelemetry Collector je czyta i zapisuje z powrotem w camelCase, a crate Rust opentelemetry-proto odrzuca plik." }, + "Detail.format/otlp.exemplars": { "hash": "sha256-01d1085a1875", "other": "Czy czasy trwania żądań podają ślad i span, w którym zmierzono pomiar, po jednym na każdy kubełek, w który trafił zbiór. Plik nie ma spanów, więc te identyfikatory nie pasują do niczego w nim. Ma je tylko http.server.request.duration, a przy rodzaju metryk bez niego są odrzucane." }, + "Detail.format/otlp.formatting": { "hash": "sha256-2863be35bc52", "other": "Jak ułożony jest plik. Przy rekord na wiersz każda paczka stoi w osobnej linii, tak jak zapisuje ją eksporter plików OTLP i jak czyta ją odbiornik plików OpenTelemetry Collectora, a nazwa pliku kończy się na .jsonl. Przy zminifikowany i z wcięciami cały plik jest jednym żądaniem, czyli treścią do wysłania na endpoint OTLP, a nazwa pliku kończy się na .json. Wysłany jako treść żądania plik o kilku liniach traci w Collectorze każdą linię po pierwszej, a jego odbiornik plików nie czyta nic z pliku z wcięciami." }, + "Detail.format/otlp.id_encoding": { "hash": "sha256-e9a63bebedc7", "other": "Jak zapisane są identyfikatory śladów i spanów. Szesnastkowo to zapis, którego wymaga specyfikacja OTLP. Szesnastkowo wielkimi literami pisze te same cyfry wielkimi literami, na co specyfikacja pozwala, a OpenTelemetry Collector zapisuje je z powrotem małymi. Base64 pisze je tak, jak mapowanie JSON protobuf zapisuje bajty, czego specyfikacja zabrania - odbiornik plików Collectora bez słowa gubi każdą paczkę, w której jest identyfikator, a jego odbiornik HTTP odpowiada 400. Czytnik zbudowany na bibliotece protobuf czyta identyfikatory base64 poprawnie, a szesnastkowe jako coś innego." }, + "Detail.format/otlp.interval": { "hash": "sha256-826c955891cb", "other": "Ile czasu usługa czeka między dwoma zbiorami swoich metryk. 60 to wartość, której SDK używa domyślnie. Każdy punkt zbioru ma tę samą datę, a w układzie rekord na wiersz linia to jeden zbiór." }, + "Detail.format/otlp.key_case": { "hash": "sha256-580a9580e01d", "other": "Jak zapisane są klucze pliku. camelCase to zapis, którego wymaga specyfikacja OTLP, na przykład traceId. snake_case pisze nazwy, które pliki .proto nadają polom, na przykład trace_id, a specyfikacja nazywa je niepoprawnymi. OpenTelemetry Collector je czyta i zapisuje z powrotem w camelCase, a crate Rust opentelemetry-proto odrzuca plik." }, "Detail.format/otlp.large_numbers": { "hash": "sha256-da573f0e1080", "other": "Jak zapisane są czasy i inne liczby 64-bitowe. Tekst to zapis, którego specyfikacja OTLP wymaga od nadawcy, na przykład \"1785585600000000000\". Liczba pisze je jako liczby JSON, które czytnik też ma przyjmować, i OpenTelemetry Collector je przyjmuje. Czytnik, który trzyma każdą liczbę JSON jako double, tak jak JavaScript, dostaje każdy czas z dokładnością do 256 nanosekund." }, "Detail.format/otlp.level_mix": { "hash": "sha256-013335bf03aa", "other": "Jakie poziomy ważności niosą rekordy logów. Realistycznie daje głównie INFO i trochę pozostałych. Kształtuje rekordy logów, a przy sygnale ślady albo metryki jest odrzucane." }, - "Detail.format/otlp.metric_kind": { "hash": "sha256-c1a86feb6d4f", "other": "Jakie metryki są w pliku. Wskaźnik pisze jvm.cpu.recent_utilization i shop.orders.pending, suma pisze jvm.cpu.time, jvm.class.loaded i jvm.memory.used, histogram pisze http.server.request.duration w kubełkach, które podają konwencje OpenTelemetry, histogram wykładniczy pisze jvm.gc.duration w kubełkach, które podwajają się co osiem, a podsumowanie pisze http.server.requests jako trzy percentyle, tak jak Micrometer zapisuje licznik czasu. Wszystkie pisze każdą z nich. Wskaźnik i suma niosą liczby całkowite i ułamki." }, - "Detail.format/otlp.non_finite": { "hash": "sha256-3cbadc5f5abb", "other": "Czy jvm.cpu.recent_utilization zgłasza wartości, które nie są liczbami: NaN w drugim z każdych czterech zbiorów, a w czwartym na zmianę Infinity i -Infinity, zapisane jako tekst, tak jak mapowanie JSON protobuf je zapisuje. OpenTelemetry Collector je czyta i zapisuje z powrotem bez zmian. Przy rodzaju metryk bez tego wskaźnika jest odrzucane." }, + "Detail.format/otlp.metric_kind": { "hash": "sha256-a10ffb3ec979", "other": "Jakie metryki są w pliku. Wskaźnik pisze jvm.cpu.recent_utilization i shop.orders.pending, suma pisze jvm.cpu.time, jvm.class.loaded i jvm.memory.used, histogram pisze http.server.request.duration w kubełkach, które podają konwencje OpenTelemetry, histogram wykładniczy pisze jvm.gc.duration w kubełkach, które podwajają się co osiem, a podsumowanie pisze http.server.requests jako trzy percentyle, tak jak Micrometer zapisuje licznik czasu. Wszystkie pisze każdą z nich. Wskaźnik i suma niosą liczby całkowite i ułamki." }, + "Detail.format/otlp.non_finite": { "hash": "sha256-9982e6fbd68c", "other": "Czy jvm.cpu.recent_utilization zgłasza wartości, które nie są liczbami: NaN w drugim z każdych czterech zbiorów, a w czwartym na zmianę Infinity i -Infinity, zapisane jako tekst, tak jak mapowanie JSON protobuf je zapisuje. OpenTelemetry Collector je czyta i zapisuje z powrotem bez zmian. Przy rodzaju metryk bez tego wskaźnika jest odrzucane." }, "Detail.format/otlp.rate": { "hash": "sha256-7e71b4f3b48f", "other": "Ile śladów albo rekordów logów zaczyna się w każdej sekundzie. Metryki są zbierane co odstęp zbiorów, a przy sygnale metryki tempo jest odrzucane." }, "Detail.format/otlp.signal": { "hash": "sha256-5d461667592e", "other": "Jaki rodzaj telemetrii jest w pliku. Przy ślady plik niesie spany, przy logi rekordy logów, a przy metryki pomiary usługi zbierane co odstęp zbiorów. Plik niesie jeden rodzaj, tak jak wymaga tego format plików OTLP." }, "Detail.format/otlp.start": { "hash": "sha256-f6d93ca7613b", "other": "Chwila, którą datowany jest pierwszy span albo rekord logu, i chwila startu usługi, która pisze metryki. Kolejne idą po niej w ustawionym tempie albo co odstęp zbiorów. Zmień ją, gdy system, który odbiera plik, odrzuca albo ukrywa zbyt stare dane." }, "Detail.format/otlp.status_mix": { "hash": "sha256-bb5ae4b2ee09", "other": "Jakimi kodami odpowiedzi kończą się żądania. Kod 500 albo wyższy oznacza swój span jako błąd, tak jak wymagają konwencje HTTP OpenTelemetry, a każdy inny kod zostawia status nieustawiony. Kształtuje spany, a przy sygnale logi albo metryki jest odrzucane." }, - "Detail.format/otlp.temporality": { "hash": "sha256-0f6234dad243", "other": "Czy suma albo histogram liczy wszystko od startu usługi, czy tylko to, co przyszło od poprzedniego zbioru. Narastająco to zapis, który SDK wysyła domyślnie. Przyrostowo zostawia jvm.memory.used narastająco, tak jak robi to SDK poproszone o temporalność przyrostową. Przy rodzaju metryk wskaźnik albo podsumowanie jest odrzucane." }, - "Detail.format/otlp.time_order": { "hash": "sha256-223b0e56bd8a", "other": "Czy każdy ślad, rekord logu albo zbiór ma datę późniejszą niż poprzedni. Nie po kolei zamienia czasy każdych dwóch sąsiadów, więc co drugi jest datowany przed tym, który stoi przed nim. Specyfikacja pliku OTLP nie obiecuje kolejności, a OpenTelemetry Collector czyta plik i zapisuje go z powrotem bez zmian. Pytaniem, które zadaje ten plik, jest to, co system przechowujący dane zrobi z tym, co przychodzi późno." }, + "Detail.format/otlp.temporality": { "hash": "sha256-fbcdfaa5a468", "other": "Czy suma albo histogram liczy wszystko od startu usługi, czy tylko to, co przyszło od poprzedniego zbioru. Narastająco to zapis, który SDK wysyła domyślnie. Przyrostowo zostawia jvm.memory.used narastająco, tak jak robi to SDK poproszone o temporalność przyrostową. Przy rodzaju metryk wskaźnik albo podsumowanie jest odrzucane." }, + "Detail.format/otlp.time_order": { "hash": "sha256-a689a5471709", "other": "Czy każdy ślad, rekord logu albo zbiór ma datę późniejszą niż poprzedni. Nie po kolei zamienia czasy każdych dwóch sąsiadów, więc co drugi jest datowany przed tym, który stoi przed nim. Specyfikacja pliku OTLP nie obiecuje kolejności, a OpenTelemetry Collector czyta plik i zapisuje go z powrotem bez zmian. Pytaniem, które zadaje ten plik, jest to, co system przechowujący dane zrobi z tym, co przychodzi późno." }, "Detail.format/otlp.trace_context": { "hash": "sha256-918e5211764c", "other": "Czy każdy rekord logu podaje ślad i span, w którym go zapisano. Plik nie ma spanów, więc te identyfikatory nie pasują do niczego w nim. Kształtuje rekordy logów, a przy sygnale ślady albo metryki jest odrzucane." }, "Detail.format/pdf.author": { "hash": "sha256-33b1ee363d86", "other": "Autor we właściwościach dokumentu. Gdy pole zostaje puste, dokument nie podaje żadnego." }, - "Detail.format/pdf.created": { "hash": "sha256-76abcd78cc63", "other": "Kiedy według dokumentu powstał. Czas zapisany bez strefy zostaje bez niej, a none pomija datę." }, + "Detail.format/pdf.created": { "hash": "sha256-c3a8f5b4f263", "other": "Kiedy według dokumentu powstał. Czas zapisany bez strefy zostaje bez niej, a `none` pomija datę." }, "Detail.format/pdf.creator": { "hash": "sha256-57ed4066a447", "other": "Program, w którym według dokumentu go napisano, na przykład Microsoft Word. Gdy pole zostaje puste, dokument nie podaje żadnego." }, "Detail.format/pdf.keywords": { "hash": "sha256-fa35deba8ee4", "other": "Słowa kluczowe we właściwościach dokumentu, jako jedna linia tekstu. Gdy pole zostaje puste, dokument nie ma żadnych." }, "Detail.format/pdf.modified": { "hash": "sha256-67960ecb9bad", "other": "Kiedy według dokumentu zmieniono go ostatni raz, zapisane tak samo jak created. Gdy pole zostaje puste, dokument nie ma takiej daty." }, @@ -381,35 +385,35 @@ "Detail.format/pdf.rotate": { "hash": "sha256-954a63b2b503", "other": "Prosi czytnik, żeby przy wyświetlaniu obrócił każdą stronę o tyle stopni zgodnie z ruchem wskazówek zegara. Sama strona zostaje pionowa, więc czytnik, który ignoruje prośbę, pokazuje ją nieobróconą." }, "Detail.format/pdf.subject": { "hash": "sha256-3c66b2d9cc36", "other": "Temat we właściwościach dokumentu. Gdy pole zostaje puste, dokument nie ma żadnego." }, "Detail.format/pdf.title": { "hash": "sha256-28f3672d6413", "other": "Tytuł, który czytnik pokazuje na pasku tytułu i we właściwościach dokumentu. Gdy pole zostaje puste, tytułem jest samoopisująca etykieta, a bez niej nazwa tego narzędzia." }, - "Detail.format/png.background": { "hash": "sha256-f19788fb6882", "other": "Kolor obrazu zastępczego, na przykład cccccc albo ccc. W przepisie pisz go bez # albo w cudzysłowie, bo # zaczyna tam komentarz." }, - "Detail.format/png.content": { "hash": "sha256-3fb6c23165c1", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, + "Detail.format/png.background": { "hash": "sha256-d8261f6d9243", "other": "Kolor obrazu zastępczego, na przykład `cccccc` albo `ccc`. W przepisie pisz go bez `#` albo w cudzysłowie, bo `#` zaczyna tam komentarz." }, + "Detail.format/png.content": { "hash": "sha256-3fdc1bf34bb6", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, "Detail.format/png.foreground": { "hash": "sha256-57ac35f17b3f", "other": "Kolor napisu i prowadnic na obrazie zastępczym, zapisany tak samo jak Tło." }, "Detail.format/png.guides": { "hash": "sha256-7edc1841adb4", "other": "Rysuje ramkę wzdłuż krawędzi obrazu zastępczego, obie przekątne i koło dotykające krótszych boków, żeby było widać, gdzie strona przycina albo rozciąga obrazek." }, "Detail.format/png.height": { "hash": "sha256-4b336c279584", "other": "Jak wysoki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, - "Detail.format/png.text": { "hash": "sha256-7055101b0dd9", "other": "Napis na środku obrazu zastępczego. {width} i {height} zamieniają się w wymiary obrazka, {index} w numer pliku, a {index:04} w ten sam numer zapisany czterema cyframi." }, + "Detail.format/png.text": { "hash": "sha256-795954c1effc", "other": "Napis na środku obrazu zastępczego. `{width}` i `{height}` zamieniają się w wymiary obrazka, `{index}` w numer pliku, a `{index:04}` w ten sam numer zapisany czterema cyframi." }, "Detail.format/png.width": { "hash": "sha256-3085ac44f0e0", "other": "Jak szeroki jest obraz. Gdy pole zostaje puste, wybierany jest rozmiar, który mieści się w zamówionych bajtach." }, "Detail.format/pptx.slides": { "hash": "sha256-b62241b390bf", "other": "Ile slajdów zawiera prezentacja. Resztę zamówionego rozmiaru niesie niewidoczna część paczki." }, "Detail.format/rtf.characters": { "hash": "sha256-a66dbdb2f6f9", "other": "Czy dokument zawiera tekst spoza ASCII. międzynarodowe dokłada akapity po polsku, rosyjsku, japońsku i arabsku, arabski od prawej do lewej, oraz jeden z emoji, literą zapisaną dwoma punktami kodowymi, trzema znakami, które RTF poprzedza ukośnikiem, i tymi, które nazywa słowem, jak myślniki i cudzysłowy. Program bez fontu japońskiego albo arabskiego pokazuje w ich miejscu kwadraty." }, "Detail.format/rtf.elements": { "hash": "sha256-b0177e3841f3", "other": "Których części używa dokument. podstawowe to nagłówki, akapity ze słowami pogrubionymi i pochylonymi, listy, tabele i cytaty z wcięciem. wszystkie dokłada właściwości dokumentu, nagłówek i stopkę strony, przypis, komentarz, tekst ukryty, odnośnik, zakładkę, grupę, którą każdy czytnik musi pominąć, słowo, którego nie zna żaden czytnik, oraz podział wiersza, tabulator, podział strony i sekcji, a każda część mówi, gdzie jest. Tika oddaje ich najwięcej, w tym nagłówek, stopkę i komentarz. LibreOffice, striprtf i RichEdit oddają tekst ukryty jako tekst, RichEdit razem z adresem odnośnika, a pandoc oddaje przypis i pomija tekst ukryty." }, "Detail.format/rtf.inline": { "hash": "sha256-10dd52bc4b54", "other": "Ile obrazków pokazuje dokument. Każdy jest prawdziwym plikiem swojego formatu w osobnym akapicie, który zaczyna się od jego nazwy, na przykład inline_0001.png. Leżą nad blokami, w 96 pikselach na cal i nigdy szerzej niż 6 cali. LibreOffice, pandoc i Tika oddają każdy plik tak, jak został zapisany. RichEdit pokazuje ten sam obrazek i zapisuje go od nowa, mniejszy." }, - "Detail.format/rtf.inline_format": { "hash": "sha256-929d6bcd9c5e", "other": "Format obrazków, png albo jpg - dwa formaty obrazków, które RTF nazywa. Każdy inny format jest odrzucany." }, + "Detail.format/rtf.inline_format": { "hash": "sha256-11b2027132aa", "other": "Format obrazków, `png` albo `jpg` - dwa formaty obrazków, które RTF nazywa. Każdy inny format jest odrzucany." }, "Detail.format/rtf.inline_size": { "hash": "sha256-4024e523b3e9", "other": "Jak duży jest każdy obrazek. Zapisany w hex zajmuje w dokumencie dwa razy więcej bajtów, z końcem linii co 128 znaków. Zapisany binarnie zajmuje tyle, ile sam waży." }, "Detail.format/rtf.links": { "hash": "sha256-9e3ca1ff09e6", "other": "Ile odnośników niesie dokument, każdy jako pole HYPERLINK w osobnym akapicie, nad obrazkami i blokami. Przechodzą po kolei przez 17 rodzajów i potem się powtarzają - do zakładki w dokumencie, względny, do katalogu wyżej, od korzenia, bezwzględny z zapytaniem i fragmentem, bezwzględny z położeniem, http, bez schematu, z kodowaniem procentowym, domena międzynarodowa, port, mailto:, tel:, ftp:, nowe okno, podpowiedź i data: - a tekst każdego mówi, którym jest. Każdy adres leży w domenie zarezerwowanej na przykłady. LibreOffice zamienia odnośnik bez schematu na adres file:// i przepisuje względne od miejsca, w którym zapisuje dokument. pandoc 3.12 zostawia odnośnik do zakładki bez adresu, pandoc 3.1 i 3.7 gubią każdy odnośnik razem z tekstem, a RichEdit oddaje adres każdego odnośnika przed jego tekstem. LibreOffice czytał milion odnośników ponad 11 minut. Katalog wszystkich części ma jeden własny odnośnik, którego to ustawienie nie liczy." }, "Detail.format/rtf.nesting": { "hash": "sha256-e1d640adb186", "other": "W ilu grupach, jedna w drugiej, siedzi treść. 0 umieszcza ją wprost w dokumencie, a etykieta zostaje na zewnątrz, więc plik dalej mówi, czym jest. Żaden zmierzony czytnik nie zgubił treści przy 10 000 000 poziomów, ale LibreOffice zużył na nie 18,5 GB pamięci, a pandoc 14,5 GB, wobec około 2 GB każdy przy 1 000 000." }, - "Detail.format/rtf.picture_data": { "hash": "sha256-f91b5cd2e506", "other": "Jak zapisane są bajty każdego obrazka, co niczego nie zmienia, dopóki inline wynosi 0. hex zapisuje je jako tekst, dwa razy większy, tak jak zapisuje je LibreOffice. binarnie zapisuje je takie, jakie są, więc dokument przestaje być tekstem, a program, który liczy klamry albo czyta go jako tekst, gubi się. pandoc zmienia końce linii wewnątrz obrazka zapisanego binarnie, więc żaden png nie wychodzi cały, a pandoc może zgubić tekst za obrazkiem albo odrzucić cały dokument. LibreOffice, Tika i RichEdit czytają oba zapisy." }, - "Detail.format/rtf.text_encoding": { "hash": "sha256-3766bb620616", "other": "Jak zapisane są litery spoza ASCII. Gdy Znaki to ascii, nic to nie zmienia. unicode zapisuje każdą jako liczbę ze znakiem zapytania po niej dla czytnika, który nie zna liczb. oba dopisuje po liczbie literę w stronie kodowej jej fontu, dla japońskiego dwa bajty, tak jak zapisuje ją Word. strona kodowa zapisuje tylko bajty strony kodowej, a emoji dalej jako liczby, bo żadna strona kodowa ich nie ma. dosłowny zapisuje znak zapytania jako zwykły znak. LibreOffice, Tika i kontrolka RichEdit z Windows czytają wszystkie cztery. pandoc pokazuje tekst ze strony kodowej złymi literami. pandoc przed 3.13 gubi też znak po każdej literze zapisanej dosłownie, a pandoc 3.1 i 3.7 gubią emoji we wszystkich czterech. striprtf oddaje emoji jako dwie połówki, których Python nie zapisze w UTF-8." }, - "Detail.format/svg.background": { "hash": "sha256-f19788fb6882", "other": "Kolor obrazu zastępczego, na przykład cccccc albo ccc. W przepisie pisz go bez # albo w cudzysłowie, bo # zaczyna tam komentarz." }, - "Detail.format/svg.content": { "hash": "sha256-3fb6c23165c1", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, + "Detail.format/rtf.picture_data": { "hash": "sha256-3f4349029862", "other": "Jak zapisane są bajty każdego obrazka, co niczego nie zmienia, dopóki dokument nie ma obrazków. hex zapisuje je jako tekst, dwa razy większy, tak jak zapisuje je LibreOffice. binarnie zapisuje je takie, jakie są, więc dokument przestaje być tekstem, a program, który liczy klamry albo czyta go jako tekst, gubi się. pandoc zmienia końce linii wewnątrz obrazka zapisanego binarnie, więc żaden png nie wychodzi cały, a pandoc może zgubić tekst za obrazkiem albo odrzucić cały dokument. LibreOffice, Tika i RichEdit czytają oba zapisy." }, + "Detail.format/rtf.text_encoding": { "hash": "sha256-3daac818c4c7", "other": "Jak zapisane są litery spoza ASCII. Gdy Znaki to ascii, nic to nie zmienia. unicode zapisuje każdą jako liczbę ze znakiem zapytania po niej dla czytnika, który nie zna liczb. Unicode i strona kodowa dopisuje też po liczbie literę w stronie kodowej jej fontu, dla japońskiego dwa bajty, tak jak zapisuje ją Word. Strona kodowa zapisuje tylko bajty strony kodowej, a emoji dalej jako liczby, bo żadna strona kodowa ich nie ma. dosłowny zapisuje znak zapytania jako zwykły znak. LibreOffice, Tika i kontrolka RichEdit z Windows czytają wszystkie cztery. pandoc pokazuje tekst ze strony kodowej złymi literami. pandoc przed 3.13 gubi też znak po każdej literze zapisanej dosłownie, a pandoc 3.1 i 3.7 gubią emoji we wszystkich czterech. striprtf oddaje emoji jako dwie połówki, których Python nie zapisze w UTF-8." }, + "Detail.format/svg.background": { "hash": "sha256-d8261f6d9243", "other": "Kolor obrazu zastępczego, na przykład `cccccc` albo `ccc`. W przepisie pisz go bez `#` albo w cudzysłowie, bo `#` zaczyna tam komentarz." }, + "Detail.format/svg.content": { "hash": "sha256-3fdc1bf34bb6", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, "Detail.format/svg.foreground": { "hash": "sha256-57ac35f17b3f", "other": "Kolor napisu i prowadnic na obrazie zastępczym, zapisany tak samo jak Tło." }, "Detail.format/svg.guides": { "hash": "sha256-7edc1841adb4", "other": "Rysuje ramkę wzdłuż krawędzi obrazu zastępczego, obie przekątne i koło dotykające krótszych boków, żeby było widać, gdzie strona przycina albo rozciąga obrazek." }, "Detail.format/svg.height": { "hash": "sha256-093ec883d633", "other": "Jaką wysokość deklaruje rysunek. Etykieta biegnie wzdłuż dolnej krawędzi, więc rysunek niższy od tego pasa nie ma widocznej etykiety." }, - "Detail.format/svg.text": { "hash": "sha256-7055101b0dd9", "other": "Napis na środku obrazu zastępczego. {width} i {height} zamieniają się w wymiary obrazka, {index} w numer pliku, a {index:04} w ten sam numer zapisany czterema cyframi." }, + "Detail.format/svg.text": { "hash": "sha256-795954c1effc", "other": "Napis na środku obrazu zastępczego. `{width}` i `{height}` zamieniają się w wymiary obrazka, `{index}` w numer pliku, a `{index:04}` w ten sam numer zapisany czterema cyframi." }, "Detail.format/svg.width": { "hash": "sha256-5dc327958f8d", "other": "Jaką szerokość deklaruje rysunek. Nic nie jest tu rysowane w pikselach, więc duża liczba kosztuje kilka bajtów w pliku i bardzo dużo pamięci w tym, co go otworzy." }, "Detail.format/targz.compression": { "hash": "sha256-82bb36e51fe2", "other": "Jak mocno ściskane są pliki w środku. Archiwum i tak ma zamówiony rozmiar - zmienia się to, ile z niego jest prawdziwą treścią, a ile dopełnieniem." }, "Detail.format/targz.depth": { "hash": "sha256-485a554d4ae5", "other": "Na ilu poziomach katalogów leżą pliki w środku. 0 stawia je wszystkie na górze." }, "Detail.format/targz.directory_entries": { "hash": "sha256-4602285f60ac", "other": "Czy archiwum wymienia też same katalogi. Większość przeglądarek plików pokazuje te same foldery w obu przypadkach, więc różnica jest w liście wpisów, a nie na ekranie. Ma znaczenie dla czytników, które tworzą tylko katalog nazwany w archiwum." }, - "Detail.format/targz.entries": { "hash": "sha256-e8a3f919b300", "other": "Ile plików zawiera archiwum. Gdy pliki nie są jednakowe, użyj zamiast tego contains." }, - "Detail.format/targz.entry_format": { "hash": "sha256-f4dab5f30a79", "other": "Format plików w środku. Uruchom tfg formats, żeby zobaczyć, co obsługuje ta wersja." }, + "Detail.format/targz.entries": { "hash": "sha256-276a8339f4ae", "other": "Ile plików zawiera archiwum. Gdy pliki nie są jednakowe, opisz zamiast tego każdy rodzaj osobno - przyciskiem Dodaj pliki do środka na ekranie Kilka partii albo przez contains w przepisie." }, + "Detail.format/targz.entry_format": { "hash": "sha256-c0b9bc30cf28", "other": "Format plików w środku." }, "Detail.format/targz.entry_mode": { "hash": "sha256-6afb3c26590f", "other": "Uprawnienia zapisane dla każdego pliku w środku. To mówi archiwum, a nie to, co dostaje plik - to zależy od tego, kto i jak je rozpakuje." }, "Detail.format/targz.entry_owner": { "hash": "sha256-e4fa8df2c217", "other": "Do kogo należy każdy plik w środku. Zostaw nieustawiony, a archiwum nie wskaże nikogo, tak jak większość archiwów zapisanych przez build." }, "Detail.format/targz.entry_size": { "hash": "sha256-c3687f6606e8", "other": "Jak duży jest każdy plik w środku." }, @@ -419,7 +423,7 @@ "Detail.format/txt.encoding": { "hash": "sha256-9b6f8a3338ec", "other": "W jakim kodowaniu zapisane są znaki. UTF-16 zapisuje dwa bajty na znak, więc plik w nim ma zawsze parzystą liczbę bajtów, a nieparzysty rozmiar jest odrzucany." }, "Detail.format/wav.bit_depth": { "hash": "sha256-211bd38551ad", "other": "Ile bitów zajmuje każda próbka." }, "Detail.format/wav.channels": { "hash": "sha256-f94ddfa60e04", "other": "Ile kanałów ma sygnał, czyli 1 dla mono i 2 dla stereo." }, - "Detail.format/wav.content": { "hash": "sha256-c2baa480c847", "other": "Jak brzmi sygnał." }, + "Detail.format/wav.content": { "hash": "sha256-526b89878d2e", "other": "Jaki to dźwięk. Stały ton trzyma jedną wysokość między 220 a 1099 Hz, wybraną przez ziarno. Narastający ton zaczyna od takiej wysokości i rośnie, gdy plik gra. Szum to losowy syk, a cisza to brak dźwięku." }, "Detail.format/wav.sample_rate": { "hash": "sha256-71e4eb77e129", "other": "Ile próbek na sekundę niesie sygnał." }, "Detail.format/webm.change_interval": { "hash": "sha256-13634dfb475a", "other": "Jak często zmienia się obraz: zegar w nim idzie dalej, a kwadrat robi krok. Każda zmiana kosztuje cały obraz w bajtach, a odstęp równy długości filmu albo dłuższy zostawia jeden obraz przez cały film." }, "Detail.format/webm.duration": { "hash": "sha256-adacce8ce234", "other": "Jak długo trwa film. Musi kończyć się na klatce, więc przy 30 klatkach na sekundę idzie co 100ms." }, @@ -438,12 +442,15 @@ "Detail.format/zip.depth": { "hash": "sha256-485a554d4ae5", "other": "Na ilu poziomach katalogów leżą pliki w środku. 0 stawia je wszystkie na górze." }, "Detail.format/zip.directory_entries": { "hash": "sha256-4602285f60ac", "other": "Czy archiwum wymienia też same katalogi. Większość przeglądarek plików pokazuje te same foldery w obu przypadkach, więc różnica jest w liście wpisów, a nie na ekranie. Ma znaczenie dla czytników, które tworzą tylko katalog nazwany w archiwum." }, "Detail.format/zip.encryption": { "hash": "sha256-2cdbcc794818", "other": "Jak zamknięte jest archiwum. AES to schemat WinZip i niektóre czytniki w ogóle go nie otworzą. ZipCrypto to stary schemat, który otwiera każdy czytnik i któremu nic współczesnego nie ufa, a niektóre czytniki oddają zaszyfrowane bajty bez słowa. Zamknięte archiwum z tego narzędzia to dane testowe, a nie ochrona - klucz jest wyprowadzany z seeda przebiegu, więc ten sam przepis daje to samo archiwum na każdej maszynie, a hasło jest zapisane w manifeście obok niego." }, - "Detail.format/zip.entries": { "hash": "sha256-e8a3f919b300", "other": "Ile plików zawiera archiwum. Gdy pliki nie są jednakowe, użyj zamiast tego contains." }, - "Detail.format/zip.entry_format": { "hash": "sha256-f4dab5f30a79", "other": "Format plików w środku. Uruchom tfg formats, żeby zobaczyć, co obsługuje ta wersja." }, + "Detail.format/zip.entries": { "hash": "sha256-276a8339f4ae", "other": "Ile plików zawiera archiwum. Gdy pliki nie są jednakowe, opisz zamiast tego każdy rodzaj osobno - przyciskiem Dodaj pliki do środka na ekranie Kilka partii albo przez contains w przepisie." }, + "Detail.format/zip.entry_format": { "hash": "sha256-c0b9bc30cf28", "other": "Format plików w środku." }, "Detail.format/zip.entry_size": { "hash": "sha256-c3687f6606e8", "other": "Jak duży jest każdy plik w środku." }, "Detail.format/zip.password": { "hash": "sha256-c3c77f362ce2", "other": "Hasło, którym zamknięto archiwum. Trafia do manifestu tak, jak je wpisano, bo test, który nie otworzy pliku, niczego nie sprawdzi." }, - "Detail.preset/empty-and-minimal.formats": { "hash": "sha256-945bbcfdb3cf", "other": "Z jakich formatów powstaje zestaw. Zostaw all, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje twój system." }, + "Detail.preset/empty-and-minimal.formats": { "hash": "sha256-b8636e5b9ead", "other": "Z jakich formatów powstaje zestaw. Zostaw `all`, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje twój system." }, "Detail.preset/filename-handling.format": { "hash": "sha256-30738a4e7806", "other": "Z jakiego rodzaju plików składa się cały zestaw." }, + "Detail.preset/picture-sizes.content": { "hash": "sha256-3fdc1bf34bb6", "other": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." }, + "Detail.preset/picture-sizes.format": { "hash": "sha256-30738a4e7806", "other": "Z jakiego rodzaju plików składa się cały zestaw." }, + "Detail.preset/picture-sizes.groups": { "hash": "sha256-132f33fd1602", "other": "Jakie rozmiary zawiera zestaw: `screens` to rozmiary ekranów, `avatars` to zdjęcia profilowe, a `social` to okładki, banery, posty i miniatury. Zostaw `all`, żeby dostać wszystkie." }, "Detail.preset/size-boundaries.format": { "hash": "sha256-30738a4e7806", "other": "Z jakiego rodzaju plików składa się cały zestaw." }, "Detail.preset/size-boundaries.limit": { "hash": "sha256-b43eca6d1365", "other": "Limit rozmiaru, który deklaruje twój system. Wszystko inne jest od niego odmierzane." }, "Detail.preset/size-boundaries.spread": { "hash": "sha256-149b17db988d", "other": "Jak daleko po obu stronach limitu sięgnąć, jako lista rozmiarów." }, @@ -518,7 +525,7 @@ "Kind.file": { "hash": "sha256-3b9c358f36f0", "other": "plik" }, "Kind.folder": { "hash": "sha256-034a00624882", "other": "folder" }, "Label.algorithm": { "hash": "sha256-d704d8af25be", "other": "Algorytm" }, - "Label.allow": { "hash": "sha256-e213c161d5ce", "other": "Dozwolone" }, + "Label.allow": { "hash": "sha256-2b04790e11e9", "other": "Dozwolone typy" }, "Label.altitude": { "hash": "sha256-cbc2e75740ca", "other": "Wysokość" }, "Label.antimeridian": { "hash": "sha256-cd0da1397b61", "other": "Antypołudnik" }, "Label.archive": { "hash": "sha256-66f4804ee23d", "other": "Archiwum" }, @@ -527,12 +534,12 @@ "Label.attachments": { "hash": "sha256-634de1147750", "other": "Liczba załączników" }, "Label.author": { "hash": "sha256-d95082a2ee57", "other": "Autor" }, "Label.background": { "hash": "sha256-ea2b8a878841", "other": "Tło" }, - "Label.batch": { "hash": "sha256-320b5d80f8cf", "other": "Paczka" }, - "Label.bbox": { "hash": "sha256-708f44b1bd98", "other": "Ramka (bbox)" }, + "Label.batch": { "hash": "sha256-b58f36c0362b", "other": "Rekordy w wierszu" }, + "Label.bbox": { "hash": "sha256-c1af2bd9fa64", "other": "Ramka ograniczająca" }, "Label.bit_depth": { "hash": "sha256-cc62f2e89a82", "other": "Głębia bitowa" }, "Label.body": { "hash": "sha256-6ccaa6415b5e", "other": "Treść" }, "Label.bom": { "hash": "sha256-1471d8c7a9cf", "other": "BOM" }, - "Label.bulk": { "hash": "sha256-3140100df131", "other": "Przesyłanie masowe" }, + "Label.bulk": { "hash": "sha256-4e0c0bc5be3c", "other": "Przesyłanie masowe" }, "Label.bytes": { "hash": "sha256-4d8000301fcc", "other": "Bajty" }, "Label.change_interval": { "hash": "sha256-e99a12a7d82d", "other": "Odstęp zmian obrazu" }, "Label.channels": { "hash": "sha256-4c8906cf76f5", "other": "Kanały" }, @@ -545,25 +552,25 @@ "Label.created": { "hash": "sha256-d70b9e24bca2", "other": "Utworzono" }, "Label.creator": { "hash": "sha256-88447b83090c", "other": "Program tworzący" }, "Label.delimiter": { "hash": "sha256-4b4eb3b88e85", "other": "Separator" }, - "Label.deny": { "hash": "sha256-05a2d7332eb9", "other": "Zabronione" }, + "Label.deny": { "hash": "sha256-15c77d9c11ec", "other": "Zabronione rozszerzenia" }, "Label.depth": { "hash": "sha256-f1dbc33978a9", "other": "Głębokość" }, "Label.directory_entries": { "hash": "sha256-7f31f347692c", "other": "Wpisy katalogów" }, "Label.duration": { "hash": "sha256-4fc52a3c4c55", "other": "Czas trwania" }, "Label.elements": { "hash": "sha256-e1ff7a906103", "other": "Elementy" }, - "Label.embed": { "hash": "sha256-7512561d2f68", "other": "Obraz w środku" }, + "Label.embed": { "hash": "sha256-be53a02ffd1a", "other": "Obraz w środku" }, "Label.empty_envelope": { "hash": "sha256-c06d29fdbae1", "other": "Pusta koperta" }, "Label.encoding": { "hash": "sha256-4d25a47625ce", "other": "Kodowanie" }, "Label.encryption": { "hash": "sha256-82f4e719a19c", "other": "Szyfrowanie" }, "Label.end_before_start": { "hash": "sha256-1ce5eed0b42b", "other": "Koniec przed początkiem" }, "Label.entries": { "hash": "sha256-7cb76b4af12a", "other": "Liczba plików" }, - "Label.entry_format": { "hash": "sha256-63d61a75badf", "other": "Format plików w środku" }, + "Label.entry_format": { "hash": "sha256-63d61a75badf", "other": "Format wpisów" }, "Label.entry_mode": { "hash": "sha256-4a17440263ca", "other": "Uprawnienia plików" }, "Label.entry_owner": { "hash": "sha256-d7bf94c5f409", "other": "Właściciel plików" }, "Label.entry_size": { "hash": "sha256-1190635edb6f", "other": "Rozmiar plików w środku" }, "Label.enum_encoding": { "hash": "sha256-22601c0211e1", "other": "Zapis enumów" }, "Label.exemplars": { "hash": "sha256-92f6b3f1e81e", "other": "Exemplary" }, - "Label.expected": { "hash": "sha256-ca99b7f1b14e", "other": "Oczekiwana suma" }, - "Label.far-over": { "hash": "sha256-874367c30d4e", "other": "Daleko ponad limit" }, + "Label.expected": { "hash": "sha256-d23e9f8e2ce8", "other": "Oczekiwana suma kontrolna" }, + "Label.far-over": { "hash": "sha256-a547261596f8", "other": "Daleko ponad limit" }, "Label.file": { "hash": "sha256-50009ce1da4d", "other": "Plik" }, "Label.filename_style": { "hash": "sha256-fbfbf4d41f13", "other": "Zapis nazw plików" }, "Label.folder": { "hash": "sha256-74ccd4330384", "other": "Folder" }, @@ -574,18 +581,19 @@ "Label.frame_rate": { "hash": "sha256-68e19e4ca3a5", "other": "Klatki na sekundę" }, "Label.frames": { "hash": "sha256-2c447e8d0598", "other": "Klatki" }, "Label.geometry": { "hash": "sha256-fa9da5754ccf", "other": "Geometria" }, + "Label.groups": { "hash": "sha256-39bbb719fa2b", "other": "Grupy" }, "Label.guides": { "hash": "sha256-572cd72feb9a", "other": "Prowadnice" }, "Label.header": { "hash": "sha256-ba5caa4285a8", "other": "Nagłówek" }, "Label.headers": { "hash": "sha256-194e9fe656a1", "other": "Nagłówki" }, "Label.height": { "hash": "sha256-bfe2eca40179", "other": "Wysokość" }, "Label.holes": { "hash": "sha256-158a3b71a54c", "other": "Dziury" }, "Label.id_encoding": { "hash": "sha256-fd8f6b3477c6", "other": "Zapis identyfikatorów" }, - "Label.ids": { "hash": "sha256-d9aa9d4aca97", "other": "Identyfikatory" }, + "Label.ids": { "hash": "sha256-f8f8e0aa3ac3", "other": "Identyfikatory obiektów" }, "Label.inline": { "hash": "sha256-1e6245009d67", "other": "Liczba obrazków" }, "Label.inline_format": { "hash": "sha256-d2a00a20bba2", "other": "Format obrazków" }, "Label.inline_size": { "hash": "sha256-28a0f4295d32", "other": "Rozmiar obrazków" }, "Label.interval": { "hash": "sha256-6f45b0005e3b", "other": "Odstęp zbiorów" }, - "Label.ip_version": { "hash": "sha256-29016036fada", "other": "Wersja IP" }, + "Label.ip_version": { "hash": "sha256-0f9c33e753e5", "other": "Wersja IP" }, "Label.key_case": { "hash": "sha256-35a6d2a884c1", "other": "Zapis kluczy" }, "Label.keyframe_interval": { "hash": "sha256-e2ebcac3d589", "other": "Odstęp klatek kluczowych" }, "Label.keywords": { "hash": "sha256-8bfdb93cafaa", "other": "Słowa kluczowe" }, @@ -599,7 +607,7 @@ "Label.message_depth": { "hash": "sha256-8a18b09b1f37", "other": "Głębokość wiadomości" }, "Label.methods": { "hash": "sha256-8696622f3441", "other": "Metody" }, "Label.metric_kind": { "hash": "sha256-c02cc2ddbac5", "other": "Rodzaj metryk" }, - "Label.missing": { "hash": "sha256-6be36ca49ee8", "other": "Brakuje" }, + "Label.missing": { "hash": "sha256-ca096c3e2581", "other": "Odcięta część" }, "Label.modified": { "hash": "sha256-e8ce5dcaf408", "other": "Zmodyfikowano" }, "Label.nesting": { "hash": "sha256-f342629fc0e1", "other": "Zagnieżdżenie" }, "Label.non_finite": { "hash": "sha256-7bd147326f22", "other": "NaN i Infinity" }, @@ -608,7 +616,7 @@ "Label.pages": { "hash": "sha256-9046da16aea9", "other": "Strony" }, "Label.paragraphs": { "hash": "sha256-d2ef75e86bb7", "other": "Akapity" }, "Label.password": { "hash": "sha256-e7cf3ef4f17c", "other": "Hasło" }, - "Label.pdf_version": { "hash": "sha256-3ce7c43387ea", "other": "Wersja PDF" }, + "Label.pdf_version": { "hash": "sha256-7a4d61286488", "other": "Wersja PDF" }, "Label.picture_data": { "hash": "sha256-b13e9c47f34a", "other": "Zapis obrazków" }, "Label.precision": { "hash": "sha256-b5d65f0ae389", "other": "Precyzja" }, "Label.producer": { "hash": "sha256-98ee4021c6f1", "other": "Producent PDF" }, @@ -616,13 +624,13 @@ "Label.quote_style": { "hash": "sha256-8c8c9f41e450", "other": "Cudzysłowy" }, "Label.rate": { "hash": "sha256-45b63ffd01af", "other": "Tempo" }, "Label.recipients": { "hash": "sha256-1e8568a82c26", "other": "Liczba odbiorców" }, - "Label.rotate": { "hash": "sha256-c3613b1704f5", "other": "Obrót" }, + "Label.rotate": { "hash": "sha256-57b5e2fc1bba", "other": "Obrót" }, "Label.rows": { "hash": "sha256-101f2ff3de22", "other": "Wiersze" }, - "Label.sample": { "hash": "sha256-95a2f1edb08a", "other": "Rozmiar próbki" }, + "Label.sample": { "hash": "sha256-ff0442941bd8", "other": "Rozmiar pliku" }, "Label.sample_rate": { "hash": "sha256-218e0d43275e", "other": "Częstotliwość próbkowania" }, "Label.signal": { "hash": "sha256-1e9806e4227b", "other": "Sygnał" }, "Label.slides": { "hash": "sha256-a0ffe3818444", "other": "Slajdy" }, - "Label.spread": { "hash": "sha256-b11fb1f593a8", "other": "Rozrzut" }, + "Label.spread": { "hash": "sha256-3de7c6087466", "other": "Odległości od limitu" }, "Label.start": { "hash": "sha256-e4bb9f1ece9a", "other": "Początek" }, "Label.status_mix": { "hash": "sha256-e5e3006b5ecd", "other": "Kody odpowiedzi" }, "Label.structure": { "hash": "sha256-7203c2b3dad3", "other": "Struktura" }, @@ -635,7 +643,7 @@ "Label.timestamps": { "hash": "sha256-755f099dbf49", "other": "Znaczniki czasu" }, "Label.title": { "hash": "sha256-7e8cd2056da7", "other": "Tytuł" }, "Label.trace_context": { "hash": "sha256-07b45d3adabb", "other": "Kontekst śladu" }, - "Label.unlocated": { "hash": "sha256-9d9b671e4837", "other": "Bez położenia" }, + "Label.unlocated": { "hash": "sha256-c7016f7ebb1d", "other": "Obiekty bez położenia" }, "Label.unpacked_limit": { "hash": "sha256-ea378e1bd7aa", "other": "Limit po rozpakowaniu" }, "Label.vertices": { "hash": "sha256-f5af129ea336", "other": "Punkty" }, "Label.width": { "hash": "sha256-3019947b6daf", "other": "Szerokość" }, @@ -645,10 +653,11 @@ "Licence.3": { "hash": "sha256-329ebd54a420", "other": "Nie ma żadnej gwarancji w zakresie, na jaki pozwala prawo." }, "Licence.4": { "hash": "sha256-13dec924ea00", "other": "Pliki, które generujesz, należą do Ciebie. Wygenerowane pliki, przepisy i manifesty są wynikiem działania tego programu, a nie utworami od niego zależnymi, więc ta licencja ich nie obejmuje. Możesz generować pliki testowe, dodawać je do repozytorium i dostarczać w produkcie o zamkniętym kodzie bez żadnych zobowiązań." }, "Licence.5": { "hash": "sha256-0e75d1e26c8b", "other": "W ten program wkompilowano kod innych projektów. Ich licencje i informacje o prawach autorskich są w pliku THIRD-PARTY-NOTICES.md, dołączonym do źródeł i do pełnego wydania." }, - "Note.size-boundaries.limit": { "hash": "sha256-d65173d5db01", "other": "nie podano limitu, więc ten zestaw jest zbudowany wokół 10mb - to nasza wartość zastępcza, a nie limit twojego systemu. Podaj limit, który deklaruje twój system, inaczej pliki nic o nim nie mówią." }, - "Note.upload-validation.limit": { "hash": "sha256-c30ac7e13539", "other": "nie podano limitu, więc ten zestaw jest zbudowany wokół 10mb - to nasza wartość zastępcza, a nie limit twojego formularza. Podaj limit, który deklaruje twój formularz, inaczej pliki nic o nim nie mówią." }, + "Note.size-boundaries.limit": { "hash": "sha256-188ae54516cc", "other": "nie podano limitu, więc ten zestaw jest zbudowany wokół 10mb - to nasza wartość zastępcza, a nie limit twojego systemu. Podaj limit, który deklaruje twój system, inaczej pliki nic o nim nie mówią." }, + "Note.upload-validation.limit": { "hash": "sha256-e9c953090726", "other": "nie podano limitu, więc ten zestaw jest zbudowany wokół 10mb - to nasza wartość zastępcza, a nie limit twojego formularza. Podaj limit, który deklaruje twój formularz, inaczej pliki nic o nim nie mówią." }, "Question.empty-and-minimal": { "hash": "sha256-9a69d7227e12", "other": "Czy plik poprawny i najmniejszy, na jaki format pozwala, przechodzi?" }, "Question.filename-handling": { "hash": "sha256-e558318318a2", "other": "Czy mój system zapisze, pokaże i odda nazwę pliku, której się nie spodziewał?" }, + "Question.picture-sizes": { "hash": "sha256-9a6f545b5c86", "other": "Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?" }, "Question.size-boundaries": { "hash": "sha256-e26666b8f7a6", "other": "Czy limit rozmiaru działa dokładnie tam, gdzie jest zadeklarowany?" }, "Question.tabular-import": { "hash": "sha256-f2132eb34797", "other": "Czy import tabeli poradzi sobie z tym, co eksportują prawdziwe narzędzia?" }, "Question.text-encoding": { "hash": "sha256-766ce93a4d3c", "other": "Czy mój czytnik wie, w jakim kodowaniu jest plik, czy zgaduje?" }, @@ -662,13 +671,15 @@ "Shape.extensions separated by commas": { "hash": "sha256-69f0be0e37e3", "other": "rozszerzenia rozdzielone przecinkami" }, "Shape.format ids separated by commas": { "hash": "sha256-cc1ca5dd954c", "other": "identyfikatory formatów rozdzielone przecinkami" }, "Shape.format ids separated by commas, or all": { "hash": "sha256-48e97c935e5d", "other": "identyfikatory formatów rozdzielone przecinkami albo all" }, + "Shape.group names separated by commas, or all": { "hash": "sha256-68f92ad5bd2b", "other": "nazwy grup rozdzielone przecinkami albo all" }, "Shape.one line of up to 100 characters": { "hash": "sha256-4a7c0c62ca18", "other": "jeden wiersz do 100 znaków" }, "Shape.sizes separated by commas": { "hash": "sha256-f7e5e8c54e6f", "other": "rozmiary rozdzielone przecinkami" }, - "Shape.the id of a format, as tfg formats lists them": { "hash": "sha256-b6784882fdeb", "other": "identyfikator formatu, tak jak wypisuje go tfg formats" }, - "Shape.the id of a picture format, as tfg formats lists them": { "hash": "sha256-bf30a7c2c3a4", "other": "identyfikator formatu obrazka, tak jak wypisuje go tfg formats" }, + "Shape.the id of a format, such as png or csv": { "hash": "sha256-776e6545e346", "other": "identyfikator formatu, na przykład png albo csv" }, + "Shape.the id of a picture format, such as png or jpg": { "hash": "sha256-ea19ea70a8b7", "other": "identyfikator formatu obrazka, na przykład png albo jpg" }, "Shape.the password, in plain text": { "hash": "sha256-eb266034b6a8", "other": "hasło, zwykłym tekstem" }, "Title.empty-and-minimal": { "hash": "sha256-4cdca50e33b5", "other": "Pliki puste i minimalne" }, "Title.filename-handling": { "hash": "sha256-314f9b08db3f", "other": "Obsługa nazw plików" }, + "Title.picture-sizes": { "hash": "sha256-f8376682bd1a", "other": "Rozmiary obrazków" }, "Title.size-boundaries": { "hash": "sha256-21dd0ecec76d", "other": "Granice rozmiaru" }, "Title.tabular-import": { "hash": "sha256-a08572cdb93c", "other": "Import tabel" }, "Title.text-encoding": { "hash": "sha256-f6726ca0b9fe", "other": "Kodowanie tekstu" }, diff --git a/internal/gui/text/locale/said/en.json b/internal/gui/text/locale/said/en.json index cdd252dd..c5f8613a 100644 --- a/internal/gui/text/locale/said/en.json +++ b/internal/gui/text/locale/said/en.json @@ -713,8 +713,8 @@ }, "core.SizeNotPlain": { "description": "Said by internal/core - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Value}}, written the way the program writes them - keep each spelled exactly that way.", - "hash": "sha256-0b892bed8bee", - "other": "{{.Setting}} {{.Value}} is not a plain number: write the digits out, as 10mb, 1.5gib or 1048576. Spellings such as 1e5, 0x10 or 1_000 are refused rather than guessed at, the same as in a recipe" + "hash": "sha256-738167ea079d", + "other": "{{.Setting}} {{.Value}} is not a plain number: write the digits out, as 10mb, 1.5gib or 1048576. Spellings such as 1e5, 0x10 or 1_000 are refused rather than guessed at" }, "core.SizeNotWhole": { "description": "Said by internal/core - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Value}}, {{.Below}}, {{.Above}}, written the way the program writes them - keep each spelled exactly that way.", @@ -968,6 +968,16 @@ "hash": "sha256-a6669f6abe6b", "other": "Use one of: {{.Formats}}." }, + "engine.AskForTheSmallestSize": { + "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Size}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-a5af52762597", + "other": "Ask for {{.Size}} B." + }, + "engine.AskForTheSmallestSizeOfAll": { + "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Size}}, {{.Files}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-b69db57c2bf5", + "other": "Ask for {{.Size}} B, the smallest size all {{.Files}} files can have." + }, "engine.CannotCreateOutDir": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Dir}}, {{.Cause}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-324037f71709", @@ -1063,6 +1073,11 @@ "hash": "sha256-2174959715d1", "other": "Ask for {{.Size}} or less." }, + "engine.EveryFileIsDifferent": { + "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Files}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-ce926e40d0f8", + "other": "each of the {{.Files}} files is different, so each has a smallest size of its own" + }, "engine.FilesSoFar": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Count}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-83589d643302", @@ -1071,8 +1086,8 @@ }, "engine.GeneratorCrash": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Format}}, {{.While}}, {{.Value}}, written the way the program writes them - keep each spelled exactly that way.", - "hash": "sha256-82716d977373", - "other": "the {{.Format}} generator stopped with an internal error while {{.While}}: {{.Value}}. This is a defect in this tool rather than something a recipe can ask for. Please report it with the settings that produced it" + "hash": "sha256-efa280a3e7d4", + "other": "the {{.Format}} generator stopped with an internal error while {{.While}}: {{.Value}}. This is a defect in this tool rather than something the settings can ask for. Please report it with the settings that produced it" }, "engine.IDTwice": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.ID}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1116,8 +1131,8 @@ }, "engine.NameAbsoluteWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-61f6a0c76deb", - "other": "a recipe carries no absolute paths, because then it only works on the machine it was written on" + "hash": "sha256-2b68d0bdf02e", + "other": "a name with an absolute path only works on the machine it was written on, so the same settings would fail anywhere else" }, "engine.NameColon": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Where}}, {{.Name}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1131,8 +1146,8 @@ }, "engine.NameColonWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-f033766b9cf1", - "other": "Windows reads that as a drive or as an alternate data stream rather than as part of the name, so the file arrives called something else or not at all. It is refused on every system so that a recipe means one thing everywhere" + "hash": "sha256-f38e726d8040", + "other": "Windows reads that as a drive or as an alternate data stream rather than as part of the name, so the file arrives called something else or not at all. It is refused on every system, so the same settings give the same files everywhere" }, "engine.NameEmpty": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Where}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1151,8 +1166,8 @@ }, "engine.NameForbiddenWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-c7a749a53ea6", - "other": "Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system so that a recipe means one thing everywhere" + "hash": "sha256-08774d0a4fe5", + "other": "Windows refuses that character in a file name, so the file is not written there at all. It is refused on every system, so the same settings give the same files everywhere" }, "engine.NameIsADirectory": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Where}}, {{.Name}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1166,8 +1181,8 @@ }, "engine.NameIsAPathWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-8caafc0ee913", - "other": "names stay inside the output directory, and a separator is refused on every system so that a recipe works everywhere" + "hash": "sha256-be69c7804ea3", + "other": "names stay inside the output directory, and a separator is refused on every system, so the same settings work everywhere" }, "engine.NameIsTheInstructions": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Target}}, {{.Name}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1201,8 +1216,8 @@ }, "engine.NameNulWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-3c22a55bc686", - "other": "writing there succeeds and the bytes go nowhere, so the run would record a file that is not on the disk. It is refused on every system so that a recipe means one thing everywhere" + "hash": "sha256-cac19da55a27", + "other": "writing there succeeds and the bytes go nowhere, so the run would record a file that is not on the disk. It is refused on every system, so the same settings give the same files everywhere" }, "engine.NameTemplateFix": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Placeholder}}, {{.Example}}, written the way the program writes them - keep each spelled exactly that way.", @@ -1231,8 +1246,8 @@ }, "engine.NameTooLongWhy": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Most}}, written the way the program writes them - keep each spelled exactly that way.", - "hash": "sha256-08a626e33035", - "other": "Linux stores at most {{.Most}} bytes in a file name, and a letter outside ASCII takes two to four of them. It is refused on every system so that a recipe means one thing everywhere" + "hash": "sha256-050c095ba6e1", + "other": "Linux stores at most {{.Most}} bytes in a file name, and a letter outside ASCII takes two to four of them. It is refused on every system, so the same settings give the same files everywhere" }, "engine.NameTrailing": { "description": "Said by internal/engine - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Where}}, {{.Name}}, written the way the program writes them - keep each spelled exactly that way.", @@ -2797,6 +2812,11 @@ "hash": "sha256-af17cbc9bca4", "other": "{{.EveryFormat}} already means every format, so it cannot stand beside a named one. Write it on its own, or name only the formats you want" }, + "preset.AlreadyMeansEveryGroupSoIt": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.EveryGroup}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-bc9f08d2c802", + "other": "{{.EveryGroup}} already means every group, so it cannot stand beside a named one. Write it on its own, or name only the groups you want" + }, "preset.AnExtensionIsWrittenWithoutIts": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.TrimPrefix}}, {{.Item}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-098698484a13", @@ -2817,6 +2837,16 @@ "hash": "sha256-6ae81854228f", "other": "the preset {{.Preset}} cannot build this set" }, + "preset.CannotDrawAPlaceholder": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Format}}, {{.Formats}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-b38bd3c1b17e", + "other": "{{.Format}} cannot draw a placeholder. The formats that can: {{.Formats}}" + }, + "preset.CannotDrawAPlaceholderFix": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", + "hash": "sha256-cc9628eaae2e", + "other": "Choose one of those formats, or leave the content as a test pattern" + }, "preset.Combinations": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Count}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-89e8d79ad737", @@ -2909,6 +2939,11 @@ "hash": "sha256-4504e5d7a37e", "other": "it is the same format as {{.First}} and the set would hold that file twice. Every format appears once, because each one stands for one path through your reader" }, + "preset.ItIsTheSameGroupAs": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.First}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-74a8201ee530", + "other": "it is the same group as {{.First}}. Name every group once" + }, "preset.ItIsTheSameTypeAs": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.First}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-e66f4431f6ca", @@ -2959,6 +2994,21 @@ "hash": "sha256-4cdc44101684", "other": "no formats were given, so there is nothing to build the set from" }, + "preset.NoGroupsWereGivenSoThere": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", + "hash": "sha256-053d25906787", + "other": "no groups were given, so there is no size to make a picture of" + }, + "preset.NoSizeFitsTheFormat": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Format}}, {{.Cause}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-b46b820f8658", + "other": "{{.Format}} cannot draw any size of these groups. Its refusal of the first: {{.Cause}}" + }, + "preset.NoSizeFitsTheFormatFix": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", + "hash": "sha256-8c6a83ae0fe6", + "other": "Choose other groups, or another picture format" + }, "preset.NoSuchParameter": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Preset}}, {{.Name}}, {{.Known}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-929a6264f65a", @@ -2969,6 +3019,16 @@ "hash": "sha256-bb028b47b8fc", "other": "no types were allowed, so the set has no positive control and no file to name wrongly" }, + "preset.NotAPictureFormat": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Format}}, {{.Formats}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-433dca4f32e1", + "other": "{{.Format}} files are not pictures, and every file of this set is one. The picture formats of this build: {{.Formats}}" + }, + "preset.NotAPictureFormatFix": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", + "hash": "sha256-c0ed9e95fd24", + "other": "Choose one of the picture formats" + }, "preset.OneAllowed": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", "hash": "sha256-bbfaa4682425", @@ -3029,6 +3089,11 @@ "hash": "sha256-c3ba9e8a8eb4", "other": "Set the {{.Setting}} to {{.Floor}} B or more." }, + "preset.SizesLeftOut": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Format}}, {{.Count}}, {{.Cause}}, {{.Sizes}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-30215e0cbaf9", + "other": "{{.Format}} cannot draw {{.Count}} of the sizes. Its refusal of the first: {{.Cause}}. The set leaves them out: {{.Sizes}}" + }, "preset.StandIns": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Formats}}, {{.Names}}, {{.Count}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-a86a61e3c5aa", @@ -3065,10 +3130,10 @@ "hash": "sha256-0bd3908db204", "other": "the preset gives every file it builds this format, so it has to be one the build can write" }, - "preset.ThePresetRefusedWhatTheRecipe": { + "preset.ThePresetRefusedTheValues": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-46f82ba266de", - "other": "the preset refused what the recipe gave it" + "hash": "sha256-1f5532a6502a", + "other": "the preset refused the values it was given" }, "preset.ThePresetTakes": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Join}}, written the way the program writes them - keep each spelled exactly that way.", @@ -3080,6 +3145,11 @@ "hash": "sha256-770eaf5a913a", "other": "the set holds files in {{.Name}}, and {{.Reason}}" }, + "preset.ThereIsNoGroupCalledThat": { + "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Groups}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-5235c4fc5d29", + "other": "there is no group called that. The groups are: {{.Groups}}" + }, "preset.ThisBuildHas": { "description": "Said by internal/preset - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Join}}, written the way the program writes them - keep each spelled exactly that way.", "hash": "sha256-3787cbba4f98", @@ -3210,11 +3280,6 @@ "hash": "sha256-0f3adf9d29dc", "other": "a recipe can build on a preset, and on nothing else in this build - not on another file" }, - "recipe.ARecipeIsATextDocument": { - "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run.", - "hash": "sha256-8361f48aa1aa", - "other": "a recipe is a text document, and a control character either breaks it or is dropped without a word" - }, "recipe.ARecipeIsOneDocumentAnd": { "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run.", "hash": "sha256-01123bae35c4", @@ -3492,8 +3557,8 @@ }, "recipe.HoldsTheCharacterWhichCannotBe": { "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.At}}, {{.Bad}}, written the way the program writes them - keep each spelled exactly that way.", - "hash": "sha256-e6aafb7f9e39", - "other": "{{.At}} holds the character {{.Bad}}, which cannot be written to a recipe" + "hash": "sha256-f8b6ab0b3f7d", + "other": "{{.At}} has {{.Setting}} holding the character {{.Bad}}, which a setting cannot carry" }, "recipe.IsAListOrABlock": { "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.At}}, {{.Key}}, written the way the program writes them - keep each spelled exactly that way.", @@ -3721,6 +3786,11 @@ "hash": "sha256-232713d53bb0", "other": "{{.Setting}} is written as 2mb or as a plain byte count" }, + "recipe.SettingsAreWrittenDownAsText": { + "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run.", + "hash": "sha256-01ff946afd1e", + "other": "settings are written down as text, and a control character either breaks the text or is dropped without a word" + }, "recipe.SettlingItTwiceGivesTwoDifferent": { "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run.", "hash": "sha256-eff74d7341c6", @@ -3796,6 +3866,11 @@ "hash": "sha256-d273c2d6fe96", "other": "the seed decides every byte of the run, so it is read exactly as written and never guessed at" }, + "recipe.TheSettingHoldsTheCharacter": { + "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run. Carries {{.Bad}}, written the way the program writes them - keep each spelled exactly that way.", + "hash": "sha256-adf72d87e4db", + "other": "the {{.Setting}} holds the character {{.Bad}}, which a setting cannot carry" + }, "recipe.TheSettingOfTheContainerFollows": { "description": "Said by internal/recipe - a refusal under the box it is about or at the foot of the form, or a note after a run.", "hash": "sha256-6a5eac5ec73d", diff --git a/internal/gui/text/locale/said/pl.json b/internal/gui/text/locale/said/pl.json index e29cd452..0f73e64c 100644 --- a/internal/gui/text/locale/said/pl.json +++ b/internal/gui/text/locale/said/pl.json @@ -78,7 +78,7 @@ "checksum.ADirectoryHasNoBytesOf": { "hash": "sha256-c5451d4ddaae", "other": "katalog nie ma własnych bajtów, z których można wyliczyć sumę kontrolną" }, "checksum.AnAlgorithmIsNamedExactlyBecause": { "hash": "sha256-5c67b39f12b3", "other": "algorytm podaje się dokładną nazwą, bo dwa podobnie brzmiące dają różne sumy" }, "checksum.ChangedWhileItWasBeingRead": { "hash": "sha256-7b323b86f3c7", "other": "{{.Path}} zmienił się w trakcie czytania" }, - "checksum.CheckTheFolderAgainstItWith": { "hash": "sha256-f2f1b7172ace", "other": "sprawdź folder względem niego przez tfg tool checksum-check albo odsuń go i uruchom to jeszcze raz" }, + "checksum.CheckTheFolderAgainstItWith": { "hash": "sha256-f2f1b7172ace", "other": "sprawdź folder względem niego narzędziem \"Czy każdy plik jest wciąż taki, jak podaje jego plik sum kontrolnych?\" albo odsuń go i uruchom to jeszcze raz" }, "checksum.CheckTheFolderInPartsEach": { "hash": "sha256-e9771dc952f5", "other": "sprawdzaj folder po częściach, każdą z własnym plikiem sum kontrolnych" }, "checksum.FolderUnreadable": { "hash": "sha256-07ba49413258", "other": "{{.Sentence}}:\n {{.Problems}}" }, "checksum.FreeSomeSpaceOnThatDisk": { "hash": "sha256-0e09b5bc8590", "other": "zwolnij trochę miejsca na tym dysku i uruchom to jeszcze raz" }, @@ -97,7 +97,7 @@ "checksum.NameAFolderWithAtLeast": { "hash": "sha256-5a322343ecd1", "other": "wskaż folder z co najmniej jednym plikiem" }, "checksum.NameOneFile": { "hash": "sha256-74c2c0a6f263", "other": "wskaż jeden plik" }, "checksum.NameTheChecksumFileItselfSuch": { "hash": "sha256-c75ab67b49df", "other": "wskaż sam plik sum kontrolnych, na przykład SHA256SUMS, a nie stronę albo podpis obok niego" }, - "checksum.NameTheFolderOrUseTfg": { "hash": "sha256-9457caf28208", "other": "wskaż folder albo użyj tfg tool checksum dla tego jednego pliku" }, + "checksum.NameTheFolderOrUseTfg": { "hash": "sha256-9457caf28208", "other": "wskaż folder albo użyj narzędzia \"Czy ten plik jest tym, za który się podaje?\" dla tego jednego pliku" }, "checksum.Names": { "hash": "sha256-1b28298a4324", "one": "{{.Count}} nazwę", "few": "{{.Count}} nazwy", "many": "{{.Count}} nazw", "other": "{{.Count}} nazwy" }, "checksum.NotEverythingUnderCouldBeRead": { "hash": "sha256-7d3694b98961", "other": "nie wszystko w {{.Folder}} dało się przeczytać, więc nic nie zostało zapisane" }, "checksum.PasteAlone": { "hash": "sha256-c174b1551cbd", "other": "wklej samą sumę kontrolną, bez nazwy pliku. Długości to: {{.Lengths}}" }, @@ -141,7 +141,7 @@ "core.SizeEmpty": { "hash": "sha256-93de7d541324", "other": "pole {{.Setting}} jest puste: wpisz liczbę bajtów albo rozmiar, na przykład 10mb, 1.5gib albo 700kB" }, "core.SizeNegative": { "hash": "sha256-d1fb1aecfb6b", "other": "{{.Setting}} {{.Value}} jest ujemny: plik nie może być mniejszy niż zero bajtów" }, "core.SizeNoNumber": { "hash": "sha256-19e757667a89", "other": "{{.Setting}} {{.Value}} nie ma liczby: wpisz coś w rodzaju 10mb albo 1048576" }, - "core.SizeNotPlain": { "hash": "sha256-0b892bed8bee", "other": "{{.Setting}} {{.Value}} nie jest zwykłą liczbą: wypisz cyfry, jak 10mb, 1.5gib albo 1048576. Zapisy takie jak 1e5, 0x10 czy 1_000 są odrzucane, a nie zgadywane, tak samo jak w przepisie" }, + "core.SizeNotPlain": { "hash": "sha256-738167ea079d", "other": "{{.Setting}} {{.Value}} nie jest zwykłą liczbą: wypisz cyfry, jak 10mb, 1.5gib albo 1048576. Zapisy takie jak 1e5, 0x10 czy 1_000 są odrzucane, a nie zgadywane" }, "core.SizeNotWhole": { "hash": "sha256-b91e69ae02ee", "other": "{{.Setting}} {{.Value}} nie daje całej liczby bajtów: wypada między {{.Below}} a {{.Above}}. Poproś o jedną z tych dwóch liczb" }, "core.SizeTooLarge": { "hash": "sha256-dd73ed43bac3", "other": "{{.Setting}} {{.Value}} jest za duży, żeby wyrazić go w bajtach" }, "core.SizeUnknownUnit": { "hash": "sha256-3cd2ef1da79b", "other": "{{.Setting}} {{.Value}} ma nieznaną jednostkę {{.Unit}}: użyj b, kb, mb, gb albo tb, wszystkie liczone po 1024, a kib, mib, gib albo tib to to samo zapisane w pełni" }, @@ -192,6 +192,8 @@ "eml.AskForSmallerAttachments": { "hash": "sha256-871e78c75c85", "other": "Poproś o mniej albo mniejsze załączniki." }, "eml.TheAttachedFileCannotBe": { "hash": "sha256-cb66d6df0c0f", "other": "eml: załączony plik {{.Format}} nie może powstać: {{.Err}}" }, "eml.UseOneOfThePictureFormats": { "hash": "sha256-a6669f6abe6b", "other": "Użyj jednego z: {{.Formats}}." }, + "engine.AskForTheSmallestSize": { "hash": "sha256-a5af52762597", "other": "Poproś o {{.Size}} B." }, + "engine.AskForTheSmallestSizeOfAll": { "hash": "sha256-b69db57c2bf5", "other": "Poproś o {{.Size}} B, najmniejszy rozmiar, jaki może mieć każdy z {{.Files}} plików." }, "engine.CannotCreateOutDir": { "hash": "sha256-324037f71709", "other": "nie można utworzyć katalogu wyjściowego {{.Dir}}: {{.Cause}}" }, "engine.CannotStart": { "hash": "sha256-114c2e153b9d", "other": "nie można zacząć przebiegu w {{.Dir}}: {{.Cause}}" }, "engine.Character": { "hash": "sha256-add48a171334", "other": "znak {{.Character}}" }, @@ -211,8 +213,9 @@ "engine.DamagedFloorWhy": { "hash": "sha256-7829143089a2", "other": "{{.Damage}} potrzebuje co najmniej {{.Floor}}" }, "engine.DamagedSizeAtLeast": { "hash": "sha256-72fcb7ac9c01", "other": "Poproś o {{.Size}} albo więcej." }, "engine.DamagedSizeAtMost": { "hash": "sha256-2174959715d1", "other": "Poproś o {{.Size}} albo mniej." }, + "engine.EveryFileIsDifferent": { "hash": "sha256-ce926e40d0f8", "other": "każdy z {{.Files}} plików jest inny, więc każdy ma własny najmniejszy rozmiar" }, "engine.FilesSoFar": { "hash": "sha256-83589d643302", "one": "{{.Count}} pliku", "few": "{{.Count}} plikach", "many": "{{.Count}} plikach", "other": "{{.Count}} plikach" }, - "engine.GeneratorCrash": { "hash": "sha256-82716d977373", "other": "generator {{.Format}} zatrzymał się na błędzie wewnętrznym w trakcie {{.While}}: {{.Value}}. To wada tego narzędzia, a nie coś, o co przepis może poprosić. Zgłoś ją razem z ustawieniami, które do niej doprowadziły" }, + "engine.GeneratorCrash": { "hash": "sha256-efa280a3e7d4", "other": "generator {{.Format}} zatrzymał się na błędzie wewnętrznym w trakcie {{.While}}: {{.Value}}. To wada tego narzędzia, a nie coś, o co mogą poprosić ustawienia. Zgłoś ją razem z ustawieniami, które do niej doprowadziły" }, "engine.IDTwice": { "hash": "sha256-724959681477", "other": "nazwa partii {{.ID}} występuje dwa razy" }, "engine.IDTwiceWhy": { "hash": "sha256-ded29dfee98c", "other": "nazwy wskazują partie, więc powtórzenie jest błędem, a nie cichym nadpisaniem" }, "engine.InstructionsNotWritten": { "hash": "sha256-7a1261279b19", "other": "nie można zapisać instrukcji do {{.Path}}: {{.Cause}}" }, @@ -221,30 +224,30 @@ "engine.MemoryOverrun": { "hash": "sha256-168a887a89fa", "other": "{{.Name}} zajmuje przy zapisie około {{.Holds}}, więcej niż {{.Room}}, które ustawienie pamięci zostawiło zapisywanym plikom, więc został zapisany sam, a przebieg przekroczył ustawienie, dopóki go nie skończył" }, "engine.MemoryUnknown": { "hash": "sha256-25e95b18a15e", "other": "nie udało się odczytać pamięci tej maszyny ({{.Cause}}), więc ten przebieg wziął {{.Limit}}, czyli najwięcej, ile brał każdy przebieg, zanim powstało ustawienie pamięci. Ustaw pamięć sam, żeby wybrać limit" }, "engine.NameAbsolute": { "hash": "sha256-2dc5711eaa7d", "other": "{{.Where}} daje ścieżkę bezwzględną {{.Name}}" }, - "engine.NameAbsoluteWhy": { "hash": "sha256-61f6a0c76deb", "other": "przepis nie niesie ścieżek bezwzględnych, bo wtedy działa tylko na maszynie, na której go napisano" }, + "engine.NameAbsoluteWhy": { "hash": "sha256-2b68d0bdf02e", "other": "nazwa ze ścieżką bezwzględną działa tylko na maszynie, na której ją zapisano, więc te same ustawienia zawiodłyby gdzie indziej" }, "engine.NameColon": { "hash": "sha256-9346cfb2e4a8", "other": "{{.Where}} daje nazwę {{.Name}}, w której jest dwukropek" }, "engine.NameColonFix": { "hash": "sha256-08dfaced15cc", "other": "Usuń dwukropek albo poproś o plik wewnątrz archiwum, gdzie nazwa przetrwa" }, - "engine.NameColonWhy": { "hash": "sha256-f033766b9cf1", "other": "Windows czyta go jako dysk albo alternatywny strumień danych, a nie jako część nazwy, więc plik trafia pod inną nazwą albo wcale. Jest odrzucany w każdym systemie, żeby przepis wszędzie znaczył to samo" }, + "engine.NameColonWhy": { "hash": "sha256-f38e726d8040", "other": "Windows czyta go jako dysk albo alternatywny strumień danych, a nie jako część nazwy, więc plik trafia pod inną nazwą albo wcale. Jest odrzucany w każdym systemie, więc te same ustawienia dają wszędzie te same pliki" }, "engine.NameEmpty": { "hash": "sha256-a8beb5c74396", "other": "{{.Where}} daje plik bez nazwy" }, "engine.NameForbidden": { "hash": "sha256-bf6388aa9fbb", "other": "{{.Where}} daje nazwę {{.Name}}, w której jest {{.Character}}" }, "engine.NameForbiddenFix": { "hash": "sha256-1d1b81343f2c", "other": "Usuń ten znak albo poproś o plik wewnątrz archiwum, gdzie nazwa przetrwa" }, - "engine.NameForbiddenWhy": { "hash": "sha256-c7a749a53ea6", "other": "Windows nie przyjmuje tego znaku w nazwie pliku, więc plik w ogóle nie zostanie tam zapisany. Jest odrzucany w każdym systemie, żeby przepis wszędzie znaczył to samo" }, + "engine.NameForbiddenWhy": { "hash": "sha256-08774d0a4fe5", "other": "Windows nie przyjmuje tego znaku w nazwie pliku, więc plik w ogóle nie zostanie tam zapisany. Jest odrzucany w każdym systemie, więc te same ustawienia dają wszędzie te same pliki" }, "engine.NameIsADirectory": { "hash": "sha256-93b2fa7a0d98", "other": "{{.Where}} daje nazwę {{.Name}}, która oznacza katalog, a nie plik" }, "engine.NameIsAPath": { "hash": "sha256-934e299eb38c", "other": "{{.Where}} daje nazwę {{.Name}}, która jest ścieżką, a nie nazwą pliku" }, - "engine.NameIsAPathWhy": { "hash": "sha256-8caafc0ee913", "other": "nazwy zostają wewnątrz katalogu wyjściowego, a separator jest odrzucany w każdym systemie, żeby przepis działał wszędzie" }, + "engine.NameIsAPathWhy": { "hash": "sha256-be69c7804ea3", "other": "nazwy zostają wewnątrz katalogu wyjściowego, a separator jest odrzucany w każdym systemie, więc te same ustawienia działają wszędzie" }, "engine.NameIsTheInstructions": { "hash": "sha256-dfd7477f00a7", "other": "partia {{.Target}} daje plik o nazwie {{.Name}}, a tak ten przebieg nazywa instrukcje obok swojego manifestu" }, "engine.NameIsTheInstructionsWhy": { "hash": "sha256-496cccf01d31", "other": "oba trafiają do katalogu wyjściowego, a instrukcje mówią, do czego służy każdy plik przebiegu, więc jeden z dwóch by przepadł" }, "engine.NameIsTheManifest": { "hash": "sha256-7ee240c4a6a6", "other": "partia {{.Target}} daje plik o nazwie {{.Name}}, a tak ten przebieg nazywa swój manifest" }, "engine.NameIsTheManifestWhy": { "hash": "sha256-19b2818db573", "other": "oba trafiają do katalogu wyjściowego, więc plik zająłby nazwę potrzebną manifestowi, a przebieg skończyłby się plikami i niczym, czym można je usunąć" }, "engine.NameNul": { "hash": "sha256-5453f2b2ff0c", "other": "{{.Where}} daje nazwę {{.Name}}, która w Windows oznacza urządzenie puste, a nie plik" }, "engine.NameNulFix": { "hash": "sha256-018e40bbb5cb", "other": "Daj jej rozszerzenie - nul.txt to zwykła nazwa - albo wybierz inną" }, - "engine.NameNulWhy": { "hash": "sha256-3c22a55bc686", "other": "zapis tam się udaje, a bajty idą donikąd, więc przebieg zapisałby plik, którego nie ma na dysku. Jest odrzucana w każdym systemie, żeby przepis wszędzie znaczył to samo" }, + "engine.NameNulWhy": { "hash": "sha256-cac19da55a27", "other": "zapis tam się udaje, a bajty idą donikąd, więc przebieg zapisałby plik, którego nie ma na dysku. Jest odrzucana w każdym systemie, więc te same ustawienia dają wszędzie te same pliki" }, "engine.NameTemplateFix": { "hash": "sha256-483ceb34910b", "other": "Jedyny znacznik to {{.Placeholder}}, więc nazwa wygląda jak invoice_{{.Example}}.pdf" }, "engine.NameTemplateUnknown": { "hash": "sha256-2eaea446230c", "other": "partia {{.Target}} ma szablon nazw, którego ta wersja nie rozumie: {{.Template}}" }, "engine.NameTheManifestElse": { "hash": "sha256-d5c9c9065282", "other": "Daj partii szablon nazw ze znacznikiem {{.Placeholder}} albo nazwij manifest inaczej" }, "engine.NameTooLong": { "hash": "sha256-a45124f3b035", "other": "{{.Where}} daje nazwę {{.Name}}, która ma {{.Length}} bajtów" }, "engine.NameTooLongFix": { "hash": "sha256-345b133ae94d", "other": "Skróć ją do {{.Most}} bajtów albo mniej albo poproś o plik wewnątrz archiwum, gdzie nazwa przetrwa" }, - "engine.NameTooLongWhy": { "hash": "sha256-08a626e33035", "other": "Linux mieści w nazwie pliku najwyżej {{.Most}} bajtów, a litera spoza ASCII zajmuje od dwóch do czterech z nich. Jest odrzucana w każdym systemie, żeby przepis wszędzie znaczył to samo" }, + "engine.NameTooLongWhy": { "hash": "sha256-050c095ba6e1", "other": "Linux mieści w nazwie pliku najwyżej {{.Most}} bajtów, a litera spoza ASCII zajmuje od dwóch do czterech z nich. Jest odrzucana w każdym systemie, więc te same ustawienia dają wszędzie te same pliki" }, "engine.NameTrailing": { "hash": "sha256-9e6def79fc88", "other": "{{.Where}} daje nazwę {{.Name}}, która kończy się kropką albo spacją" }, "engine.NameTrailingFix": { "hash": "sha256-92a29aace20d", "other": "Usuń ostatni znak albo poproś o plik wewnątrz archiwum, gdzie nazwa przetrwa" }, "engine.NameTrailingWhy": { "hash": "sha256-b080589d9f64", "other": "Windows zapisuje taką nazwę bez niego, więc plik na dysku nie byłby plikiem, który opisuje manifest, a verify zgłosiłby oba" }, @@ -302,7 +305,7 @@ "format.APasswordWasGivenAndThis": { "hash": "sha256-9dead9140bc0", "other": "podano hasło, a to ustawienie mówi, że archiwum nie jest zamknięte, więc jedno z dwóch nie jest tym, co miałeś na myśli" }, "format.APlaceholderPictureHolds": { "hash": "sha256-d9838974daaa", "other": "obraz zastępczy zawiera swoje kształty, napis i etykietę, a taki {{.Width}}x{{.Height}} potrzebuje tyle" }, "format.ARIFFFileStatesItsOwn": { "hash": "sha256-beaa6ef535a9", "other": "plik RIFF zapisuje swoją długość w polu czterobajtowym, więc ten format nie opisze tak dużego pliku" }, - "format.ARateSaysHowFastEntries": { "hash": "sha256-d38f8ddf9901", "other": "tempo mówi, jak szybko przychodzą wpisy, a timestamps=fixed stawia je wszystkie w jednej chwili" }, + "format.ARateSaysHowFastEntries": { "hash": "sha256-d38f8ddf9901", "other": "tempo mówi, jak szybko przychodzą wpisy, a Znaczniki czasu ustawione na stałe stawiają je wszystkie w jednej chwili" }, "format.ASheetOfByAlreadyPackages": { "hash": "sha256-4246af222774", "other": "arkusz {{.Rows}} na {{.Columns}} już po spakowaniu zajmuje tyle, a skoroszyt nie może pominąć typów zawartości ani relacji" }, "format.ATIFFLocatesItsPixelsWith": { "hash": "sha256-0e6ed3d21e3b", "other": "TIFF wskazuje swoje piksele czterobajtowym przesunięciem, więc ten format nie opisze tak dużego pliku" }, "format.AWAVNeedsItsRIFFHeader": { "hash": "sha256-bca949f9e7fd", "other": "WAV potrzebuje nagłówka RIFF, fragmentu formatu i nagłówka fragmentu danych, zanim pojawi się choćby jedna próbka" }, @@ -439,10 +442,10 @@ "format.ValueRefused": { "hash": "sha256-3fba4a321577", "other": "{{.Format}}: {{.Setting}} nie może mieć wartości {{.Value}} - {{.Why}}" }, "format.ValueRefusedBare": { "hash": "sha256-9b1b8007064f", "other": "{{.Subject}} nie może mieć wartości {{.Value}} - {{.Why}}" }, "format.WriteADateThatExistsSuch": { "hash": "sha256-324ab7f056b1", "other": "Wpisz datę, która istnieje, na przykład 2024-02-29T13:45:00+02:00." }, - "format.WriteAValue": { "hash": "sha256-134396e545bd", "other": "wpisz wartość, którą przyjmuje, albo pomiń ten wiersz, a format sam ją wyliczy" }, - "format.WriteAValueSuchAs": { "hash": "sha256-b91dd569f6d3", "other": "wpisz wartość, którą przyjmuje, na przykład {{.Default}}, albo pomiń ten wiersz" }, + "format.WriteAValue": { "hash": "sha256-134396e545bd", "other": "wpisz wartość, którą przyjmuje, albo zostaw pole puste, a format sam ją wyliczy" }, + "format.WriteAValueSuchAs": { "hash": "sha256-b91dd569f6d3", "other": "wpisz wartość, którą przyjmuje, na przykład {{.Default}}, albo zostaw pole puste" }, "format.WriteItTheWayChmodTakes": { "hash": "sha256-233e48fc5f2d", "other": "Zapisz to tak, jak przyjmuje chmod, czyli 644 albo 755." }, - "format.WriteItTheWayTheSetting": { "hash": "sha256-59a86a136c8b", "other": "Zapisz to tak, jak deklaruje ustawienie, czyli root albo użytkownik, albo pomiń ten wiersz, a pliki w środku nie będą miały właściciela." }, + "format.WriteItTheWayTheSetting": { "hash": "sha256-59a86a136c8b", "other": "Zapisz to tak, jak deklaruje ustawienie, czyli root albo użytkownik, albo zostaw pole puste, a pliki w środku nie będą miały właściciela." }, "format.WriteTheDateInOneOf": { "hash": "sha256-95e8e2f5f105", "other": "Zapisz datę na jeden z tych trzech sposobów, bez ułamka sekundy." }, "format.WriteTheValueInUTF8": { "hash": "sha256-28353b79a463", "other": "Zapisz wartość w UTF-8." }, "format.ZipTheDirectoryCouldNotBe": { "hash": "sha256-7eb26b5ea426", "other": "zip: nie udało się nazwać katalogu {{.Name}}: {{.Err}}" }, @@ -490,7 +493,7 @@ "manifest.ItHoldsTheKeyTwice": { "hash": "sha256-d13535e53697", "other": "zawiera klucz {{.Key}} dwa razy" }, "manifest.ItHoldsTheKeyTwiceSpelled": { "hash": "sha256-5a62ea453435", "other": "zawiera klucz {{.Key}} dwa razy, za drugim razem zapisany jako {{.Second}}" }, "manifest.ItIsNotAnObject": { "hash": "sha256-1bd780d90f55", "other": "jest wartością JSON typu {{.Kind}}, a nie obiektem, więc to nie jest manifest zapisany przez to narzędzie" }, - "manifest.ItIsSchemaVersionAndThis": { "hash": "sha256-57828974a0e1", "other": "ma wersję schematu {{.ManifestVersion}}, a ta wersja czyta {{.Version}}. Użyj wersji tfg, która go zapisała" }, + "manifest.ItIsSchemaVersionAndThis": { "hash": "sha256-57828974a0e1", "other": "ma wersję schematu {{.ManifestVersion}}, a ta wersja czyta {{.Version}}. Użyj wersji programu, która go zapisała" }, "manifest.NoteMany": { "hash": "sha256-c4c8340dd2e0", "other": "{{.Files}}: {{.Note}} Wymienione: {{.Named}}. Pozostałe, których tu nie wymieniono: {{.Hidden}}." }, "manifest.NoteOne": { "hash": "sha256-9d548db5c58a", "other": "{{.File}}: {{.Note}}" }, "manifest.NoteSeveral": { "hash": "sha256-d0803401c505", "other": "{{.Files}}: {{.Note}} Wymienione: {{.Named}}." }, @@ -544,7 +547,7 @@ "placeholder.NoLetterFor": { "hash": "sha256-52142b5ef1e4", "other": "krój pisma nie ma litery dla {{.Characters}}" }, "placeholder.NotAColour": { "hash": "sha256-a2f402e52f75", "other": "musi być kolorem zapisanym sześcioma cyframi szesnastkowymi, jak cccccc, albo trzema, jak ccc" }, "placeholder.OnlyOnAPlaceholder": { "hash": "sha256-40b0219a40f7", "other": "zmienia tylko obraz zastępczy, a Zawartość to obraz testowy" }, - "placeholder.SetContentPlaceholder": { "hash": "sha256-4961835418b9", "other": "Ustaw Zawartość na obraz zastępczy albo usuń tę linię" }, + "placeholder.SetContentPlaceholder": { "hash": "sha256-4961835418b9", "other": "Ustaw Zawartość na obraz zastępczy albo zostaw pole puste" }, "placeholder.ShortenTheText": { "hash": "sha256-8c77fbf41b8c", "other": "Napisz krótszy tekst, jeden wiersz, który mieści się w szerokości obrazka" }, "placeholder.TextOmitted": { "hash": "sha256-219a1de7d5aa", "other": "Obrazek ma {{.Width}} na {{.Height}} px, a jego napis potrzebuje więcej miejsca, więc ten obraz zastępczy nie ma napisu. Zmieści się na większym obrazku albo krótszy napis." }, "placeholder.TextTooLong": { "hash": "sha256-0bc80f951bf0", "other": "ma {{.Count}} znaków, a obraz zastępczy przyjmuje najwyżej {{.Most}}" }, @@ -557,10 +560,13 @@ "preset.ADistanceFromTheLimitHas": { "hash": "sha256-3fad7b38f5ae", "other": "odległość od limitu musi być większa od zera" }, "preset.ARecipeCanBuildOnlyOn": { "hash": "sha256-b96ec4594ce9", "other": "przepis może budować tylko na presecie, który zna narzędzie, na którym działa" }, "preset.AlreadyMeansEveryFormatSoIt": { "hash": "sha256-af17cbc9bca4", "other": "{{.EveryFormat}} już oznacza każdy format, więc nie może stać obok nazwanego. Wpisz je samo albo wymień tylko formaty, których chcesz" }, + "preset.AlreadyMeansEveryGroupSoIt": { "hash": "sha256-bc9f08d2c802", "other": "{{.EveryGroup}} już oznacza każdą grupę, więc nie może stać obok nazwanej. Wpisz je samo albo wymień tylko grupy, których chcesz" }, "preset.AnExtensionIsWrittenWithoutIts": { "hash": "sha256-098698484a13", "other": "rozszerzenie zapisuje się bez kropki, więc {{.TrimPrefix}}, a nie {{.Item}}" }, "preset.BulkNotWhole": { "hash": "sha256-8dd30727905b", "other": "{{.Param}}: {{.Value}} nie jest całkowitą liczbą plików" }, "preset.BulkNought": { "hash": "sha256-9f12af8e80c4", "other": "masowe przesyłanie ma wartość zero, więc ten zestaw nie zawiera masowego uploadu." }, "preset.CannotBuild": { "hash": "sha256-6ae81854228f", "other": "preset {{.Preset}} nie może zbudować tego zestawu" }, + "preset.CannotDrawAPlaceholder": { "hash": "sha256-b38bd3c1b17e", "other": "{{.Format}} nie rysuje obrazu zastępczego. Formaty, które to potrafią: {{.Formats}}" }, + "preset.CannotDrawAPlaceholderFix": { "hash": "sha256-cc9628eaae2e", "other": "Wybierz jeden z tych formatów albo zostaw zawartość jako obraz testowy" }, "preset.Combinations": { "hash": "sha256-89e8d79ad737", "one": "{{.Count}} kombinację", "few": "{{.Count}} kombinacje", "many": "{{.Count}} kombinacji", "other": "{{.Count}} kombinacji" }, "preset.Defaulted": { "hash": "sha256-e75b463d20f0", "other": "{{.Text}}" }, "preset.EncodingLeftOut": { "hash": "sha256-bdf71c709021", "other": "ta wersja odrzuca {{.Refused}} zestawu kodowań, więc zawiera on {{.Holds}} zamiast {{.Described}}. Pominięte: {{.Left}}." }, @@ -579,6 +585,7 @@ "preset.ItIsTheSameDistanceAs": { "hash": "sha256-4ad253058b9f", "other": "to ta sama odległość co {{.First}} i zestaw zawierałby ten krok dwa razy. Każda odległość musi być inna, bo każda wyznacza po jednym pliku z obu stron limitu" }, "preset.ItIsTheSameExtensionAs": { "hash": "sha256-7fa2a1b46c69", "other": "to to samo rozszerzenie co {{.First}} i zestaw zawierałby ten plik dwa razy. Każde odrzucane rozszerzenie występuje raz, bo każde odpowiada jednej regule Twojego formularza" }, "preset.ItIsTheSameFormatAs": { "hash": "sha256-4504e5d7a37e", "other": "to ten sam format co {{.First}} i zestaw zawierałby ten plik dwa razy. Każdy format występuje raz, bo każdy odpowiada jednej ścieżce przez Twój czytnik" }, + "preset.ItIsTheSameGroupAs": { "hash": "sha256-74a8201ee530", "other": "to ta sama grupa co {{.First}}. Wymień każdą grupę raz" }, "preset.ItIsTheSameTypeAs": { "hash": "sha256-e66f4431f6ca", "other": "to ten sam typ co {{.First}} i zestaw zawierałby ten plik dwa razy. Każdy dozwolony typ występuje raz, bo każdy odpowiada jednej ścieżce przez Twój formularz" }, "preset.ItsExtensionIsTooLongFor": { "hash": "sha256-f5d7c69e3a4a", "other": "jego rozszerzenie {{.Ext}} jest za długie na nazwę o {{.Bytes}} bajtach, której dotyczy plik {{.ID}}. Wybierz format o krótszym rozszerzeniu" }, "preset.LeftOutAs": { "hash": "sha256-f3020fe59d49", "other": "{{.Format}} jako {{.As}} ({{.Why}})" }, @@ -589,20 +596,26 @@ "preset.NoExtensionsWereDeniedSoThere": { "hash": "sha256-732512c09653", "other": "nie odrzucono żadnych rozszerzeń, więc formularz nie ma czego odrzucać" }, "preset.NoFormatInThisBuildCarries": { "hash": "sha256-4a6750d6f63d", "other": "żaden format w tej wersji nie niesie kodowania ani końca linii, więc nie ma zestawu do zbudowania" }, "preset.NoFormatsWereGivenSoThere": { "hash": "sha256-4cdc44101684", "other": "nie podano żadnych formatów, więc nie ma z czego zbudować zestawu" }, + "preset.NoGroupsWereGivenSoThere": { "hash": "sha256-053d25906787", "other": "nie podano żadnych grup, więc nie ma rozmiaru, w którym można zrobić obrazek" }, + "preset.NoSizeFitsTheFormat": { "hash": "sha256-b46b820f8658", "other": "{{.Format}} nie narysuje żadnego rozmiaru z tych grup. Jego odmowa pierwszego: {{.Cause}}" }, + "preset.NoSizeFitsTheFormatFix": { "hash": "sha256-8c6a83ae0fe6", "other": "Wybierz inne grupy albo inny format obrazka" }, "preset.NoSuchParameter": { "hash": "sha256-929a6264f65a", "other": "preset {{.Preset}} nie ma parametru o nazwie {{.Name}}. Przyjmuje: {{.Known}}" }, "preset.NoTypesWereAllowedSoThe": { "hash": "sha256-bb028b47b8fc", "other": "nie dopuszczono żadnych typów, więc zestaw nie ma kontroli pozytywnej ani pliku do błędnego nazwania" }, + "preset.NotAPictureFormat": { "hash": "sha256-433dca4f32e1", "other": "pliki {{.Format}} nie są obrazkami, a każdy plik tego zestawu nim jest. Formaty obrazków w tej wersji: {{.Formats}}" }, + "preset.NotAPictureFormatFix": { "hash": "sha256-c0ed9e95fd24", "other": "Wybierz jeden z formatów obrazków" }, "preset.OneAllowed": { "hash": "sha256-bbfaa4682425", "other": "dozwolony jest tylko jeden typ, więc zestaw nie zawiera pliku nazwanego jak jeden dozwolony typ, a wypełnionego innym - do tego potrzeba dwóch." }, "preset.ParamCause": { "hash": "sha256-db5c6acdbb8d", "other": "{{.Param}}: {{.Cause}}" }, "preset.RaiseTheSettingAboveBNarrow": { "hash": "sha256-1e2c92f16629", "other": "Podnieś pole {{.Setting}} powyżej {{.Floor}} B, zawęź rozrzut albo wybierz format o mniejszym minimum. W polu {{.Setting}} podano {{.Limit}} B." }, "preset.RaiseTheSettingToBOr": { "hash": "sha256-588c9bcb6cc3", "other": "Podnieś pole {{.Setting}} do {{.Need}} B albo więcej albo usuń {{.ID}} z dozwolonych typów. W polu {{.Setting}} podano {{.Limit}} B." }, "preset.Refused": { "hash": "sha256-e75b463d20f0", "other": "{{.Text}}" }, "preset.RemoveTheLine": { "hash": "sha256-14c26fa261f4", "other": "usuń ten wiersz" }, - "preset.RunPresetShow": { "hash": "sha256-fe7d5528fb3b", "other": "uruchom \"tfg preset show {{.Preset}}\", żeby zobaczyć, co przyjmuje" }, + "preset.RunPresetShow": { "hash": "sha256-fe7d5528fb3b", "other": "wybierz {{.Preset}} w zakładce Presety, żeby zobaczyć, co przyjmuje" }, "preset.RunTfgFormatsForTheList": { "hash": "sha256-923b9bd13d26", "other": "uruchom \"tfg formats\", żeby zobaczyć listę" }, "preset.RunTfgFormatsToSeeWhat": { "hash": "sha256-f047d0599c10", "other": "Uruchom \"tfg formats\", żeby zobaczyć, co ma ta wersja." }, "preset.RunTfgPresetListForThe": { "hash": "sha256-25a1a032c139", "other": "uruchom \"tfg preset list\", żeby zobaczyć identyfikatory tej wersji" }, "preset.SetTheSettingToBOr": { "hash": "sha256-5a47f6cb7b98", "other": "Ustaw pole {{.Setting}} na {{.Size}} B albo {{.Minimum}} B." }, "preset.SetTheSettingToBOr2": { "hash": "sha256-c3ba9e8a8eb4", "other": "Ustaw pole {{.Setting}} na {{.Floor}} B albo więcej." }, + "preset.SizesLeftOut": { "hash": "sha256-30215e0cbaf9", "other": "{{.Format}} nie narysuje {{.Count}} z tych rozmiarów. Jego odmowa pierwszego: {{.Cause}}. Zestaw je pomija: {{.Sizes}}" }, "preset.StandIns": { "hash": "sha256-a86a61e3c5aa", "one": "ta wersja nie ma formatu o nazwie {{.Formats}}, więc {{.Names}} zawiera zwykły tekst pod tą nazwą. To sprawdza formularz, który czyta koniec nazwy, a nie zawartość.", "few": "ta wersja nie ma formatu o nazwie {{.Formats}}, więc {{.Names}} zawierają zwykły tekst pod tymi nazwami. To sprawdza formularz, który czyta koniec nazwy, a nie zawartość.", "many": "ta wersja nie ma formatu o nazwie {{.Formats}}, więc {{.Names}} zawierają zwykły tekst pod tymi nazwami. To sprawdza formularz, który czyta koniec nazwy, a nie zawartość.", "other": "ta wersja nie ma formatu o nazwie {{.Formats}}, więc {{.Names}} zawierają zwykły tekst pod tymi nazwami. To sprawdza formularz, który czyta koniec nazwy, a nie zawartość." }, "preset.StepBelowFloor": { "hash": "sha256-170136bfee7f", "other": "{{.Step}} miałby {{.Size}} B, a najmniejszy plik {{.Format}}, jaki tworzy ta wersja, ma {{.Floor}} B" }, "preset.StepBelowZero": { "hash": "sha256-4a4ed15f64f3", "other": "{{.Step}} miałby {{.Size}} B, a plik nie może być mniejszy niż nic" }, @@ -610,9 +623,10 @@ "preset.TakeOutOfTheListOr": { "hash": "sha256-3a45bd78cd55", "other": "Usuń {{.ID}} z listy {{.AllowParam}} albo {{.Written}} z listy {{.DenyParam}}." }, "preset.TakesNoParameters": { "hash": "sha256-10127e9faa16", "other": "preset {{.Preset}} nie przyjmuje parametrów, więc {{.Name}} nie jest jednym z nich" }, "preset.ThePresetGivesEveryFileIt": { "hash": "sha256-0bd3908db204", "other": "preset daje każdemu budowanemu plikowi ten format, więc musi to być taki, który ta wersja umie zapisać" }, - "preset.ThePresetRefusedWhatTheRecipe": { "hash": "sha256-46f82ba266de", "other": "preset odrzucił to, co dał mu przepis" }, + "preset.ThePresetRefusedTheValues": { "hash": "sha256-1f5532a6502a", "other": "preset odrzucił wartości, które dostał" }, "preset.ThePresetTakes": { "hash": "sha256-078daea8c1a6", "other": "preset przyjmuje: {{.Join}}" }, "preset.TheSetHoldsFilesInAnd": { "hash": "sha256-770eaf5a913a", "other": "zestaw zawiera pliki w {{.Name}}, a {{.Reason}}" }, + "preset.ThereIsNoGroupCalledThat": { "hash": "sha256-5235c4fc5d29", "other": "nie ma grupy o takiej nazwie. Grupy to: {{.Groups}}" }, "preset.ThisBuildHas": { "hash": "sha256-3787cbba4f98", "other": "ta wersja ma: {{.Join}}" }, "preset.ThisBuildHasNoFormatCalled": { "hash": "sha256-758e0bae8496", "other": "ta wersja nie ma formatu o takiej nazwie. Ma: {{.Join}}" }, "preset.Unknown": { "hash": "sha256-535352e45ee2", "other": "nieznany preset {{.Preset}}. Ta wersja ma: {{.Known}}" }, @@ -639,7 +653,6 @@ "recipe.ARangeIsTwoSizesWith": { "hash": "sha256-5a18946381db", "other": "zakres to dwa rozmiary z łącznikiem między nimi" }, "recipe.AReasonIsOneValueFrom": { "hash": "sha256-0111a952089c", "other": "testowana reguła to jedna wartość z zamkniętej listy" }, "recipe.ARecipeCanBuildOnA": { "hash": "sha256-0f3adf9d29dc", "other": "przepis może budować na presecie i na niczym innym w tej wersji - nie na innym pliku" }, - "recipe.ARecipeIsATextDocument": { "hash": "sha256-8361f48aa1aa", "other": "przepis to dokument tekstowy, a znak sterujący albo go psuje, albo przepada bez słowa" }, "recipe.ARecipeIsOneDocumentAnd": { "hash": "sha256-01123bae35c4", "other": "przepis to jeden dokument, a wszystko po pierwszym separatorze zostałoby pominięte bez słowa" }, "recipe.ARecipeThatBuildsOnA": { "hash": "sha256-e559b6752421", "other": "przepis budujący na presecie czyta czytnik, który najpierw rozwija preset, a ten tego nie robi" }, "recipe.ARecipeWithoutTargetsHasNothing": { "hash": "sha256-f69e05f3bab1", "other": "przepis bez partii nie ma czego wytworzyć" }, @@ -649,11 +662,11 @@ "recipe.ATypoAcceptedInSilenceBecomes": { "hash": "sha256-0c20fa7ae876", "other": "literówka przyjęta po cichu staje się oczekiwaniem, którego żaden test nigdy nie sprawdzi" }, "recipe.AddAtLeastOneEntryUnder": { "hash": "sha256-577a79df5625", "other": "dodaj co najmniej jeden wpis pod targets:" }, "recipe.AddExtendsPresetIdAboveIt": { "hash": "sha256-c0747ed47cd7", "other": "dodaj nad nim extends: preset: albo usuń with" }, - "recipe.AddFormatPdf": { "hash": "sha256-514ee52e95db", "other": "dodaj format: pdf" }, - "recipe.AddFormatTxtOrRunTfg": { "hash": "sha256-1fc7c58ded33", "other": "dodaj format: txt albo uruchom \"tfg formats\", żeby zobaczyć całą listę" }, + "recipe.AddFormatPdf": { "hash": "sha256-514ee52e95db", "other": "wybierz go w polu Format" }, + "recipe.AddFormatTxtOrRunTfg": { "hash": "sha256-1fc7c58ded33", "other": "wybierz go w polu Format" }, "recipe.AddOutcomeAcceptRejectSanitizeOr": { "hash": "sha256-906f83c6e332", "other": "dodaj outcome: accept, reject, sanitize albo unspecified" }, - "recipe.AddSize2mb": { "hash": "sha256-aaa48a1f0dc8", "other": "dodaj size: 2mb" }, - "recipe.AddSize2mbSizeRange1kb": { "hash": "sha256-75d03ddd7410", "other": "dodaj size: 2mb, size-range: 1kb-8kb, boundary, contains albo zwykłą liczbę bajtów" }, + "recipe.AddSize2mb": { "hash": "sha256-aaa48a1f0dc8", "other": "wpisz rozmiar, na przykład 2mb" }, + "recipe.AddSize2mbSizeRange1kb": { "hash": "sha256-75d03ddd7410", "other": "wpisz rozmiar, na przykład 2mb, albo wybierz inny sposób w polu Jak podany jest rozmiar" }, "recipe.AddTypeWithTheNameOf": { "hash": "sha256-a4232a7b5f56", "other": "dodaj type z nazwą uszkodzenia" }, "recipe.AddVersionAsTheFirstLine": { "hash": "sha256-ffcea33474a0", "other": "dodaj version: {{.SchemaVersion}} jako pierwszy wiersz" }, "recipe.AllowNondeterministicTrueHasNothingTo": { "hash": "sha256-2ef05077fa28", "other": "allow_nondeterministic: true nie ma w tej wersji na co pozwalać" }, @@ -674,14 +687,14 @@ "recipe.Entry": { "hash": "sha256-3d172c936981", "other": "{{.Where}}: wpis {{.Number}} listy {{.List}}" }, "recipe.EveryFormatHereRepeatsToThe": { "hash": "sha256-a1c5006fdb6d", "other": "każdy format tutaj powtarza się co do bajtu, więc żadna zgoda nie jest potrzebna" }, "recipe.EveryRecipeDeclaresTheSchemaVersion": { "hash": "sha256-48bf6f9999fc", "other": "każdy przepis podaje wersję schematu, według której go napisano" }, - "recipe.EveryTargetDeclaresItsSettingWhich": { "hash": "sha256-df7af7d5d62b", "other": "każda partia podaje pole {{.Setting}} i to dzięki temu przebieg próbny podaje dokładne liczby, zanim cokolwiek trafi na dysk" }, + "recipe.EveryTargetDeclaresItsSettingWhich": { "hash": "sha256-df7af7d5d62b", "other": "każda partia podaje pole {{.Setting}} i to dzięki temu Podgląd podaje dokładne liczby, zanim cokolwiek trafi na dysk" }, "recipe.ExpectsWhichIsNotAKnown": { "hash": "sha256-056d10d1cdc7", "other": "{{.Where}} oczekuje wyniku {{.Outcome}}, a takiego wyniku nie ma" }, "recipe.ExtendsDoesNotNameAPreset": { "hash": "sha256-96b167b16bf9", "other": "extends {{.Value}} nie wskazuje presetu" }, "recipe.GeneratedContentIsEnglishOnlySo": { "hash": "sha256-730196b0eddb", "other": "generowana treść jest na razie tylko po angielsku" }, - "recipe.GiveItADifferentSettingOr": { "hash": "sha256-8dd1a4a5c174", "other": "zmień pole {{.Setting}} albo pomiń partię presetu, wyjmując preset do pliku i edytując przepis" }, + "recipe.GiveItADifferentSettingOr": { "hash": "sha256-8dd1a4a5c174", "other": "zmień pole {{.Setting}}" }, "recipe.GiveItOneValueForExample": { "hash": "sha256-f43e69de623b", "other": "daj mu jedną wartość, na przykład bytes: 16" }, "recipe.GiveItOneValueForExample2": { "hash": "sha256-1865e1d0d4fc", "other": "daj jej jedną wartość, na przykład pages: 3" }, - "recipe.GiveItSettingForExampleId": { "hash": "sha256-9066c56454f2", "other": "uzupełnij pole {{.Setting}}, na przykład id: invoices" }, + "recipe.GiveItSettingForExampleId": { "hash": "sha256-9066c56454f2", "other": "uzupełnij pole {{.Setting}}, na przykład invoices" }, "recipe.GiveOneOfThemADifferent": { "hash": "sha256-f06830c13eb6", "other": "zmień pole {{.Setting}} w jednej z nich" }, "recipe.GivesTheReasonWhichIsNot": { "hash": "sha256-8f677f25d2b4", "other": "{{.Where}} podaje testowaną regułę {{.Value}}, której nie ma na liście" }, "recipe.HasAFormatThatIsNot": { "hash": "sha256-e06c14c235fd", "other": "{{.At}} ma format, który nie jest nazwą" }, @@ -695,7 +708,7 @@ "recipe.HasSettingThatIsNotText": { "hash": "sha256-2b479eb7c452", "other": "{{.Where}} ma w polu {{.Setting}} coś, co nie jest tekstem" }, "recipe.HasTheKey": { "hash": "sha256-1cdc9dd0b5e2", "other": "{{.At}} ma klucz {{.Key}}" }, "recipe.HasTheSettingOfATarget": { "hash": "sha256-ff414a2e347a", "other": "{{.Where}} ma w polu {{.Setting}} to samo co partia, którą preset już buduje" }, - "recipe.HoldsTheCharacterWhichCannotBe": { "hash": "sha256-e6aafb7f9e39", "other": "{{.At}} zawiera znak {{.Bad}}, którego nie da się zapisać w przepisie" }, + "recipe.HoldsTheCharacterWhichCannotBe": { "hash": "sha256-f8b6ab0b3f7d", "other": "{{.At}} ma pole {{.Setting}} ze znakiem {{.Bad}}, którego ustawienie nie może nieść" }, "recipe.IsAListOrABlock": { "hash": "sha256-d3df7f29aa77", "other": "{{.At}}: {{.Key}} jest listą albo blokiem" }, "recipe.IsNeitherANameNorA": { "hash": "sha256-ff6baa7396bc", "other": "{{.At}} nie jest ani nazwą, ani zestawem ustawień" }, "recipe.IsWhichIsNeitherTrueNor": { "hash": "sha256-731e62d7639d", "other": "{{.Subject}} to {{.Value}}, czyli ani true, ani false" }, @@ -741,6 +754,7 @@ "recipe.SettingIsOneSizeAndThe": { "hash": "sha256-93e665020c2d", "other": "pole {{.Setting}} to jeden rozmiar, a zestaw powstaje po obu jego stronach" }, "recipe.SettingIsThreeChosenSizesAround": { "hash": "sha256-f4373c72f697", "other": "pole {{.Setting}} to trzy wybrane rozmiary wokół limitu, więc losowanie rozmiarów dodatkowo przekreśliłoby powód ich wyboru" }, "recipe.SettingIsWrittenAs2mbOr": { "hash": "sha256-232713d53bb0", "other": "pole {{.Setting}} zapisuje się jako 2mb albo jako zwykłą liczbę bajtów" }, + "recipe.SettingsAreWrittenDownAsText": { "hash": "sha256-01ff946afd1e", "other": "ustawienia są zapisywane jako tekst, a znak sterujący albo psuje ten tekst, albo przepada bez słowa" }, "recipe.SettlingItTwiceGivesTwoDifferent": { "hash": "sha256-eff74d7341c6", "other": "dwukrotne uporządkowanie daje dwa różne pliki, więc sprawdzenie nigdy by nie przeszło, a skrót przepisu w manifeście by go nie opisywał" }, "recipe.StatesBothSettingAndABoundary": { "hash": "sha256-e26d703b93e3", "other": "{{.Where}} podaje naraz pole {{.Setting}} i limit testowany" }, "recipe.StatesBothSettingAndASize": { "hash": "sha256-fe85fe68a072", "other": "{{.Where}} podaje naraz pole {{.Setting}} i size-range" }, @@ -756,6 +770,7 @@ "recipe.TheRecipeAsksForNoFiles": { "hash": "sha256-dfe478303a1a", "other": "przepis nie prosi o żadne pliki" }, "recipe.TheRecipeHasNoVersion": { "hash": "sha256-328db8bc7fcb", "other": "przepis nie ma wersji" }, "recipe.TheSeedDecidesEveryByteOf": { "hash": "sha256-d273c2d6fe96", "other": "ziarno decyduje o każdym bajcie przebiegu, więc jest czytane dokładnie tak, jak je zapisano, i nigdy nie jest zgadywane" }, + "recipe.TheSettingHoldsTheCharacter": { "hash": "sha256-adf72d87e4db", "other": "pole {{.Setting}} zawiera znak {{.Bad}}, którego ustawienie nie może nieść" }, "recipe.TheSettingOfTheContainerFollows": { "hash": "sha256-6a5eac5ec73d", "other": "pole {{.Setting}} kontenera wynika z pola {{.Setting}} tego, co zawiera, więc każda grupa je podaje" }, "recipe.TheSettledShapeOfThisFile": { "hash": "sha256-20b623f6d3da", "other": "uporządkowanej postaci tego pliku nie da się odczytać z powrotem" }, "recipe.TheSettledShapeOfThisFile2": { "hash": "sha256-23ef3499f4b2", "other": "uporządkowana postać tego pliku nie zostaje uporządkowana" }, @@ -769,27 +784,27 @@ "recipe.ThisSettingIsOneOfTwo": { "hash": "sha256-3ad6ce9edcc3", "other": "to ustawienie jest jednym z dwóch słów, a wszystko inne trzeba by zgadywać" }, "recipe.ThisSettingIsOneValueWritten": { "hash": "sha256-342b49446a29", "other": "to ustawienie to jedna wartość, zapisana obok nazwy, a nie wcięta pod nią" }, "recipe.TooDeep": { "hash": "sha256-0d47280182a1", "other": "{{.Name}} zagnieżdża listy i mapy na głębokość {{.Depth}}, a limit to {{.Limit}}. Czytanie głęboko zagnieżdżonego dokumentu kosztuje pamięć, która rośnie dużo szybciej niż sam dokument, więc mały plik może wyczerpać tę maszynę, zanim cokolwiek zostanie zapisane. Zapisz partie jako zwykłą listę" }, - "recipe.TooLarge": { "hash": "sha256-c0e7fdfe5e2a", "other": "{{.Name}} ma {{.Bytes}} B, a limit to {{.Limit}} B. Przepis to dokument, który ktoś pisze, a czas czytania rośnie z jego rozmiarem, więc nieograniczony byłby sposobem na zawieszenie budowania. Podziel go na kilka przepisów albo generuj partie pętlą we własnym skrypcie" }, + "recipe.TooLarge": { "hash": "sha256-c0e7fdfe5e2a", "other": "{{.Name}} ma {{.Bytes}} B, a limit to {{.Limit}} B. Czas czytania rośnie z rozmiarem tego, o co prosisz, więc rozmiar jest ograniczony. Skróć to, co jest w polach, albo rozłóż partie na kilka przebiegów" }, "recipe.UnitsCountIn1024sSo10mb": { "hash": "sha256-6583bf42dc24", "other": "jednostki liczą się po 1024, więc 10mb to 10485760 bajtów" }, "recipe.Unreadable": { "hash": "sha256-6db3546dfc2c", "other": "{{.Name}} nie daje się odczytać jako przepis:\n{{.Detail}}" }, "recipe.UnspecifiedExpectationsAreLeftInThe": { "hash": "sha256-94e9e4b033f1", "other": "nieokreślone oczekiwania zostają w manifeście do rozstrzygnięcia przez odbiorcę" }, "recipe.UpgradeTheToolOrWriteThe": { "hash": "sha256-191faed33769", "other": "zaktualizuj narzędzie albo napisz przepis według wersji podanej wyżej" }, "recipe.UseAcceptRejectSanitizeOrUnspecified": { "hash": "sha256-85d365e7de8c", "other": "użyj accept, reject, sanitize albo unspecified" }, - "recipe.UseBoundary10mbOrAPlain": { "hash": "sha256-82fc57a9cff3", "other": "użyj boundary: 10mb albo zwykłej liczby bajtów" }, - "recipe.UseCount0ForAGroup": { "hash": "sha256-de61b29c39d0", "other": "użyj count: 0 dla grupy, która nic nie wnosi, albo usuń wpis" }, - "recipe.UseCount50": { "hash": "sha256-ec6634fce2c2", "other": "użyj count: 50" }, + "recipe.UseBoundary10mbOrAPlain": { "hash": "sha256-82fc57a9cff3", "other": "użyj granicy, na przykład 10mb, albo zwykłej liczby bajtów" }, + "recipe.UseCount0ForAGroup": { "hash": "sha256-de61b29c39d0", "other": "poproś o 0 albo więcej albo usuń wpis" }, + "recipe.UseCount50": { "hash": "sha256-ec6634fce2c2", "other": "wpisz liczbę całkowitą, na przykład 50" }, "recipe.UseExpectedAcceptOrABlock": { "hash": "sha256-d7d3c6dee42f", "other": "użyj expected: accept albo bloku z outcome:" }, "recipe.UseFormatPdfOrRunTfg": { "hash": "sha256-39cbda389c37", "other": "użyj format: pdf albo uruchom tfg formats, żeby zobaczyć listę" }, "recipe.UseLocaleEnOrLeaveThe": { "hash": "sha256-0a19d43dd48f", "other": "użyj locale: en albo pomiń ten wiersz" }, "recipe.UseOneOfReasons": { "hash": "sha256-4e2410ba8441", "other": "użyj jednej z: {{.Reasons}}" }, "recipe.UseSettingAtLeastOneByte": { "hash": "sha256-810411e520cb", "other": "wpisz w polu {{.Setting}} wartość co najmniej o bajt mniejszą od największej liczby" }, "recipe.UseSettingOfOrLessOr": { "hash": "sha256-a950b91ebbd9", "other": "wpisz w polu {{.Setting}} najwyżej {{.MaxFilesPerRun}} albo rozłóż kontener na kilka wpisów" }, - "recipe.UseSettingOfOrLessOr2": { "hash": "sha256-e940b6c564de", "other": "wpisz w polu {{.Setting}} najwyżej {{.MaxFilesPerRun}} albo rozłóż partię na kilka przepisów" }, + "recipe.UseSettingOfOrLessOr2": { "hash": "sha256-e940b6c564de", "other": "wpisz w polu {{.Setting}} najwyżej {{.MaxFilesPerRun}} albo rozłóż pliki na kilka przebiegów" }, "recipe.UseSettingSuchAs10mb512kb": { "hash": "sha256-bead317186c2", "other": "wpisz w polu {{.Setting}} na przykład 10mb, 512kb albo zwykłą liczbę bajtów" }, "recipe.UseSettingSuchAs2mb512kb": { "hash": "sha256-cd8679e4c31b", "other": "wpisz w polu {{.Setting}} na przykład 2mb, 512kb albo zwykłą liczbę bajtów" }, "recipe.UseSize2mbOrSize2097152": { "hash": "sha256-e3c50d33a6be", "other": "użyj size: 2mb albo size: 2097152" }, - "recipe.UseSizeRange1kb8kb": { "hash": "sha256-ae8d05cf1f68", "other": "użyj size-range: 1kb-8kb" }, - "recipe.UseSizeRange1kb8kbOr": { "hash": "sha256-f1d9e9c21ff4", "other": "użyj size-range: 1kb-8kb albo pary zwykłych liczb bajtów" }, + "recipe.UseSizeRange1kb8kb": { "hash": "sha256-ae8d05cf1f68", "other": "użyj zakresu, na przykład 1kb-8kb" }, + "recipe.UseSizeRange1kb8kbOr": { "hash": "sha256-f1d9e9c21ff4", "other": "użyj zakresu, na przykład 1kb-8kb, albo pary zwykłych liczb bajtów" }, "recipe.UseTrueOrFalse": { "hash": "sha256-27db5e3986d1", "other": "użyj {{.Subject}}: true albo {{.Subject2}}: false" }, "recipe.VersionIsNotASchemaThis": { "hash": "sha256-3fe3d2cfbd35", "other": "wersja {{.Version}} to schemat, którego ta wersja nie zna" }, "recipe.VersionIsNotAWholeNumber": { "hash": "sha256-82edb8fdc772", "other": "wersja {{.Text}} nie jest liczbą całkowitą" }, @@ -797,13 +812,13 @@ "recipe.WhereWhat": { "hash": "sha256-d0a8cf451027", "other": "{{.Where}}: {{.What}}" }, "recipe.WithBelongsBesideExtendsItSays": { "hash": "sha256-f7313a2dbc3d", "other": "with należy obok extends: mówi, co wypełnić, a extends mówi, w co" }, "recipe.WithFillsTheParametersOfA": { "hash": "sha256-91f25e74d772", "other": "with wypełnia parametry presetu, a żaden preset nie jest wskazany" }, - "recipe.WriteADecimalNumberSuchAs": { "hash": "sha256-fd6a6e21bf53", "other": "wpisz liczbę dziesiętną, na przykład seed: 20260802" }, - "recipe.WriteADecimalNumberSuchAs2": { "hash": "sha256-69ec31d15356", "other": "wpisz liczbę dziesiętną, na przykład count: 10" }, + "recipe.WriteADecimalNumberSuchAs": { "hash": "sha256-fd6a6e21bf53", "other": "wpisz liczbę dziesiętną, na przykład 20260802" }, + "recipe.WriteADecimalNumberSuchAs2": { "hash": "sha256-69ec31d15356", "other": "wpisz liczbę dziesiętną, na przykład 10" }, "recipe.WriteExtendsPresetIdAndRun": { "hash": "sha256-eec676d41814", "other": "wpisz extends: preset: i uruchom \"tfg preset list\", żeby zobaczyć identyfikatory tej wersji" }, "recipe.WriteItOnOneLineSuch": { "hash": "sha256-b00307984821", "other": "zapisz to w jednym wierszu, na przykład {{.Example}}" }, "recipe.WriteTheNameAsAWord": { "hash": "sha256-effad2028c85", "other": "zapisz nazwę jako słowo" }, "recipe.WriteTheNameOnItsOwn": { "hash": "sha256-da431c8ff106", "other": "zapisz samą nazwę albo mapę zaczynającą się od type" }, - "recipe.WriteTheNameOrRemoveThe": { "hash": "sha256-f127771519ee", "other": "wpisz nazwę, na przykład {{.Example}}, albo usuń wiersz, a plik pójdzie pod nazwą, którą ma na dysku" }, + "recipe.WriteTheNameOrRemoveThe": { "hash": "sha256-f127771519ee", "other": "wpisz nazwę, na przykład {{.Example}}, albo wyczyść pole, a plik pójdzie pod nazwą, którą ma na dysku" }, "recipe.WriteVersion": { "hash": "sha256-6b426dee7162", "other": "wpisz version: {{.SchemaVersion}}" }, "rtf.ADocumentThisLargeCannotBe": { "hash": "sha256-3026003f221c", "other": "tak dużego dokumentu ta wersja nie potrafi policzyć co do bajta" }, "rtf.APictureInTheDocumentIs": { "hash": "sha256-b4581f4ef7ea", "other": "obrazek w dokumencie RTF musi być w jednym z dwóch formatów obrazków, które RTF nazywa" }, @@ -836,5 +851,5 @@ "xlsx.Columns": { "hash": "sha256-5a53b3c96cb2", "one": "{{.Count}} kolumnę", "few": "{{.Count}} kolumny", "many": "{{.Count}} kolumn", "other": "{{.Count}} kolumny" }, "xlsx.JointFewer": { "hash": "sha256-15c3bae806db", "other": "{{.Why}}. Poproś o mniej wierszy albo mniej kolumn" }, "xlsx.Rows": { "hash": "sha256-244cc1fe9311", "one": "{{.Count}} wiersz", "few": "{{.Count}} wiersze", "many": "{{.Count}} wierszy", "other": "{{.Count}} wiersza" }, - "xml.NeedsBOM": { "hash": "sha256-74660e3e12d1", "other": "XML w {{.Encoding}} musi zaczynać się znacznikiem kolejności bajtów, więc to wymaga bom=true albo encoding={{.UTF8}}" } + "xml.NeedsBOM": { "hash": "sha256-74660e3e12d1", "other": "XML w {{.Encoding}} musi zaczynać się znacznikiem kolejności bajtów, więc to wymaga włączonego BOM albo pola Kodowanie ustawionego na {{.UTF8}}" } } diff --git a/internal/gui/text/preferences.go b/internal/gui/text/preferences.go index 86e7bff2..31be8580 100644 --- a/internal/gui/text/preferences.go +++ b/internal/gui/text/preferences.go @@ -19,7 +19,7 @@ import "github.com/donislawdev/TestingFilesGenerator/internal/core" func TabPreferences() string { return say("TabPreferences", "Preferences") } func SubtitlePreferences() string { - return say("SubtitlePreferences", "How this window speaks, how much memory its runs may take, and what it keeps between runs. Nothing here changes the files it makes.") + return say("SubtitlePreferences", "How this window speaks, how much memory its runs may take, and what it remembers for the next time it opens. Nothing here changes the files it makes.") } func SectionLanguage() string { return say("SectionLanguage", "Language") } @@ -35,7 +35,7 @@ func MemoryWayOff() string { return say("MemoryWayOff", "No limit") } // floor of the plan under Automatic is said from the constant that sets it, // the way --help says it. func PreferencesMemoryScope() string { - return sayf("PreferencesMemoryScope", "How much memory one run may take, the plan and the files being written together. Pictures wait for room rather than all being held at once, and a plan larger than this is refused before anything is written. When a run gets close to this amount, the program frees memory more often, which makes the run slower. A run that needs more memory than this still gets it. Under Automatic, a plan of up to {{.Floor}} is never refused. It applies from the next run, and nothing in the files changes.", + return sayf("PreferencesMemoryScope", "How much memory one run may take. A run first works out the whole list of files and keeps that list while it writes, so a list that needs more memory than this is refused before anything is written. Files that need a lot of memory, such as large pictures, are then written in turn rather than all at once. Close to this amount the program frees memory more often, which makes the run slower, and a file that needs more than all of it is still written, on its own. Under Automatic, a list needing up to {{.Floor}} is never refused. It applies from the next run, and nothing in the files changes.", map[string]any{"Floor": HumanBytes(core.MaxPlanBytes)}) } @@ -46,7 +46,7 @@ func MemoryAutoIs(size string) string { // MemoryAutoUnknown is Automatic on a computer that could not be asked. func MemoryAutoUnknown(size string) string { - return sayf("MemoryAutoUnknown", "The memory of this computer could not be read, so runs take {{.Size}}, the most every run took before this setting.", map[string]any{"Size": size}) + return sayf("MemoryAutoUnknown", "The memory of this computer could not be read, so runs may take {{.Size}}.", map[string]any{"Size": size}) } func MemoryCustomIs() string { @@ -58,7 +58,7 @@ func MemoryCustomEmpty() string { } func MemoryOffIs() string { - return say("MemoryOffIs", "Runs take what they need. Pictures are not held back and the plan has no limit, so a very large run can be ended by the system without a word.") + return say("MemoryOffIs", "Runs take as much memory as they need. A very large run can then be ended by the system without a word.") } // MemoryUnreadable is a kept setting that does not read as one. @@ -128,7 +128,7 @@ func PreferencesMissing(tag string) string { // computer. The folder picker's own memory is named as well: it writes into the // same place, and a list of what is kept that left it out would be untrue. func PreferencesKept() string { - return say("PreferencesKept", "Between runs this window keeps four things: the output directory, the size of the window, and the language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer.") + return say("PreferencesKept", "For the next time it opens, this window keeps four things: the output directory, the size of the window, and the language and the memory chosen above. The folder picker also keeps the last folder it showed. Nothing leaves this computer.") } func PreferencesKeptIn() string { return say("PreferencesKeptIn", "They are kept in this folder:") } diff --git a/internal/gui/text/recipewords.go b/internal/gui/text/recipewords.go new file mode 100644 index 00000000..830d2627 --- /dev/null +++ b/internal/gui/text/recipewords.go @@ -0,0 +1,174 @@ +package text + +import ( + "strings" + + "github.com/donislawdev/TestingFilesGenerator/internal/tool" +) + +// The engine's sentences are written for the command line, where a person has +// written a recipe or typed a command. Some of their words are the recipe's: a +// target, a line of the file, a key and its value, a command to run. The window +// has none of those - it has batches, boxes, lists and buttons - so the English +// window says those words as the screen does. docs/SIZE-FIXES-2026-11-16.md +// section 6.1, M3b. +// +// A table of phrases rather than a second English of every sentence: the +// window's word for a target is one rule, and a sentence the engine starts to +// say tomorrow is said in it without anybody writing it twice. A phrase only +// one sentence has is the whole of what that sentence says differently. +// +// A phrase is replaced in the layout, before the values go in, so a value +// somebody typed is never reworded - a file called target.txt stays target.txt. +// Every phrase keeps the values and the slots of the layout where they are, +// which TestTheWindowSaysNoWordOfTheRecipe holds for every sentence the code +// says. +// +// A translation says these things in its own words, and is held to the same +// rule by the same guard. + +// phrase is one of the recipe's words and what the English window says +// instead. The screen's words are asked for when a sentence is said, because +// they name boxes and lists by the words the screen shows them under, and a +// label written here a second time would stay behind when the label changed. +type phrase struct { + recipe string + screen func() string +} + +// as is words the screen says as they are. +func as(words string) func() string { return func() string { return words } } + +// toolNamed is a tool as the list of tools names it - by the question it +// answers - in quotes, the way a sentence names a thing on the screen. +func toolNamed(id string) string { + for _, d := range tool.All() { + if d.ID == id { + return `"` + ToolQuestion(d.ID, d.Question) + `"` + } + } + return id +} + +// setTo is a setting and a value of its list, as a sentence asks for them. +func setTo(key, value string) string { return SettingLabel(key) + " to " + ChoiceName(key, value) } + +// inTheScreensWords is every phrase, in the order they are tried: a phrase +// comes before any shorter one it holds, so a sentence is said by its own +// phrase before the words of every sentence are. +var inTheScreensWords = []phrase{ + // A target is a batch on every screen. The id of one is its Batch name, + // and a target without one is counted the way the screen heads it. + {"target {setting} %q is used twice", as("{setting} %q is used twice")}, + {"target id", FieldTargetID}, + {"ids identify targets", func() string { return FieldTargetID() + "s identify batches" }}, + {"a target has no id", func() string { return "a batch has no " + FieldTargetID() }}, + {"every target needs a stable id", func() string { return "every batch needs a stable " + FieldTargetID() }}, + {", or leave the preset's target out by ejecting the preset and editing the recipe", as("")}, + {"the preset's target", as("the preset's batch")}, + {"target %d", as("Batch %d")}, + {"{a} {setting} is how many files this target produces, so it is read exactly as written", as("the number of files is read exactly as written")}, + {"use {a} {setting} of %d or less, or split the target across several recipes", as("ask for %d or fewer, or split the files across several runs")}, + {"or delete the target", as("or remove the batch")}, + {"a dry run", ButtonPreview}, + + // What to type, said as what goes in a box rather than as a line of the + // file. + {"for example id: invoices", as("such as invoices")}, + {`add format: txt, or run "tfg formats" to see the whole list`, func() string { return "choose one under " + FieldFormat() }}, + {"add format: pdf", func() string { return "choose one under " + FieldFormat() }}, + {"add size: 2mb, size-range: 1kb-8kb, a boundary, contains, or a plain number of bytes", func() string { + return "type a size such as 2mb, or choose another way under " + FieldSizeWay() + }}, + {"add size: 2mb", as("type a size such as 2mb")}, + {"such as count: 10", as("such as 10")}, + {"such as seed: 20260802", as("such as 20260802")}, + {"use boundary: 10mb", as("use a limit such as 10mb")}, + {"use size-range: 1kb-8kb", as("use a range such as 1kb-8kb")}, + {"use count: 50", as("use a whole number such as 50")}, + {"use count: 0 for a group that contributes nothing, or drop the entry", as("ask for 0 or more, or remove the entry")}, + {"add outcome: accept, reject, sanitize or unspecified", func() string { return "choose one under " + FieldExpected() }}, + {"ask for compression: none", func() string { return "set " + setTo("compression", "none") }}, + {"or for compression: none", func() string { return "or set " + setTo("compression", "none") }}, + {"timestamps=fixed puts them", func() string { + return SettingLabel("timestamps") + " set to " + ChoiceName("timestamps", "fixed") + " puts them" + }}, + {"so this needs bom=true or encoding=%s", func() string { + return "so this needs " + SettingLabel("bom") + " " + SwitchState(true) + ", or " + SettingLabel("encoding") + " set to %s" + }}, + {"leave the line out", as("leave the box empty")}, + {"remove the line", as("empty the box")}, + + // A command to run, said as the place on the screen that does the same. + {"use tfg tool checksum for the one file", func() string { return "use the tool " + toolNamed("checksum") + " for the one file" }}, + {"with tfg tool checksum-check", func() string { return "with the tool " + toolNamed("checksum-check") }}, + {`run "tfg preset show %s" for what it takes`, func() string { return "choose %s on " + TabPresets() + " to see what it takes" }}, + {"Use the version of tfg that wrote it", as("Use the version of this program that wrote it")}, + {"A recipe is a document somebody writes, and reading time grows with its size, so an unbounded one is a way to hang a build. " + + "Split it into several recipes, or generate the targets with a loop in your own script", as( + "Reading time grows with the size of what is asked for, so the size is limited. Shorten what the boxes hold, or split the batches across several runs")}, + + // Last, the word every sentence about a target has. + {"targets", as("batches")}, + {"target", as("batch")}, +} + +// InTheScreensWords is a layout of the engine's with the recipe's words said as +// the English window says them. Only a whole word or phrase is replaced, never +// part of a longer word. +func InTheScreensWords(layout string) string { + for _, p := range inTheScreensWords { + if wholeIndex(layout, p.recipe) >= 0 { + layout = replaceWhole(layout, p.recipe, p.screen()) + } + } + return layout +} + +// replaceWhole replaces every old in s that stands as a whole: no letter or +// digit right before it or right after it. +func replaceWhole(s, old, with string) string { + var b strings.Builder + for i := wholeIndex(s, old); i >= 0; i = wholeIndex(s, old) { + b.WriteString(s[:i]) + b.WriteString(with) + s = s[i+len(old):] + } + b.WriteString(s) + return b.String() +} + +// wholeIndex is where old first stands as a whole in s, and -1 where it does +// not. +func wholeIndex(s, old string) int { + from := 0 + for { + i := strings.Index(s[from:], old) + if i < 0 { + return -1 + } + i += from + end := i + len(old) + if (i == 0 || !wordByte(s[i-1])) && (end == len(s) || !wordByte(s[end])) { + return i + } + from = i + 1 + } +} + +// wordByte is a byte that belongs to a word: a letter or a digit of ASCII. A +// layout's own words are ASCII (D9), so a letter outside it never stands +// against a phrase. +func wordByte(c byte) bool { + return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' +} + +// RecipePhrases is every phrase of the recipe the English window rewords, for +// the guard that holds each to rewording some sentence. +func RecipePhrases() []string { + out := make([]string, len(inTheScreensWords)) + for i, p := range inTheScreensWords { + out[i] = p.recipe + } + return out +} diff --git a/internal/gui/text/registry.go b/internal/gui/text/registry.go index 357fbd65..77482d49 100644 --- a/internal/gui/text/registry.go +++ b/internal/gui/text/registry.go @@ -193,7 +193,9 @@ func Licence(notice string) string { // ChoiceName is what a list shows for one of its values. The value itself is // what a recipe, the command line and the manifest write, and what the list // hands back - only the words on the screen are the window's. -func ChoiceName(of, value string) string { return lookup(ChoiceKey(of, value), value) } +func ChoiceName(of, value string) string { + return lookup(ChoiceKey(of, value), EnglishChoice(of, value)) +} // ToolQuestion is the question a tool answers, which is its title. func ToolQuestion(id, english string) string { return lookup(ToolQuestionKey(id), english) } diff --git a/internal/gui/text/registrywords.go b/internal/gui/text/registrywords.go index 848cbad6..8e48620e 100644 --- a/internal/gui/text/registrywords.go +++ b/internal/gui/text/registrywords.go @@ -55,10 +55,12 @@ func RegistryWords() []RegistryWord { // the manifest": what the system under test should do, and the rule tested. func (w registryWords) lists() { for _, o := range recipe.Outcomes() { - w.add(ChoiceKey(recipe.KeyExpected, o), o, "One entry of the list of what the system under test should do with a file. The manifest writes the value itself.") + w.add(ChoiceKey(recipe.KeyExpected, o), EnglishChoice(recipe.KeyExpected, o), + "One entry of the list of what the system under test should do with a file. The manifest writes "+o+".") } for _, r := range recipe.Reasons() { - w.add(ChoiceKey(recipe.KeyExpectedReason, r), r, "One entry of the list of the rule a file tests. The manifest writes the value itself.") + w.add(ChoiceKey(recipe.KeyExpectedReason, r), EnglishChoice(recipe.KeyExpectedReason, r), + "One entry of the list of the rule a file tests. The manifest writes "+r+".") } } @@ -123,7 +125,8 @@ func (w registryWords) settings(owner Owner, whose string, declared []format.Pro w.add(GroupKey(owner, p.Group), p.Group, "The heading over a block of settings of "+whose+".") w.add(ShapeKey(p.Shape), p.Shape, "What the text in a box has to look like, in the sentence under it.") for _, c := range p.Choices { - w.add(ChoiceKey(p.Name, c), c, "One entry of the "+p.Name+" list, as the list shows it. A recipe and the command line write the value itself, so a token such as utf-8, a4, sha256 or 644 stays as it is.") + w.add(ChoiceKey(p.Name, c), EnglishChoice(p.Name, c), "One entry of the "+p.Name+" list, as the list shows it. A recipe and the command line write "+c+ + ", so a token such as utf-8, a4, sha256 or 644 stays as it is.") } w.unit(p.Unit) } diff --git a/internal/gui/text/said.go b/internal/gui/text/said.go index a1b2d445..c3b14866 100644 --- a/internal/gui/text/said.go +++ b/internal/gui/text/said.go @@ -22,10 +22,12 @@ import ( // a number - so a translation cannot change what a value looks like, only the // words around it. // -// No entry, or a window in English, is the sentence exactly as the window -// showed it before any of this existed. That is not a courtesy: the stored -// pictures of every screen hold the English window to its old self, which is -// the proof this layer changed nothing there. +// No entry, or a window in English, is the command line's English in the +// screen's words (englishWindow): a value of a list by its name, a setting by +// its label, and the recipe's words in the layout by what the screen calls the +// same things (recipewords.go). The values are the command line's to the byte, +// which TestTheEnglishWindowRewordsOnlyNamesAndLabels holds across every kind +// of value. // SaidFolder is where the engine's sentences are kept, inside the folder of // the window's catalogue. Its en.json is written for a translator by the guard @@ -33,12 +35,17 @@ import ( const SaidFolder = "said" // Refusal is an error in the window's language, naming the setting it is about -// by the label above that setting's box. An empty label names it by its recipe +// by the label above that setting's box. With no box - a refusal at the foot of +// the form - a setting of a format is named by its own label, and two refused +// together by both (settingWithoutABox). Anything else is named by its recipe // key, which is what a refusal at the foot of the form has always done. func Refusal(err error, label string) string { if err == nil { return "" } + if label == "" { + label = settingWithoutABox(err) + } var said interface{ Said() core.Said } if errors.As(err, &said) { if out, ok := translated(said.Said(), label); ok { @@ -52,22 +59,78 @@ func Refusal(err error, label string) string { return systemIn(err) } -// inEnglish is a refusal the way the window has always shown it. +// inEnglish is a refusal in English: the command line's sentence with the +// setting named by the label above its box, and every value of a list and +// every setting it names in the words the window shows them in - see +// core.Wording. A refusal that cannot be reworded is its own text. +// +// The label is asked of whatever the error wraps, the way the window always +// placed a refusal under its box. Without a label, what it wraps is reworded +// only where its text is the whole of the error's - the engine addresses a +// format's refusal to its batch without adding a word, and anything that does +// add one keeps it. func inEnglish(err error, label string) string { - var reworded interface{ InTheWordsOf(string) string } - if label != "" && errors.As(err, &reworded) { - return reworded.InTheWordsOf(label) + var reworded interface { + Reworded(string, core.Wording) string + } + if errors.As(err, &reworded) { + if label != "" { + return reworded.Reworded(label, englishWindow{}) + } + if inner, isErr := reworded.(error); isErr && inner.Error() == err.Error() { + return reworded.Reworded("", englishWindow{}) + } + } + var said interface{ Said() core.Said } + if errors.As(err, &said) && said.Said().String() == err.Error() { + return said.Said().Reworded("", englishWindow{}) } return err.Error() } +// settingWithoutABox is the setting a refusal of a format's setting is about, +// in the window's words, for a refusal no box on the screen stands for - two +// settings refused together are keyed "level_mix and entry_format", which no +// box is. Without it the slot takes the recipe key in English, and nothing at +// all in a translation, whose sentence has no key to fall back on. Empty for +// any other refusal, which keeps the key it always had. +func settingWithoutABox(err error) string { + var named interface{ SettingSaid() core.Said } + if !errors.As(err, &named) { + return "" + } + return Sentence(named.SettingSaid()) +} + +// englishWindow is how the English window says the engine's sentences where it +// does not say them as the command line does - see core.Wording. +type englishWindow struct{} + +// Layout is a sentence's layout with the recipe's words in the screen's - see +// recipewords.go. +func (englishWindow) Layout(layout string) string { return InTheScreensWords(layout) } + +// Word is a value of a list by the name its menu shows, and a setting by the +// label above its box. +func (englishWindow) Word(v any) (string, bool) { + switch v := v.(type) { + case core.Choice: + return ChoiceName(v.Of, v.Value), true + case core.Term: + if name, isLabel := v.Setting(); isLabel { + return SettingLabel(name), true + } + } + return "", false +} + // Sentence is one of the engine's sentences that is not a refusal - a note a // run left - in the window's language. func Sentence(s core.Said) string { if out, ok := translated(s, ""); ok { return out } - return s.String() + return s.Reworded("", englishWindow{}) } // Line is a note a run left about itself, as a line of its own on the screen. @@ -143,6 +206,9 @@ func valueIn(v any, directive, label string) string { case core.Choice: return ChoiceName(v.Of, v.Value) case core.Term: + if name, isLabel := v.Setting(); isLabel { + return SettingLabel(name) + } return lookup(v.Key, v.Text) case error: return Refusal(v, label) diff --git a/internal/gui/text/screens.go b/internal/gui/text/screens.go index 121da874..1625951b 100644 --- a/internal/gui/text/screens.go +++ b/internal/gui/text/screens.go @@ -23,8 +23,11 @@ import ( // The thing it does that they do not is the manifest, and the manifest was // named on no work screen at all: not in the form, not after a run. Named // here it costs a clause on a line that was already there. +// +// It names no size, because a range and Smallest both give the files of one +// batch different sizes, and "one size" would be untrue of either. func SubtitleGenerate() string { - return say("SubtitleGenerate", "Files of one format and one size, with a manifest that says how the system under test should react to them.") + return say("SubtitleGenerate", "Files of one format, with a manifest that says how the system under test should react to them.") } func SubtitlePreset() string { @@ -75,10 +78,16 @@ func SectionHowToUse() string { return say("SectionHowToUse", "How to use it") } // A list of sentences rather than one paragraph per step: the window draws // these as the bullets the preset screen already uses for what a set // typically finds, so the three steps are read at a glance rather than read. +// +// The tabs, the buttons and the field are named by their own words rather than +// spelled here, so a renamed tab cannot leave these steps sending somebody to +// a screen the window no longer has. func HowToUseSteps() []string { return []string{ - say("HowToUseChoose", "Choose a preset, or fill in one batch on the first screen."), - say("HowToUsePress", "Press Generate. The files and a manifest land in the output folder."), + sayf("HowToUseChoose", "Choose a preset on {{.Presets}}, or describe the files yourself on {{.Single}} or {{.Several}}.", + map[string]any{"Presets": TabPresets(), "Single": TabOneTarget(), "Several": TabRecipe()}), + sayf("HowToUsePress", "Press {{.Preview}} to see what would be written, then {{.Generate}}. The files and a manifest go into the folder named in {{.OutputDir}}.", + map[string]any{"Preview": ButtonPreview(), "Generate": ButtonGenerate(), "OutputDir": FieldOutputDir()}), say("HowToUseRead", "Point your test at the manifest. For every file it says what the system under test should do with it - accept it, reject it or sanitize it - or records the outcome as unspecified, where the right answer belongs to the application's own policy."), } } @@ -218,25 +227,31 @@ func HintPreset() string { return say("HintPreset", "What you are testing.") // the field cannot show. The button is still there, carrying the line that says // what the setting does. func DetailSize() string { - return say("DetailSize", "Units count in 1024s, so 10mb is 10485760 bytes. A plain number is a count of bytes. smallest makes a picture with its width and height set as small as it can be.") + return say("DetailSize", "Units count in 1024s, so `10mb` is 10485760 bytes. A plain number is a count of bytes.") } func DetailTargetID() string { return say("DetailTargetID", "It reaches the manifest and the file names, so a test can tell these files from the rest of the run. The seeds are derived from it, so changing it changes the bytes.") } func DetailNameTemplate() string { - return say("DetailNameTemplate", "Left empty, the files are named after the batch and numbered, like invoices_0001.pdf. Fill it in and the name is used exactly as written, extension and all. The one placeholder is {index:04}, which becomes 0001, 0002 and so on, and a batch of more than one file needs it.") + return say("DetailNameTemplate", "Left empty, the files are named after the batch and numbered, like invoices_0001.pdf. Fill it in and the name is used exactly as written, extension and all. The one placeholder is `{index:04}`, which becomes 0001, 0002 and so on, and a batch of more than one file needs it.") } func DetailOutputDir() string { return say("DetailOutputDir", "It is created if it is not there.") } func DetailSeed() string { - return say("DetailSeed", "On any machine and in any build of this tool. 0 is the seed a run uses when nobody asks for another one. It is a seed like any other rather than a request for random files, which this tool never produces.") + return say("DetailSeed", "On any machine. A new version of this tool may change them, and its release notes then say so. `0` is the seed a run uses when nobody asks for another one. It is a seed like any other rather than a request for random files, which this tool never produces.") } + +// DetailLabel lists what the label carries, because a picture and a film carry +// less than the rest: their label names no size (format.Request.PictureLabel). func DetailLabel() string { - return say("DetailLabel", "Writes into the file what it is and how big it was meant to be. Turn it off for a file that has to hold nothing but its content.") + return say("DetailLabel", "Writes into each file what it is - its format, its seed, any damage and, except in a picture or a film, its size. Turn it off for a file that has to hold nothing but its content.") } func DetailNumberIfTaken() string { return say("DetailNumberIfTaken", "When the output directory already holds an earlier run, this run is added beside it. Its files and its manifest get a number in their names, such as files-2_0001.pdf, and nothing already there changes. Turned off, a run into such a directory is refused, so every run needs a directory of its own.") } -func DetailPreset() string { return say("DetailPreset", "The set is worked out from the answer.") } +func DetailPreset() string { + return sayf("DetailPreset", "Each preset is a ready-made set of files for the question it names. Its files are made from the values under {{.Settings}}.", + map[string]any{"Settings": SectionSettings()}) +} // PlaceholderNameTemplate stands in the empty name box. It shows the answer // rather than describing it, because a name template is easier recognised than @@ -311,6 +326,15 @@ func UseSmallestSize(size string) string { return sayf("UseSmallestSize", "Use the smallest size, {{.Size}}", map[string]any{"Size": size}) } +// UseSmallestForEach is the second button under the same refusal, for a batch +// of more than one picture with their width and height known. It puts smallest +// into the box, so each picture comes out as small as it can be - at a size of +// its own, which is what tells it apart from the button above it. One picture +// gets no such button, because there the two make the same file. +func UseSmallestForEach() string { + return say("UseSmallestForEach", "Make each picture as small as it can be") +} + // PlaceholderLeftEmpty stands in a format setting that has a declared default, // showing what happens if the field is not touched. // @@ -407,6 +431,17 @@ func AllowedOneOf(values []string) string { return sayf("AllowedOneOf", "one of: {{.Values}}", map[string]any{"Values": strings.Join(values, ", ")}) } func AllowedTrueOrFalse() string { return say("AllowedTrueOrFalse", "true or false") } + +// SwitchState is the state of a switch in words, for the places the window +// says it rather than draws it: the line a folded section shows, and the +// state a switch starts in. A recipe writes true and false, and a switch on +// the screen is neither. +func SwitchState(on bool) string { + if on { + return say("SwitchOn", "on") + } + return say("SwitchOff", "off") +} func AllowedSize() string { return say("AllowedSize", "a size such as 2mb, or a plain byte count") } @@ -426,7 +461,7 @@ func AllowedWithDefault(what, value string) string { } // AllowedJointly is format.JointLimit.Describe in the window's language. Of and -// By are the keys a recipe writes, as they are in English. +// By are the labels of the two settings, as the boxes above the note say them. func AllowedJointly(of, by string, most int64, unit, why string) string { return sayf("AllowedJointly", "{{.Of}} times {{.By}} cannot pass {{.Max}} {{.Unit}}, because {{.Why}}", map[string]any{"Of": of, "By": by, "Max": most, "Unit": unit, "Why": why}) @@ -503,47 +538,12 @@ func ContentsHeading() string { return say("ContentsHeading", "Files inside each // surprise. func FieldSizeRange() string { return say("FieldSizeRange", "Size range") } func FieldBoundary() string { return say("FieldBoundary", "Limit to test") } - -// The three ways of saying how big, as one control that allows one of them. -// -// They were three boxes side by side until 2026-08-25, with a sentence above -// them saying that only one may be filled in - which is O114, and it was a -// sentence because the screen let somebody fill in two and find out at the -// press of a button. A switch removes the state instead of describing it. -// -// The words differ from the labels below them on purpose. A switch reading -// "Size" above a box reading "Size" is the same word twice in 40 px, and these -// say HOW the size is stated where the label says WHAT the box holds. -func SizeWayExact() string { return say("SizeWayExact", "One size") } -func SizeWayRange() string { return say("SizeWayRange", "A range") } -func SizeWayBoundary() string { return say("SizeWayBoundary", "Around a limit") } - -// FieldSizeWay names that switch, and until 2026-09-23 it had no name at all. -// -// It was the one control on the batch screen standing between two named -// fields with nothing over it, so what it was about came from where it sat - -// which is guessing, and which puts it outside the rule that every element -// belongs to something. The words say HOW the size is stated, where the -// label under it says WHAT the box holds, for the reason written above the -// three words themselves. -func FieldSizeWay() string { return say("FieldSizeWay", "How the size is given") } - -// DetailSizeWay says what each of the three does, and it is behind the button -// because it is read once. -// -// All three in one sentence each, deliberately: the line under a box explains -// only the way already chosen, so before choosing there is nothing on the -// screen that compares them - and "Around a limit" is both the least obvious -// of the three and the one this tool is really for. -func DetailSizeWay() string { - return say("DetailSizeWay", "One size gives every file the same size. A range draws a different size for each file. Around a limit makes three files: one byte under the limit, one on it, one over.") -} -func FieldGroup() string { return say("FieldGroup", "Kind of case") } -func FieldPurpose() string { return say("FieldPurpose", "Purpose") } -func FieldSendAs() string { return say("FieldSendAs", "Send as") } -func FieldExpected() string { return say("FieldExpected", "Expected outcome") } -func FieldReason() string { return say("FieldReason", "Rule being tested") } -func FieldManifest() string { return say("FieldManifest", "Manifest file name") } +func FieldGroup() string { return say("FieldGroup", "Kind of case") } +func FieldPurpose() string { return say("FieldPurpose", "Purpose") } +func FieldSendAs() string { return say("FieldSendAs", "Send as") } +func FieldExpected() string { return say("FieldExpected", "Expected outcome") } +func FieldReason() string { return say("FieldReason", "Rule being tested") } +func FieldManifest() string { return say("FieldManifest", "Manifest file name") } // The line under each of the recipe screen's own fields. func HintSizeRange() string { return say("HintSizeRange", "A different size for every file.") } @@ -565,10 +565,10 @@ func HintManifest() string { return say("HintManifest", "The record of what this // The longer explanation behind the button beside each of them. func DetailSizeRange() string { - return say("DetailSizeRange", "Two sizes with a hyphen, as 1kb-8kb. Each file gets its own size, drawn from the seed, so the run repeats.") + return say("DetailSizeRange", "Two sizes with a hyphen, as `1kb-8kb`. Each file gets its own size, drawn from the seed, so the run repeats.") } func DetailBoundary() string { - return say("DetailBoundary", "Give the limit your system declares, as 10mb. Units count in 1024s, and the run prints the number it used.") + return say("DetailBoundary", "Give the limit your system declares, such as `10mb`. Units count in 1024s, so `10mb` is 10485760 bytes.") } func DetailPurpose() string { return say("DetailPurpose", "It is written into the manifest and into the instructions beside it, which say what every file of the run is for. It changes no byte of any file.") @@ -579,8 +579,13 @@ func DetailSendAs() string { func DetailGroup() string { return say("DetailGroup", "It reaches the manifest, so a test can assert about a whole class of case at once.") } + +// DetailExpected says what the manifest records when the menu is left alone, +// which is the engine's answer rather than nothing: unspecified, or reject for +// a damage that certainly breaks the format (engine.expectationFor). func DetailExpected() string { - return say("DetailExpected", "It reaches the manifest and nothing else reads it. Leave it alone where the right answer depends on the application's own policy.") + return sayf("DetailExpected", "Left at {{.NotStated}}, the manifest records the outcome as unspecified, or as reject for a file whose damage certainly breaks its format. Leave it at {{.NotStated}} where the right answer depends on the application's own policy.", + map[string]any{"NotStated": PlaceholderNotStated()}) } func DetailReason() string { return say("DetailReason", "From a closed list, so a report can group by reason. It names the rule in play whatever the outcome is - a file a byte under a size limit is expected to be accepted, and the rule in play is still the size limit. A reason needs an outcome beside it.") @@ -684,7 +689,7 @@ func SectionBase() string { return say("SectionBase", "Build on a preset") } // screen does not have. Pointed out by an outside review of #119. func NoteBase() string { return say("NoteBase", - "With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches are the whole recipe.") + "With the box ticked, the chosen preset's files come first and the batches below are added after them. Without it, the batches below are everything the run makes.") } // FieldBuildOnPreset names the switch that turns the section on. Off is the @@ -692,7 +697,7 @@ func NoteBase() string { func FieldBuildOnPreset() string { return say("FieldBuildOnPreset", "Start from a preset") } func DetailBuildOnPreset() string { return say("DetailBuildOnPreset", - "Unticked, the batches below are the whole recipe. Ticked, the chosen preset's files come first and the batches are added after them.") + "Unticked, the batches below are everything the run makes. Ticked, the chosen preset's files come first and the batches are added after them.") } // FieldBasePreset names the box choosing the preset to build on. A different diff --git a/internal/gui/text/sizeways.go b/internal/gui/text/sizeways.go new file mode 100644 index 00000000..cfbbcd8a --- /dev/null +++ b/internal/gui/text/sizeways.go @@ -0,0 +1,83 @@ +package text + +import "strings" + +// The ways a size can be given on the batch screens - one size, a range, +// around a limit, smallest - as the switch names them, the label over it, and +// the sentence explaining each. + +// The three ways of saying how big, as one control that allows one of them. +// +// They were three boxes side by side until 2026-08-25, with a sentence above +// them saying that only one may be filled in - which is O114, and it was a +// sentence because the screen let somebody fill in two and find out at the +// press of a button. A switch removes the state instead of describing it. +// +// The words differ from the labels below them on purpose. A switch reading +// "Size" above a box reading "Size" is the same word twice in 40 px, and these +// say HOW the size is stated where the label says WHAT the box holds. +func SizeWayExact() string { return say("SizeWayExact", "One size") } +func SizeWayRange() string { return say("SizeWayRange", "A range") } +func SizeWayBoundary() string { return say("SizeWayBoundary", "Around a limit") } + +// SizeWaySmallest is the fourth way, offered for pictures only since +// 2026-11-17: each picture as small as its format makes it. It was a word to +// type into the size box before that, and the owner could not find it. +func SizeWaySmallest() string { return say("SizeWaySmallest", "Smallest") } + +// FieldSizeWay names that switch, and until 2026-09-23 it had no name at all. +// +// It was the one control on the batch screen standing between two named +// fields with nothing over it, so what it was about came from where it sat - +// which is guessing, and which puts it outside the rule that every element +// belongs to something. The words say HOW the size is stated, where the +// label under it says WHAT the box holds, for the reason written above the +// three words themselves. +func FieldSizeWay() string { return say("FieldSizeWay", "How the size is given") } + +// What each way of giving the size does, one sentence each, behind the button +// beside the switch because it is read once. +// +// One sentence per way, deliberately: the line under a box explains only the +// way already chosen, so before choosing there is nothing on the screen that +// compares them - and "Around a limit" is both the least obvious of them and +// the one this tool is really for. +// +// Separate sentences rather than one paragraph since 2026-11-17, because the +// switch no longer offers the same ways everywhere: smallest is offered for +// pictures only, and the single batch screen offers two ways of the four. A +// paragraph naming a way the switch beside it does not have sends somebody +// looking for it. See DetailSizeWays. +func SaysSizeWayExact() string { + return say("SaysSizeWayExact", "One size gives every file the same size.") +} +func SaysSizeWayRange() string { + return say("SaysSizeWayRange", "A range draws a different size for each file.") +} +func SaysSizeWayBoundary() string { + return say("SaysSizeWayBoundary", "Around a limit makes three files: one byte under the limit, one on it, one over.") +} +func SaysSizeWaySmallest() string { + return say("SaysSizeWaySmallest", "Smallest makes each picture as small as it can be at its width and height, so the files come out at different sizes. It can be chosen once both are set in the format's settings.") +} + +// SmallestNeedsTheSides is why Smallest cannot be chosen yet, opened by the +// pointer over it. The second sentence of SaysSizeWaySmallest says the same +// for somebody who reached the switch by keyboard and has no pointer to hover +// with. +func SmallestNeedsTheSides() string { + return say("SmallestNeedsTheSides", "Smallest needs the picture's width and height. Set both in the format's settings first.") +} + +// DetailSizeWays is the explanation of a switch offering these ways, from the +// sentences of the ways it offers. +func DetailSizeWays(sentences []string) string { return strings.Join(sentences, " ") } + +// SmallestCaption stands under a size box holding smallest, where the count of +// bytes stands under a number. There is no number to count until the run has +// planned each picture, so it says when there will be one and what it comes +// from - the width and height, which sit folded away in the format's +// settings, and a picture without them is refused. +func SmallestCaption() string { + return say("SmallestCaption", "Known after Preview, from the width and height in the format's settings.") +} diff --git a/internal/gui/text/text.go b/internal/gui/text/text.go index 91429498..aa9b99ce 100644 --- a/internal/gui/text/text.go +++ b/internal/gui/text/text.go @@ -246,7 +246,7 @@ func RunHoldsMoreThanItsMemory(holds, room string) string { // instant. It says so rather than leaving the screen looking idle while both // buttons are greyed out with no explanation. func WorkingOutTheCost() string { - return say("WorkingOutTheCost", "Working out what this would cost...") + return say("WorkingOutTheCost", "Working out the files and their sizes...") } // Progress is the line under the bar during a run. Bytes as well as files, diff --git a/internal/gui/wheel_other.go b/internal/gui/wheel_other.go new file mode 100644 index 00000000..6d016975 --- /dev/null +++ b/internal/gui/wheel_other.go @@ -0,0 +1,12 @@ +//go:build !windows + +package gui + +// SystemWheelLines has nothing to give away from Windows, and says so. Linux +// desktops have no setting for it that a program can ask, and on macOS the +// toolkit's own wheel is kept (parts/wheel_darwin.go), so the window's default +// stands. +// +// A stub rather than a build tag at the call site, so run_cgo.go reads the +// same on every system - the arrangement of PreferDarkMenus. +func SystemWheelLines() (int, bool) { return 0, false } diff --git a/internal/gui/wheel_windows.go b/internal/gui/wheel_windows.go new file mode 100644 index 00000000..c98f810a --- /dev/null +++ b/internal/gui/wheel_windows.go @@ -0,0 +1,42 @@ +//go:build windows + +package gui + +import ( + "syscall" + "unsafe" +) + +// What SystemParametersInfoW is asked, and the answer that means a whole +// screen at a time rather than a number of lines (WHEEL_PAGESCROLL, UINT_MAX). +const ( + spiGetWheelScrollLines = 0x0068 + wheelPageScroll = 0xFFFFFFFF +) + +// systemParametersInfo is user32.dll by name, allowed for the reason +// dialog_windows.go gives: it is a KnownDLL, so the loader hands back the +// module already mapped without consulting any search order. Lazy, so nothing +// is loaded until the wheel is first turned. +var systemParametersInfo = syscall.NewLazyDLL("user32.dll").NewProc("SystemParametersInfoW") + +// SystemWheelLines is how many lines Windows is set to scroll for one notch +// of the mouse wheel - Settings, Bluetooth and devices, Mouse, "Lines to +// scroll at a time" - and -1 when it is set to a whole screen at a time. +// false when the system did not answer, and the window's default stands. +// +// Asked at every notch rather than once, so a change in Settings reaches a +// window that is already open, as it reaches every other program. One call +// into a library already loaded, a few microseconds, against a notch that +// costs a frame to draw. +func SystemWheelLines() (int, bool) { + var lines uint32 + ok, _, _ := systemParametersInfo.Call(spiGetWheelScrollLines, 0, uintptr(unsafe.Pointer(&lines)), 0) + switch { + case ok == 0: + return 0, false + case lines == wheelPageScroll: + return -1, true + } + return int(lines), true +} diff --git a/internal/gui/window/about.go b/internal/gui/window/about.go index 89396d5b..6c0572e5 100644 --- a/internal/gui/window/about.go +++ b/internal/gui/window/about.go @@ -103,7 +103,7 @@ func About(h Host) fyne.CanvasObject { // start and this one did not need while it held four paragraphs. It holds // the list of what the binary carries now, and a licence notice that cannot // be read to the end is the one kind of notice that fails at its only job. - return container.NewVScroll(page) + return parts.VScroll(page) } // linkCard is a card whose button leads out of the program: what pressing it diff --git a/internal/gui/window/dropping.go b/internal/gui/window/dropping.go index a60f143c..dc2d8baf 100644 --- a/internal/gui/window/dropping.go +++ b/internal/gui/window/dropping.go @@ -7,7 +7,6 @@ import ( "unicode/utf8" "fyne.io/fyne/v2" - "fyne.io/fyne/v2/container" "github.com/donislawdev/TestingFilesGenerator/internal/core" "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" @@ -32,7 +31,7 @@ type dropScreen struct { fields *parts.Fields busy *busy sections *sections - scroll *container.Scroll + scroll *parts.Scroll // unfold opens whatever the screen put a box away inside. Nil on a screen // that folds nothing of its own. unfold func(string) @@ -247,7 +246,7 @@ func (d *dropping) land(screen dropScreen, items []DroppedItem, at fyne.Position // Where each one stands is asked only when there are two or more, because only // then is the position read at all - and asking the toolkit where something is // walks the whole canvas. -func boxesOf(targets []parts.PathTarget, scroll *container.Scroll) []DropBox { +func boxesOf(targets []parts.PathTarget, scroll *parts.Scroll) []DropBox { boxes := make([]DropBox, len(targets)) for i, t := range targets { boxes[i].Takes = t.Takes @@ -264,7 +263,7 @@ func boxesOf(targets []parts.PathTarget, scroll *container.Scroll) []DropBox { // The toolkit answers nought for a control it did not find on a visible // canvas, which is a control folded away. A box at the very corner of the // window would read the same, and none stands there: the tabs do. -func areaOf(o fyne.CanvasObject, scroll *container.Scroll) Area { +func areaOf(o fyne.CanvasObject, scroll *parts.Scroll) Area { driver := fyne.CurrentApp().Driver() at := driver.AbsolutePositionForObject(o) if at.IsZero() || !o.Visible() { diff --git a/internal/gui/window/generate.go b/internal/gui/window/generate.go index ed20d69b..538761b9 100644 --- a/internal/gui/window/generate.go +++ b/internal/gui/window/generate.go @@ -191,6 +191,7 @@ type Generate struct { formatPick *parts.Chooser size *parts.Entry + sizing singleSizing count *parts.Entry id *parts.Entry name *parts.Entry @@ -281,7 +282,7 @@ func NewGenerate(host Host, links ...fyne.CanvasObject) *Generate { nil, g.footer(rail(append(outwardButtons(host), links...)...)), nil, nil, - (g.keepScroll(container.NewVScroll(parts.Screen( + (g.keepScroll(parts.VScroll(parts.Screen( parts.Titled(text.TabOneTarget(), text.SubtitleGenerate()), g.settingsSection()..., )))), @@ -297,6 +298,8 @@ func NewGenerate(host Host, links ...fyne.CanvasObject) *Generate { // Said last, once every box it reads exists. g.runner.destination = g.OutDir + g.runner.follow = g.holdSmallest + g.holdSmallest() g.runner.refreshLine() // A host that wants to wait for work in flight is told how, here as well // as in Open. A screen built on its own - which is how most of the @@ -355,6 +358,7 @@ func (g *Generate) buildFields() { g.damage.pick.SetSelected(text.DamageNone()) g.size = entry(startingSize, "") + g.sizing.build(g.size) g.count = entry("1", "") g.id = entry(startingBatchName, "") g.name = entry("", text.PlaceholderNameTemplate) @@ -409,7 +413,10 @@ func (g *Generate) settingsSection() []fyne.CanvasObject { // In the grid's columns since the prototype of 2026-09-23 // (parts.Grid): the format, how big, how many and whether damaged // share one row of four, then what the group is called and what - // the files are called. + // the files are called. For a picture the way of giving the size + // stands before its box since 2026-11-17, and damaged moves to the + // second row. + g.sizing.namedIn(g.fields, g.tips), add(format.SettingSize, text.FieldSize(), text.HintSize(), g.tips.Say(text.DetailSize()), parts.Numeric(g.size)), add(engine.SettingCount, text.FieldCount(), "", parts.NoDetail, parts.Numeric(g.count)), @@ -446,6 +453,7 @@ func (g *Generate) onFormatChosen(id string) { } g.propBox.RemoveAll() g.props = nil + g.sizing.offerFor(id) // The fields of the format that was chosen before this one go with their // boxes. Left in the registry they would be places a refusal could still be // put, under widgets no longer on the screen. @@ -597,21 +605,13 @@ func (g *Generate) chosenDamage() damage.Chain { // Only what was stated, and it matters here more than anywhere: this section // arrives folded, so a value somebody typed and then had swallowed would be a // setting they cannot see and did not remove. -func (g *Generate) settingsSaid() string { - said := make([]string, 0, len(g.props)) - for _, f := range g.props { - // What was CHOSEN, not what the field started on. A menu opens on its - // default and so always has a value, and listing all of them turned - // this line into every setting the format declares - which for log, - // with seven, ran off the edge of the window. - if f.Chosen != nil && !f.Chosen() { - continue - } - if v := f.Value(); v != "" { - said = append(said, text.SettingSaid(text.SettingLabel(f.Name), v)) - } - } - return text.FoldedSummary(said...) +func (g *Generate) settingsSaid() string { return parts.SettingsSaid(g.props) } + +// holdSmallest holds Smallest back until the format's settings say how large +// the picture is - see holdSmallest in sizeword.go. After every change on the +// form, a new format included. +func (g *Generate) holdSmallest() { + holdSmallest(g.sizing.way, g.formatPick.Selected, g.properties(), g.tips) } // openFoldHolding opens the settings section when a refusal is about a box @@ -637,19 +637,9 @@ func (g *Generate) openFoldHolding(address string) { // properties is what the user put in the generated fields, under the keys the // format declared. An empty one is left out, because the registry reads a // missing key and an empty value as the same thing - not stated - and a format -// that works its own answer out has to be allowed to. -func (g *Generate) properties() map[string]string { - out := map[string]string{} - for _, f := range g.props { - if v := f.Value(); v != "" { - out[f.Name] = v - } - } - if len(out) == 0 { - return nil - } - return out -} +// that works its own answer out has to be allowed to. A hidden one says +// nothing - see parts.StatedValues. +func (g *Generate) properties() map[string]string { return parts.StatedValues(g.props) } // settle turns what is on the screen into what the engine takes. // diff --git a/internal/gui/window/generatesize.go b/internal/gui/window/generatesize.go new file mode 100644 index 00000000..d0838f9a --- /dev/null +++ b/internal/gui/window/generatesize.go @@ -0,0 +1,60 @@ +// How big, on the single batch screen: one size, or smallest for a picture. +package window + +import ( + "fyne.io/fyne/v2" + + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" +) + +// singleWays is what the single batch screen offers. Two of the four, because +// this screen is one batch of one size: a range and a limit belong to the +// batch screen, which says how each of them is written. +var singleWays = []sizeWay{wayExact, waySmallest} + +// singleSizing is the switch between one size and smallest, with its name, and +// what keeps it in step with the size box. +// +// The switch is shown for pictures only. One way on a switch is not a choice, +// so for any other format the box stands alone the way it always has. +// +// Added on 2026-11-17 because the owner could not find smallest: it was a word +// to type into the size box, named only in the explanation behind the button +// beside it. +type singleSizing struct { + way *parts.Segments + word *smallestWord + named fyne.CanvasObject +} + +// build makes the switch and ties it to the box, before the box is registered +// as a field - see newSmallestWord. +func (s *singleSizing) build(box *parts.Entry) { + s.way = parts.NewSegments(wayNames(singleWays), nil) + s.word = newSmallestWord(box, s.way) + // Nothing else to do on a change: the box changes with it, and the box is + // a field the live check and the line at the foot already listen to. + s.way.OnChanged = s.word.chosen +} + +// namedIn puts the switch on the form under its name. +func (s *singleSizing) namedIn(fields *parts.Fields, tips *parts.Tips) fyne.CanvasObject { + s.named = fields.Named(text.FieldSizeWay(), tips.Say(waysExplained(singleWays)), s.way) + return s.named +} + +// offerFor shows the switch for a format that takes smallest and hides it for +// one that does not. A switch hidden while on Smallest moves to one size and +// the box takes back its last size, for the reason smallestWord.offer gives. +func (s *singleSizing) offerFor(formatID string) { + s.word.offer(waysFor(singleWays, formatID)) + if s.named == nil { + return + } + if takesSmallest(formatID) { + s.named.Show() + return + } + s.named.Hide() +} diff --git a/internal/gui/window/opening.go b/internal/gui/window/opening.go index 30909232..4fa20fe4 100644 --- a/internal/gui/window/opening.go +++ b/internal/gui/window/opening.go @@ -2,7 +2,6 @@ package window import ( "fyne.io/fyne/v2" - "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/theme" "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" @@ -122,6 +121,6 @@ func firstOpening(tabbed *fyne.Container, first unscrolled) fyne.Size { // bar and forgetting the tab strip said "fits" for a screen whose last field // was cut off. Whatever stands above and below the scroll has taken its share // in the screen's MinSize already. -func unscrolledHeight(body fyne.CanvasObject, scroll *container.Scroll) float32 { +func unscrolledHeight(body fyne.CanvasObject, scroll *parts.Scroll) float32 { return body.MinSize().Height - scroll.MinSize().Height + scroll.Content.MinSize().Height } diff --git a/internal/gui/window/preferences.go b/internal/gui/window/preferences.go index 35eed816..ff0bd5b8 100644 --- a/internal/gui/window/preferences.go +++ b/internal/gui/window/preferences.go @@ -85,7 +85,7 @@ func NewPreferences(h Host, leave func(), busy func() bool) *Preferences { ) p.memory = newMemoryPreference(h) page := parts.Screen(parts.Titled(text.TabPreferences(), text.SubtitlePreferences()), language, p.memory.object, remembered) - p.object = container.NewVScroll(page) + p.object = parts.VScroll(page) return p } diff --git a/internal/gui/window/preset.go b/internal/gui/window/preset.go index e32f0fb6..2357ef2c 100644 --- a/internal/gui/window/preset.go +++ b/internal/gui/window/preset.go @@ -102,7 +102,7 @@ func NewPreset(host Host, links ...fyne.CanvasObject) *Preset { nil, p.footer(rail(append(outwardButtons(host), links...)...)), nil, nil, - (p.keepScroll(container.NewVScroll(parts.Screen( + (p.keepScroll(parts.VScroll(parts.Screen( parts.Titled(text.TabPresets(), text.SubtitlePreset()), p.sections.section(sectionPreset, text.SectionPreset(), p.fields.Add(settingPreset, text.FieldPreset(), text.HintPreset(), @@ -171,7 +171,7 @@ func (p *Preset) onPresetChosen(id string) { // The question first, because it is the thing somebody chooses by. A list // of ids says nothing about which one answers what they came to ask. - p.about.Add(parts.Prose(text.PresetQuestion(chosen.ID, chosen.Question))) + p.about.Add(parts.Explanation(text.PresetQuestion(chosen.ID, chosen.Question))) // One line each rather than one sentence. Run together they are unreadable, // because the entries have commas inside them - "MB confused with MiB, diff --git a/internal/gui/window/recipe.go b/internal/gui/window/recipe.go index d0c62b72..4caa1fa1 100644 --- a/internal/gui/window/recipe.go +++ b/internal/gui/window/recipe.go @@ -114,6 +114,9 @@ type batch struct { // engine refuses unreachable rather than merely discouraged. sizeWay *parts.Segments sizeBoxes map[string]fyne.CanvasObject + // word keeps the box of one size and the switch's Smallest in step - see + // smallestWord. + word *smallestWord // folded is whether this batch is put away, and it is a plain bool on the // batch rather than state inside the panel because the panel is built again @@ -136,11 +139,10 @@ type batch struct { // notes is the other section, with its fold, as one piece - see batchNotes. notes batchNotes - // declared is what the chosen format takes, and props are the controls drawn - // from it. Both are replaced when the format changes and reused across a - // rebuild, for the reason above. - declared []format.Property - props []parts.PropertyField + // props are the controls drawn from what the chosen format takes, each + // with its declaration. Replaced when the format changes and reused across + // a rebuild, for the reason above. + props []parts.PropertyField contents []*content } @@ -202,7 +204,7 @@ func NewRecipe(host Host, links ...fyne.CanvasObject) *Recipe { nil, r.footer(rail(append(append(outwardButtons(host), parts.Divider(), r.addBtn), links...)...)), nil, nil, - (r.keepScroll(container.NewVScroll(parts.Screen(parts.Titled(text.TabRecipe(), text.SubtitleRecipe()), r.baseBox, r.batchBox, r.outBox)))), + (r.keepScroll(parts.VScroll(parts.Screen(parts.Titled(text.TabRecipe(), text.SubtitleRecipe()), r.baseBox, r.batchBox, r.outBox)))), )) // The format of the first batch has to be chosen for its declared settings @@ -219,6 +221,15 @@ func NewRecipe(host Host, links ...fyne.CanvasObject) *Recipe { // Said last, once every box it reads exists. r.runner.destination = r.OutDir + // Smallest held back on every batch whose settings do not say how large + // its picture is - see holdSmallest in sizeword.go. A closure rather than + // a method, because Recipe is one of the three types allowed past twenty + // methods and is near the ceiling. + r.runner.follow = func() { + for _, b := range r.batches { + b.holdSmallest(r.tips) + } + } r.runner.refreshLine() // A host that wants to wait for work in flight is told how, here as well // as in Open. A screen built on its own - which is how most of the @@ -228,6 +239,13 @@ func NewRecipe(host Host, links ...fyne.CanvasObject) *Recipe { return r } +// holdSmallest holds Smallest back while this batch's settings do not say how +// large its picture is. After every change on the form, and as its panel is +// drawn. +func (b *batch) holdSmallest(tips *parts.Tips) { + holdSmallest(b.sizeWay, b.formatPick.Selected, parts.StatedValues(b.props), tips) +} + // Object is the screen, to put in the window. func (r *Recipe) Object() fyne.CanvasObject { return r.body } @@ -258,6 +276,7 @@ func (r *Recipe) newBatch() *batch { settingsFolded: true, } b.name.SetPlaceHolder(text.PlaceholderNameTemplate) + b.word = newSmallestWord(b.size, b.sizeWay) // What happens if the box is left alone, in the place a box says that. // // The single batch screen arrives with "files" and "1" typed into the same @@ -572,11 +591,15 @@ func (r *Recipe) onFormatChosen(b *batch, id string) { return } - b.declared = d.Properties b.props = make([]parts.PropertyField, 0, len(d.Properties)) for _, p := range d.Properties { b.props = append(b.props, parts.FromProperty(p)) } + // Before the rebuild rather than while the batch is drawn, because a + // switch losing Smallest moves to another way and its box changes - and + // that is reported to the live check, which must not run on a screen + // half registered. + b.word.offer(waysFor(batchWays, id)) r.rebuild() } @@ -689,17 +712,9 @@ func manifestName(stated string) string { // draft is one batch as text, ready to be composed into a document. func (b *batch) draft() recipe.TargetDraft { - props := map[string]string{} - for _, f := range b.props { - // An empty control means the setting was not stated, and a format that - // works its own answer out has to be allowed to. - if v := f.Value(); v != "" { - props[f.Name] = v - } - } - if len(props) == 0 { - props = nil - } + // An empty control means the setting was not stated, and a format that + // works its own answer out has to be allowed to. A hidden one says nothing. + props := parts.StatedValues(b.props) var inside []recipe.ContentDraft for _, c := range b.contents { diff --git a/internal/gui/window/recipebase.go b/internal/gui/window/recipebase.go index c5db5678..a2952f21 100644 --- a/internal/gui/window/recipebase.go +++ b/internal/gui/window/recipebase.go @@ -34,13 +34,12 @@ type base struct { on *parts.Toggle pick *parts.Chooser - // declared is what the chosen preset takes - its parameters and the - // globals it reads - and params are the controls drawn from it. Both are - // replaced when the preset changes and kept across a rebuild, for the + // params are the controls drawn from what the chosen preset takes - its + // parameters and the globals it reads - each with its declaration. + // Replaced when the preset changes and kept across a rebuild, for the // reason the batch's own props are: a rebuilt box has forgotten what was // typed into it. - declared []format.Property - params []parts.PropertyField + params []parts.PropertyField // owner is whose declaration they are, for the sentences under them in // another language - replaced with them. owner text.Owner @@ -99,7 +98,6 @@ func (b *base) choose(id string) error { settings := make([]format.Property, 0, len(chosen.Parameters)+len(chosen.Reads)) settings = append(settings, chosen.Parameters...) settings = append(settings, chosen.Globals()...) - b.declared = settings b.owner = text.PresetOwner(chosen.ID) b.params = make([]parts.PropertyField, 0, len(settings)) for _, p := range settings { @@ -135,17 +133,12 @@ func (b *base) rows(fields *parts.Fields, tips *parts.Tips) []fyne.CanvasObject } // parameterRows draws the chosen preset's parameters. +// +// Laid out by the call every other declaration goes through, under with. +// - the line a recipe writes the value on. See parts.DeclaredRows. func (b *base) parameterRows(fields *parts.Fields, tips *parts.Tips) []fyne.CanvasObject { - rows := make([]fyne.CanvasObject, 0, len(b.params)) - for i, f := range b.params { - d := b.declared[i] - if d.Kind == format.PropertySize { - fields.InBytes(recipe.KeyWith + "." + f.Name) - } - rows = append(rows, fields.Add(recipe.KeyWith+"."+f.Name, text.SettingLabel(f.Name), - parts.PropertyDetail(b.owner, d), tips.Say(text.SettingKey(f.Name)), parts.ShapedFor(d, f.Control))) - } - return rows + return parts.DeclaredRows(b.owner, b.params, fields, tips, + func(name string) string { return recipe.KeyWith + "." + name }) } // settingBuildOnPreset is the key the switch goes under. @@ -164,14 +157,5 @@ func (b *base) draft() (extends string, with map[string]string) { if !b.on.Checked { return "", nil } - with = map[string]string{} - for _, f := range b.params { - if v := f.Value(); v != "" { - with[f.Name] = v - } - } - if len(with) == 0 { - with = nil - } - return b.pick.Selected, with + return b.pick.Selected, parts.StatedValues(b.params) } diff --git a/internal/gui/window/recipefolds.go b/internal/gui/window/recipefolds.go index 57f7c5ec..fc246f5f 100644 --- a/internal/gui/window/recipefolds.go +++ b/internal/gui/window/recipefolds.go @@ -49,17 +49,11 @@ func (r *Recipe) declaredSettings(b *batch, at func(string) string) fyne.CanvasO return nil } - var out []fyne.CanvasObject owner := text.FormatOwner(b.formatPick.Selected) - for i, f := range b.props { - // Shaped here as well as on the single batch screen. The two draw the - // same declarations through different code, and only one of them was - // given the width on the first try - which is how a difference between - // two surfaces starts. - out = append(out, r.fields.Add(at(recipe.KeyProperties+"."+f.Name), text.SettingLabel(f.Name), - parts.PropertyDetail(owner, b.declared[i]), r.tips.Say(text.SettingKey(f.Name)), - parts.ShapedFor(b.declared[i], f.Control))) - } + // Laid out by the call the single batch screen's fields go through, under + // addresses naming this batch - see parts.DeclaredRows. + out := parts.DeclaredRows(owner, b.props, r.fields, r.tips, + func(name string) string { return at(recipe.KeyProperties + "." + name) }) // A rule binding two settings belongs beside them. Two number boxes drawn // from a range alone would offer a pair the run then refuses. if d, err := format.Get(b.formatPick.Selected); err == nil { @@ -189,22 +183,7 @@ func (r *Recipe) wire(fold *parts.Folding, folded *bool, say func() string) { // Only what was stated. A section folded from the start that swallowed a value // somebody typed would be a setting they cannot see and did not remove, which // is worse than the scrolling folding was meant to save. -func (b *batch) settingsSaid() string { - said := make([]string, 0, len(b.props)) - for _, f := range b.props { - // What was CHOSEN, not what the field started on. A menu opens on its - // default and so always has a value, and listing all of them turned - // this line into every setting the format declares - which for log, - // with seven, ran off the edge of the window. - if f.Chosen != nil && !f.Chosen() { - continue - } - if v := f.Value(); v != "" { - said = append(said, text.SettingSaid(text.SettingLabel(f.Name), v)) - } - } - return text.FoldedSummary(said...) -} +func (b *batch) settingsSaid() string { return parts.SettingsSaid(b.props) } // said is what the manifest notes say while they are away. func (n *batchNotes) said() string { diff --git a/internal/gui/window/recipesize.go b/internal/gui/window/recipesize.go index 7b622828..738fe84e 100644 --- a/internal/gui/window/recipesize.go +++ b/internal/gui/window/recipesize.go @@ -1,4 +1,4 @@ -// The three ways of saying how big, as one switch and one box. +// The ways of saying how big on the batch screen, as one switch and one box. // // Its own file because recipe.go was 426 lines of a 550 line ceiling when this // arrived, and TestNothingIsQuietlyCreepingTowardsTheCeiling said so the same @@ -15,7 +15,8 @@ import ( ) // sizeWayFor is the switch that chooses how this batch says how big, and the -// three boxes it chooses between. +// three boxes it chooses between - four ways, since smallest fills the box of +// one size (see smallestWord), and three for a format that is not a picture. // // All three are registered, and two of them are hidden. Registration is what // gives a box the address a refusal is placed by, the star, the count of bytes @@ -44,17 +45,19 @@ func (r *Recipe) sizeWayFor(b *batch, at func(string) string, r.tips.Say(text.DetailBoundary()), parts.Numeric(b.boundary)), } - names := sizeWayNames() // Assigned after the boxes exist, and on every rebuild, because a rebuild // makes new boxes for a switch that is kept. b.sizeWay.OnChanged = func(chosen string) { - key := sizeWayKey(chosen) + // The box first, so that what is shown and checked below is read off + // the box as the switch has just left it. + b.word.chosen(chosen) + key := wayNamed(batchWays, chosen).box b.showSizeWay(key) // A refusal about a box that is no longer sent is a refusal about // nothing. Taken back rather than left on a hidden box, where it would // wait to reappear the next time somebody came back to that way of // saying how big - and read as a complaint about what they just typed. - for _, other := range sizeWayKeys() { + for _, other := range sizeBoxKeys() { if other != key { r.fields.Clear(at(other)) } @@ -63,11 +66,18 @@ func (r *Recipe) sizeWayFor(b *batch, at func(string) string, } b.showSizeWay(b.chosenSizeKey()) - boxes := make([]fyne.CanvasObject, 0, len(names)) - for _, key := range sizeWayKeys() { + boxes := make([]fyne.CanvasObject, 0, len(b.sizeBoxes)) + for _, key := range sizeBoxKeys() { boxes = append(boxes, b.sizeBoxes[key]) } - named := r.fields.Named(text.FieldSizeWay(), r.tips.Say(text.DetailSizeWay()), b.sizeWay) + // Explained by the ways this batch's switch offers, so a batch of CSV is + // not told about a way it does not have. + explained := waysExplained(waysFor(batchWays, b.formatPick.Selected)) + named := r.fields.Named(text.FieldSizeWay(), r.tips.Say(explained), b.sizeWay) + // Asked as the panel is drawn as well as after every change, because a + // panel is drawn again - a batch added, copied or a format chosen - where + // nothing was typed. + b.holdSmallest(r.tips) // The switch and the box it leaves are cells of one row since the // prototype of 2026-09-23 - see parts.Grid. All three boxes go in, and // the grid skips the two that are hidden, so the one shown takes the @@ -84,39 +94,33 @@ func (r *Recipe) sizeWayFor(b *batch, at func(string) string, // first one. Found by the guard on its first run. // // A segmented switch since 2026-09-15, in place of three radio circles. One of -// the three is always chosen - there is no fourth state where nothing is - so -// nothing here has to ask for "required" the way the radio did: the switch -// opens on the first way and never has none. +// the ways is always chosen - there is no state where nothing is - so nothing +// here has to ask for "required" the way the radio did: the switch opens on +// the first way and never has none. +// +// It opens on the ways every format has. Smallest is added with the format, +// in onFormatChosen, which every batch goes through before it is drawn. func newSizeWaySwitch() *parts.Segments { - return parts.NewSegments(sizeWayNames(), nil) + return parts.NewSegments(wayNames(waysFor(batchWays, "")), nil) } -// The three ways, in one order, named once. The window shows the words and the -// recipe writes the keys, and neither list may drift from the other. -func sizeWayNames() []string { - return []string{text.SizeWayExact(), text.SizeWayRange(), text.SizeWayBoundary()} -} +// batchWays is every way of saying how big this screen offers, in the order +// the switch shows them. The window shows the words and the recipe writes the +// keys, and both come from this one list. +var batchWays = []sizeWay{wayExact, wayRange, wayBoundary, waySmallest} -func sizeWayKeys() []string { +// sizeBoxKeys is the boxes the ways leave on the screen, one each - smallest +// shares the box of one size. +func sizeBoxKeys() []string { return []string{recipe.KeySize, recipe.KeySizeRange, recipe.KeyBoundary} } -// sizeWayKey is the recipe key behind a word on the switch. -func sizeWayKey(chosen string) string { - for i, name := range sizeWayNames() { - if name == chosen { - return sizeWayKeys()[i] - } - } - return recipe.KeySize -} - -// chosenSizeKey is which way this batch is using. +// chosenSizeKey is which box this batch is using. func (b *batch) chosenSizeKey() string { if b.sizeWay == nil { return recipe.KeySize } - return sizeWayKey(b.sizeWay.Selected) + return wayNamed(batchWays, b.sizeWay.Selected).box } // showSizeWay leaves one box on the screen and takes the other two off it. @@ -168,7 +172,7 @@ func (b *batch) statedSize(key string) string { // setting that has one box like everything else. func (r *Recipe) readdressSizeWay(address string) string { for index, b := range r.batches { - for _, key := range sizeWayKeys() { + for _, key := range sizeBoxKeys() { if address != recipe.TargetAddress(index+1, key) { continue } diff --git a/internal/gui/window/run.go b/internal/gui/window/run.go index 10b2e6ba..71ce69fd 100644 --- a/internal/gui/window/run.go +++ b/internal/gui/window/run.go @@ -141,7 +141,7 @@ type runner struct { // scroll is the part of this screen that moves, so a refusal can bring the // box it is about into view. Set by the screen, because only the screen // that built it knows which scroll holds its form. - scroll *container.Scroll + scroll *parts.Scroll // readdress moves a refusal onto the box that is on the screen, for a // screen that draws one of several boxes for one question. @@ -165,6 +165,12 @@ type runner struct { // about it can be seen. Nil on a screen that folds nothing. unfold func(string) + // follow is what the screen does after any field changes, before the + // form is checked: a control whose choices depend on other fields catches + // up with them - smallest held back until a width and a height are set. + // Nil on a screen with no such control. + follow func() + // sections are the screen's panels, each of which folds away - see // sections.go. Opened by a refusal as unfold is. sections *sections @@ -725,7 +731,7 @@ func manifestNameOf(path string) string { // can bring the box it is about into view. It hands the scroll straight back, // so a screen wires it by wrapping the call it was already making rather than // by finding somewhere to put an extra statement. -func (r *runner) keepScroll(scroll *container.Scroll) *container.Scroll { +func (r *runner) keepScroll(scroll *parts.Scroll) *parts.Scroll { r.scroll = scroll return scroll } diff --git a/internal/gui/window/runrefuse.go b/internal/gui/window/runrefuse.go index 18bdb59c..6cc88464 100644 --- a/internal/gui/window/runrefuse.go +++ b/internal/gui/window/runrefuse.go @@ -93,7 +93,7 @@ func placed(r *runner, one error) string { // with the way to the directory under the sentence - see inTheWay. if dir := inTheWay(one); dir != "" { if where := r.placeOf(engine.SettingOutDir); r.fields.Mark(where, one) { - r.fields.Lookup(where).Offer(text.ButtonOpenFolder(), openIn(r.offer, dir)) + r.fields.Lookup(where).Offer(parts.Fix{Label: text.ButtonOpenFolder(), Apply: openIn(r.offer, dir)}) return where } } @@ -210,6 +210,9 @@ func (r *runner) recheck(setting string) { if r.settle == nil { return } + if r.follow != nil { + r.follow() + } // A run owns the screen while it lasts. Its progress and its refusals are // not to be wiped by a keystroke. if r.busy.occupied { diff --git a/internal/gui/window/sizeword.go b/internal/gui/window/sizeword.go new file mode 100644 index 00000000..53fc7365 --- /dev/null +++ b/internal/gui/window/sizeword.go @@ -0,0 +1,197 @@ +// The ways of giving a size, and the word smallest kept in step with the switch +// that offers it. +// +// Its own file because both screens draw the switch since 2026-11-17 - the +// batch screen with up to four ways, the single batch screen with two - and a +// way described in one screen's file would be described again in the other's. +package window + +import ( + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/engine" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/parts" + "github.com/donislawdev/TestingFilesGenerator/internal/gui/text" + "github.com/donislawdev/TestingFilesGenerator/internal/recipe" +) + +// sizeWay is one way of giving the size: the word on the switch, the sentence +// explaining it, and the box it leaves on the screen. +// +// Smallest leaves the box of one size, because what it sends is that box's +// key holding the word smallest - the value a recipe and --size take. It is a +// way of filling the box, not a box of its own. See smallestWord. +type sizeWay struct { + name func() string + says func() string + box string + smallest bool +} + +var ( + wayExact = sizeWay{name: text.SizeWayExact, says: text.SaysSizeWayExact, box: recipe.KeySize} + wayRange = sizeWay{name: text.SizeWayRange, says: text.SaysSizeWayRange, box: recipe.KeySizeRange} + wayBoundary = sizeWay{name: text.SizeWayBoundary, says: text.SaysSizeWayBoundary, box: recipe.KeyBoundary} + waySmallest = sizeWay{name: text.SizeWaySmallest, says: text.SaysSizeWaySmallest, box: recipe.KeySize, smallest: true} +) + +// waysFor is the ways a screen offering all of these offers for one format: +// all of them for a picture, and all but smallest for anything else. +// +// Asked of the engine (G1), by the rule it refuses smallest by, so the window +// holds no list of formats of its own. A format the menu holds and the +// registry does not know offers what a format that is not a picture does - the +// menu was filled from the registry, so that is a build where the two came +// apart, and the screen says so elsewhere. +func waysFor(all []sizeWay, formatID string) []sizeWay { + picture := takesSmallest(formatID) + offered := make([]sizeWay, 0, len(all)) + for _, way := range all { + if way.smallest && !picture { + continue + } + offered = append(offered, way) + } + return offered +} + +// holdSmallest holds Smallest back on a switch while the settings of its batch +// do not say how large the picture is, and lets it be chosen once they do. The +// engine is asked, by the rule a run refuses smallest by (G1), so the switch +// never offers what Preview would refuse. A switch without Smallest is told to +// let it go, which changes nothing. +// +// The owner's report of 2026-11-18: Smallest was there to choose with no width +// and no height, and the run then refused it - with nothing on the screen +// saying that smallest needs them. +func holdSmallest(way *parts.Segments, formatID string, properties map[string]string, tips *parts.Tips) { + if way == nil { + return + } + why := parts.NoDetail + if desc, err := format.Get(formatID); err == nil && engine.TakesSmallest(desc) && !engine.SmallestAnswered(desc, properties) { + why = tips.Say(text.SmallestNeedsTheSides()) + } + way.Held.Set(text.SizeWaySmallest(), why) +} + +// takesSmallest says a batch of this format can ask for smallest. +func takesSmallest(formatID string) bool { + desc, err := format.Get(formatID) + return err == nil && engine.TakesSmallest(desc) +} + +// wayNames is the words on a switch offering these ways, in their order. +func wayNames(ways []sizeWay) []string { + names := make([]string, 0, len(ways)) + for _, way := range ways { + names = append(names, way.name()) + } + return names +} + +// waysExplained is what the button beside a switch offering these ways says: +// one sentence for each of them, and none for a way it does not offer. +func waysExplained(ways []sizeWay) string { + sentences := make([]string, 0, len(ways)) + for _, way := range ways { + sentences = append(sentences, way.says()) + } + return text.DetailSizeWays(sentences) +} + +// wayNamed is the way behind a word on the switch, or the first of them for a +// word none of them has. +func wayNamed(ways []sizeWay, chosen string) sizeWay { + for _, way := range ways { + if way.name() == chosen { + return way + } + } + if len(ways) == 0 { + return wayExact + } + return ways[0] +} + +// smallestWord keeps one size box and the switch offering smallest saying the +// same thing, with the box as the one that is right. +// +// The box is what reaches the run - draft and settle read it and nothing else +// - so the switch is a view of it rather than a second record. Choosing +// Smallest writes the word into the box. Leaving it puts back the last size +// that was typed there. Typing smallest moves the switch onto Smallest, and +// typing anything else while it is there moves it back to One size. The +// button under a size refusal writes smallest into the box the same way any +// value goes in, and the switch follows - so there is no way of filling the +// box that leaves the two disagreeing, and no second rule for the button. +// +// Kept in the box rather than hidden behind a box of its own because a +// refusal about the size has to land on a box that is on the screen. Smallest +// without a width and a height is refused about the size, and a fourth box +// holding no value would have needed an address of its own and a rule moving +// refusals onto it - the shape that left a run refusing and nothing marked on +// 2026-08-25 (see readdressSizeWay). +type smallestWord struct { + box *parts.Entry + way *parts.Segments + // last is the last thing the box held that was not smallest, which is + // what leaving Smallest puts back. + last string +} + +// newSmallestWord ties a box to a switch. Called before the box is registered +// as a field, because registering chains onto the box's own handler, and a +// handler assigned after that would replace the chain. +func newSmallestWord(box *parts.Entry, way *parts.Segments) *smallestWord { + w := &smallestWord{box: box, way: way, last: startingSize} + if box.Text != core.SizeSmallest { + w.last = box.Text + } + box.OnChanged = w.typed + return w +} + +// typed follows the box with the switch. +func (w *smallestWord) typed(value string) { + if value == core.SizeSmallest { + // Nothing happens where the switch does not offer it - see + // parts.Segments.SetSelected - and the run then refuses smallest for + // that format in the engine's own words. + w.way.SetSelected(text.SizeWaySmallest()) + return + } + w.last = value + if w.way.Selected == text.SizeWaySmallest() { + w.way.SetSelected(text.SizeWayExact()) + } +} + +// chosen follows the switch with the box. Called first from the switch's own +// handler, so whatever the screen then reads is read off the box as it is now. +func (w *smallestWord) chosen(name string) { + if name == text.SizeWaySmallest() { + if w.box.Text != core.SizeSmallest { + w.box.SetText(core.SizeSmallest) + } + return + } + if w.box.Text == core.SizeSmallest { + w.box.SetText(w.last) + } +} + +// offer puts these ways on the switch and the switch where the box says. +// +// A switch that loses Smallest while on it moves to the first way and the box +// takes back its last size - a format that is not a picture cannot be the +// smallest of anything, and leaving the word would leave a form the run +// refuses. A switch that gains it goes onto it when the box already holds the +// word, which is how a batch copied with smallest, or a box somebody typed +// smallest into before choosing a picture, reads. +func (w *smallestWord) offer(ways []sizeWay) { + w.way.SetOptions(wayNames(ways)) + if w.box.Text == core.SizeSmallest { + w.way.SetSelected(text.SizeWaySmallest()) + } +} diff --git a/internal/gui/window/tools.go b/internal/gui/window/tools.go index f678b7ca..e4a58c7b 100644 --- a/internal/gui/window/tools.go +++ b/internal/gui/window/tools.go @@ -63,7 +63,7 @@ type toolMenu struct { // sections, kept to lay the screen out again (see relay), and the whole with // the bar under it. type toolsView struct { - scroll *container.Scroll + scroll *parts.Scroll body fyne.CanvasObject } @@ -158,7 +158,7 @@ func NewTools(host Host) *Tools { t.status.Wrapping = fyne.TextWrapWord t.fault = parts.NewErrorArea() - t.view.scroll = container.NewVScroll(parts.Screen( + t.view.scroll = parts.VScroll(parts.Screen( parts.Titled(text.TabTools(), text.SubtitleTools()), t.sections.section(sectionTool, text.SectionTool(), t.fields.Add(settingTool, text.FieldTool(), text.HintTool(), t.tips.Say(text.DetailTool()), t.menu.pick), @@ -230,7 +230,7 @@ func (t *Tools) onChosen(choice string) { t.chosen = d t.offer.withdraw(t.busy.relay) t.about.RemoveAll() - t.about.Add(parts.Prose(text.ToolDetail(d.ID, d.Detail))) + t.about.Add(parts.Explanation(text.ToolDetail(d.ID, d.Detail))) t.about.Refresh() t.fields.KeepFirst(t.form.fixed) diff --git a/internal/preset/emptyandminimal.go b/internal/preset/emptyandminimal.go index 762a8fb8..4477cfb2 100644 --- a/internal/preset/emptyandminimal.go +++ b/internal/preset/emptyandminimal.go @@ -42,7 +42,7 @@ func init() { Name: "formats", Kind: format.PropertyText, Shape: "format ids separated by commas, or all", Default: everyFormat, - Detail: "Which formats the set is built from. Leave it at all for every format " + + Detail: "Which formats the set is built from. Leave it at `all` for every format " + "this build has, or name the ones your system accepts.", }, }, diff --git a/internal/preset/picturesizes.go b/internal/preset/picturesizes.go new file mode 100644 index 00000000..9a587f64 --- /dev/null +++ b/internal/preset/picturesizes.go @@ -0,0 +1,434 @@ +package preset + +import ( + "errors" + "fmt" + "slices" + "strconv" + "strings" + + "github.com/donislawdev/TestingFilesGenerator/internal/core" + "github.com/donislawdev/TestingFilesGenerator/internal/format" + "github.com/donislawdev/TestingFilesGenerator/internal/format/placeholder" + "github.com/donislawdev/TestingFilesGenerator/internal/recipe" +) + +const ( + pictureSizesID = "picture-sizes" + + // pictureSizesQuestion is announced by the preset AND written into the + // header of an ejected recipe, so it is named once. + pictureSizesQuestion = "Does my system take pictures at the sizes screens and platforms use?" + + // everyGroup is what the groups parameter says when it means all of them - + // the word the formats of empty-and-minimal use for the same thing. + everyGroup = "all" + + // defaultPictureFormat is JPEG because it is what a camera, a phone and + // most of the web hand an upload form, and because its smallest pictures + // stay small: the whole set at its defaults is about four megabytes, where + // WebP, BMP and TIFF write their smallest picture uncompressed and come to + // a hundred (measured 2026-11-17, docs/SIZE-FIXES-2026-11-16.md section 3.7). + defaultPictureFormat = "jpg" + + screensGroup = "screens" + avatarsGroup = "avatars" + socialGroup = "social" + + // dimensionsReason is the rule in play for every file of the set - the + // size of the picture - rather than a verdict, the way a boundary set + // expects the file under its limit to be accepted with size_limit. + dimensionsReason = "dimensions_limit" +) + +// pictureGroups is the order a set lays its groups out in, whatever order +// they were typed in, so two people asking for the same groups get the same +// recipe - the rule chosenFormats keeps for formats. +var pictureGroups = []string{screensGroup, avatarsGroup, socialGroup} + +func init() { + content := placeholder.Content() + Register(Preset{ + ID: pictureSizesID, + Title: "Picture sizes", + Question: pictureSizesQuestion, + + Parameters: []format.Property{ + { + Name: "groups", Kind: format.PropertyText, + Shape: "group names separated by commas, or all", + Default: everyGroup, + Detail: "Which sizes the set holds: `screens` for the sizes of screens, `avatars` for profile pictures " + + "and `social` for covers, banners, posts and thumbnails. Leave it at `all` for every one of them.", + }, + content, + }, + Reads: []string{"format"}, + ReadDefaults: map[string]string{"format": defaultPictureFormat}, + + Requires: []string{"MVP"}, + Catches: []string{ + "a limit on the width or the height set with one shape in mind that turns away another, such as a profile background 1584 px wide", + "a thumbnail cut or squashed because the code expects a landscape picture and a portrait one arrives", + "a picture with an odd height, such as 1200 x 627, refused by a step that only takes even sizes", + "a 4K picture that runs out of time or memory on its way to a thumbnail, although the file itself is small", + }, + + Says: saidAboutThePictureSizes, + Expand: expandPictureSizes, + }) +} + +// pictureSize is one use of one size: a screen, or a place on a platform. +type pictureSize struct { + group string + width, height int + // use names what this size is, worded to follow "the size of" and without a + // comma, so that the uses of one size can be joined into one sentence. + use string +} + +// pictureSizes is every use the set knows, by group, in the order the files +// are laid out. A size that has several uses is listed once for each, beside +// the page it comes from, and becomes one file. +// +// Every number is from the page written beside it, read on 2026-11-17. A +// platform changes these when it redesigns a page, so the date belongs to the +// number: YouTube asked for a thumbnail of 1280 x 720 before it asked for +// 3840 x 2160. docs/SIZE-FIXES-2026-11-16.md section 7 has what each page says +// and the sizes left out. +var pictureSizes = []pictureSize{ + // ITU-R BT.1847-1 (2015), the 1 280 x 720 image format. + {screensGroup, 1280, 720, "an HD screen"}, + // ITU-R BT.709-6 (2015): 1 920 samples a line and 1 080 lines. + {screensGroup, 1920, 1080, "a Full HD screen"}, + // No television standard says 2560 x 1440. It is the sixth most common + // computer screen, 3.79 per cent in October 2026: + // gs.statcounter.com/screen-resolution-stats/desktop/worldwide + {screensGroup, 2560, 1440, "a QHD screen"}, + // ITU-R BT.2020-2 (2015), the 3 840 x 2 160 system. + {screensGroup, 3840, 2160, "a 4K Ultra HD screen"}, + + // support.google.com/youtube/answer/10456525: a profile picture "renders + // at 98 X 98 px". + {avatarsGroup, 98, 98, "a YouTube channel picture as YouTube shows it"}, + // facebook.com/help/125379114252045: a page's profile picture shows at + // 176 x 176 on a computer and 196 x 196 on a smartphone, and is best at + // 320 x 320. + {avatarsGroup, 176, 176, "a Facebook page picture as a computer shows it"}, + {avatarsGroup, 196, 196, "a Facebook page picture as a phone shows it"}, + {avatarsGroup, 320, 320, "a Facebook page picture as Facebook asks for it"}, + // help.x.com/en/managing-your-account/common-issues-when-uploading-profile-photo: + // a profile photo of 400 x 400. + {avatarsGroup, 400, 400, "an X profile photo"}, + // linkedin.com/help/linkedin/answer/a549049: a profile photo from 400 x 400 + // up to 7680 x 4320. a563309: a page logo of 400 x 400. + {avatarsGroup, 400, 400, "the smallest LinkedIn profile photo"}, + {avatarsGroup, 400, 400, "a LinkedIn page logo"}, + + // facebook.com/help/125379114252045: a page's cover of 851 x 315. + {socialGroup, 851, 315, "a Facebook page cover"}, + // help.x.com, the page above: a header of 1500 x 500. + {socialGroup, 1500, 500, "an X header"}, + // linkedin.com/help/linkedin/answer/a568217: a background of 1584 x 396. + {socialGroup, 1584, 396, "a LinkedIn profile background"}, + // support.google.com/youtube/answer/10456525: a banner of at least + // 2048 x 1152, and 2560 x 1440 recommended. + {socialGroup, 2048, 1152, "the smallest YouTube channel banner"}, + {socialGroup, 2560, 1440, "a YouTube channel banner"}, + // developers.facebook.com/docs/sharing/webmasters/images: at least + // 1200 x 630 for the picture of a shared link. + {socialGroup, 1200, 630, "the picture of a link shared on Facebook"}, + // linkedin.com/help/linkedin/answer/a563309: 1.91:1, 1200 x 627. + {socialGroup, 1200, 627, "a picture in a LinkedIn post"}, + // help.instagram.com/1631821640426723: 1080 wide and from 566 to 1440 + // high, 1.91:1 to 3:4. + {socialGroup, 1080, 1080, "a square Instagram post"}, + {socialGroup, 1080, 566, "the widest Instagram post"}, + {socialGroup, 1080, 1440, "the tallest Instagram post"}, + // help.pinterest.com/en/business/article/pinterest-product-specs: 2:3 at + // 1000 x 1500, and 1080 x 1920 to fill the screen. + {socialGroup, 1000, 1500, "a Pinterest pin"}, + {socialGroup, 1080, 1920, "a Pinterest pin that fills the screen"}, + // support.google.com/youtube/answer/72431: 3840 x 2160 for videos and + // 2160 x 3840 for Shorts. + {socialGroup, 3840, 2160, "a YouTube video thumbnail"}, + {socialGroup, 2160, 3840, "a YouTube Shorts thumbnail"}, +} + +// groupsList is how the groups parameter is written. +var groupsList = commaList{ + preset: pictureSizesID, + param: "groups", + empty: core.Says("preset.NoGroupsWereGivenSoThere", "no groups were given, so there is no size to make a picture of"), + check: checkPictureGroup, + keep: lower, + duplicate: repeatedGroup, +} + +func repeatedGroup(first string) core.Said { + return core.Says("preset.ItIsTheSameGroupAs", "it is the same group as %q. Name every group once", core.A("First", first)) +} + +// checkPictureGroup lets the keyword through and refuses a name that is not +// a group, naming the ones there are. +func checkPictureGroup(item string) core.Said { + if strings.EqualFold(item, everyGroup) || slices.Contains(pictureGroups, strings.ToLower(item)) { + return core.Said{} + } + return core.Says("preset.ThereIsNoGroupCalledThat", "there is no group called that. The groups are: %s", core.A("Groups", strings.Join(pictureGroups, ", "))) +} + +// chosenGroups is the groups a set covers, in the set's own order. +func chosenGroups(raw string) ([]string, error) { + names, err := groupsList.parse(raw) + if err != nil { + return nil, err + } + if len(names) == 1 && names[0] == everyGroup { + return pictureGroups, nil + } + if slices.Contains(names, everyGroup) { + return nil, groupsList.refuse(everyGroup, core.Says("preset.AlreadyMeansEveryGroupSoIt", "%q already means every group, so it cannot stand beside a named one. Write it on its own, or name only the groups you want", core.A("EveryGroup", everyGroup))) + } + var out []string + for _, g := range pictureGroups { + if slices.Contains(names, g) { + out = append(out, g) + } + } + return out, nil +} + +// pictureFile is one size of the set with every use it has in the groups +// chosen, under the first of those groups that names it. +type pictureFile struct { + group string + width, height int + uses []string +} + +func (f pictureFile) id() string { return fmt.Sprintf("%dx%d", f.width, f.height) } + +// props are the settings that make the picture this size, and content only +// when it is the placeholder - the test pattern is every format's default and +// a recipe states nothing it does not need to. +func (f pictureFile) props(content string) map[string]string { + props := map[string]string{ + "width": strconv.Itoa(f.width), + "height": strconv.Itoa(f.height), + } + if content == placeholder.ContentPlaceholder { + props[placeholder.SettingContent] = content + } + return props +} + +// filesIn merges the uses of the chosen groups into one file per size. +// +// The id of a file is its size and nothing else, so a size has the same seed +// and the same bytes whichever groups were chosen, and a set of avatars is the +// same files as the avatars of a set of everything. +func filesIn(groups []string) []pictureFile { + var files []pictureFile + at := map[string]int{} + for _, s := range usesIn(groups) { + f := pictureFile{group: s.group, width: s.width, height: s.height, uses: []string{s.use}} + if i, seen := at[f.id()]; seen { + files[i].uses = append(files[i].uses, s.use) + continue + } + at[f.id()] = len(files) + files = append(files, f) + } + return files +} + +// usesIn is every use of the chosen groups, group by group in the set's order. +func usesIn(groups []string) []pictureSize { + var out []pictureSize + for _, g := range groups { + out = append(out, slices.DeleteFunc(slices.Clone(pictureSizes), func(s pictureSize) bool { return s.group != g })...) + } + return out +} + +// pictureSet is a set laid out for one format: the files it can draw and the +// sizes it cannot, with the format's own refusal of the first of those. +type pictureSet struct { + desc format.Descriptor + content string + files []pictureFile + left []pictureFile + // why is the refusal without the format in front of it, because every + // sentence it goes into has already named the format. + why any +} + +// withoutTheFormat is a refusal of a setting as it reads after the format has +// been named, or the refusal itself when it is of another kind. +func withoutTheFormat(err error) any { + var refused *format.PropertyValueError + if errors.As(err, &refused) { + return refused.Bare() + } + return err +} + +// layOutPictures is the set the values ask for, or the refusal of them. +// +// A size the format cannot draw is left out before anything is planned, asked +// of the format's declaration - which is cheap, where planning a picture +// encodes it. An icon is at most 256 pixels a side, so a set of icons is three +// of the avatars, and the set says so rather than shrinking in silence (PR7). +func layOutPictures(args Args) (pictureSet, error) { + groups, err := chosenGroups(args["groups"]) + if err != nil { + return pictureSet{}, err + } + desc, err := pictureFormat(args["format"]) + if err != nil { + return pictureSet{}, err + } + content := args[placeholder.SettingContent] + if err := drawsContent(desc, content); err != nil { + return pictureSet{}, err + } + set := pictureSet{desc: desc, content: content} + for _, f := range filesIn(groups) { + err := desc.CheckProperties(f.props(content)) + if err == nil { + set.files = append(set.files, f) + continue + } + if set.why == nil { + set.why = withoutTheFormat(err) + } + set.left = append(set.left, f) + } + if len(set.files) == 0 { + return pictureSet{}, &format.PropertyValueError{ + Format: pictureSizesID, Key: "groups", Value: strings.Join(groups, ","), + Reason: core.Says("preset.NoSizeFitsTheFormat", "%s cannot draw any size of these groups. Its refusal of the first: %s", core.A("Format", desc.ID), core.A("Cause", set.why)), + Remedy: core.Says("preset.NoSizeFitsTheFormatFix", "Choose other groups, or another picture format"), + } + } + return set, nil +} + +// pictureFormat is the format the set is written in, which has to be a +// picture - the rule the engine takes smallest by, so the preset never lays +// out a set the engine refuses. +func pictureFormat(id string) (format.Descriptor, error) { + if id == "" { + id = defaultPictureFormat + } + desc, err := format.Get(id) + if err != nil { + return format.Descriptor{}, err + } + if !desc.IsPicture() { + return format.Descriptor{}, &format.PropertyValueError{ + Format: pictureSizesID, Key: "format", Value: id, + Reason: core.Says("preset.NotAPictureFormat", "%s files are not pictures, and every file of this set is one. The picture formats of this build: %s", + core.A("Format", desc.ID), core.A("Formats", strings.Join(pictureFormatIDs(), ", "))), + Remedy: core.Says("preset.NotAPictureFormatFix", "Choose one of the picture formats"), + } + } + return desc, nil +} + +// pictureFormatIDs is every picture format of this build, asked of the +// registry rather than listed here. +func pictureFormatIDs() []string { + var out []string + for _, d := range format.All() { + if d.IsPicture() { + out = append(out, d.ID) + } + } + return out +} + +// drawsContent refuses the placeholder for a format that does not declare +// one. The test pattern is what every picture format draws when nothing is +// said, so it needs no declaration. +func drawsContent(desc format.Descriptor, content string) error { + if content != placeholder.ContentPlaceholder || declaresPlaceholder(desc) { + return nil + } + var can []string + for _, d := range format.All() { + if declaresPlaceholder(d) { + can = append(can, d.ID) + } + } + return &format.PropertyValueError{ + Format: pictureSizesID, Key: placeholder.SettingContent, Value: content, + Reason: core.Says("preset.CannotDrawAPlaceholder", "%s cannot draw a placeholder. The formats that can: %s", + core.A("Format", desc.ID), core.A("Formats", strings.Join(can, ", "))), + Remedy: core.Says("preset.CannotDrawAPlaceholderFix", "Choose one of those formats, or leave the content as a test pattern"), + } +} + +// declaresPlaceholder says the format offers the placeholder among the +// values of its content setting. +func declaresPlaceholder(d format.Descriptor) bool { + for _, p := range d.Properties { + if p.Name == placeholder.SettingContent && slices.Contains(p.Choices, placeholder.ContentPlaceholder) { + return true + } + } + return false +} + +// draft is one file of the set as a target of the recipe. +func (s pictureSet) draft(f pictureFile) recipe.TargetDraft { + return recipe.TargetDraft{ + ID: f.id(), Format: s.desc.ID, Count: "1", + Size: core.SizeSmallest, Name: f.id() + s.desc.Extension, Group: f.group, + Expected: "accept", ExpectedReason: dimensionsReason, + Purpose: fmt.Sprintf("A picture of %d x %d written as %s, the size of %s. "+ + "Your system should take it. If it does not, check whether it limits the width, "+ + "the height or the size of a file below this picture.", + f.width, f.height, s.desc.Name, joinUses(f.uses)), + Properties: f.props(s.content), + } +} + +// joinUses says the uses of one size as one list: a, b and c. +func joinUses(uses []string) string { + if len(uses) == 1 { + return uses[0] + } + return strings.Join(uses[:len(uses)-1], ", ") + " and " + uses[len(uses)-1] +} + +// saidAboutThePictureSizes says which sizes a format left out, and why. +func saidAboutThePictureSizes(args Args) []core.Said { + set, err := layOutPictures(args) + if err != nil || len(set.left) == 0 { + // A refusal is Expand's to make, with a message that names the value. + return nil + } + sizes := make([]string, 0, len(set.left)) + for _, f := range set.left { + sizes = append(sizes, f.id()) + } + return []core.Said{core.Says("preset.SizesLeftOut", + "%s cannot draw %d of the sizes. Its refusal of the first: %s. The set leaves them out: %s", + core.A("Format", set.desc.ID), core.A("Count", len(set.left)), + core.A("Cause", set.why), core.A("Sizes", strings.Join(sizes, ", ")))} +} + +func expandPictureSizes(args Args) ([]byte, error) { + set, err := layOutPictures(args) + if err != nil { + return nil, err + } + targets := make([]recipe.TargetDraft, 0, len(set.files)) + for _, f := range set.files { + targets = append(targets, set.draft(f)) + } + return plan{preset: pictureSizesID, question: pictureSizesQuestion, targets: targets}.source() +} diff --git a/internal/preset/preset.go b/internal/preset/preset.go index c8dfd26f..c540ca12 100644 --- a/internal/preset/preset.go +++ b/internal/preset/preset.go @@ -344,11 +344,14 @@ func (e *ImpossibleError) Error() string { // InTheWordsOf is this refusal with the parameter named the way one surface // names it - see core.SettingSlot. Error is this with the declared name, which // is what the command line has always printed. -func (e *ImpossibleError) InTheWordsOf(name string) string { +func (e *ImpossibleError) InTheWordsOf(name string) string { return e.Reworded(name, nil) } + +// Reworded is InTheWordsOf with the values worded by w - see core.Said.Reworded. +func (e *ImpossibleError) Reworded(name string, w core.Wording) string { if name == "" { name = e.Setting } - return core.InTheWordsOf(e.Said().String(), name) + return core.InTheWordsOf(e.Said().Reworded("", w), name) } // Said is the whole refusal, for a window that says it in its own language, @@ -448,6 +451,9 @@ func Register(p Preset) { // A parameter IS a format.Property, so a closed set of values is put in the // same order here as it is over there. One rule for both, in the place each // declaration passes through exactly once. + if format.AnyConditional(p.Parameters) { + panic(fmt.Sprintf("preset: %s declares a parameter with a condition, which only a format keeps", p.ID)) + } for i := range p.Parameters { format.SortChoices(p.Parameters[i].Choices) } diff --git a/internal/preset/read.go b/internal/preset/read.go index 60c31cfc..dd744a60 100644 --- a/internal/preset/read.go +++ b/internal/preset/read.go @@ -138,7 +138,7 @@ func aboutTheFile(name, id string, err error) error { // A refusal of a shape this does not know still arrives whole, at // the extends line, with the two parts it lacks filled in rather than // printed as a bare dash and a bare stop. - problem.Why = core.Says("preset.ThePresetRefusedWhatTheRecipe", "the preset refused what the recipe gave it") + problem.Why = core.Says("preset.ThePresetRefusedTheValues", "the preset refused the values it was given") problem.Fix = core.Says("preset.RunPresetShow", "run \"tfg preset show %s\" for what it takes", core.A("Preset", id)) } return &recipe.ValidationError{Name: name, Problems: []recipe.Problem{problem}} diff --git a/internal/preset/sizeboundaries.go b/internal/preset/sizeboundaries.go index 8a132659..9b4279bb 100644 --- a/internal/preset/sizeboundaries.go +++ b/internal/preset/sizeboundaries.go @@ -44,7 +44,7 @@ func init() { SaidWhenDefaulted: map[string]string{ "limit": "no limit was given, so this set is built around " + defaultLimitText + - " - that is our placeholder and not your system's limit. Pass the limit your system declares, or the files say nothing about it.", + " - that is our placeholder and not your system's limit. Give the limit your system declares, or the files say nothing about it.", }, Requires: []string{"MVP"}, diff --git a/internal/preset/uploadvalidation.go b/internal/preset/uploadvalidation.go index ba2dd877..829bb808 100644 --- a/internal/preset/uploadvalidation.go +++ b/internal/preset/uploadvalidation.go @@ -118,7 +118,7 @@ func init() { SaidWhenDefaulted: map[string]string{ uploadLimitParam: "no limit was given, so this set is built around " + defaultUploadLimit + - " - that is our placeholder and not your form's limit. Pass the limit your form declares, or the files say nothing about it.", + " - that is our placeholder and not your form's limit. Give the limit your form declares, or the files say nothing about it.", }, Requires: []string{"MVP"}, diff --git a/internal/recipe/compose.go b/internal/recipe/compose.go index b2efb27a..2c4cd919 100644 --- a/internal/recipe/compose.go +++ b/internal/recipe/compose.go @@ -351,12 +351,24 @@ func expectationEntry(t TargetDraft) any { func refuseUnwritable(d Document) error { p := &problems{name: composedName} + // The place is named the way every refusal of a recipe names it - the + // target as a sentence, the setting in its slot - so each surface says it + // in its own words: the key on the command line, the label of the box in + // a window. + refuse := func(at string, what core.Said) { + p.add(at, what, + core.Says("recipe.SettingsAreWrittenDownAsText", "settings are written down as text, and a control character either breaks the text or is dropped without a word"), + core.Says("recipe.RemoveItItIsUsuallyA", "remove it - it is usually a stray tab or a line break from pasting")) + } check := func(at, value string) { if bad, found := firstControl(value); found { - p.add(at, - core.Says("recipe.HoldsTheCharacterWhichCannotBe", "%s holds the character %q, which cannot be written to a recipe", core.A("At", at), core.A("Bad", bad)), - core.Says("recipe.ARecipeIsATextDocument", "a recipe is a text document, and a control character either breaks it or is dropped without a word"), - core.Says("recipe.RemoveItItIsUsuallyA", "remove it - it is usually a stray tab or a line break from pasting")) + refuse(at, core.Says("recipe.TheSettingHoldsTheCharacter", "the {setting} holds the character %q, which a setting cannot carry", core.A("Bad", bad))) + } + } + checkIn := func(where spot, setting, value string) { + if bad, found := firstControl(value); found { + refuse(where.of(setting), core.Says("recipe.HoldsTheCharacterWhichCannotBe", + "%s has {a} {setting} holding the character %q, which a setting cannot carry", core.A("At", where), core.A("Bad", bad))) } } @@ -370,32 +382,32 @@ func refuseUnwritable(d Document) error { for i, t := range d.Targets { where := targetSpot(i, t.ID) - check(where.of("id"), t.ID) - check(where.of("format"), t.Format) - check(where.of("count"), t.Count) - check(where.of("size"), t.Size) - check(where.of("size-range"), t.SizeRange) - check(where.of("boundary"), t.Boundary) - check(where.of("name"), t.Name) - check(where.of("group"), t.Group) - check(where.of(KeyPurpose), t.Purpose) + checkIn(where, "id", t.ID) + checkIn(where, "format", t.Format) + checkIn(where, "count", t.Count) + checkIn(where, "size", t.Size) + checkIn(where, "size-range", t.SizeRange) + checkIn(where, "boundary", t.Boundary) + checkIn(where, "name", t.Name) + checkIn(where, "group", t.Group) + checkIn(where, KeyPurpose, t.Purpose) // send-as is not checked, and it is the one typed value that is not. A // control character in it is a name somebody sends on purpose, the // document carries it as an escape inside double quotes, and the // reader takes it back from there. - check(where.of("expected"), t.Expected) - check(where.of("expected.reason"), t.ExpectedReason) + checkIn(where, "expected", t.Expected) + checkIn(where, "expected.reason", t.ExpectedReason) // Sorted, so a document with two bad properties reports them in the // same order twice. for _, name := range sortedKeys(t.Properties) { - check(where.of("properties."+name), t.Properties[name]) + checkIn(where, "properties."+name, t.Properties[name]) } for j, c := range t.Contains { inside := where.entry("contains", j) - check(inside.of("format"), c.Format) - check(inside.of("count"), c.Count) - check(inside.of("size"), c.Size) + checkIn(inside, "format", c.Format) + checkIn(inside, "count", c.Count) + checkIn(inside, "size", c.Size) } } diff --git a/internal/recipe/errors.go b/internal/recipe/errors.go index 3d1e7c8e..2dc1e298 100644 --- a/internal/recipe/errors.go +++ b/internal/recipe/errors.go @@ -48,11 +48,14 @@ func (p Problem) String() string { // // String is this with the recipe key, so the command line prints what it // always printed and a window asks for the label above the box. -func (p Problem) InTheWordsOf(name string) string { +func (p Problem) InTheWordsOf(name string) string { return p.Reworded(name, nil) } + +// Reworded is InTheWordsOf with the values worded by w - see core.Said.Reworded. +func (p Problem) Reworded(name string, w core.Wording) string { if name == "" { name = core.LastSettingSegment(p.At) } - return core.InTheWordsOf(p.Said().String(), name) + return core.InTheWordsOf(p.Said().Reworded("", w), name) } // Said is the whole problem, for a window that says it in its own language, diff --git a/internal/site/presets.go b/internal/site/presets.go index 704688b1..ee940575 100644 --- a/internal/site/presets.go +++ b/internal/site/presets.go @@ -12,6 +12,7 @@ package site import ( "fmt" + "html/template" "path" "regexp" "strconv" @@ -181,13 +182,42 @@ type PresetPage struct { // SettingRow is one line of the settings table. type SettingRow struct { - Flag string - Takes string - Default string - Detail string + Flag string + Takes string + Default string + // Detail is the sentence about the setting, with every value to type in + // (withCode). + Detail template.HTML Placeholder bool } +// withCode is a description as HTML: its words escaped, and every value to +// type in , as the window draws it in the type of code. +// +// The marks are the ones internal/core/literal.go describes - a value between +// two backticks, a backtick without a partner kept as it is. Split here rather +// than through core.Pieces because this package imports nothing of ours (the +// layer table in internal/guard/layers_test.go), and +// TestEveryValueToTypeIsShownAsAValue holds every published value to the +// values core.Literals reads out of the same words. +func withCode(s string) template.HTML { + parts := strings.Split(s, "`") + if len(parts)%2 == 0 { + // An odd number of marks: the last has no partner, so it is words. + last := len(parts) - 2 + parts = append(parts[:last:last], parts[last]+"`"+parts[last+1]) + } + var b strings.Builder + for i, p := range parts { + if i%2 == 1 && p != "" { + b.WriteString("" + template.HTMLEscapeString(p) + "") + continue + } + b.WriteString(template.HTMLEscapeString(p)) + } + return template.HTML(b.String()) //nolint:gosec // every piece escaped above +} + // OutcomeRow is one line of the reactions table. type OutcomeRow struct { Name string @@ -258,7 +288,7 @@ func (v view) settingRows(f PresetFacts, text PresetText) ([]SettingRow, error) if !ok { return nil, fmt.Errorf("the setting --%s of the preset %q has no sentence written in %s", s.Name, f.ID, v.Lang.Code) } - out = append(out, SettingRow{Flag: s.Name, Takes: takes, Default: s.Default, Detail: detail, Placeholder: s.Placeholder}) + out = append(out, SettingRow{Flag: s.Name, Takes: takes, Default: s.Default, Detail: withCode(detail), Placeholder: s.Placeholder}) } for _, r := range f.Reads { takes, err := v.Word("readTakes." + r.Name) @@ -269,7 +299,7 @@ func (v view) settingRows(f PresetFacts, text PresetText) ([]SettingRow, error) if err != nil { return nil, err } - out = append(out, SettingRow{Flag: r.Name, Takes: takes, Default: r.Default, Detail: detail}) + out = append(out, SettingRow{Flag: r.Name, Takes: takes, Default: r.Default, Detail: withCode(detail)}) } return out, nil } diff --git a/internal/tool/tool.go b/internal/tool/tool.go index ed3f734d..3a297bd3 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -241,6 +241,9 @@ func Register(d Descriptor) { if _, exists := registry[d.ID]; exists { panic(fmt.Sprintf("tool: %q is registered twice", d.ID)) } + if format.AnyConditional(d.Settings) { + panic(fmt.Sprintf("tool: %q declares a setting with a condition, which only a format keeps", d.ID)) + } for i := range d.Settings { format.SortChoices(d.Settings[i].Choices) } diff --git a/npm/testing-files-generator/README.md b/npm/testing-files-generator/README.md index a4666cf3..764fc2c7 100644 --- a/npm/testing-files-generator/README.md +++ b/npm/testing-files-generator/README.md @@ -248,6 +248,7 @@ Three things to know: | `upload-validation` | Does my upload form take what it should and turn the rest away? | | `size-boundaries` | Is a size limit enforced exactly where it is declared? | | `filename-handling` | Will my system store, show and give back a file name it did not expect? | +| `picture-sizes` | Does my system take pictures at the sizes screens and platforms use? | | `tabular-import` | Does my table import survive what real tools export? | | `text-encoding` | Does my reader know which encoding a file is in, or is it guessing? | | `empty-and-minimal` | Does a file that is valid and as small as the format allows get through? | diff --git a/python/testing-files-generator/README.md b/python/testing-files-generator/README.md index 9e915263..3127895f 100644 --- a/python/testing-files-generator/README.md +++ b/python/testing-files-generator/README.md @@ -245,6 +245,7 @@ Two things to know: | `upload-validation` | Does my upload form take what it should and turn the rest away? | | `size-boundaries` | Is a size limit enforced exactly where it is declared? | | `filename-handling` | Will my system store, show and give back a file name it did not expect? | +| `picture-sizes` | Does my system take pictures at the sizes screens and platforms use? | | `tabular-import` | Does my table import survive what real tools export? | | `text-encoding` | Does my reader know which encoding a file is in, or is it guessing? | | `empty-and-minimal` | Does a file that is valid and as small as the format allows get through? | diff --git a/web/assets/social-preview.png b/web/assets/social-preview.png index 85d72cc6..84b6f7af 100644 Binary files a/web/assets/social-preview.png and b/web/assets/social-preview.png differ diff --git a/web/content/ar/site.json b/web/content/ar/site.json index dd567499..fdaa9bc6 100644 --- a/web/content/ar/site.json +++ b/web/content/ar/site.json @@ -138,7 +138,7 @@ "تخزين يقرأ صفر بايت على أنه رفع فاشل ويواصل إعادة المحاولة" ], "details": { - "formats": "الصيغ التي تتكون منها المجموعة. اتركها على all لكل صيغ هذا الإصدار، أو سمِّ الصيغ التي يقبلها نظامك." + "formats": "الصيغ التي تتكون منها المجموعة. اتركها على `all` لكل صيغ هذا الإصدار، أو سمِّ الصيغ التي يقبلها نظامك." } }, "filename-handling": { @@ -221,6 +221,22 @@ "far-over": "إلى أي مدى يتجاوز الملف الكبير الوحيد الحد. أوقفه حيث لا يستحق كتابة أضعاف الحد مساحة القرص.", "bulk": "عدد الملفات في الرفع الجماعي. الصفر يُخرج هذه المجموعة من المجموعة كليًا." } + }, + "picture-sizes": { + "question": "هل يقبل نظامي الصور بالأحجام التي تستخدمها الشاشات والمنصات؟", + "title": "أحجام الصور", + "pageTitle": "صور اختبار بأحجام شائعة - الشاشات والصور الرمزية ووسائل التواصل", + "description": "صور بأحجام شاشات HD وFull HD وQHD و4K، وبأحجام صور الملف الشخصي، وأغلفة المنشورات والصور المصغرة التي تطلبها منصات التواصل الاجتماعي، كل منها بأصغر حجم ممكن.", + "catches": [ + "حد للعرض أو الارتفاع وُضع لشكل واحد فيرفض شكلًا آخر، مثل خلفية ملف شخصي بعرض 1584 px", + "صورة مصغرة مقصوصة أو مضغوطة لأن الشيفرة تتوقع صورة أفقية فتصل صورة عمودية", + "صورة بارتفاع فردي، مثل 1200 x 627، ترفضها خطوة لا تقبل إلا الأحجام الزوجية", + "صورة 4K ينفد وقتها أو ذاكرتها في الطريق إلى صورة مصغرة، رغم أن الملف نفسه صغير" + ], + "details": { + "groups": "الأحجام التي تضمها المجموعة: `screens` لأحجام الشاشات، و`avatars` لصور الملف الشخصي، و`social` للأغلفة واللافتات والمنشورات والصور المصغرة. اتركها على `all` للحصول عليها كلها.", + "content": "ما تعرضه الصورة. نمط الاختبار للتحقق من طريقة قراءة الملف. الصورة البديلة لون واحد مع كلمات في الوسط، لتنسيق صفحة قبل وجود الصور الحقيقية." + } } }, "commands": { @@ -272,9 +288,10 @@ "sizes separated by commas": "أحجام مفصولة بفواصل", "format ids separated by commas": "معرّفات صيغ مفصولة بفواصل", "format ids separated by commas, or all": "معرّفات صيغ مفصولة بفواصل، أو all", + "group names separated by commas, or all": "أسماء مجموعات مفصولة بفواصل، أو all", "extensions separated by commas": "امتدادات مفصولة بفواصل", - "the id of a format, as tfg formats lists them": "معرّف صيغة، كما يسردها tfg formats", - "the id of a picture format, as tfg formats lists them": "معرّف صيغة صورة، كما يسردها tfg formats", + "the id of a format, such as png or csv": "معرّف صيغة، مثل png أو csv", + "the id of a picture format, such as png or jpg": "معرّف صيغة صورة، مثل png أو jpg", "one line of up to 100 characters": "سطر واحد من 100 حرف كحد أقصى", "a colour such as cccccc or ccc": "لون مثل cccccc أو ccc", "the password, in plain text": "كلمة المرور، كنص عادي", diff --git a/web/content/cs/site.json b/web/content/cs/site.json index 0b7a7bc7..acd99cf6 100644 --- a/web/content/cs/site.json +++ b/web/content/cs/site.json @@ -137,7 +137,7 @@ "úložiště, které čte nula bajtů jako selhané nahrání a stále to opakuje" ], "details": { - "formats": "Z jakých formátů se sada skládá. Ponechte all pro všechny formáty této verze, nebo uveďte ty, které váš systém přijímá." + "formats": "Z jakých formátů se sada skládá. Ponechte `all` pro všechny formáty této verze, nebo uveďte ty, které váš systém přijímá." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Jak daleko za limit sahá jediný velký soubor. Vypněte, kde zapsání několikanásobku limitu nestojí za místo na disku.", "bulk": "Kolik souborů obsahuje hromadné nahrání. Nula tuto skupinu ze sady úplně vynechá." } + }, + "picture-sizes": { + "question": "Přijme můj systém obrázky ve velikostech, které používají obrazovky a platformy?", + "title": "Velikosti obrázků", + "pageTitle": "Testovací obrázky v běžných velikostech - obrazovky, avatary, sociální sítě", + "description": "Obrázky ve velikostech obrazovek HD, Full HD, QHD a 4K, profilových fotek a titulních obrázků, příspěvků a náhledů, které chtějí sociální sítě, každý tak malý, jak jen může být.", + "catches": [ + "limit šířky nebo výšky nastavený pro jeden tvar, který odmítne jiný, například pozadí profilu široké 1584 px", + "náhled oříznutý nebo zploštělý, protože kód čeká obrázek na šířku a přijde obrázek na výšku", + "obrázek s lichou výškou, například 1200 x 627, odmítnutý krokem, který bere jen sudé rozměry", + "obrázek 4K, kterému cestou k náhledu dojde čas nebo paměť, i když je samotný soubor malý" + ], + "details": { + "groups": "Jaké velikosti sada obsahuje: `screens` pro velikosti obrazovek, `avatars` pro profilové fotky a `social` pro titulní obrázky, bannery, příspěvky a náhledy. Ponechte `all` pro všechny.", + "content": "Co obrázek ukazuje. Testovací obrazec slouží ke kontrole, jak se soubor čte. Zástupný obrázek je jednolitá barva s textem uprostřed, pro rozvržení stránky dřív, než existují skutečné obrázky." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "velikosti oddělené čárkami", "format ids separated by commas": "id formátů oddělená čárkami", "format ids separated by commas, or all": "id formátů oddělená čárkami, nebo all", + "group names separated by commas, or all": "názvy skupin oddělené čárkami, nebo all", "extensions separated by commas": "přípony oddělené čárkami", - "the id of a format, as tfg formats lists them": "id formátu tak, jak je vypisuje tfg formats", - "the id of a picture format, as tfg formats lists them": "id obrázkového formátu tak, jak je vypisuje tfg formats", + "the id of a format, such as png or csv": "id formátu, například png nebo csv", + "the id of a picture format, such as png or jpg": "id obrázkového formátu, například png nebo jpg", "one line of up to 100 characters": "jeden řádek o nejvýše 100 znacích", "a colour such as cccccc or ccc": "barva, například cccccc nebo ccc", "the password, in plain text": "heslo ve formě prostého textu", diff --git a/web/content/de/site.json b/web/content/de/site.json index 4a0b5178..58f96489 100644 --- a/web/content/de/site.json +++ b/web/content/de/site.json @@ -137,7 +137,7 @@ "ein Speicher, der null Bytes als fehlgeschlagenen Upload liest und immer wieder neu versucht" ], "details": { - "formats": "Aus welchen Formaten das Set besteht. Mit all werden alle Formate dieses Builds verwendet, oder du nennst die, die dein System akzeptiert." + "formats": "Aus welchen Formaten das Set besteht. Mit `all` werden alle Formate dieses Builds verwendet, oder du nennst die, die dein System akzeptiert." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Wie weit über dem Limit die eine große Datei liegt. Schalte sie ab, wo es das Vielfache des Limits auf der Platte nicht wert ist.", "bulk": "Wie viele Dateien der Massen-Upload enthält. Bei null fällt diese Gruppe ganz aus dem Set." } + }, + "picture-sizes": { + "question": "Nimmt mein System Bilder in den Größen an, die Bildschirme und Plattformen verwenden?", + "title": "Bildgrößen", + "pageTitle": "Testbilder in gängigen Größen - Bildschirme, Avatare, soziale Medien", + "description": "Bilder in den Größen von HD-, Full-HD-, QHD- und 4K-Bildschirmen, von Profilbildern und von den Titelbildern, Beiträgen und Vorschaubildern, die soziale Plattformen verlangen, jedes so klein wie möglich.", + "catches": [ + "eine Grenze für Breite oder Höhe, die für eine Bildform gedacht war und eine andere abweist, etwa einen Profilhintergrund mit 1584 px Breite", + "ein Vorschaubild, das beschnitten oder gestaucht wird, weil der Code ein Querformat erwartet und ein Hochformat ankommt", + "ein Bild mit ungerader Höhe, etwa 1200 x 627, das von einem Schritt abgewiesen wird, der nur gerade Größen annimmt", + "ein 4K-Bild, dem auf dem Weg zum Vorschaubild Zeit oder Speicher ausgeht, obwohl die Datei selbst klein ist" + ], + "details": { + "groups": "Welche Größen das Set enthält: `screens` für Bildschirmgrößen, `avatars` für Profilbilder und `social` für Titelbilder, Banner, Beiträge und Vorschaubilder. Mit `all` bekommst du alle.", + "content": "Was das Bild zeigt. Ein Testmuster dient dazu, zu prüfen, wie eine Datei gelesen wird. Ein Platzhalter ist eine einfarbige Fläche mit Text in der Mitte, um eine Seite zu gestalten, bevor es die echten Bilder gibt." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "Größen, durch Kommas getrennt", "format ids separated by commas": "Format-IDs, durch Kommas getrennt", "format ids separated by commas, or all": "Format-IDs, durch Kommas getrennt, oder all", + "group names separated by commas, or all": "Gruppennamen, durch Kommas getrennt, oder all", "extensions separated by commas": "Endungen, durch Kommas getrennt", - "the id of a format, as tfg formats lists them": "die ID eines Formats, wie tfg formats sie auflistet", - "the id of a picture format, as tfg formats lists them": "die ID eines Bildformats, wie tfg formats sie auflistet", + "the id of a format, such as png or csv": "die ID eines Formats, etwa png oder csv", + "the id of a picture format, such as png or jpg": "die ID eines Bildformats, etwa png oder jpg", "one line of up to 100 characters": "eine Zeile mit bis zu 100 Zeichen", "a colour such as cccccc or ccc": "eine Farbe wie cccccc oder ccc", "the password, in plain text": "das Passwort im Klartext", diff --git a/web/content/en/site.json b/web/content/en/site.json index 9879249b..51ece9d0 100644 --- a/web/content/en/site.json +++ b/web/content/en/site.json @@ -137,7 +137,7 @@ "storage that reads nought bytes as a failed upload and keeps retrying" ], "details": { - "formats": "Which formats the set is built from. Leave it at all for every format this build has, or name the ones your system accepts." + "formats": "Which formats the set is built from. Leave it at `all` for every format this build has, or name the ones your system accepts." } }, "filename-handling": { @@ -152,6 +152,22 @@ ], "details": {} }, + "picture-sizes": { + "question": "Does my system take pictures at the sizes screens and platforms use?", + "title": "Picture sizes", + "pageTitle": "Test Images at Common Sizes - Screens, Avatars, Social Media", + "description": "Pictures at the sizes of HD, Full HD, QHD and 4K screens, of profile pictures, and of the covers, posts and thumbnails social platforms ask for, each as small as it can be.", + "catches": [ + "a limit on the width or the height set with one shape in mind that turns away another, such as a profile background 1584 px wide", + "a thumbnail cut or squashed because the code expects a landscape picture and a portrait one arrives", + "a picture with an odd height, such as 1200 x 627, refused by a step that only takes even sizes", + "a 4K picture that runs out of time or memory on its way to a thumbnail, although the file itself is small" + ], + "details": { + "groups": "Which sizes the set holds: `screens` for the sizes of screens, `avatars` for profile pictures and `social` for covers, banners, posts and thumbnails. Leave it at `all` for every one of them.", + "content": "What the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist." + } + }, "size-boundaries": { "question": "Is a size limit enforced exactly where it is declared?", "title": "Size boundaries", @@ -266,9 +282,10 @@ "sizes separated by commas": "sizes separated by commas", "format ids separated by commas": "format ids separated by commas", "format ids separated by commas, or all": "format ids separated by commas, or all", + "group names separated by commas, or all": "group names separated by commas, or all", "extensions separated by commas": "extensions separated by commas", - "the id of a format, as tfg formats lists them": "the id of a format, as tfg formats lists them", - "the id of a picture format, as tfg formats lists them": "the id of a picture format, as tfg formats lists them", + "the id of a format, such as png or csv": "the id of a format, such as png or csv", + "the id of a picture format, such as png or jpg": "the id of a picture format, such as png or jpg", "one line of up to 100 characters": "one line of up to 100 characters", "a colour such as cccccc or ccc": "a colour such as cccccc or ccc", "the password, in plain text": "the password, in plain text", diff --git a/web/content/es/site.json b/web/content/es/site.json index 586366cf..937fdbcb 100644 --- a/web/content/es/site.json +++ b/web/content/es/site.json @@ -137,7 +137,7 @@ "un almacenamiento que lee cero bytes como una subida fallida y sigue reintentando" ], "details": { - "formats": "De qué formatos se compone el conjunto. Déjalo en all para todos los formatos de esta versión, o nombra los que acepta tu sistema." + "formats": "De qué formatos se compone el conjunto. Déjalo en `all` para todos los formatos de esta versión, o nombra los que acepta tu sistema." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Cuánto se pasa del límite el único archivo grande. Desactívalo donde escribir varias veces el límite no compense el disco.", "bulk": "Cuántos archivos contiene la subida masiva. Cero deja ese grupo fuera del conjunto por completo." } + }, + "picture-sizes": { + "question": "¿Acepta mi sistema imágenes en los tamaños que usan las pantallas y las plataformas?", + "title": "Tamaños de imagen", + "pageTitle": "Imágenes de prueba en tamaños comunes - pantallas, avatares, redes sociales", + "description": "Imágenes en los tamaños de pantallas HD, Full HD, QHD y 4K, de fotos de perfil y de las portadas, publicaciones y miniaturas que piden las redes sociales, cada una tan pequeña como puede ser.", + "catches": [ + "un límite de ancho o de alto pensado para una forma que rechaza otra, como un fondo de perfil de 1584 px de ancho", + "una miniatura recortada o aplastada porque el código espera una imagen horizontal y llega una vertical", + "una imagen de alto impar, como 1200 x 627, rechazada por un paso que solo acepta tamaños pares", + "una imagen 4K que se queda sin tiempo o sin memoria camino de una miniatura, aunque el archivo sea pequeño" + ], + "details": { + "groups": "Qué tamaños contiene el conjunto: `screens` para tamaños de pantalla, `avatars` para fotos de perfil y `social` para portadas, banners, publicaciones y miniaturas. Déjalo en `all` para tenerlos todos.", + "content": "Lo que muestra la imagen. Un patrón de prueba sirve para comprobar cómo se lee un archivo. Un marcador de posición es un color liso con texto en el centro, para maquetar una página antes de tener las imágenes reales." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "tamaños separados por comas", "format ids separated by commas": "ids de formato separados por comas", "format ids separated by commas, or all": "ids de formato separados por comas, o all", + "group names separated by commas, or all": "nombres de grupo separados por comas, o all", "extensions separated by commas": "extensiones separadas por comas", - "the id of a format, as tfg formats lists them": "el id de un formato, tal como lo lista tfg formats", - "the id of a picture format, as tfg formats lists them": "el id de un formato de imagen, tal como lo lista tfg formats", + "the id of a format, such as png or csv": "el id de un formato, como png o csv", + "the id of a picture format, such as png or jpg": "el id de un formato de imagen, como png o jpg", "one line of up to 100 characters": "una línea de hasta 100 caracteres", "a colour such as cccccc or ccc": "un color como cccccc o ccc", "the password, in plain text": "la contraseña, en texto plano", diff --git a/web/content/fr/site.json b/web/content/fr/site.json index c885a9ed..6026381e 100644 --- a/web/content/fr/site.json +++ b/web/content/fr/site.json @@ -137,7 +137,7 @@ "un stockage qui lit zéro octet comme un envoi échoué et recommence sans fin" ], "details": { - "formats": "Les formats dont le jeu est fait. Laissez all pour tous les formats de cette version, ou nommez ceux que votre système accepte." + "formats": "Les formats dont le jeu est fait. Laissez `all` pour tous les formats de cette version, ou nommez ceux que votre système accepte." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Jusqu'où le grand fichier dépasse la limite. Désactivez-le là où écrire plusieurs fois la limite ne vaut pas le disque.", "bulk": "Le nombre de fichiers de l'envoi en masse. Zéro retire complètement ce groupe du jeu." } + }, + "picture-sizes": { + "question": "Mon système accepte-t-il les images aux tailles qu'utilisent les écrans et les plateformes ?", + "title": "Tailles d'image", + "pageTitle": "Images de test aux tailles courantes - écrans, avatars, réseaux sociaux", + "description": "Des images aux tailles des écrans HD, Full HD, QHD et 4K, des photos de profil, et des couvertures, publications et miniatures que demandent les réseaux sociaux, chacune aussi petite que possible.", + "catches": [ + "une limite de largeur ou de hauteur pensée pour une forme qui en refuse une autre, comme un arrière-plan de profil de 1584 px de large", + "une miniature coupée ou écrasée parce que le code attend une image en paysage et qu'une image en portrait arrive", + "une image de hauteur impaire, comme 1200 x 627, refusée par une étape qui n'accepte que des tailles paires", + "une image 4K qui manque de temps ou de mémoire en route vers une miniature, alors que le fichier lui-même est petit" + ], + "details": { + "groups": "Les tailles que contient le jeu : `screens` pour les tailles d'écran, `avatars` pour les photos de profil et `social` pour les couvertures, bannières, publications et miniatures. Laissez `all` pour les avoir toutes.", + "content": "Ce que montre l'image. Une mire de test sert à vérifier comment un fichier est lu. Un espace réservé est une couleur unie avec du texte au milieu, pour mettre en page avant que les vraies images existent." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "tailles séparées par des virgules", "format ids separated by commas": "identifiants de format séparés par des virgules", "format ids separated by commas, or all": "identifiants de format séparés par des virgules, ou all", + "group names separated by commas, or all": "noms de groupe séparés par des virgules, ou all", "extensions separated by commas": "extensions séparées par des virgules", - "the id of a format, as tfg formats lists them": "l'identifiant d'un format, comme le liste tfg formats", - "the id of a picture format, as tfg formats lists them": "l'identifiant d'un format d'image, comme le liste tfg formats", + "the id of a format, such as png or csv": "l'identifiant d'un format, par exemple png ou csv", + "the id of a picture format, such as png or jpg": "l'identifiant d'un format d'image, par exemple png ou jpg", "one line of up to 100 characters": "une ligne de 100 caractères au plus", "a colour such as cccccc or ccc": "une couleur comme cccccc ou ccc", "the password, in plain text": "le mot de passe, en clair", diff --git a/web/content/hi/site.json b/web/content/hi/site.json index c43c816d..1ddd053c 100644 --- a/web/content/hi/site.json +++ b/web/content/hi/site.json @@ -137,7 +137,7 @@ "ऐसा स्टोरेज जो शून्य बाइट को असफल अपलोड समझकर बार-बार कोशिश करता रहता है" ], "details": { - "formats": "सेट किन फ़ॉर्मैट से बना है। इस बिल्ड के सभी फ़ॉर्मैट के लिए all रहने दें, या वे फ़ॉर्मैट लिखें जिन्हें आपका सिस्टम स्वीकार करता है।" + "formats": "सेट किन फ़ॉर्मैट से बना है। इस बिल्ड के सभी फ़ॉर्मैट के लिए `all` रहने दें, या वे फ़ॉर्मैट लिखें जिन्हें आपका सिस्टम स्वीकार करता है।" } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "एकमात्र बड़ी फ़ाइल सीमा से कितनी आगे जाती है। जहाँ सीमा के कई गुना लिखना डिस्क के लायक न हो, वहाँ इसे बंद कर दें।", "bulk": "एक साथ अपलोड में कितनी फ़ाइलें हैं। शून्य होने पर वह समूह सेट से पूरी तरह हट जाता है।" } + }, + "picture-sizes": { + "question": "क्या मेरा सिस्टम उन आकारों की तस्वीरें लेता है जो स्क्रीन और प्लेटफ़ॉर्म इस्तेमाल करते हैं?", + "title": "तस्वीरों के आकार", + "pageTitle": "आम आकारों में टेस्ट तस्वीरें - स्क्रीन, अवतार, सोशल मीडिया", + "description": "HD, Full HD, QHD और 4K स्क्रीन के आकार, प्रोफ़ाइल तस्वीरों के आकार, और सोशल प्लेटफ़ॉर्म जिन कवर, पोस्ट और थंबनेल के आकार माँगते हैं, उनकी तस्वीरें, हर एक जितनी छोटी हो सके।", + "catches": [ + "एक आकृति को ध्यान में रखकर रखी गई चौड़ाई या ऊँचाई की सीमा जो दूसरी आकृति को ठुकरा देती है, जैसे 1584 px चौड़ी प्रोफ़ाइल पृष्ठभूमि", + "थंबनेल कटा या दबा हुआ, क्योंकि कोड क्षैतिज तस्वीर की उम्मीद करता है और लंबवत तस्वीर आती है", + "विषम ऊँचाई वाली तस्वीर, जैसे 1200 x 627, जिसे ऐसा चरण ठुकरा देता है जो केवल सम आकार लेता है", + "4K तस्वीर जिसका थंबनेल बनते समय समय या मेमोरी खत्म हो जाती है, जबकि फ़ाइल खुद छोटी है" + ], + "details": { + "groups": "सेट में कौन-से आकार हैं: स्क्रीन के आकारों के लिए `screens`, प्रोफ़ाइल तस्वीरों के लिए `avatars`, और कवर, बैनर, पोस्ट और थंबनेल के लिए `social`। सभी के लिए `all` रहने दें।", + "content": "तस्वीर क्या दिखाती है। टेस्ट पैटर्न यह जाँचने के लिए है कि फ़ाइल कैसे पढ़ी जाती है। प्लेसहोल्डर बीच में शब्दों वाला एक सादा रंग है, असली तस्वीरें बनने से पहले पेज का खाका बनाने के लिए।" + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "अल्पविराम से अलग किए गए आकार", "format ids separated by commas": "अल्पविराम से अलग किए गए फ़ॉर्मैट id", "format ids separated by commas, or all": "अल्पविराम से अलग किए गए फ़ॉर्मैट id, या all", + "group names separated by commas, or all": "अल्पविराम से अलग किए गए समूह नाम, या all", "extensions separated by commas": "अल्पविराम से अलग किए गए एक्सटेंशन", - "the id of a format, as tfg formats lists them": "किसी फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है", - "the id of a picture format, as tfg formats lists them": "किसी चित्र फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है", + "the id of a format, such as png or csv": "किसी फ़ॉर्मैट का id, जैसे png या csv", + "the id of a picture format, such as png or jpg": "किसी चित्र फ़ॉर्मैट का id, जैसे png या jpg", "one line of up to 100 characters": "अधिकतम 100 वर्णों की एक पंक्ति", "a colour such as cccccc or ccc": "कोई रंग, जैसे cccccc या ccc", "the password, in plain text": "पासवर्ड, सादे टेक्स्ट में", diff --git a/web/content/id/site.json b/web/content/id/site.json index d37629c9..24373c64 100644 --- a/web/content/id/site.json +++ b/web/content/id/site.json @@ -137,7 +137,7 @@ "penyimpanan yang membaca nol byte sebagai unggahan gagal dan terus mencoba ulang" ], "details": { - "formats": "Dari format apa set dibuat. Biarkan all untuk setiap format build ini, atau sebutkan format yang diterima sistem Anda." + "formats": "Dari format apa set dibuat. Biarkan `all` untuk setiap format build ini, atau sebutkan format yang diterima sistem Anda." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Seberapa jauh di atas batas file besar tunggal itu. Matikan bila menulis beberapa kali batas tidak sepadan dengan disknya.", "bulk": "Berapa banyak file dalam unggahan massal. Nol membuang kelompok itu dari set sepenuhnya." } + }, + "picture-sizes": { + "question": "Apakah sistem saya menerima gambar dalam ukuran yang dipakai layar dan platform?", + "title": "Ukuran gambar", + "pageTitle": "Gambar uji dalam ukuran umum - layar, avatar, media sosial", + "description": "Gambar dalam ukuran layar HD, Full HD, QHD, dan 4K, foto profil, serta sampul, postingan, dan thumbnail yang diminta platform media sosial, masing-masing sekecil mungkin.", + "catches": [ + "batas lebar atau tinggi yang dibuat untuk satu bentuk dan menolak bentuk lain, misalnya latar profil selebar 1584 px", + "thumbnail terpotong atau tergencet karena kode mengharapkan gambar mendatar dan yang datang gambar tegak", + "gambar dengan tinggi ganjil, misalnya 1200 x 627, ditolak oleh langkah yang hanya menerima ukuran genap", + "gambar 4K yang kehabisan waktu atau memori dalam perjalanan menjadi thumbnail, padahal filenya sendiri kecil" + ], + "details": { + "groups": "Ukuran yang ada di set: `screens` untuk ukuran layar, `avatars` untuk foto profil, dan `social` untuk sampul, banner, postingan, dan thumbnail. Biarkan `all` untuk semuanya.", + "content": "Apa yang ditampilkan gambar. Pola uji dipakai untuk memeriksa cara file dibaca. Placeholder adalah warna polos dengan tulisan di tengah, untuk menata halaman sebelum gambar aslinya ada." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "ukuran dipisahkan koma", "format ids separated by commas": "id format dipisahkan koma", "format ids separated by commas, or all": "id format dipisahkan koma, atau all", + "group names separated by commas, or all": "nama grup dipisahkan koma, atau all", "extensions separated by commas": "ekstensi dipisahkan koma", - "the id of a format, as tfg formats lists them": "id sebuah format, seperti yang didaftar tfg formats", - "the id of a picture format, as tfg formats lists them": "id sebuah format gambar, seperti yang didaftar tfg formats", + "the id of a format, such as png or csv": "id sebuah format, misalnya png atau csv", + "the id of a picture format, such as png or jpg": "id sebuah format gambar, misalnya png atau jpg", "one line of up to 100 characters": "satu baris berisi paling banyak 100 karakter", "a colour such as cccccc or ccc": "warna seperti cccccc atau ccc", "the password, in plain text": "kata sandi, dalam teks biasa", diff --git a/web/content/it/site.json b/web/content/it/site.json index 7fffe380..59641f29 100644 --- a/web/content/it/site.json +++ b/web/content/it/site.json @@ -137,7 +137,7 @@ "uno storage che legge zero byte come un upload fallito e continua a riprovare" ], "details": { - "formats": "Da quali formati è composto il set. Lascia all per tutti i formati di questa versione, oppure indica quelli che il tuo sistema accetta." + "formats": "Da quali formati è composto il set. Lascia `all` per tutti i formati di questa versione, oppure indica quelli che il tuo sistema accetta." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Quanto oltre il limite arriva l'unico file grande. Disattivalo dove scrivere diverse volte il limite non vale il disco.", "bulk": "Quanti file contiene l'upload di massa. Zero lascia del tutto fuori dal set quel gruppo." } + }, + "picture-sizes": { + "question": "Il mio sistema accetta immagini nelle dimensioni usate da schermi e piattaforme?", + "title": "Dimensioni delle immagini", + "pageTitle": "Immagini di test in dimensioni comuni - schermi, avatar, social media", + "description": "Immagini nelle dimensioni di schermi HD, Full HD, QHD e 4K, delle foto profilo e di copertine, post e miniature richieste dalle piattaforme social, ognuna piccola quanto può esserlo.", + "catches": [ + "un limite di larghezza o di altezza pensato per una forma che ne rifiuta un'altra, come uno sfondo del profilo largo 1584 px", + "una miniatura tagliata o schiacciata perché il codice si aspetta un'immagine orizzontale e ne arriva una verticale", + "un'immagine di altezza dispari, come 1200 x 627, rifiutata da un passaggio che accetta solo dimensioni pari", + "un'immagine 4K che esaurisce tempo o memoria mentre diventa una miniatura, anche se il file è piccolo" + ], + "details": { + "groups": "Quali dimensioni contiene il set: `screens` per le dimensioni degli schermi, `avatars` per le foto profilo e `social` per copertine, banner, post e miniature. Lascia `all` per averle tutte.", + "content": "Cosa mostra l'immagine. Un'immagine di prova serve a controllare come viene letto un file. Un segnaposto è un colore uniforme con un testo al centro, per impaginare prima che esistano le immagini vere." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "dimensioni separate da virgole", "format ids separated by commas": "id di formato separati da virgole", "format ids separated by commas, or all": "id di formato separati da virgole, oppure all", + "group names separated by commas, or all": "nomi di gruppo separati da virgole, oppure all", "extensions separated by commas": "estensioni separate da virgole", - "the id of a format, as tfg formats lists them": "l'id di un formato, come lo elenca tfg formats", - "the id of a picture format, as tfg formats lists them": "l'id di un formato di immagine, come lo elenca tfg formats", + "the id of a format, such as png or csv": "l'id di un formato, come png o csv", + "the id of a picture format, such as png or jpg": "l'id di un formato di immagine, come png o jpg", "one line of up to 100 characters": "una riga di al massimo 100 caratteri", "a colour such as cccccc or ccc": "un colore come cccccc o ccc", "the password, in plain text": "la password, in chiaro", diff --git a/web/content/ja/site.json b/web/content/ja/site.json index 570a5d55..f10c44e6 100644 --- a/web/content/ja/site.json +++ b/web/content/ja/site.json @@ -137,7 +137,7 @@ "0バイトを失敗したアップロードと見なして再試行し続けるストレージ" ], "details": { - "formats": "セットを構成する形式です。このビルドのすべての形式にするにはallのままにし、システムが受け付ける形式だけを指定することもできます。" + "formats": "セットを構成する形式です。このビルドのすべての形式にするには`all`のままにし、システムが受け付ける形式だけを指定することもできます。" } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "1つだけの大きなファイルが制限をどれだけ超えるかです。制限の何倍も書き込むのがディスクの無駄になる場合はオフにします。", "bulk": "一括アップロードに含めるファイル数です。0にすると、そのグループはセットから完全に外れます。" } + }, + "picture-sizes": { + "question": "画面やプラットフォームが使うサイズの画像を、システムは受け付けるでしょうか。", + "title": "画像サイズ", + "pageTitle": "よく使われるサイズのテスト画像 - 画面、アバター、ソーシャルメディア", + "description": "HD、Full HD、QHD、4Kの画面サイズ、プロフィール画像のサイズ、そしてソーシャルプラットフォームが求めるカバー、投稿、サムネイルのサイズの画像。それぞれできるだけ小さく作ります。", + "catches": [ + "ある形を想定して設けた幅や高さの上限が、別の形を拒否する問題。たとえば幅1584 pxのプロフィール背景", + "コードが横長の画像を想定しているのに縦長の画像が届き、切り取られたりつぶれたりするサムネイル", + "偶数のサイズしか受け付けない処理に拒否される、1200 x 627のような高さが奇数の画像", + "ファイル自体は小さいのに、サムネイルにする途中で時間やメモリが足りなくなる4K画像" + ], + "details": { + "groups": "セットに含めるサイズです。画面サイズは`screens`、プロフィール画像は`avatars`、カバー、バナー、投稿、サムネイルは`social`です。すべてにするには`all`のままにします。", + "content": "画像に何を表示するかです。テストパターンはファイルの読み取られ方を確かめるためのものです。プレースホルダーは中央に文字のある単色の画像で、本物の画像ができる前にページをレイアウトするためのものです。" + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "カンマ区切りのサイズ", "format ids separated by commas": "カンマ区切りの形式ID", "format ids separated by commas, or all": "カンマ区切りの形式ID、またはall", + "group names separated by commas, or all": "カンマ区切りのグループ名、またはall", "extensions separated by commas": "カンマ区切りの拡張子", - "the id of a format, as tfg formats lists them": "tfg formatsが一覧表示する形式のID", - "the id of a picture format, as tfg formats lists them": "tfg formatsが一覧表示する画像形式のID", + "the id of a format, such as png or csv": "pngやcsvなどの形式のID", + "the id of a picture format, such as png or jpg": "pngやjpgなどの画像形式のID", "one line of up to 100 characters": "100文字以内の1行", "a colour such as cccccc or ccc": "cccccc や ccc のような色", "the password, in plain text": "パスワード(平文)", diff --git a/web/content/ko/site.json b/web/content/ko/site.json index 0c9f220e..5420d011 100644 --- a/web/content/ko/site.json +++ b/web/content/ko/site.json @@ -137,7 +137,7 @@ "0바이트를 업로드 실패로 보고 계속 재시도하는 스토리지" ], "details": { - "formats": "세트를 구성하는 형식입니다. 이 빌드의 모든 형식을 쓰려면 all로 두고, 시스템이 받는 형식만 쓰려면 이름을 지정합니다." + "formats": "세트를 구성하는 형식입니다. 이 빌드의 모든 형식을 쓰려면 `all`로 두고, 시스템이 받는 형식만 쓰려면 이름을 지정합니다." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "하나뿐인 큰 파일이 한도를 얼마나 넘는지입니다. 한도의 몇 배를 쓰는 것이 디스크 낭비라면 꺼 두세요.", "bulk": "대량 업로드에 포함할 파일 수입니다. 0이면 그 그룹은 세트에서 완전히 빠집니다." } + }, + "picture-sizes": { + "question": "화면과 플랫폼이 쓰는 크기의 이미지를 내 시스템이 받을까요?", + "title": "이미지 크기", + "pageTitle": "자주 쓰는 크기의 테스트 이미지 - 화면, 아바타, 소셜 미디어", + "description": "HD, Full HD, QHD, 4K 화면 크기, 프로필 사진 크기, 그리고 소셜 플랫폼이 요구하는 커버, 게시물, 썸네일 크기의 이미지입니다. 각각 가능한 한 작게 만듭니다.", + "catches": [ + "한 가지 모양을 생각하고 정한 너비나 높이 제한이 다른 모양을 거부하는 문제, 예를 들어 너비 1584 px의 프로필 배경", + "코드가 가로 이미지를 기대하는데 세로 이미지가 들어와 잘리거나 찌그러진 썸네일", + "짝수 크기만 받는 단계에서 거부되는, 1200 x 627처럼 높이가 홀수인 이미지", + "파일 자체는 작은데 썸네일이 되는 도중 시간이나 메모리가 부족해지는 4K 이미지" + ], + "details": { + "groups": "세트에 담을 크기입니다. 화면 크기는 `screens`, 프로필 사진은 `avatars`, 커버, 배너, 게시물, 썸네일은 `social`입니다. 모두 쓰려면 `all`로 둡니다.", + "content": "이미지가 보여 주는 것입니다. 테스트 패턴은 파일이 어떻게 읽히는지 확인하는 용도입니다. 자리 표시자는 가운데에 글자가 있는 단색 이미지로, 실제 이미지가 생기기 전에 페이지를 배치하는 용도입니다." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "쉼표로 구분한 크기", "format ids separated by commas": "쉼표로 구분한 형식 id", "format ids separated by commas, or all": "쉼표로 구분한 형식 id 또는 all", + "group names separated by commas, or all": "쉼표로 구분한 그룹 이름 또는 all", "extensions separated by commas": "쉼표로 구분한 확장자", - "the id of a format, as tfg formats lists them": "tfg formats가 나열하는 형식의 id", - "the id of a picture format, as tfg formats lists them": "tfg formats가 나열하는 이미지 형식의 id", + "the id of a format, such as png or csv": "png나 csv 같은 형식의 id", + "the id of a picture format, such as png or jpg": "png나 jpg 같은 이미지 형식의 id", "one line of up to 100 characters": "최대 100자의 한 줄", "a colour such as cccccc or ccc": "cccccc 또는 ccc 같은 색", "the password, in plain text": "암호(평문)", diff --git a/web/content/nl/site.json b/web/content/nl/site.json index 2e15e99d..d847e35d 100644 --- a/web/content/nl/site.json +++ b/web/content/nl/site.json @@ -137,7 +137,7 @@ "opslag die nul bytes als een mislukte upload leest en blijft opnieuw proberen" ], "details": { - "formats": "Uit welke formaten de set is opgebouwd. Laat het op all staan voor elk formaat van deze build, of noem de formaten die je systeem accepteert." + "formats": "Uit welke formaten de set is opgebouwd. Laat het op `all` staan voor elk formaat van deze build, of noem de formaten die je systeem accepteert." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Hoe ver boven de limiet het ene grote bestand komt. Zet het uit waar het schrijven van een veelvoud van de limiet de schijfruimte niet waard is.", "bulk": "Hoeveel bestanden de bulkupload bevat. Nul laat die groep helemaal uit de set." } + }, + "picture-sizes": { + "question": "Neemt mijn systeem afbeeldingen aan in de formaten die schermen en platforms gebruiken?", + "title": "Afbeeldingsformaten", + "pageTitle": "Testafbeeldingen in gangbare formaten - schermen, avatars, sociale media", + "description": "Afbeeldingen in de formaten van HD-, Full HD-, QHD- en 4K-schermen, van profielfoto's en van de omslagfoto's, berichten en miniaturen die sociale platforms vragen, elk zo klein als het kan.", + "catches": [ + "een grens voor breedte of hoogte die voor één vorm bedoeld was en een andere weigert, zoals een profielachtergrond van 1584 px breed", + "een miniatuur die wordt bijgesneden of platgedrukt omdat de code een liggende afbeelding verwacht en er een staande binnenkomt", + "een afbeelding met een oneven hoogte, zoals 1200 x 627, geweigerd door een stap die alleen even formaten aanneemt", + "een 4K-afbeelding die op weg naar een miniatuur zonder tijd of geheugen komt, hoewel het bestand zelf klein is" + ], + "details": { + "groups": "Welke formaten de set bevat: `screens` voor schermformaten, `avatars` voor profielfoto's en `social` voor omslagfoto's, banners, berichten en miniaturen. Laat het op `all` staan voor allemaal.", + "content": "Wat de afbeelding toont. Een testpatroon is om te controleren hoe een bestand wordt gelezen. Een placeholder is een egale kleur met tekst in het midden, om een pagina op te maken voordat de echte afbeeldingen er zijn." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "groottes gescheiden door komma's", "format ids separated by commas": "formaat-id's gescheiden door komma's", "format ids separated by commas, or all": "formaat-id's gescheiden door komma's, of all", + "group names separated by commas, or all": "groepsnamen gescheiden door komma's, of all", "extensions separated by commas": "extensies gescheiden door komma's", - "the id of a format, as tfg formats lists them": "de id van een formaat, zoals tfg formats ze opsomt", - "the id of a picture format, as tfg formats lists them": "de id van een afbeeldingsformaat, zoals tfg formats ze opsomt", + "the id of a format, such as png or csv": "de id van een formaat, zoals png of csv", + "the id of a picture format, such as png or jpg": "de id van een afbeeldingsformaat, zoals png of jpg", "one line of up to 100 characters": "één regel van maximaal 100 tekens", "a colour such as cccccc or ccc": "een kleur zoals cccccc of ccc", "the password, in plain text": "het wachtwoord, als platte tekst", diff --git a/web/content/pl/site.json b/web/content/pl/site.json index 536f02d4..e1bf9897 100644 --- a/web/content/pl/site.json +++ b/web/content/pl/site.json @@ -137,7 +137,7 @@ "magazyn, który zero bajtów uznaje za nieudane przesłanie i ponawia je bez końca" ], "details": { - "formats": "Z jakich formatów powstaje zestaw. Zostaw all, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje Twój system." + "formats": "Z jakich formatów powstaje zestaw. Zostaw `all`, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje Twój system." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Jak daleko za limit sięga jeden duży plik. Wyłącz go tam, gdzie zapis kilkukrotności limitu nie jest wart miejsca na dysku.", "bulk": "Ile plików ma przesyłanie masowe. Zero całkiem usuwa tę grupę z zestawu." } + }, + "picture-sizes": { + "question": "Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?", + "title": "Rozmiary obrazków", + "pageTitle": "Obrazki testowe w popularnych rozmiarach - ekrany, awatary, media społecznościowe", + "description": "Obrazki w rozmiarach ekranów HD, Full HD, QHD i 4K, zdjęć profilowych oraz okładek, postów i miniatur, o które proszą platformy społecznościowe, każdy tak mały, jak się da.", + "catches": [ + "limit szerokości albo wysokości ustawiony z myślą o jednym kształcie, który odrzuca inny, na przykład tło profilu szerokie na 1584 px", + "miniatura przycięta albo spłaszczona, bo kod spodziewa się obrazka poziomego, a przychodzi pionowy", + "obrazek o nieparzystej wysokości, na przykład 1200 x 627, odrzucony przez krok, który przyjmuje tylko parzyste wymiary", + "obrazek 4K, któremu w drodze do miniatury kończy się czas albo pamięć, choć sam plik jest mały" + ], + "details": { + "groups": "Jakie rozmiary zawiera zestaw: `screens` to rozmiary ekranów, `avatars` to zdjęcia profilowe, a `social` to okładki, banery, posty i miniatury. Zostaw `all`, żeby dostać wszystkie.", + "content": "Co pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki." + } } }, "commands": { @@ -266,9 +282,10 @@ "sizes separated by commas": "rozmiary rozdzielone przecinkami", "format ids separated by commas": "identyfikatory formatów rozdzielone przecinkami", "format ids separated by commas, or all": "identyfikatory formatów rozdzielone przecinkami albo all", + "group names separated by commas, or all": "nazwy grup rozdzielone przecinkami albo all", "extensions separated by commas": "rozszerzenia rozdzielone przecinkami", - "the id of a format, as tfg formats lists them": "identyfikator formatu, tak jak wypisuje go tfg formats", - "the id of a picture format, as tfg formats lists them": "identyfikator formatu obrazka, tak jak wypisuje go tfg formats", + "the id of a format, such as png or csv": "identyfikator formatu, na przykład png albo csv", + "the id of a picture format, such as png or jpg": "identyfikator formatu obrazka, na przykład png albo jpg", "one line of up to 100 characters": "jeden wiersz do 100 znaków", "a colour such as cccccc or ccc": "kolor, na przykład cccccc albo ccc", "the password, in plain text": "hasło, zwykłym tekstem", diff --git a/web/content/pt-BR/site.json b/web/content/pt-BR/site.json index 720efecd..5f3849dc 100644 --- a/web/content/pt-BR/site.json +++ b/web/content/pt-BR/site.json @@ -137,7 +137,7 @@ "um armazenamento que lê zero byte como upload com falha e fica tentando de novo" ], "details": { - "formats": "De quais formatos o conjunto é feito. Deixe em all para todos os formatos desta versão, ou nomeie os que o seu sistema aceita." + "formats": "De quais formatos o conjunto é feito. Deixe em `all` para todos os formatos desta versão, ou nomeie os que o seu sistema aceita." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "O quanto acima do limite vai o único arquivo grande. Desligue onde escrever várias vezes o limite não vale o disco.", "bulk": "Quantos arquivos o upload em massa contém. Zero deixa esse grupo totalmente fora do conjunto." } + }, + "picture-sizes": { + "question": "Meu sistema aceita imagens nos tamanhos que telas e plataformas usam?", + "title": "Tamanhos de imagem", + "pageTitle": "Imagens de teste em tamanhos comuns - telas, avatares, redes sociais", + "description": "Imagens nos tamanhos de telas HD, Full HD, QHD e 4K, de fotos de perfil e das capas, publicações e miniaturas que as redes sociais pedem, cada uma tão pequena quanto pode ser.", + "catches": [ + "um limite de largura ou altura pensado para um formato de imagem que recusa outro, como um fundo de perfil com 1584 px de largura", + "uma miniatura cortada ou achatada porque o código espera uma imagem horizontal e chega uma vertical", + "uma imagem de altura ímpar, como 1200 x 627, recusada por uma etapa que só aceita tamanhos pares", + "uma imagem 4K que fica sem tempo ou sem memória a caminho de uma miniatura, embora o arquivo seja pequeno" + ], + "details": { + "groups": "Quais tamanhos o conjunto contém: `screens` para tamanhos de tela, `avatars` para fotos de perfil e `social` para capas, banners, publicações e miniaturas. Deixe em `all` para ter todos.", + "content": "O que a imagem mostra. Um padrão de teste serve para verificar como um arquivo é lido. Um espaço reservado é uma cor lisa com texto no meio, para montar uma página antes de existirem as imagens reais." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "tamanhos separados por vírgulas", "format ids separated by commas": "ids de formato separados por vírgulas", "format ids separated by commas, or all": "ids de formato separados por vírgulas, ou all", + "group names separated by commas, or all": "nomes de grupo separados por vírgulas, ou all", "extensions separated by commas": "extensões separadas por vírgulas", - "the id of a format, as tfg formats lists them": "o id de um formato, como o tfg formats lista", - "the id of a picture format, as tfg formats lists them": "o id de um formato de imagem, como o tfg formats lista", + "the id of a format, such as png or csv": "o id de um formato, como png ou csv", + "the id of a picture format, such as png or jpg": "o id de um formato de imagem, como png ou jpg", "one line of up to 100 characters": "uma linha de até 100 caracteres", "a colour such as cccccc or ccc": "uma cor como cccccc ou ccc", "the password, in plain text": "a senha, em texto simples", diff --git a/web/content/ro/site.json b/web/content/ro/site.json index dcaa971d..9c00c618 100644 --- a/web/content/ro/site.json +++ b/web/content/ro/site.json @@ -137,7 +137,7 @@ "un depozit care citește zero octeți ca pe o încărcare eșuată și tot reîncearcă" ], "details": { - "formats": "Din ce formate este alcătuit setul. Lasă all pentru toate formatele acestei versiuni sau numește-le pe cele pe care le acceptă sistemul tău." + "formats": "Din ce formate este alcătuit setul. Lasă `all` pentru toate formatele acestei versiuni sau numește-le pe cele pe care le acceptă sistemul tău." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Cât de mult peste limită ajunge singurul fișier mare. Oprește-l unde scrierea de mai multe ori limita nu merită discul.", "bulk": "Câte fișiere conține încărcarea în masă. Zero scoate acel grup complet din set." } + }, + "picture-sizes": { + "question": "Acceptă sistemul meu imagini la dimensiunile folosite de ecrane și platforme?", + "title": "Dimensiuni de imagine", + "pageTitle": "Imagini de test la dimensiuni uzuale - ecrane, avatare, rețele sociale", + "description": "Imagini la dimensiunile ecranelor HD, Full HD, QHD și 4K, ale fotografiilor de profil și ale copertelor, postărilor și miniaturilor cerute de rețelele sociale, fiecare cât de mică poate fi.", + "catches": [ + "o limită de lățime sau de înălțime gândită pentru o formă care respinge alta, de exemplu un fundal de profil lat de 1584 px", + "o miniatură tăiată sau turtită pentru că codul așteaptă o imagine orizontală și sosește una verticală", + "o imagine cu înălțime impară, de exemplu 1200 x 627, respinsă de un pas care acceptă doar dimensiuni pare", + "o imagine 4K care rămâne fără timp sau fără memorie în drum spre o miniatură, deși fișierul în sine este mic" + ], + "details": { + "groups": "Ce dimensiuni conține setul: `screens` pentru dimensiunile ecranelor, `avatars` pentru fotografiile de profil și `social` pentru coperte, bannere, postări și miniaturi. Lasă `all` pentru toate.", + "content": "Ce arată imaginea. Un model de test servește la verificarea felului în care este citit un fișier. Un substituent este o culoare uniformă cu text în mijloc, pentru a așeza o pagină înainte să existe imaginile reale." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "dimensiuni separate prin virgule", "format ids separated by commas": "id-uri de format separate prin virgule", "format ids separated by commas, or all": "id-uri de format separate prin virgule, sau all", + "group names separated by commas, or all": "nume de grupuri separate prin virgule, sau all", "extensions separated by commas": "extensii separate prin virgule", - "the id of a format, as tfg formats lists them": "id-ul unui format, așa cum îl listează tfg formats", - "the id of a picture format, as tfg formats lists them": "id-ul unui format de imagine, așa cum îl listează tfg formats", + "the id of a format, such as png or csv": "id-ul unui format, de exemplu png sau csv", + "the id of a picture format, such as png or jpg": "id-ul unui format de imagine, de exemplu png sau jpg", "one line of up to 100 characters": "un singur rând de cel mult 100 de caractere", "a colour such as cccccc or ccc": "o culoare precum cccccc sau ccc", "the password, in plain text": "parola, în text simplu", diff --git a/web/content/ru/site.json b/web/content/ru/site.json index a9598be6..df4d565a 100644 --- a/web/content/ru/site.json +++ b/web/content/ru/site.json @@ -137,7 +137,7 @@ "хранилище, которое воспринимает ноль байт как неудачную загрузку и бесконечно повторяет попытки" ], "details": { - "formats": "Из каких форматов состоит набор. Оставьте all для всех форматов этой сборки или перечислите те, которые принимает ваша система." + "formats": "Из каких форматов состоит набор. Оставьте `all` для всех форматов этой сборки или перечислите те, которые принимает ваша система." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Насколько далеко за лимит заходит единственный большой файл. Отключите, если запись нескольких лимитов не стоит места на диске.", "bulk": "Сколько файлов в массовой загрузке. Ноль полностью убирает эту группу из набора." } + }, + "picture-sizes": { + "question": "Принимает ли моя система изображения тех размеров, которые используют экраны и платформы?", + "title": "Размеры изображений", + "pageTitle": "Тестовые изображения популярных размеров - экраны, аватары, соцсети", + "description": "Изображения размеров экранов HD, Full HD, QHD и 4K, фото профиля, а также обложек, публикаций и миниатюр, которые просят социальные платформы, каждое настолько маленькое, насколько возможно.", + "catches": [ + "ограничение ширины или высоты, заданное под одну форму и отклоняющее другую, например фон профиля шириной 1584 px", + "миниатюра обрезана или сплющена, потому что код ждёт горизонтальное изображение, а приходит вертикальное", + "изображение нечётной высоты, например 1200 x 627, отклонённое шагом, который принимает только чётные размеры", + "изображение 4K, которому по пути к миниатюре не хватает времени или памяти, хотя сам файл маленький" + ], + "details": { + "groups": "Какие размеры входят в набор: `screens` для размеров экранов, `avatars` для фото профиля и `social` для обложек, баннеров, публикаций и миниатюр. Оставьте `all`, чтобы получить все.", + "content": "Что показывает изображение. Тестовый шаблон нужен, чтобы проверить, как читается файл. Заглушка - это сплошной цвет с надписью посередине, чтобы верстать страницу до появления настоящих изображений." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "размеры через запятую", "format ids separated by commas": "id форматов через запятую", "format ids separated by commas, or all": "id форматов через запятую или all", + "group names separated by commas, or all": "названия групп через запятую или all", "extensions separated by commas": "расширения через запятую", - "the id of a format, as tfg formats lists them": "id формата в том виде, как его выводит tfg formats", - "the id of a picture format, as tfg formats lists them": "id формата изображения в том виде, как его выводит tfg formats", + "the id of a format, such as png or csv": "id формата, например png или csv", + "the id of a picture format, such as png or jpg": "id формата изображения, например png или jpg", "one line of up to 100 characters": "одна строка не длиннее 100 символов", "a colour such as cccccc or ccc": "цвет, например cccccc или ccc", "the password, in plain text": "пароль открытым текстом", diff --git a/web/content/th/site.json b/web/content/th/site.json index 23c97bec..767466cc 100644 --- a/web/content/th/site.json +++ b/web/content/th/site.json @@ -137,7 +137,7 @@ "ที่เก็บข้อมูลที่ถือว่าศูนย์ไบต์คืออัปโหลดล้มเหลวแล้วลองซ้ำไม่หยุด" ], "details": { - "formats": "ชุดนี้สร้างจากรูปแบบใดบ้าง ปล่อยเป็น all เพื่อใช้ทุกรูปแบบของบิลด์นี้ หรือระบุเฉพาะรูปแบบที่ระบบของคุณรับ" + "formats": "ชุดนี้สร้างจากรูปแบบใดบ้าง ปล่อยเป็น `all` เพื่อใช้ทุกรูปแบบของบิลด์นี้ หรือระบุเฉพาะรูปแบบที่ระบบของคุณรับ" } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "ไฟล์ใหญ่ไฟล์เดียวเกินขีดจำกัดไปไกลแค่ไหน ปิดไว้หากการเขียนหลายเท่าของขีดจำกัดไม่คุ้มกับพื้นที่ดิสก์", "bulk": "การอัปโหลดเป็นกลุ่มมีกี่ไฟล์ ศูนย์จะตัดกลุ่มนั้นออกจากชุดทั้งหมด" } + }, + "picture-sizes": { + "question": "ระบบของฉันรับรูปภาพในขนาดที่หน้าจอและแพลตฟอร์มใช้หรือไม่", + "title": "ขนาดรูปภาพ", + "pageTitle": "รูปภาพทดสอบในขนาดที่ใช้บ่อย - หน้าจอ อวาตาร์ โซเชียลมีเดีย", + "description": "รูปภาพในขนาดของหน้าจอ HD, Full HD, QHD และ 4K ขนาดของรูปโปรไฟล์ และขนาดของภาพปก โพสต์ และภาพขนาดย่อที่แพลตฟอร์มโซเชียลกำหนด แต่ละรูปเล็กที่สุดเท่าที่ทำได้", + "catches": [ + "ขีดจำกัดความกว้างหรือความสูงที่ตั้งไว้สำหรับรูปทรงหนึ่งแต่ปฏิเสธอีกรูปทรง เช่น พื้นหลังโปรไฟล์กว้าง 1584 px", + "ภาพขนาดย่อถูกตัดหรือบีบ เพราะโค้ดคาดว่าจะเป็นภาพแนวนอนแต่ได้ภาพแนวตั้งมา", + "รูปภาพความสูงเป็นเลขคี่ เช่น 1200 x 627 ที่ถูกปฏิเสธโดยขั้นตอนที่รับเฉพาะขนาดเลขคู่", + "รูปภาพ 4K ที่หมดเวลาหรือหน่วยความจำระหว่างทางไปเป็นภาพขนาดย่อ แม้ตัวไฟล์จะเล็ก" + ], + "details": { + "groups": "ชุดนี้มีขนาดใดบ้าง `screens` สำหรับขนาดหน้าจอ `avatars` สำหรับรูปโปรไฟล์ และ `social` สำหรับภาพปก แบนเนอร์ โพสต์ และภาพขนาดย่อ ปล่อยเป็น `all` เพื่อให้ได้ทั้งหมด", + "content": "รูปภาพแสดงอะไร รูปแบบทดสอบใช้ตรวจว่าไฟล์ถูกอ่านอย่างไร ภาพตัวยึดตำแหน่งคือสีพื้นเรียบที่มีข้อความอยู่ตรงกลาง สำหรับจัดหน้าก่อนที่จะมีรูปจริง" + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "ขนาดที่คั่นด้วยจุลภาค", "format ids separated by commas": "รหัสรูปแบบที่คั่นด้วยจุลภาค", "format ids separated by commas, or all": "รหัสรูปแบบที่คั่นด้วยจุลภาค หรือ all", + "group names separated by commas, or all": "ชื่อกลุ่มที่คั่นด้วยจุลภาค หรือ all", "extensions separated by commas": "นามสกุลที่คั่นด้วยจุลภาค", - "the id of a format, as tfg formats lists them": "รหัสของรูปแบบ ตามที่ tfg formats แสดง", - "the id of a picture format, as tfg formats lists them": "รหัสของรูปแบบรูปภาพ ตามที่ tfg formats แสดง", + "the id of a format, such as png or csv": "รหัสของรูปแบบ เช่น png หรือ csv", + "the id of a picture format, such as png or jpg": "รหัสของรูปแบบรูปภาพ เช่น png หรือ jpg", "one line of up to 100 characters": "หนึ่งบรรทัด ไม่เกิน 100 ตัวอักษร", "a colour such as cccccc or ccc": "สี เช่น cccccc หรือ ccc", "the password, in plain text": "รหัสผ่านในรูปข้อความธรรมดา", diff --git a/web/content/tr/site.json b/web/content/tr/site.json index f0151f39..22f264f0 100644 --- a/web/content/tr/site.json +++ b/web/content/tr/site.json @@ -137,7 +137,7 @@ "sıfır baytı başarısız yükleme sayıp durmadan yeniden deneyen depolama" ], "details": { - "formats": "Setin hangi biçimlerden oluştuğu. Bu sürümdeki tüm biçimler için all bırakın veya sisteminizin kabul ettiklerini yazın." + "formats": "Setin hangi biçimlerden oluştuğu. Bu sürümdeki tüm biçimler için `all` bırakın veya sisteminizin kabul ettiklerini yazın." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Tek büyük dosyanın sınırın ne kadar ötesine geçtiği. Sınırın birkaç katını yazmak diske değmiyorsa kapatın.", "bulk": "Toplu yüklemenin kaç dosya içerdiği. Sıfır, bu grubu setten tamamen çıkarır." } + }, + "picture-sizes": { + "question": "Sistemim ekranların ve platformların kullandığı boyutlardaki resimleri kabul ediyor mu?", + "title": "Resim boyutları", + "pageTitle": "Yaygın boyutlarda test resimleri - ekranlar, avatarlar, sosyal medya", + "description": "HD, Full HD, QHD ve 4K ekranların, profil fotoğraflarının ve sosyal platformların istediği kapak, gönderi ve küçük resimlerin boyutlarında resimler, her biri olabildiğince küçük.", + "catches": [ + "bir şekil düşünülerek konmuş ve başka bir şekli reddeden genişlik ya da yükseklik sınırı, örneğin 1584 px genişliğinde bir profil arka planı", + "kod yatay bir resim beklediği hâlde dikey bir resim geldiği için kırpılan ya da ezilen küçük resim", + "yalnızca çift boyutları kabul eden bir adımın reddettiği tek yükseklikli bir resim, örneğin 1200 x 627", + "dosyanın kendisi küçük olsa da küçük resme dönüşürken zamanı ya da belleği tükenen bir 4K resim" + ], + "details": { + "groups": "Setin hangi boyutları içerdiği: ekran boyutları için `screens`, profil fotoğrafları için `avatars` ve kapaklar, afişler, gönderiler ve küçük resimler için `social`. Hepsi için `all` bırakın.", + "content": "Resmin ne gösterdiği. Test deseni bir dosyanın nasıl okunduğunu denetlemek içindir. Yer tutucu, ortasında yazı olan düz bir renktir ve gerçek resimler hazır olmadan sayfayı düzenlemeye yarar." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "virgülle ayrılmış boyutlar", "format ids separated by commas": "virgülle ayrılmış biçim kimlikleri", "format ids separated by commas, or all": "virgülle ayrılmış biçim kimlikleri veya all", + "group names separated by commas, or all": "virgülle ayrılmış grup adları veya all", "extensions separated by commas": "virgülle ayrılmış uzantılar", - "the id of a format, as tfg formats lists them": "tfg formats'ın listelediği gibi bir biçimin kimliği", - "the id of a picture format, as tfg formats lists them": "tfg formats'ın listelediği gibi bir görüntü biçiminin kimliği", + "the id of a format, such as png or csv": "png ya da csv gibi bir biçimin kimliği", + "the id of a picture format, such as png or jpg": "png ya da jpg gibi bir görüntü biçiminin kimliği", "one line of up to 100 characters": "en fazla 100 karakterlik tek satır", "a colour such as cccccc or ccc": "cccccc veya ccc gibi bir renk", "the password, in plain text": "parola, düz metin olarak", diff --git a/web/content/uk/site.json b/web/content/uk/site.json index a2270253..85f20b6e 100644 --- a/web/content/uk/site.json +++ b/web/content/uk/site.json @@ -137,7 +137,7 @@ "сховище, яке сприймає нуль байтів як невдале завантаження й безкінечно повторює спроби" ], "details": { - "formats": "З яких форматів складається набір. Залиште all для всіх форматів цієї збірки або перелічіть ті, які приймає ваша система." + "formats": "З яких форматів складається набір. Залиште `all` для всіх форматів цієї збірки або перелічіть ті, які приймає ваша система." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Наскільки далеко за ліміт заходить єдиний великий файл. Вимкніть, якщо запис кількох лімітів не вартий місця на диску.", "bulk": "Скільки файлів у масовому завантаженні. Нуль повністю прибирає цю групу з набору." } + }, + "picture-sizes": { + "question": "Чи приймає моя система зображення тих розмірів, які використовують екрани й платформи?", + "title": "Розміри зображень", + "pageTitle": "Тестові зображення поширених розмірів - екрани, аватари, соцмережі", + "description": "Зображення розмірів екранів HD, Full HD, QHD і 4K, фото профілю, а також обкладинок, дописів і мініатюр, яких вимагають соціальні платформи, кожне настільки мале, наскільки можливо.", + "catches": [ + "обмеження ширини або висоти, задане під одну форму, яке відхиляє іншу, наприклад тло профілю завширшки 1584 px", + "мініатюра обрізана або сплющена, бо код чекає горизонтальне зображення, а надходить вертикальне", + "зображення непарної висоти, наприклад 1200 x 627, відхилене кроком, який приймає лише парні розміри", + "зображення 4K, якому дорогою до мініатюри бракує часу або пам'яті, хоча сам файл малий" + ], + "details": { + "groups": "Які розміри містить набір: `screens` для розмірів екранів, `avatars` для фото профілю і `social` для обкладинок, банерів, дописів і мініатюр. Залиште `all`, щоб отримати всі.", + "content": "Що показує зображення. Тестовий шаблон потрібен, щоб перевірити, як читається файл. Заповнювач - це суцільний колір із написом посередині, щоб верстати сторінку до появи справжніх зображень." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "розміри через кому", "format ids separated by commas": "id форматів через кому", "format ids separated by commas, or all": "id форматів через кому або all", + "group names separated by commas, or all": "назви груп через кому або all", "extensions separated by commas": "розширення через кому", - "the id of a format, as tfg formats lists them": "id формату в тому вигляді, як його виводить tfg formats", - "the id of a picture format, as tfg formats lists them": "id формату зображення в тому вигляді, як його виводить tfg formats", + "the id of a format, such as png or csv": "id формату, наприклад png або csv", + "the id of a picture format, such as png or jpg": "id формату зображення, наприклад png або jpg", "one line of up to 100 characters": "один рядок до 100 символів", "a colour such as cccccc or ccc": "колір, наприклад cccccc або ccc", "the password, in plain text": "пароль відкритим текстом", diff --git a/web/content/vi/site.json b/web/content/vi/site.json index c2cabb9c..9abbfa0b 100644 --- a/web/content/vi/site.json +++ b/web/content/vi/site.json @@ -137,7 +137,7 @@ "bộ lưu trữ đọc không byte như một lần tải lên thất bại và cứ thử lại mãi" ], "details": { - "formats": "Bộ được dựng từ những định dạng nào. Để all cho mọi định dạng của bản dựng này, hoặc nêu những định dạng hệ thống của bạn chấp nhận." + "formats": "Bộ được dựng từ những định dạng nào. Để `all` cho mọi định dạng của bản dựng này, hoặc nêu những định dạng hệ thống của bạn chấp nhận." } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "Tệp lớn duy nhất vượt giới hạn bao xa. Tắt đi nếu ghi gấp nhiều lần giới hạn không đáng với dung lượng đĩa.", "bulk": "Số tệp trong lần tải lên hàng loạt. Bằng không thì bỏ hẳn nhóm đó khỏi bộ." } + }, + "picture-sizes": { + "question": "Hệ thống của tôi có nhận hình ảnh ở các kích thước mà màn hình và nền tảng dùng không?", + "title": "Kích thước hình ảnh", + "pageTitle": "Hình ảnh thử ở kích thước phổ biến - màn hình, ảnh đại diện, mạng xã hội", + "description": "Hình ảnh ở kích thước của màn hình HD, Full HD, QHD và 4K, của ảnh đại diện, và của ảnh bìa, bài đăng và hình thu nhỏ mà các nền tảng mạng xã hội yêu cầu, mỗi ảnh nhỏ nhất có thể.", + "catches": [ + "giới hạn chiều rộng hoặc chiều cao đặt cho một dạng ảnh nhưng từ chối dạng khác, chẳng hạn ảnh nền hồ sơ rộng 1584 px", + "hình thu nhỏ bị cắt hoặc bị bóp méo vì mã chờ ảnh ngang mà ảnh đến lại là ảnh dọc", + "ảnh có chiều cao lẻ, chẳng hạn 1200 x 627, bị một bước chỉ nhận kích thước chẵn từ chối", + "ảnh 4K hết thời gian hoặc bộ nhớ trên đường thành hình thu nhỏ, dù bản thân tệp nhỏ" + ], + "details": { + "groups": "Bộ chứa những kích thước nào: `screens` cho kích thước màn hình, `avatars` cho ảnh đại diện và `social` cho ảnh bìa, biểu ngữ, bài đăng và hình thu nhỏ. Để `all` để có tất cả.", + "content": "Hình ảnh hiển thị gì. Mẫu thử dùng để kiểm tra cách một tệp được đọc. Ảnh giữ chỗ là một màu trơn có chữ ở giữa, để dàn trang trước khi có ảnh thật." + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "các kích thước cách nhau bằng dấu phẩy", "format ids separated by commas": "các id định dạng cách nhau bằng dấu phẩy", "format ids separated by commas, or all": "các id định dạng cách nhau bằng dấu phẩy, hoặc all", + "group names separated by commas, or all": "các tên nhóm cách nhau bằng dấu phẩy, hoặc all", "extensions separated by commas": "các phần mở rộng cách nhau bằng dấu phẩy", - "the id of a format, as tfg formats lists them": "id của một định dạng, như tfg formats liệt kê", - "the id of a picture format, as tfg formats lists them": "id của một định dạng hình ảnh, như tfg formats liệt kê", + "the id of a format, such as png or csv": "id của một định dạng, chẳng hạn png hoặc csv", + "the id of a picture format, such as png or jpg": "id của một định dạng hình ảnh, chẳng hạn png hoặc jpg", "one line of up to 100 characters": "một dòng tối đa 100 ký tự", "a colour such as cccccc or ccc": "một màu như cccccc hoặc ccc", "the password, in plain text": "mật khẩu, ở dạng văn bản thuần", diff --git a/web/content/zh-Hans/site.json b/web/content/zh-Hans/site.json index 1f14483a..8bf0d15c 100644 --- a/web/content/zh-Hans/site.json +++ b/web/content/zh-Hans/site.json @@ -137,7 +137,7 @@ "存储把零字节当成上传失败,并不断重试" ], "details": { - "formats": "集合由哪些格式构成。填 all 表示此版本的所有格式,也可以只列出你的系统接受的格式。" + "formats": "集合由哪些格式构成。填 `all` 表示此版本的所有格式,也可以只列出你的系统接受的格式。" } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "那个超大文件超出限制多少。如果写入限制数倍大小的文件不值得占用磁盘,可以关闭。", "bulk": "批量上传包含多少个文件。设为零则完全不包含这一组。" } + }, + "picture-sizes": { + "question": "我的系统能接受屏幕和平台所用尺寸的图片吗?", + "title": "图片尺寸", + "pageTitle": "常用尺寸的测试图片 - 屏幕、头像、社交媒体", + "description": "HD、Full HD、QHD 和 4K 屏幕尺寸、头像尺寸,以及社交平台要求的封面、帖子和缩略图尺寸的图片,每张都尽可能小。", + "catches": [ + "按一种形状设定的宽度或高度上限拒绝了另一种形状,例如宽 1584 px 的个人资料背景", + "代码以为是横向图片,来的却是纵向图片,于是缩略图被裁切或压扁", + "高度为奇数的图片,例如 1200 x 627,被只接受偶数尺寸的步骤拒绝", + "文件本身很小,生成缩略图时却耗尽时间或内存的 4K 图片" + ], + "details": { + "groups": "集合包含哪些尺寸:`screens` 表示屏幕尺寸,`avatars` 表示头像,`social` 表示封面、横幅、帖子和缩略图。填 `all` 表示全部。", + "content": "图片显示什么。测试图案用于检查文件如何被读取。占位图是中间有文字的纯色图片,用于在真实图片出现之前排版页面。" + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "以逗号分隔的大小", "format ids separated by commas": "以逗号分隔的格式 id", "format ids separated by commas, or all": "以逗号分隔的格式 id,或 all", + "group names separated by commas, or all": "以逗号分隔的组名,或 all", "extensions separated by commas": "以逗号分隔的扩展名", - "the id of a format, as tfg formats lists them": "格式的 id,与 tfg formats 列出的一致", - "the id of a picture format, as tfg formats lists them": "图片格式的 id,与 tfg formats 列出的一致", + "the id of a format, such as png or csv": "格式的 id,例如 png 或 csv", + "the id of a picture format, such as png or jpg": "图片格式的 id,例如 png 或 jpg", "one line of up to 100 characters": "一行,最多 100 个字符", "a colour such as cccccc or ccc": "颜色,例如 cccccc 或 ccc", "the password, in plain text": "明文密码", diff --git a/web/content/zh-Hant/site.json b/web/content/zh-Hant/site.json index 53adbebf..796a8bf8 100644 --- a/web/content/zh-Hant/site.json +++ b/web/content/zh-Hant/site.json @@ -137,7 +137,7 @@ "儲存空間把零位元組當成上傳失敗,並不斷重試" ], "details": { - "formats": "組合由哪些格式構成。填 all 代表此版本的所有格式,也可以只列出你的系統接受的格式。" + "formats": "組合由哪些格式構成。填 `all` 代表此版本的所有格式,也可以只列出你的系統接受的格式。" } }, "filename-handling": { @@ -220,6 +220,22 @@ "far-over": "那個超大檔案超出限制多少。如果寫入限制數倍大小的檔案不值得占用磁碟,可以關閉。", "bulk": "大量上傳包含多少個檔案。設為零則完全不包含這一組。" } + }, + "picture-sizes": { + "question": "我的系統能接受螢幕和平台所用尺寸的圖片嗎?", + "title": "圖片尺寸", + "pageTitle": "常用尺寸的測試圖片 - 螢幕、頭像、社群媒體", + "description": "HD、Full HD、QHD 和 4K 螢幕尺寸、頭像尺寸,以及社群平台要求的封面、貼文和縮圖尺寸的圖片,每張都盡可能小。", + "catches": [ + "依一種形狀設定的寬度或高度上限拒絕了另一種形狀,例如寬 1584 px 的個人檔案背景", + "程式碼以為是橫向圖片,來的卻是直向圖片,於是縮圖被裁切或壓扁", + "高度為奇數的圖片,例如 1200 x 627,被只接受偶數尺寸的步驟拒絕", + "檔案本身很小,產生縮圖時卻耗盡時間或記憶體的 4K 圖片" + ], + "details": { + "groups": "組合包含哪些尺寸:`screens` 代表螢幕尺寸,`avatars` 代表頭像,`social` 代表封面、橫幅、貼文和縮圖。填 `all` 代表全部。", + "content": "圖片顯示什麼。測試圖樣用來檢查檔案如何被讀取。佔位圖是中間有文字的純色圖片,用來在真實圖片出現之前排版頁面。" + } } }, "commands": { @@ -271,9 +287,10 @@ "sizes separated by commas": "以逗號分隔的大小", "format ids separated by commas": "以逗號分隔的格式 id", "format ids separated by commas, or all": "以逗號分隔的格式 id,或 all", + "group names separated by commas, or all": "以逗號分隔的組名,或 all", "extensions separated by commas": "以逗號分隔的副檔名", - "the id of a format, as tfg formats lists them": "格式的 id,與 tfg formats 列出的相同", - "the id of a picture format, as tfg formats lists them": "圖片格式的 id,與 tfg formats 列出的相同", + "the id of a format, such as png or csv": "格式的 id,例如 png 或 csv", + "the id of a picture format, such as png or jpg": "圖片格式的 id,例如 png 或 jpg", "one line of up to 100 characters": "一行,最多 100 個字元", "a colour such as cccccc or ccc": "顏色,例如 cccccc 或 ccc", "the password, in plain text": "明文密碼", diff --git a/web/public/ar/docs/index.html b/web/public/ar/docs/index.html index 1746a34f..ee5ac083 100644 --- a/web/public/ar/docs/index.html +++ b/web/public/ar/docs/index.html @@ -385,6 +385,11 @@

ما الإعداد المسبق؟

هل سيخزّن نظامي ويعرض ويعيد اسم ملف لم يتوقعه؟

filename-handling

+
  • +

    أحجام الصور

    +

    هل يقبل نظامي الصور بالأحجام التي تستخدمها الشاشات والمنصات؟

    +

    picture-sizes

    +
  • حدود الحجم

    هل يُطبَّق حد الحجم تمامًا حيث أُعلن عنه؟

    diff --git a/web/public/ar/formats/index.html b/web/public/ar/formats/index.html index 8945d9ee..d066253a 100644 --- a/web/public/ar/formats/index.html +++ b/web/public/ar/formats/index.html @@ -570,7 +570,7 @@

    الإعدادات التي تقبلها كل صيغة

    attachment_format - معرّف صيغة، كما يسردها tfg formats + معرّف صيغة، مثل png أو csv @@ -595,7 +595,7 @@

    الإعدادات التي تقبلها كل صيغة

    inline_format - معرّف صيغة صورة، كما يسردها tfg formats + معرّف صيغة صورة، مثل png أو jpg @@ -720,7 +720,7 @@

    الإعدادات التي تقبلها كل صيغة

    inline_format - معرّف صيغة صورة، كما يسردها tfg formats + معرّف صيغة صورة، مثل png أو jpg @@ -1140,7 +1140,7 @@

    الإعدادات التي تقبلها كل صيغة

    inline_format - معرّف صيغة صورة، كما يسردها tfg formats + معرّف صيغة صورة، مثل png أو jpg @@ -1195,7 +1195,7 @@

    الإعدادات التي تقبلها كل صيغة

    entry_format - معرّف صيغة، كما يسردها tfg formats + معرّف صيغة، مثل png أو csv @@ -1340,7 +1340,7 @@

    الإعدادات التي تقبلها كل صيغة

    entry_format - معرّف صيغة، كما يسردها tfg formats + معرّف صيغة، مثل png أو csv diff --git a/web/public/ar/index.html b/web/public/ar/index.html index b4d11aaf..a600c34b 100644 --- a/web/public/ar/index.html +++ b/web/public/ar/index.html @@ -275,6 +275,11 @@

    اختر السؤال، واحصل على المجموعة كاملة

    هل سيخزّن نظامي ويعرض ويعيد اسم ملف لم يتوقعه؟

    filename-handling

  • +
  • +

    أحجام الصور

    +

    هل يقبل نظامي الصور بالأحجام التي تستخدمها الشاشات والمنصات؟

    +

    picture-sizes

    +
  • حدود الحجم

    هل يُطبَّق حد الحجم تمامًا حيث أُعلن عنه؟

    diff --git a/web/public/ar/presets/empty-and-minimal/index.html b/web/public/ar/presets/empty-and-minimal/index.html index aff5998e..0b89fc54 100644 --- a/web/public/ar/presets/empty-and-minimal/index.html +++ b/web/public/ar/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    ما الذي يمكنك تغييره؟

    --formats معرّفات صيغ مفصولة بفواصل، أو all all - الصيغ التي تتكون منها المجموعة. اتركها على all لكل صيغ هذا الإصدار، أو سمِّ الصيغ التي يقبلها نظامك. + الصيغ التي تتكون منها المجموعة. اتركها على all لكل صيغ هذا الإصدار، أو سمِّ الصيغ التي يقبلها نظامك. diff --git a/web/public/ar/presets/index.html b/web/public/ar/presets/index.html index fb675d3a..468a5e6b 100644 --- a/web/public/ar/presets/index.html +++ b/web/public/ar/presets/index.html @@ -162,6 +162,11 @@

    إعدادات مسبقة لملفات الاختبار، مجموعة لك

    هل سيخزّن نظامي ويعرض ويعيد اسم ملف لم يتوقعه؟

    filename-handling

  • +
  • +

    أحجام الصور

    +

    هل يقبل نظامي الصور بالأحجام التي تستخدمها الشاشات والمنصات؟

    +

    picture-sizes

    +
  • حدود الحجم

    هل يُطبَّق حد الحجم تمامًا حيث أُعلن عنه؟

    diff --git a/web/public/ar/presets/picture-sizes/index.html b/web/public/ar/presets/picture-sizes/index.html new file mode 100644 index 00000000..e6839959 --- /dev/null +++ b/web/public/ar/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +صور اختبار بأحجام شائعة - الشاشات والصور الرمزية ووسائل التواصل + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    الإعدادات المسبقة

    +

    أحجام الصور

    +

    هل يقبل نظامي الصور بالأحجام التي تستخدمها الشاشات والمنصات؟

    +

    + يبني الإعداد المسبق picture-sizes بأمر واحد مجموعة كاملة من ملفات الاختبار الحقيقية لهذا + السؤال، وبجانبها manifest.json يحدد كيف يجب أن يتفاعل نظامك مع كل ملف. كل ما يلي + مقروء من البرنامج، عند القيم الافتراضية لهذا الإصدار. +

    + + +
    +

    ماذا يكتشف عادةً؟

    +
      +
    • حد للعرض أو الارتفاع وُضع لشكل واحد فيرفض شكلًا آخر، مثل خلفية ملف شخصي بعرض 1584 px
    • +
    • صورة مصغرة مقصوصة أو مضغوطة لأن الشيفرة تتوقع صورة أفقية فتصل صورة عمودية
    • +
    • صورة بارتفاع فردي، مثل 1200 x 627، ترفضها خطوة لا تقبل إلا الأحجام الزوجية
    • +
    • صورة 4K ينفد وقتها أو ذاكرتها في الطريق إلى صورة مصغرة، رغم أن الملف نفسه صغير
    • +
    +
    + + +
    +

    ماذا في المجموعة؟

    +

    عند القيم الافتراضية، كما يبلّغ tfg preset show picture-sizes:

    +
    + + + + + + + +
    الملفات21
    الأهداف في وصفته21
    الحجم الإجمالي4 178 420 B
    الصيغjpg
    +
    +

    وما يتوقعه بيان تلك المجموعة من نظامك:

    +
    + + + + + + + +
    المتوقعالمعنىالملفات
    acceptينبغي أن يقبل نظامك الملف.21
    +
    +
    + +
    +

    ما الذي يمكنك تغييره؟

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    الإعداديقبلالافتراضيما يفعله
    --groupsأسماء مجموعات مفصولة بفواصل، أو allallالأحجام التي تضمها المجموعة: screens لأحجام الشاشات، وavatars لصور الملف الشخصي، وsocial للأغلفة واللافتات والمنشورات والصور المصغرة. اتركها على all للحصول عليها كلها.
    --contentplaceholder, testtestما تعرضه الصورة. نمط الاختبار للتحقق من طريقة قراءة الملف. الصورة البديلة لون واحد مع كلمات في الوسط، لتنسيق صفحة قبل وجود الصور الحقيقية.
    --formatمعرّف صيغة من صفحة الصيغjpgصيغة كل ملف في المجموعة. إنه خيار في الأداة نفسها، والإعداد المسبق يمنحه قيمة افتراضية فقط.
    +
    +
    + +
    +

    كيف تشغّله؟

    +

    اطّلع على كلفة المجموعة، أو ابنِها، أو خذ وصفتها لتعدّلها:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    أو ابنِ عليه في وصفة خاصة بك، بجانب اختباراتك:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/assets/social-preview.png b/web/public/assets/social-preview.png index 85d72cc6..84b6f7af 100644 Binary files a/web/public/assets/social-preview.png and b/web/public/assets/social-preview.png differ diff --git a/web/public/cs/dokumentace/index.html b/web/public/cs/dokumentace/index.html index 2ec7416c..bbff22a8 100644 --- a/web/public/cs/dokumentace/index.html +++ b/web/public/cs/dokumentace/index.html @@ -391,6 +391,11 @@

    Co je předvolba?

    Uloží, zobrazí a vrátí můj systém název souboru, který nečekal?

    filename-handling

  • +
  • +

    Velikosti obrázků

    +

    Přijme můj systém obrázky ve velikostech, které používají obrazovky a platformy?

    +

    picture-sizes

    +
  • Hranice velikosti

    Je limit velikosti vynucován přesně tam, kde je deklarován?

    diff --git a/web/public/cs/formaty/index.html b/web/public/cs/formaty/index.html index 656aa0d6..f859cc0f 100644 --- a/web/public/cs/formaty/index.html +++ b/web/public/cs/formaty/index.html @@ -571,7 +571,7 @@

    Nastavení, která každý formát přijímá

    attachment_format - id formátu tak, jak je vypisuje tfg formats + id formátu, například png nebo csv @@ -596,7 +596,7 @@

    Nastavení, která každý formát přijímá

    inline_format - id obrázkového formátu tak, jak je vypisuje tfg formats + id obrázkového formátu, například png nebo jpg @@ -721,7 +721,7 @@

    Nastavení, která každý formát přijímá

    inline_format - id obrázkového formátu tak, jak je vypisuje tfg formats + id obrázkového formátu, například png nebo jpg @@ -1141,7 +1141,7 @@

    Nastavení, která každý formát přijímá

    inline_format - id obrázkového formátu tak, jak je vypisuje tfg formats + id obrázkového formátu, například png nebo jpg @@ -1196,7 +1196,7 @@

    Nastavení, která každý formát přijímá

    entry_format - id formátu tak, jak je vypisuje tfg formats + id formátu, například png nebo csv @@ -1341,7 +1341,7 @@

    Nastavení, která každý formát přijímá

    entry_format - id formátu tak, jak je vypisuje tfg formats + id formátu, například png nebo csv diff --git a/web/public/cs/index.html b/web/public/cs/index.html index 90204563..0fc6c480 100644 --- a/web/public/cs/index.html +++ b/web/public/cs/index.html @@ -276,6 +276,11 @@

    Vyberte otázku, získejte celou sadu

    Uloží, zobrazí a vrátí můj systém název souboru, který nečekal?

    filename-handling

  • +
  • +

    Velikosti obrázků

    +

    Přijme můj systém obrázky ve velikostech, které používají obrazovky a platformy?

    +

    picture-sizes

    +
  • Hranice velikosti

    Je limit velikosti vynucován přesně tam, kde je deklarován?

    diff --git a/web/public/cs/predvolby/empty-and-minimal/index.html b/web/public/cs/predvolby/empty-and-minimal/index.html index 3c9259ea..02177e68 100644 --- a/web/public/cs/predvolby/empty-and-minimal/index.html +++ b/web/public/cs/predvolby/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Co můžete změnit?

    --formats id formátů oddělená čárkami, nebo all all - Z jakých formátů se sada skládá. Ponechte all pro všechny formáty této verze, nebo uveďte ty, které váš systém přijímá. + Z jakých formátů se sada skládá. Ponechte all pro všechny formáty této verze, nebo uveďte ty, které váš systém přijímá. diff --git a/web/public/cs/predvolby/index.html b/web/public/cs/predvolby/index.html index 933d31a7..b2e5a415 100644 --- a/web/public/cs/predvolby/index.html +++ b/web/public/cs/predvolby/index.html @@ -162,6 +162,11 @@

    Předvolby testovacích souborů, jedna sada pro každou testovací otázku<

    Uloží, zobrazí a vrátí můj systém název souboru, který nečekal?

    filename-handling

  • +
  • +

    Velikosti obrázků

    +

    Přijme můj systém obrázky ve velikostech, které používají obrazovky a platformy?

    +

    picture-sizes

    +
  • Hranice velikosti

    Je limit velikosti vynucován přesně tam, kde je deklarován?

    diff --git a/web/public/cs/predvolby/picture-sizes/index.html b/web/public/cs/predvolby/picture-sizes/index.html new file mode 100644 index 00000000..b266707e --- /dev/null +++ b/web/public/cs/predvolby/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Testovací obrázky v běžných velikostech - obrazovky, avatary, sociální sítě + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Předvolby

    +

    Velikosti obrázků

    +

    Přijme můj systém obrázky ve velikostech, které používají obrazovky a platformy?

    +

    + Předvolba picture-sizes sestaví jediným příkazem celou sadu skutečných testovacích souborů + pro tuto otázku a vedle nich manifest.json, který říká, jak má váš systém na každý + soubor reagovat. Vše níže se čte z programu při výchozích hodnotách této verze. +

    + + +
    +

    Co obvykle najde?

    +
      +
    • limit šířky nebo výšky nastavený pro jeden tvar, který odmítne jiný, například pozadí profilu široké 1584 px
    • +
    • náhled oříznutý nebo zploštělý, protože kód čeká obrázek na šířku a přijde obrázek na výšku
    • +
    • obrázek s lichou výškou, například 1200 x 627, odmítnutý krokem, který bere jen sudé rozměry
    • +
    • obrázek 4K, kterému cestou k náhledu dojde čas nebo paměť, i když je samotný soubor malý
    • +
    +
    + + +
    +

    Co je v sadě?

    +

    Při výchozích hodnotách, jak je hlásí tfg preset show picture-sizes:

    +
    + + + + + + + +
    Soubory21
    Targety v receptu21
    Celková velikost4 178 420 B
    Formátyjpg
    +
    +

    A co od vašeho systému očekává manifest té sady:

    +
    + + + + + + + +
    OčekávánoVýznamSoubory
    acceptVáš systém má soubor přijmout.21
    +
    +
    + +
    +

    Co můžete změnit?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NastaveníPřijímáVýchozíCo dělá
    --groupsnázvy skupin oddělené čárkami, nebo allallJaké velikosti sada obsahuje: screens pro velikosti obrazovek, avatars pro profilové fotky a social pro titulní obrázky, bannery, příspěvky a náhledy. Ponechte all pro všechny.
    --contentplaceholder, testtestCo obrázek ukazuje. Testovací obrazec slouží ke kontrole, jak se soubor čte. Zástupný obrázek je jednolitá barva s textem uprostřed, pro rozvržení stránky dřív, než existují skutečné obrázky.
    --formatid formátu ze stránky formátůjpgFormát každého souboru v sadě. Je to přepínač samotného nástroje a předvolba mu jen dává výchozí hodnotu.
    +
    +
    + +
    +

    Jak ji spustit?

    +

    Podívejte se, kolik by sada stála, sestavte ji, nebo si vezměte její recept k úpravě:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Nebo na ní stavte ve vlastním receptu vedle svých testů:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/de/dokumentation/index.html b/web/public/de/dokumentation/index.html index 3b55453c..a81117b5 100644 --- a/web/public/de/dokumentation/index.html +++ b/web/public/de/dokumentation/index.html @@ -397,6 +397,11 @@

    Was ist ein Preset?

    Speichert, zeigt und liefert mein System einen Dateinamen korrekt, mit dem es nicht gerechnet hat?

    filename-handling

  • +
  • +

    Bildgrößen

    +

    Nimmt mein System Bilder in den Größen an, die Bildschirme und Plattformen verwenden?

    +

    picture-sizes

    +
  • Größengrenzen

    Wird ein Größenlimit genau dort durchgesetzt, wo es angegeben ist?

    diff --git a/web/public/de/formate/index.html b/web/public/de/formate/index.html index ad60f951..72e6a95b 100644 --- a/web/public/de/formate/index.html +++ b/web/public/de/formate/index.html @@ -573,7 +573,7 @@

    Einstellungen, die jedes Format kennt

    attachment_format - die ID eines Formats, wie tfg formats sie auflistet + die ID eines Formats, etwa png oder csv @@ -598,7 +598,7 @@

    Einstellungen, die jedes Format kennt

    inline_format - die ID eines Bildformats, wie tfg formats sie auflistet + die ID eines Bildformats, etwa png oder jpg @@ -723,7 +723,7 @@

    Einstellungen, die jedes Format kennt

    inline_format - die ID eines Bildformats, wie tfg formats sie auflistet + die ID eines Bildformats, etwa png oder jpg @@ -1143,7 +1143,7 @@

    Einstellungen, die jedes Format kennt

    inline_format - die ID eines Bildformats, wie tfg formats sie auflistet + die ID eines Bildformats, etwa png oder jpg @@ -1198,7 +1198,7 @@

    Einstellungen, die jedes Format kennt

    entry_format - die ID eines Formats, wie tfg formats sie auflistet + die ID eines Formats, etwa png oder csv @@ -1343,7 +1343,7 @@

    Einstellungen, die jedes Format kennt

    entry_format - die ID eines Formats, wie tfg formats sie auflistet + die ID eines Formats, etwa png oder csv diff --git a/web/public/de/index.html b/web/public/de/index.html index d7039f33..b0517a7b 100644 --- a/web/public/de/index.html +++ b/web/public/de/index.html @@ -278,6 +278,11 @@

    Wähle die Frage, bekomme das ganze Set

    Speichert, zeigt und liefert mein System einen Dateinamen korrekt, mit dem es nicht gerechnet hat?

    filename-handling

  • +
  • +

    Bildgrößen

    +

    Nimmt mein System Bilder in den Größen an, die Bildschirme und Plattformen verwenden?

    +

    picture-sizes

    +
  • Größengrenzen

    Wird ein Größenlimit genau dort durchgesetzt, wo es angegeben ist?

    diff --git a/web/public/de/presets/empty-and-minimal/index.html b/web/public/de/presets/empty-and-minimal/index.html index df28017c..7966325b 100644 --- a/web/public/de/presets/empty-and-minimal/index.html +++ b/web/public/de/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Was kannst du ändern?

    --formats Format-IDs, durch Kommas getrennt, oder all all - Aus welchen Formaten das Set besteht. Mit all werden alle Formate dieses Builds verwendet, oder du nennst die, die dein System akzeptiert. + Aus welchen Formaten das Set besteht. Mit all werden alle Formate dieses Builds verwendet, oder du nennst die, die dein System akzeptiert. diff --git a/web/public/de/presets/index.html b/web/public/de/presets/index.html index 40a577fd..c311d5a2 100644 --- a/web/public/de/presets/index.html +++ b/web/public/de/presets/index.html @@ -163,6 +163,11 @@

    Testdatei-Presets, ein Set für jede Testfrage

    Speichert, zeigt und liefert mein System einen Dateinamen korrekt, mit dem es nicht gerechnet hat?

    filename-handling

  • +
  • +

    Bildgrößen

    +

    Nimmt mein System Bilder in den Größen an, die Bildschirme und Plattformen verwenden?

    +

    picture-sizes

    +
  • Größengrenzen

    Wird ein Größenlimit genau dort durchgesetzt, wo es angegeben ist?

    diff --git a/web/public/de/presets/picture-sizes/index.html b/web/public/de/presets/picture-sizes/index.html new file mode 100644 index 00000000..b2439afe --- /dev/null +++ b/web/public/de/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Testbilder in gängigen Größen - Bildschirme, Avatare, soziale Medien + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presets

    +

    Bildgrößen

    +

    Nimmt mein System Bilder in den Größen an, die Bildschirme und Plattformen verwenden?

    +

    + Das Preset picture-sizes baut mit einem Befehl ein ganzes Set echter Testdateien für diese + Frage und ein manifest.json daneben, das beschreibt, wie dein System auf jede Datei + reagieren soll. Alles unten wird aus dem Programm gelesen, mit den Standardwerten dieser Version. +

    + + +
    +

    Was findet es meistens?

    +
      +
    • eine Grenze für Breite oder Höhe, die für eine Bildform gedacht war und eine andere abweist, etwa einen Profilhintergrund mit 1584 px Breite
    • +
    • ein Vorschaubild, das beschnitten oder gestaucht wird, weil der Code ein Querformat erwartet und ein Hochformat ankommt
    • +
    • ein Bild mit ungerader Höhe, etwa 1200 x 627, das von einem Schritt abgewiesen wird, der nur gerade Größen annimmt
    • +
    • ein 4K-Bild, dem auf dem Weg zum Vorschaubild Zeit oder Speicher ausgeht, obwohl die Datei selbst klein ist
    • +
    +
    + + +
    +

    Was steckt im Set?

    +

    Mit den Standardwerten, wie es tfg preset show picture-sizes ausgibt:

    +
    + + + + + + + +
    Dateien21
    Targets in seinem Rezept21
    Gesamtgröße4 178 420 B
    Formatejpg
    +
    +

    Und was das Manifest dieses Sets von deinem System erwartet:

    +
    + + + + + + + +
    ErwartetBedeutungDateien
    acceptDein System soll die Datei annehmen.21
    +
    +
    + +
    +

    Was kannst du ändern?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    EinstellungNimmtStandardWas es tut
    --groupsGruppennamen, durch Kommas getrennt, oder allallWelche Größen das Set enthält: screens für Bildschirmgrößen, avatars für Profilbilder und social für Titelbilder, Banner, Beiträge und Vorschaubilder. Mit all bekommst du alle.
    --contentplaceholder, testtestWas das Bild zeigt. Ein Testmuster dient dazu, zu prüfen, wie eine Datei gelesen wird. Ein Platzhalter ist eine einfarbige Fläche mit Text in der Mitte, um eine Seite zu gestalten, bevor es die echten Bilder gibt.
    --formateine Format-ID von der Formate-SeitejpgDas Format jeder Datei im Set. Es ist ein Flag des Tools selbst, das Preset gibt ihm nur einen Standardwert.
    +
    +
    + +
    +

    Wie führst du es aus?

    +

    Sieh nach, was das Set kosten würde, baue es oder nimm sein Rezept zum Bearbeiten:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Oder baue in einem eigenen Rezept darauf auf, neben deinen Tests:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/docs/index.html b/web/public/docs/index.html index 0ff39ac8..f0a09e5b 100644 --- a/web/public/docs/index.html +++ b/web/public/docs/index.html @@ -392,6 +392,11 @@

    What is a preset?

    Will my system store, show and give back a file name it did not expect?

    filename-handling

  • +
  • +

    Picture sizes

    +

    Does my system take pictures at the sizes screens and platforms use?

    +

    picture-sizes

    +
  • Size boundaries

    Is a size limit enforced exactly where it is declared?

    diff --git a/web/public/es/documentacion/index.html b/web/public/es/documentacion/index.html index 52a028f6..60965ed3 100644 --- a/web/public/es/documentacion/index.html +++ b/web/public/es/documentacion/index.html @@ -394,6 +394,11 @@

    ¿Qué es un preset?

    ¿Mi sistema guardará, mostrará y devolverá un nombre de archivo que no esperaba?

    filename-handling

  • +
  • +

    Tamaños de imagen

    +

    ¿Acepta mi sistema imágenes en los tamaños que usan las pantallas y las plataformas?

    +

    picture-sizes

    +
  • Límites de tamaño

    ¿Se aplica un límite de tamaño exactamente donde se declara?

    diff --git a/web/public/es/formatos/index.html b/web/public/es/formatos/index.html index a5d7c367..a3ee73b8 100644 --- a/web/public/es/formatos/index.html +++ b/web/public/es/formatos/index.html @@ -574,7 +574,7 @@

    Ajustes que admite cada formato

    attachment_format - el id de un formato, tal como lo lista tfg formats + el id de un formato, como png o csv @@ -599,7 +599,7 @@

    Ajustes que admite cada formato

    inline_format - el id de un formato de imagen, tal como lo lista tfg formats + el id de un formato de imagen, como png o jpg @@ -724,7 +724,7 @@

    Ajustes que admite cada formato

    inline_format - el id de un formato de imagen, tal como lo lista tfg formats + el id de un formato de imagen, como png o jpg @@ -1144,7 +1144,7 @@

    Ajustes que admite cada formato

    inline_format - el id de un formato de imagen, tal como lo lista tfg formats + el id de un formato de imagen, como png o jpg @@ -1199,7 +1199,7 @@

    Ajustes que admite cada formato

    entry_format - el id de un formato, tal como lo lista tfg formats + el id de un formato, como png o csv @@ -1344,7 +1344,7 @@

    Ajustes que admite cada formato

    entry_format - el id de un formato, tal como lo lista tfg formats + el id de un formato, como png o csv diff --git a/web/public/es/index.html b/web/public/es/index.html index 96e34fa1..a24fd2a3 100644 --- a/web/public/es/index.html +++ b/web/public/es/index.html @@ -278,6 +278,11 @@

    Elige la pregunta, obtén el conjunto entero

    ¿Mi sistema guardará, mostrará y devolverá un nombre de archivo que no esperaba?

    filename-handling

  • +
  • +

    Tamaños de imagen

    +

    ¿Acepta mi sistema imágenes en los tamaños que usan las pantallas y las plataformas?

    +

    picture-sizes

    +
  • Límites de tamaño

    ¿Se aplica un límite de tamaño exactamente donde se declara?

    diff --git a/web/public/es/presets/empty-and-minimal/index.html b/web/public/es/presets/empty-and-minimal/index.html index a927a526..c8abac57 100644 --- a/web/public/es/presets/empty-and-minimal/index.html +++ b/web/public/es/presets/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    ¿Qué puedes cambiar?

    --formats ids de formato separados por comas, o all all - De qué formatos se compone el conjunto. Déjalo en all para todos los formatos de esta versión, o nombra los que acepta tu sistema. + De qué formatos se compone el conjunto. Déjalo en all para todos los formatos de esta versión, o nombra los que acepta tu sistema. diff --git a/web/public/es/presets/index.html b/web/public/es/presets/index.html index c887bfac..000e895d 100644 --- a/web/public/es/presets/index.html +++ b/web/public/es/presets/index.html @@ -163,6 +163,11 @@

    Presets de archivos de prueba, un conjunto para cada pregunta de prueba

    ¿Mi sistema guardará, mostrará y devolverá un nombre de archivo que no esperaba?

    filename-handling

  • +
  • +

    Tamaños de imagen

    +

    ¿Acepta mi sistema imágenes en los tamaños que usan las pantallas y las plataformas?

    +

    picture-sizes

    +
  • Límites de tamaño

    ¿Se aplica un límite de tamaño exactamente donde se declara?

    diff --git a/web/public/es/presets/picture-sizes/index.html b/web/public/es/presets/picture-sizes/index.html new file mode 100644 index 00000000..621616cc --- /dev/null +++ b/web/public/es/presets/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Imágenes de prueba en tamaños comunes - pantallas, avatares, redes sociales + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presets

    +

    Tamaños de imagen

    +

    ¿Acepta mi sistema imágenes en los tamaños que usan las pantallas y las plataformas?

    +

    + El preset picture-sizes construye con un solo comando un conjunto entero de archivos de + prueba reales para esta pregunta, y un manifest.json a su lado que dice cómo debe + reaccionar tu sistema a cada archivo. Todo lo de abajo se lee del programa, con los valores por + defecto de esta versión. +

    + + +
    +

    ¿Qué suele encontrar?

    +
      +
    • un límite de ancho o de alto pensado para una forma que rechaza otra, como un fondo de perfil de 1584 px de ancho
    • +
    • una miniatura recortada o aplastada porque el código espera una imagen horizontal y llega una vertical
    • +
    • una imagen de alto impar, como 1200 x 627, rechazada por un paso que solo acepta tamaños pares
    • +
    • una imagen 4K que se queda sin tiempo o sin memoria camino de una miniatura, aunque el archivo sea pequeño
    • +
    +
    + + +
    +

    ¿Qué hay en el conjunto?

    +

    Con sus valores por defecto, tal como lo informa tfg preset show picture-sizes:

    +
    + + + + + + + +
    Archivos21
    Targets en su receta21
    Tamaño total4 178 420 B
    Formatosjpg
    +
    +

    Y lo que el manifiesto de ese conjunto espera de tu sistema:

    +
    + + + + + + + +
    EsperadoSignificadoArchivos
    acceptTu sistema debe aceptar el archivo.21
    +
    +
    + +
    +

    ¿Qué puedes cambiar?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    AjusteAdmitePor defectoQué hace
    --groupsnombres de grupo separados por comas, o allallQué tamaños contiene el conjunto: screens para tamaños de pantalla, avatars para fotos de perfil y social para portadas, banners, publicaciones y miniaturas. Déjalo en all para tenerlos todos.
    --contentplaceholder, testtestLo que muestra la imagen. Un patrón de prueba sirve para comprobar cómo se lee un archivo. Un marcador de posición es un color liso con texto en el centro, para maquetar una página antes de tener las imágenes reales.
    --formatun id de formato de la página de formatosjpgEl formato de cada archivo del conjunto. Es una opción de la propia herramienta, y el preset solo le da un valor por defecto.
    +
    +
    + +
    +

    ¿Cómo se ejecuta?

    +

    Mira cuánto costaría el conjunto, constrúyelo o toma su receta para editarla:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    O construye sobre él en una receta propia, junto a tus pruebas:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/formats/index.html b/web/public/formats/index.html index 50dc8ebf..2a9da2a3 100644 --- a/web/public/formats/index.html +++ b/web/public/formats/index.html @@ -572,7 +572,7 @@

    Settings each format accepts

    attachment_format - the id of a format, as tfg formats lists them + the id of a format, such as png or csv @@ -597,7 +597,7 @@

    Settings each format accepts

    inline_format - the id of a picture format, as tfg formats lists them + the id of a picture format, such as png or jpg @@ -722,7 +722,7 @@

    Settings each format accepts

    inline_format - the id of a picture format, as tfg formats lists them + the id of a picture format, such as png or jpg @@ -1142,7 +1142,7 @@

    Settings each format accepts

    inline_format - the id of a picture format, as tfg formats lists them + the id of a picture format, such as png or jpg @@ -1197,7 +1197,7 @@

    Settings each format accepts

    entry_format - the id of a format, as tfg formats lists them + the id of a format, such as png or csv @@ -1342,7 +1342,7 @@

    Settings each format accepts

    entry_format - the id of a format, as tfg formats lists them + the id of a format, such as png or csv diff --git a/web/public/fr/documentation/index.html b/web/public/fr/documentation/index.html index 2e36f8f8..eb743edb 100644 --- a/web/public/fr/documentation/index.html +++ b/web/public/fr/documentation/index.html @@ -398,6 +398,11 @@

    Qu'est-ce qu'un préréglage ?

    Mon système va-t-il stocker, afficher et restituer un nom de fichier auquel il ne s'attendait pas ?

    filename-handling

  • +
  • +

    Tailles d'image

    +

    Mon système accepte-t-il les images aux tailles qu'utilisent les écrans et les plateformes ?

    +

    picture-sizes

    +
  • Limites de taille

    Une limite de taille est-elle appliquée exactement là où elle est déclarée ?

    diff --git a/web/public/fr/formats/index.html b/web/public/fr/formats/index.html index 8cb444b4..4625a4a3 100644 --- a/web/public/fr/formats/index.html +++ b/web/public/fr/formats/index.html @@ -574,7 +574,7 @@

    Réglages que chaque format accepte

    attachment_format - l'identifiant d'un format, comme le liste tfg formats + l'identifiant d'un format, par exemple png ou csv @@ -599,7 +599,7 @@

    Réglages que chaque format accepte

    inline_format - l'identifiant d'un format d'image, comme le liste tfg formats + l'identifiant d'un format d'image, par exemple png ou jpg @@ -724,7 +724,7 @@

    Réglages que chaque format accepte

    inline_format - l'identifiant d'un format d'image, comme le liste tfg formats + l'identifiant d'un format d'image, par exemple png ou jpg @@ -1144,7 +1144,7 @@

    Réglages que chaque format accepte

    inline_format - l'identifiant d'un format d'image, comme le liste tfg formats + l'identifiant d'un format d'image, par exemple png ou jpg @@ -1199,7 +1199,7 @@

    Réglages que chaque format accepte

    entry_format - l'identifiant d'un format, comme le liste tfg formats + l'identifiant d'un format, par exemple png ou csv @@ -1344,7 +1344,7 @@

    Réglages que chaque format accepte

    entry_format - l'identifiant d'un format, comme le liste tfg formats + l'identifiant d'un format, par exemple png ou csv diff --git a/web/public/fr/index.html b/web/public/fr/index.html index 91e0a966..3a05fd22 100644 --- a/web/public/fr/index.html +++ b/web/public/fr/index.html @@ -278,6 +278,11 @@

    Choisissez la question, obtenez tout le jeu

    Mon système va-t-il stocker, afficher et restituer un nom de fichier auquel il ne s'attendait pas ?

    filename-handling

  • +
  • +

    Tailles d'image

    +

    Mon système accepte-t-il les images aux tailles qu'utilisent les écrans et les plateformes ?

    +

    picture-sizes

    +
  • Limites de taille

    Une limite de taille est-elle appliquée exactement là où elle est déclarée ?

    diff --git a/web/public/fr/prereglages/empty-and-minimal/index.html b/web/public/fr/prereglages/empty-and-minimal/index.html index 4ba336dd..a44b723b 100644 --- a/web/public/fr/prereglages/empty-and-minimal/index.html +++ b/web/public/fr/prereglages/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Que pouvez-vous modifier ?

    --formats identifiants de format séparés par des virgules, ou all all - Les formats dont le jeu est fait. Laissez all pour tous les formats de cette version, ou nommez ceux que votre système accepte. + Les formats dont le jeu est fait. Laissez all pour tous les formats de cette version, ou nommez ceux que votre système accepte. diff --git a/web/public/fr/prereglages/index.html b/web/public/fr/prereglages/index.html index 16c22eed..237888d8 100644 --- a/web/public/fr/prereglages/index.html +++ b/web/public/fr/prereglages/index.html @@ -163,6 +163,11 @@

    Préréglages de fichiers de test, un jeu pour chaque question de test

    Mon système va-t-il stocker, afficher et restituer un nom de fichier auquel il ne s'attendait pas ?

    filename-handling

  • +
  • +

    Tailles d'image

    +

    Mon système accepte-t-il les images aux tailles qu'utilisent les écrans et les plateformes ?

    +

    picture-sizes

    +
  • Limites de taille

    Une limite de taille est-elle appliquée exactement là où elle est déclarée ?

    diff --git a/web/public/fr/prereglages/picture-sizes/index.html b/web/public/fr/prereglages/picture-sizes/index.html new file mode 100644 index 00000000..21f7279f --- /dev/null +++ b/web/public/fr/prereglages/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Images de test aux tailles courantes - écrans, avatars, réseaux sociaux + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Préréglages

    +

    Tailles d'image

    +

    Mon système accepte-t-il les images aux tailles qu'utilisent les écrans et les plateformes ?

    +

    + Le préréglage picture-sizes construit en une commande tout un jeu de vrais fichiers de test + pour cette question, avec un manifest.json à côté qui dit comment votre système doit + réagir à chaque fichier. Tout ce qui suit est lu depuis le programme, aux valeurs par défaut de + cette version. +

    + + +
    +

    Que trouve-t-il d'habitude ?

    +
      +
    • une limite de largeur ou de hauteur pensée pour une forme qui en refuse une autre, comme un arrière-plan de profil de 1584 px de large
    • +
    • une miniature coupée ou écrasée parce que le code attend une image en paysage et qu'une image en portrait arrive
    • +
    • une image de hauteur impaire, comme 1200 x 627, refusée par une étape qui n'accepte que des tailles paires
    • +
    • une image 4K qui manque de temps ou de mémoire en route vers une miniature, alors que le fichier lui-même est petit
    • +
    +
    + + +
    +

    Que contient le jeu ?

    +

    Aux valeurs par défaut, comme le rapporte tfg preset show picture-sizes :

    +
    + + + + + + + +
    Fichiers21
    Cibles dans sa recette21
    Taille totale4 178 420 B
    Formatsjpg
    +
    +

    Et ce que le manifeste de ce jeu attend de votre système :

    +
    + + + + + + + +
    AttenduSignificationFichiers
    acceptVotre système doit accepter le fichier.21
    +
    +
    + +
    +

    Que pouvez-vous modifier ?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    RéglageAcceptePar défautCe qu'il fait
    --groupsnoms de groupe séparés par des virgules, ou allallLes tailles que contient le jeu : screens pour les tailles d'écran, avatars pour les photos de profil et social pour les couvertures, bannières, publications et miniatures. Laissez all pour les avoir toutes.
    --contentplaceholder, testtestCe que montre l'image. Une mire de test sert à vérifier comment un fichier est lu. Un espace réservé est une couleur unie avec du texte au milieu, pour mettre en page avant que les vraies images existent.
    --formatun identifiant de format de la page des formatsjpgLe format de chaque fichier du jeu. C'est une option de l'outil lui-même, et le préréglage ne fait que lui donner une valeur par défaut.
    +
    +
    + +
    +

    Comment le lancer ?

    +

    Voyez ce que coûterait le jeu, construisez-le ou prenez sa recette pour la modifier :

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Ou bâtissez dessus dans une recette à vous, à côté de vos tests :

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/hi/docs/index.html b/web/public/hi/docs/index.html index c220514c..f53537e7 100644 --- a/web/public/hi/docs/index.html +++ b/web/public/hi/docs/index.html @@ -393,6 +393,11 @@

    प्रीसेट क्या है?

    क्या मेरा सिस्टम ऐसा फ़ाइल नाम सहेजेगा, दिखाएगा और लौटाएगा जिसकी उसे उम्मीद नहीं थी?

    filename-handling

  • +
  • +

    तस्वीरों के आकार

    +

    क्या मेरा सिस्टम उन आकारों की तस्वीरें लेता है जो स्क्रीन और प्लेटफ़ॉर्म इस्तेमाल करते हैं?

    +

    picture-sizes

    +
  • आकार की सीमाएँ

    क्या आकार की सीमा ठीक वहीं लागू होती है जहाँ उसकी घोषणा की गई है?

    diff --git a/web/public/hi/formats/index.html b/web/public/hi/formats/index.html index 03ef0c1e..828a9d81 100644 --- a/web/public/hi/formats/index.html +++ b/web/public/hi/formats/index.html @@ -572,7 +572,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा attachment_format - किसी फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी फ़ॉर्मैट का id, जैसे png या csv @@ -597,7 +597,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा inline_format - किसी चित्र फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी चित्र फ़ॉर्मैट का id, जैसे png या jpg @@ -722,7 +722,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा inline_format - किसी चित्र फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी चित्र फ़ॉर्मैट का id, जैसे png या jpg @@ -1142,7 +1142,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा inline_format - किसी चित्र फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी चित्र फ़ॉर्मैट का id, जैसे png या jpg @@ -1197,7 +1197,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा entry_format - किसी फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी फ़ॉर्मैट का id, जैसे png या csv @@ -1342,7 +1342,7 @@

    हर फ़ॉर्मैट की स्वीकार की जा entry_format - किसी फ़ॉर्मैट का id, जैसा tfg formats सूचीबद्ध करता है + किसी फ़ॉर्मैट का id, जैसे png या csv diff --git a/web/public/hi/index.html b/web/public/hi/index.html index 6ba72565..f03d32e6 100644 --- a/web/public/hi/index.html +++ b/web/public/hi/index.html @@ -276,6 +276,11 @@

    सवाल चुनें, पूरा सेट पाएँ

    क्या मेरा सिस्टम ऐसा फ़ाइल नाम सहेजेगा, दिखाएगा और लौटाएगा जिसकी उसे उम्मीद नहीं थी?

    filename-handling

  • +
  • +

    तस्वीरों के आकार

    +

    क्या मेरा सिस्टम उन आकारों की तस्वीरें लेता है जो स्क्रीन और प्लेटफ़ॉर्म इस्तेमाल करते हैं?

    +

    picture-sizes

    +
  • आकार की सीमाएँ

    क्या आकार की सीमा ठीक वहीं लागू होती है जहाँ उसकी घोषणा की गई है?

    diff --git a/web/public/hi/presets/empty-and-minimal/index.html b/web/public/hi/presets/empty-and-minimal/index.html index a19cc07a..e024a18e 100644 --- a/web/public/hi/presets/empty-and-minimal/index.html +++ b/web/public/hi/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    आप क्या बदल सकते हैं?

    --formats अल्पविराम से अलग किए गए फ़ॉर्मैट id, या all all - सेट किन फ़ॉर्मैट से बना है। इस बिल्ड के सभी फ़ॉर्मैट के लिए all रहने दें, या वे फ़ॉर्मैट लिखें जिन्हें आपका सिस्टम स्वीकार करता है। + सेट किन फ़ॉर्मैट से बना है। इस बिल्ड के सभी फ़ॉर्मैट के लिए all रहने दें, या वे फ़ॉर्मैट लिखें जिन्हें आपका सिस्टम स्वीकार करता है। diff --git a/web/public/hi/presets/index.html b/web/public/hi/presets/index.html index 944d0c16..72f58d40 100644 --- a/web/public/hi/presets/index.html +++ b/web/public/hi/presets/index.html @@ -163,6 +163,11 @@

    टेस्ट फ़ाइल प्रीसेट, हर टेस्

    क्या मेरा सिस्टम ऐसा फ़ाइल नाम सहेजेगा, दिखाएगा और लौटाएगा जिसकी उसे उम्मीद नहीं थी?

    filename-handling

  • +
  • +

    तस्वीरों के आकार

    +

    क्या मेरा सिस्टम उन आकारों की तस्वीरें लेता है जो स्क्रीन और प्लेटफ़ॉर्म इस्तेमाल करते हैं?

    +

    picture-sizes

    +
  • आकार की सीमाएँ

    क्या आकार की सीमा ठीक वहीं लागू होती है जहाँ उसकी घोषणा की गई है?

    diff --git a/web/public/hi/presets/picture-sizes/index.html b/web/public/hi/presets/picture-sizes/index.html new file mode 100644 index 00000000..3c67c47f --- /dev/null +++ b/web/public/hi/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +आम आकारों में टेस्ट तस्वीरें - स्क्रीन, अवतार, सोशल मीडिया + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    प्रीसेट

    +

    तस्वीरों के आकार

    +

    क्या मेरा सिस्टम उन आकारों की तस्वीरें लेता है जो स्क्रीन और प्लेटफ़ॉर्म इस्तेमाल करते हैं?

    +

    + picture-sizes प्रीसेट एक कमांड में इस सवाल के लिए असली टेस्ट फ़ाइलों का पूरा सेट बनाता है, + और उनके बगल में एक manifest.json जो बताता है कि आपके सिस्टम को हर फ़ाइल पर क्या + प्रतिक्रिया देनी चाहिए। नीचे सब कुछ इस संस्करण के डिफ़ॉल्ट पर प्रोग्राम से पढ़ा गया है। +

    + + +
    +

    यह आम तौर पर क्या पकड़ता है?

    +
      +
    • एक आकृति को ध्यान में रखकर रखी गई चौड़ाई या ऊँचाई की सीमा जो दूसरी आकृति को ठुकरा देती है, जैसे 1584 px चौड़ी प्रोफ़ाइल पृष्ठभूमि
    • +
    • थंबनेल कटा या दबा हुआ, क्योंकि कोड क्षैतिज तस्वीर की उम्मीद करता है और लंबवत तस्वीर आती है
    • +
    • विषम ऊँचाई वाली तस्वीर, जैसे 1200 x 627, जिसे ऐसा चरण ठुकरा देता है जो केवल सम आकार लेता है
    • +
    • 4K तस्वीर जिसका थंबनेल बनते समय समय या मेमोरी खत्म हो जाती है, जबकि फ़ाइल खुद छोटी है
    • +
    +
    + + +
    +

    सेट में क्या है?

    +

    डिफ़ॉल्ट पर, जैसा tfg preset show picture-sizes बताता है:

    +
    + + + + + + + +
    फ़ाइलें21
    इसकी रेसिपी में टार्गेट21
    कुल आकार4 178 420 B
    फ़ॉर्मैटjpg
    +
    +

    और उस सेट का मैनिफ़ेस्ट आपके सिस्टम से क्या अपेक्षा रखता है:

    +
    + + + + + + + +
    अपेक्षितअर्थफ़ाइलें
    acceptआपके सिस्टम को फ़ाइल मंज़ूर करनी चाहिए।21
    +
    +
    + +
    +

    आप क्या बदल सकते हैं?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    सेटिंगलेती हैडिफ़ॉल्टक्या करती है
    --groupsअल्पविराम से अलग किए गए समूह नाम, या allallसेट में कौन-से आकार हैं: स्क्रीन के आकारों के लिए screens, प्रोफ़ाइल तस्वीरों के लिए avatars, और कवर, बैनर, पोस्ट और थंबनेल के लिए social। सभी के लिए all रहने दें।
    --contentplaceholder, testtestतस्वीर क्या दिखाती है। टेस्ट पैटर्न यह जाँचने के लिए है कि फ़ाइल कैसे पढ़ी जाती है। प्लेसहोल्डर बीच में शब्दों वाला एक सादा रंग है, असली तस्वीरें बनने से पहले पेज का खाका बनाने के लिए।
    --formatफ़ॉर्मैट पेज से एक फ़ॉर्मैट idjpgसेट की हर फ़ाइल का फ़ॉर्मैट। यह टूल का अपना फ़्लैग है, और प्रीसेट बस उसे एक डिफ़ॉल्ट देता है।
    +
    +
    + +
    +

    इसे कैसे चलाएँ?

    +

    देखें कि सेट की क़ीमत क्या होगी, उसे बनाएँ, या संपादन के लिए उसकी रेसिपी लें:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    या अपनी रेसिपी में, अपने टेस्ट के बगल में, इस पर आगे बनाएँ:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/id/dokumentasi/index.html b/web/public/id/dokumentasi/index.html index b33af7d4..fcdac1ca 100644 --- a/web/public/id/dokumentasi/index.html +++ b/web/public/id/dokumentasi/index.html @@ -395,6 +395,11 @@

    Apa itu preset?

    Apakah sistem saya akan menyimpan, menampilkan, dan mengembalikan nama file yang tidak diduganya?

    filename-handling

  • +
  • +

    Ukuran gambar

    +

    Apakah sistem saya menerima gambar dalam ukuran yang dipakai layar dan platform?

    +

    picture-sizes

    +
  • Batas ukuran

    Apakah batas ukuran ditegakkan tepat di tempat batas itu dinyatakan?

    diff --git a/web/public/id/format/index.html b/web/public/id/format/index.html index c92ad2a7..90ebfc64 100644 --- a/web/public/id/format/index.html +++ b/web/public/id/format/index.html @@ -572,7 +572,7 @@

    Pengaturan yang diterima setiap format

    attachment_format - id sebuah format, seperti yang didaftar tfg formats + id sebuah format, misalnya png atau csv @@ -597,7 +597,7 @@

    Pengaturan yang diterima setiap format

    inline_format - id sebuah format gambar, seperti yang didaftar tfg formats + id sebuah format gambar, misalnya png atau jpg @@ -722,7 +722,7 @@

    Pengaturan yang diterima setiap format

    inline_format - id sebuah format gambar, seperti yang didaftar tfg formats + id sebuah format gambar, misalnya png atau jpg @@ -1142,7 +1142,7 @@

    Pengaturan yang diterima setiap format

    inline_format - id sebuah format gambar, seperti yang didaftar tfg formats + id sebuah format gambar, misalnya png atau jpg @@ -1197,7 +1197,7 @@

    Pengaturan yang diterima setiap format

    entry_format - id sebuah format, seperti yang didaftar tfg formats + id sebuah format, misalnya png atau csv @@ -1342,7 +1342,7 @@

    Pengaturan yang diterima setiap format

    entry_format - id sebuah format, seperti yang didaftar tfg formats + id sebuah format, misalnya png atau csv diff --git a/web/public/id/index.html b/web/public/id/index.html index ef509b8c..4ec4e74b 100644 --- a/web/public/id/index.html +++ b/web/public/id/index.html @@ -278,6 +278,11 @@

    Pilih pertanyaannya, dapatkan seluruh setnya

    Apakah sistem saya akan menyimpan, menampilkan, dan mengembalikan nama file yang tidak diduganya?

    filename-handling

  • +
  • +

    Ukuran gambar

    +

    Apakah sistem saya menerima gambar dalam ukuran yang dipakai layar dan platform?

    +

    picture-sizes

    +
  • Batas ukuran

    Apakah batas ukuran ditegakkan tepat di tempat batas itu dinyatakan?

    diff --git a/web/public/id/preset/empty-and-minimal/index.html b/web/public/id/preset/empty-and-minimal/index.html index 64e18d54..ae4463d4 100644 --- a/web/public/id/preset/empty-and-minimal/index.html +++ b/web/public/id/preset/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Apa yang dapat Anda ubah?

    --formats id format dipisahkan koma, atau all all - Dari format apa set dibuat. Biarkan all untuk setiap format build ini, atau sebutkan format yang diterima sistem Anda. + Dari format apa set dibuat. Biarkan all untuk setiap format build ini, atau sebutkan format yang diterima sistem Anda. diff --git a/web/public/id/preset/index.html b/web/public/id/preset/index.html index f9ff24cc..dd8b01c6 100644 --- a/web/public/id/preset/index.html +++ b/web/public/id/preset/index.html @@ -163,6 +163,11 @@

    Preset file uji, satu set untuk setiap pertanyaan pengujian

    Apakah sistem saya akan menyimpan, menampilkan, dan mengembalikan nama file yang tidak diduganya?

    filename-handling

  • +
  • +

    Ukuran gambar

    +

    Apakah sistem saya menerima gambar dalam ukuran yang dipakai layar dan platform?

    +

    picture-sizes

    +
  • Batas ukuran

    Apakah batas ukuran ditegakkan tepat di tempat batas itu dinyatakan?

    diff --git a/web/public/id/preset/picture-sizes/index.html b/web/public/id/preset/picture-sizes/index.html new file mode 100644 index 00000000..34e24b87 --- /dev/null +++ b/web/public/id/preset/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Gambar uji dalam ukuran umum - layar, avatar, media sosial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Preset

    +

    Ukuran gambar

    +

    Apakah sistem saya menerima gambar dalam ukuran yang dipakai layar dan platform?

    +

    + Preset picture-sizes membuat satu set lengkap file uji asli untuk pertanyaan ini dengan + satu perintah, dan manifest.json di sampingnya yang menyatakan bagaimana sistem Anda + harus bereaksi terhadap tiap file. Semua di bawah dibaca dari program, pada nilai bawaan versi + ini. +

    + + +
    +

    Apa yang biasanya ditemukan?

    +
      +
    • batas lebar atau tinggi yang dibuat untuk satu bentuk dan menolak bentuk lain, misalnya latar profil selebar 1584 px
    • +
    • thumbnail terpotong atau tergencet karena kode mengharapkan gambar mendatar dan yang datang gambar tegak
    • +
    • gambar dengan tinggi ganjil, misalnya 1200 x 627, ditolak oleh langkah yang hanya menerima ukuran genap
    • +
    • gambar 4K yang kehabisan waktu atau memori dalam perjalanan menjadi thumbnail, padahal filenya sendiri kecil
    • +
    +
    + + +
    +

    Apa isi set?

    +

    Pada nilai bawaan, seperti yang dilaporkan tfg preset show picture-sizes:

    +
    + + + + + + + +
    File21
    Target dalam resepnya21
    Ukuran total4 178 420 B
    Formatjpg
    +
    +

    Dan apa yang diharapkan manifes set itu dari sistem Anda:

    +
    + + + + + + + +
    DiharapkanArtiFile
    acceptSistem Anda harus menerima file ini.21
    +
    +
    + +
    +

    Apa yang dapat Anda ubah?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    PengaturanMenerimaBawaanFungsinya
    --groupsnama grup dipisahkan koma, atau allallUkuran yang ada di set: screens untuk ukuran layar, avatars untuk foto profil, dan social untuk sampul, banner, postingan, dan thumbnail. Biarkan all untuk semuanya.
    --contentplaceholder, testtestApa yang ditampilkan gambar. Pola uji dipakai untuk memeriksa cara file dibaca. Placeholder adalah warna polos dengan tulisan di tengah, untuk menata halaman sebelum gambar aslinya ada.
    --formatid format dari halaman formatjpgFormat setiap file dalam set. Ini adalah opsi alat itu sendiri, dan preset hanya memberinya nilai bawaan.
    +
    +
    + +
    +

    Bagaimana menjalankannya?

    +

    Lihat biaya set, buat, atau ambil resepnya untuk disunting:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Atau bangun di atasnya dalam resep Anda sendiri, di samping pengujian Anda:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/index.html b/web/public/index.html index ffa41da4..fa0b296d 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -276,6 +276,11 @@

    Pick the question, get the whole set

    Will my system store, show and give back a file name it did not expect?

    filename-handling

  • +
  • +

    Picture sizes

    +

    Does my system take pictures at the sizes screens and platforms use?

    +

    picture-sizes

    +
  • Size boundaries

    Is a size limit enforced exactly where it is declared?

    diff --git a/web/public/it/documentazione/index.html b/web/public/it/documentazione/index.html index 023e5441..f8092ec7 100644 --- a/web/public/it/documentazione/index.html +++ b/web/public/it/documentazione/index.html @@ -394,6 +394,11 @@

    Cos'è un preset?

    Il mio sistema salverà, mostrerà e restituirà un nome di file che non si aspettava?

    filename-handling

  • +
  • +

    Dimensioni delle immagini

    +

    Il mio sistema accetta immagini nelle dimensioni usate da schermi e piattaforme?

    +

    picture-sizes

    +
  • Limiti di dimensione

    Un limite di dimensione viene applicato esattamente dove è dichiarato?

    diff --git a/web/public/it/formati/index.html b/web/public/it/formati/index.html index 4981e642..d74d37a8 100644 --- a/web/public/it/formati/index.html +++ b/web/public/it/formati/index.html @@ -574,7 +574,7 @@

    Impostazioni che ogni formato accetta

    attachment_format - l'id di un formato, come lo elenca tfg formats + l'id di un formato, come png o csv @@ -599,7 +599,7 @@

    Impostazioni che ogni formato accetta

    inline_format - l'id di un formato di immagine, come lo elenca tfg formats + l'id di un formato di immagine, come png o jpg @@ -724,7 +724,7 @@

    Impostazioni che ogni formato accetta

    inline_format - l'id di un formato di immagine, come lo elenca tfg formats + l'id di un formato di immagine, come png o jpg @@ -1144,7 +1144,7 @@

    Impostazioni che ogni formato accetta

    inline_format - l'id di un formato di immagine, come lo elenca tfg formats + l'id di un formato di immagine, come png o jpg @@ -1199,7 +1199,7 @@

    Impostazioni che ogni formato accetta

    entry_format - l'id di un formato, come lo elenca tfg formats + l'id di un formato, come png o csv @@ -1344,7 +1344,7 @@

    Impostazioni che ogni formato accetta

    entry_format - l'id di un formato, come lo elenca tfg formats + l'id di un formato, come png o csv diff --git a/web/public/it/index.html b/web/public/it/index.html index 428ad58d..ff5b44c3 100644 --- a/web/public/it/index.html +++ b/web/public/it/index.html @@ -277,6 +277,11 @@

    Scegli la domanda, ottieni l'intero set

    Il mio sistema salverà, mostrerà e restituirà un nome di file che non si aspettava?

    filename-handling

  • +
  • +

    Dimensioni delle immagini

    +

    Il mio sistema accetta immagini nelle dimensioni usate da schermi e piattaforme?

    +

    picture-sizes

    +
  • Limiti di dimensione

    Un limite di dimensione viene applicato esattamente dove è dichiarato?

    diff --git a/web/public/it/preset/empty-and-minimal/index.html b/web/public/it/preset/empty-and-minimal/index.html index c716f6b3..290c3d50 100644 --- a/web/public/it/preset/empty-and-minimal/index.html +++ b/web/public/it/preset/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Cosa puoi cambiare?

    --formats id di formato separati da virgole, oppure all all - Da quali formati è composto il set. Lascia all per tutti i formati di questa versione, oppure indica quelli che il tuo sistema accetta. + Da quali formati è composto il set. Lascia all per tutti i formati di questa versione, oppure indica quelli che il tuo sistema accetta. diff --git a/web/public/it/preset/index.html b/web/public/it/preset/index.html index ba8e6b79..970c6376 100644 --- a/web/public/it/preset/index.html +++ b/web/public/it/preset/index.html @@ -163,6 +163,11 @@

    Preset di file di test, un set per ogni domanda di test

    Il mio sistema salverà, mostrerà e restituirà un nome di file che non si aspettava?

    filename-handling

  • +
  • +

    Dimensioni delle immagini

    +

    Il mio sistema accetta immagini nelle dimensioni usate da schermi e piattaforme?

    +

    picture-sizes

    +
  • Limiti di dimensione

    Un limite di dimensione viene applicato esattamente dove è dichiarato?

    diff --git a/web/public/it/preset/picture-sizes/index.html b/web/public/it/preset/picture-sizes/index.html new file mode 100644 index 00000000..35ea22f7 --- /dev/null +++ b/web/public/it/preset/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Immagini di test in dimensioni comuni - schermi, avatar, social media + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Preset

    +

    Dimensioni delle immagini

    +

    Il mio sistema accetta immagini nelle dimensioni usate da schermi e piattaforme?

    +

    + Il preset picture-sizes costruisce con un solo comando un intero set di file di test reali + per questa domanda, e un manifest.json accanto che dice come il tuo sistema deve + reagire a ogni file. Tutto ciò che segue è letto dal programma, ai valori predefiniti di questa + versione. +

    + + +
    +

    Cosa trova di solito?

    +
      +
    • un limite di larghezza o di altezza pensato per una forma che ne rifiuta un'altra, come uno sfondo del profilo largo 1584 px
    • +
    • una miniatura tagliata o schiacciata perché il codice si aspetta un'immagine orizzontale e ne arriva una verticale
    • +
    • un'immagine di altezza dispari, come 1200 x 627, rifiutata da un passaggio che accetta solo dimensioni pari
    • +
    • un'immagine 4K che esaurisce tempo o memoria mentre diventa una miniatura, anche se il file è piccolo
    • +
    +
    + + +
    +

    Cosa c'è nel set?

    +

    Ai valori predefiniti, come lo riporta tfg preset show picture-sizes:

    +
    + + + + + + + +
    File21
    Target nella sua ricetta21
    Dimensione totale4 178 420 B
    Formatijpg
    +
    +

    E ciò che il manifest di quel set si aspetta dal tuo sistema:

    +
    + + + + + + + +
    AttesoSignificatoFile
    acceptIl tuo sistema deve accettare il file.21
    +
    +
    + +
    +

    Cosa puoi cambiare?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ImpostazioneAccettaPredefinitoCosa fa
    --groupsnomi di gruppo separati da virgole, oppure allallQuali dimensioni contiene il set: screens per le dimensioni degli schermi, avatars per le foto profilo e social per copertine, banner, post e miniature. Lascia all per averle tutte.
    --contentplaceholder, testtestCosa mostra l'immagine. Un'immagine di prova serve a controllare come viene letto un file. Un segnaposto è un colore uniforme con un testo al centro, per impaginare prima che esistano le immagini vere.
    --formatun id di formato dalla pagina dei formatijpgIl formato di ogni file del set. È un'opzione dello strumento stesso, e il preset le dà solo un valore predefinito.
    +
    +
    + +
    +

    Come si esegue?

    +

    Guarda quanto costerebbe il set, costruiscilo o prendi la sua ricetta da modificare:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Oppure costruiscici sopra in una ricetta tua, accanto ai tuoi test:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/ja/docs/index.html b/web/public/ja/docs/index.html index 224ca99f..13ac766d 100644 --- a/web/public/ja/docs/index.html +++ b/web/public/ja/docs/index.html @@ -360,6 +360,11 @@

    プリセットとは何ですか。

    想定外のファイル名を、システムは保存し、表示し、返せるでしょうか。

    filename-handling

  • +
  • +

    画像サイズ

    +

    画面やプラットフォームが使うサイズの画像を、システムは受け付けるでしょうか。

    +

    picture-sizes

    +
  • サイズの境界

    サイズ制限は、宣言された位置ちょうどで適用されているでしょうか。

    diff --git a/web/public/ja/formats/index.html b/web/public/ja/formats/index.html index 6f9c547f..36c4fb22 100644 --- a/web/public/ja/formats/index.html +++ b/web/public/ja/formats/index.html @@ -564,7 +564,7 @@

    形式ごとに受け付ける設定

    attachment_format - tfg formatsが一覧表示する形式のID + pngやcsvなどの形式のID @@ -589,7 +589,7 @@

    形式ごとに受け付ける設定

    inline_format - tfg formatsが一覧表示する画像形式のID + pngやjpgなどの画像形式のID @@ -714,7 +714,7 @@

    形式ごとに受け付ける設定

    inline_format - tfg formatsが一覧表示する画像形式のID + pngやjpgなどの画像形式のID @@ -1134,7 +1134,7 @@

    形式ごとに受け付ける設定

    inline_format - tfg formatsが一覧表示する画像形式のID + pngやjpgなどの画像形式のID @@ -1189,7 +1189,7 @@

    形式ごとに受け付ける設定

    entry_format - tfg formatsが一覧表示する形式のID + pngやcsvなどの形式のID @@ -1334,7 +1334,7 @@

    形式ごとに受け付ける設定

    entry_format - tfg formatsが一覧表示する形式のID + pngやcsvなどの形式のID diff --git a/web/public/ja/index.html b/web/public/ja/index.html index ca30fa92..e85db362 100644 --- a/web/public/ja/index.html +++ b/web/public/ja/index.html @@ -267,6 +267,11 @@

    疑問を選べば、セット一式が手に入ります

    想定外のファイル名を、システムは保存し、表示し、返せるでしょうか。

    filename-handling

  • +
  • +

    画像サイズ

    +

    画面やプラットフォームが使うサイズの画像を、システムは受け付けるでしょうか。

    +

    picture-sizes

    +
  • サイズの境界

    サイズ制限は、宣言された位置ちょうどで適用されているでしょうか。

    diff --git a/web/public/ja/presets/empty-and-minimal/index.html b/web/public/ja/presets/empty-and-minimal/index.html index f47ff873..afe8e8f1 100644 --- a/web/public/ja/presets/empty-and-minimal/index.html +++ b/web/public/ja/presets/empty-and-minimal/index.html @@ -209,7 +209,7 @@

    何を変更できますか。

    --formats カンマ区切りの形式ID、またはall all - セットを構成する形式です。このビルドのすべての形式にするにはallのままにし、システムが受け付ける形式だけを指定することもできます。 + セットを構成する形式です。このビルドのすべての形式にするにはallのままにし、システムが受け付ける形式だけを指定することもできます。 diff --git a/web/public/ja/presets/index.html b/web/public/ja/presets/index.html index e54fb3ba..0164c61c 100644 --- a/web/public/ja/presets/index.html +++ b/web/public/ja/presets/index.html @@ -160,6 +160,11 @@

    テストファイルのプリセット、テストの疑問ごとに1セッ

    想定外のファイル名を、システムは保存し、表示し、返せるでしょうか。

    filename-handling

  • +
  • +

    画像サイズ

    +

    画面やプラットフォームが使うサイズの画像を、システムは受け付けるでしょうか。

    +

    picture-sizes

    +
  • サイズの境界

    サイズ制限は、宣言された位置ちょうどで適用されているでしょうか。

    diff --git a/web/public/ja/presets/picture-sizes/index.html b/web/public/ja/presets/picture-sizes/index.html new file mode 100644 index 00000000..cb7a4b47 --- /dev/null +++ b/web/public/ja/presets/picture-sizes/index.html @@ -0,0 +1,280 @@ + + + + + + +よく使われるサイズのテスト画像 - 画面、アバター、ソーシャルメディア + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    プリセット

    +

    画像サイズ

    +

    画面やプラットフォームが使うサイズの画像を、システムは受け付けるでしょうか。

    +

    + picture-sizesプリセットは、この疑問に対する本物のテストファイル一式を1つのコマンドで作り、その隣に、システムが各ファイルにどう反応すべきかを示すmanifest.jsonを置きます。以下はすべて、このバージョンの既定値でプログラムから読み取ったものです。 +

    + + +
    +

    普通は何を見つけますか。

    +
      +
    • ある形を想定して設けた幅や高さの上限が、別の形を拒否する問題。たとえば幅1584 pxのプロフィール背景
    • +
    • コードが横長の画像を想定しているのに縦長の画像が届き、切り取られたりつぶれたりするサムネイル
    • +
    • 偶数のサイズしか受け付けない処理に拒否される、1200 x 627のような高さが奇数の画像
    • +
    • ファイル自体は小さいのに、サムネイルにする途中で時間やメモリが足りなくなる4K画像
    • +
    +
    + + +
    +

    セットには何が入っていますか。

    +

    既定値で、tfg preset show picture-sizesが報告するとおりです。

    +
    + + + + + + + +
    ファイル数21
    レシピ内のターゲット数21
    合計サイズ4 178 420 B
    形式jpg
    +
    +

    そして、そのセットのマニフェストがシステムに期待していること:

    +
    + + + + + + + +
    期待意味ファイル数
    acceptシステムはこのファイルを受け入れるべきです。21
    +
    +
    + +
    +

    何を変更できますか。

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    設定値既定値動作
    --groupsカンマ区切りのグループ名、またはallallセットに含めるサイズです。画面サイズはscreens、プロフィール画像はavatars、カバー、バナー、投稿、サムネイルはsocialです。すべてにするにはallのままにします。
    --contentplaceholder, testtest画像に何を表示するかです。テストパターンはファイルの読み取られ方を確かめるためのものです。プレースホルダーは中央に文字のある単色の画像で、本物の画像ができる前にページをレイアウトするためのものです。
    --format形式ページにある形式IDjpgセット内のすべてのファイルの形式です。ツール自体のフラグで、プリセットは既定値を与えるだけです。
    +
    +
    + +
    +

    どう実行しますか。

    +

    セットのコストを確認し、作成し、または編集用にそのレシピを取り出します。

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    または、テストの隣に置いた自分のレシピで、これを土台にします。

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/ko/docs/index.html b/web/public/ko/docs/index.html index 93f09f1c..5be4acdc 100644 --- a/web/public/ko/docs/index.html +++ b/web/public/ko/docs/index.html @@ -377,6 +377,11 @@

    프리셋이란 무엇인가요?

    예상하지 못한 파일 이름을 시스템이 저장하고, 보여 주고, 돌려줄 수 있을까요?

    filename-handling

  • +
  • +

    이미지 크기

    +

    화면과 플랫폼이 쓰는 크기의 이미지를 내 시스템이 받을까요?

    +

    picture-sizes

    +
  • 크기 경계

    크기 한도가 선언한 바로 그 지점에서 적용되고 있을까요?

    diff --git a/web/public/ko/formats/index.html b/web/public/ko/formats/index.html index 9c9389bc..4bbf7458 100644 --- a/web/public/ko/formats/index.html +++ b/web/public/ko/formats/index.html @@ -565,7 +565,7 @@

    각 형식이 받는 설정

    attachment_format - tfg formats가 나열하는 형식의 id + png나 csv 같은 형식의 id @@ -590,7 +590,7 @@

    각 형식이 받는 설정

    inline_format - tfg formats가 나열하는 이미지 형식의 id + png나 jpg 같은 이미지 형식의 id @@ -715,7 +715,7 @@

    각 형식이 받는 설정

    inline_format - tfg formats가 나열하는 이미지 형식의 id + png나 jpg 같은 이미지 형식의 id @@ -1135,7 +1135,7 @@

    각 형식이 받는 설정

    inline_format - tfg formats가 나열하는 이미지 형식의 id + png나 jpg 같은 이미지 형식의 id @@ -1190,7 +1190,7 @@

    각 형식이 받는 설정

    entry_format - tfg formats가 나열하는 형식의 id + png나 csv 같은 형식의 id @@ -1335,7 +1335,7 @@

    각 형식이 받는 설정

    entry_format - tfg formats가 나열하는 형식의 id + png나 csv 같은 형식의 id diff --git a/web/public/ko/index.html b/web/public/ko/index.html index f965b1f5..219129b5 100644 --- a/web/public/ko/index.html +++ b/web/public/ko/index.html @@ -272,6 +272,11 @@

    질문을 고르면 세트 전체를 얻습니다

    예상하지 못한 파일 이름을 시스템이 저장하고, 보여 주고, 돌려줄 수 있을까요?

    filename-handling

  • +
  • +

    이미지 크기

    +

    화면과 플랫폼이 쓰는 크기의 이미지를 내 시스템이 받을까요?

    +

    picture-sizes

    +
  • 크기 경계

    크기 한도가 선언한 바로 그 지점에서 적용되고 있을까요?

    diff --git a/web/public/ko/presets/empty-and-minimal/index.html b/web/public/ko/presets/empty-and-minimal/index.html index 10e79b60..5b24711f 100644 --- a/web/public/ko/presets/empty-and-minimal/index.html +++ b/web/public/ko/presets/empty-and-minimal/index.html @@ -210,7 +210,7 @@

    무엇을 바꿀 수 있나요?

    --formats 쉼표로 구분한 형식 id 또는 all all - 세트를 구성하는 형식입니다. 이 빌드의 모든 형식을 쓰려면 all로 두고, 시스템이 받는 형식만 쓰려면 이름을 지정합니다. + 세트를 구성하는 형식입니다. 이 빌드의 모든 형식을 쓰려면 all로 두고, 시스템이 받는 형식만 쓰려면 이름을 지정합니다. diff --git a/web/public/ko/presets/index.html b/web/public/ko/presets/index.html index 98314e18..dfb978d4 100644 --- a/web/public/ko/presets/index.html +++ b/web/public/ko/presets/index.html @@ -161,6 +161,11 @@

    테스트 파일 프리셋, 테스트 질문마다 한 세트

    예상하지 못한 파일 이름을 시스템이 저장하고, 보여 주고, 돌려줄 수 있을까요?

    filename-handling

  • +
  • +

    이미지 크기

    +

    화면과 플랫폼이 쓰는 크기의 이미지를 내 시스템이 받을까요?

    +

    picture-sizes

    +
  • 크기 경계

    크기 한도가 선언한 바로 그 지점에서 적용되고 있을까요?

    diff --git a/web/public/ko/presets/picture-sizes/index.html b/web/public/ko/presets/picture-sizes/index.html new file mode 100644 index 00000000..3ef28f27 --- /dev/null +++ b/web/public/ko/presets/picture-sizes/index.html @@ -0,0 +1,281 @@ + + + + + + +자주 쓰는 크기의 테스트 이미지 - 화면, 아바타, 소셜 미디어 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    프리셋

    +

    이미지 크기

    +

    화면과 플랫폼이 쓰는 크기의 이미지를 내 시스템이 받을까요?

    +

    + picture-sizes 프리셋은 이 질문에 대한 실제 테스트 파일 세트 전체를 명령 하나로 만들고, 그 옆에 시스템이 각 파일에 어떻게 반응해야 하는지 알려 주는 + manifest.json을 둡니다. 아래의 모든 내용은 이 버전의 기본값으로 프로그램에서 읽어 온 것입니다. +

    + + +
    +

    보통 무엇을 찾아내나요?

    +
      +
    • 한 가지 모양을 생각하고 정한 너비나 높이 제한이 다른 모양을 거부하는 문제, 예를 들어 너비 1584 px의 프로필 배경
    • +
    • 코드가 가로 이미지를 기대하는데 세로 이미지가 들어와 잘리거나 찌그러진 썸네일
    • +
    • 짝수 크기만 받는 단계에서 거부되는, 1200 x 627처럼 높이가 홀수인 이미지
    • +
    • 파일 자체는 작은데 썸네일이 되는 도중 시간이나 메모리가 부족해지는 4K 이미지
    • +
    +
    + + +
    +

    세트에는 무엇이 들어 있나요?

    +

    기본값에서 tfg preset show picture-sizes가 보고하는 대로입니다.

    +
    + + + + + + + +
    파일 수21
    레시피의 타깃 수21
    총 크기4 178 420 B
    형식jpg
    +
    +

    그리고 그 세트의 매니페스트가 시스템에 기대하는 것:

    +
    + + + + + + + +
    기대값의미파일 수
    accept시스템은 이 파일을 받아야 합니다.21
    +
    +
    + +
    +

    무엇을 바꿀 수 있나요?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    설정값기본값동작
    --groups쉼표로 구분한 그룹 이름 또는 allall세트에 담을 크기입니다. 화면 크기는 screens, 프로필 사진은 avatars, 커버, 배너, 게시물, 썸네일은 social입니다. 모두 쓰려면 all로 둡니다.
    --contentplaceholder, testtest이미지가 보여 주는 것입니다. 테스트 패턴은 파일이 어떻게 읽히는지 확인하는 용도입니다. 자리 표시자는 가운데에 글자가 있는 단색 이미지로, 실제 이미지가 생기기 전에 페이지를 배치하는 용도입니다.
    --format형식 페이지의 형식 idjpg세트에 포함된 모든 파일의 형식입니다. 도구 자체의 플래그이며, 프리셋은 기본값만 지정합니다.
    +
    +
    + +
    +

    어떻게 실행하나요?

    +

    세트의 비용을 확인하고, 만들거나, 편집할 레시피를 꺼냅니다.

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    또는 테스트 옆에 둔 직접 만든 레시피에서 이를 바탕으로 이어 갑니다.

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + +
    + + +
    + + diff --git a/web/public/nl/documentatie/index.html b/web/public/nl/documentatie/index.html index 74483b8c..df1c30ef 100644 --- a/web/public/nl/documentatie/index.html +++ b/web/public/nl/documentatie/index.html @@ -397,6 +397,11 @@

    Wat is een preset?

    Slaat mijn systeem een bestandsnaam op, toont en geeft het die terug, ook als het die niet verwachtte?

    filename-handling

  • +
  • +

    Afbeeldingsformaten

    +

    Neemt mijn systeem afbeeldingen aan in de formaten die schermen en platforms gebruiken?

    +

    picture-sizes

    +
  • Groottegrenzen

    Wordt een groottelimiet precies afgedwongen waar hij is opgegeven?

    diff --git a/web/public/nl/formaten/index.html b/web/public/nl/formaten/index.html index 4fe63f0c..e9d805f7 100644 --- a/web/public/nl/formaten/index.html +++ b/web/public/nl/formaten/index.html @@ -574,7 +574,7 @@

    Instellingen die elk formaat accepteert

    attachment_format - de id van een formaat, zoals tfg formats ze opsomt + de id van een formaat, zoals png of csv @@ -599,7 +599,7 @@

    Instellingen die elk formaat accepteert

    inline_format - de id van een afbeeldingsformaat, zoals tfg formats ze opsomt + de id van een afbeeldingsformaat, zoals png of jpg @@ -724,7 +724,7 @@

    Instellingen die elk formaat accepteert

    inline_format - de id van een afbeeldingsformaat, zoals tfg formats ze opsomt + de id van een afbeeldingsformaat, zoals png of jpg @@ -1144,7 +1144,7 @@

    Instellingen die elk formaat accepteert

    inline_format - de id van een afbeeldingsformaat, zoals tfg formats ze opsomt + de id van een afbeeldingsformaat, zoals png of jpg @@ -1199,7 +1199,7 @@

    Instellingen die elk formaat accepteert

    entry_format - de id van een formaat, zoals tfg formats ze opsomt + de id van een formaat, zoals png of csv @@ -1344,7 +1344,7 @@

    Instellingen die elk formaat accepteert

    entry_format - de id van een formaat, zoals tfg formats ze opsomt + de id van een formaat, zoals png of csv diff --git a/web/public/nl/index.html b/web/public/nl/index.html index f37e992e..2dbc3e89 100644 --- a/web/public/nl/index.html +++ b/web/public/nl/index.html @@ -276,6 +276,11 @@

    Kies de vraag, krijg de hele set

    Slaat mijn systeem een bestandsnaam op, toont en geeft het die terug, ook als het die niet verwachtte?

    filename-handling

  • +
  • +

    Afbeeldingsformaten

    +

    Neemt mijn systeem afbeeldingen aan in de formaten die schermen en platforms gebruiken?

    +

    picture-sizes

    +
  • Groottegrenzen

    Wordt een groottelimiet precies afgedwongen waar hij is opgegeven?

    diff --git a/web/public/nl/presets/empty-and-minimal/index.html b/web/public/nl/presets/empty-and-minimal/index.html index bd55fdef..d76e061c 100644 --- a/web/public/nl/presets/empty-and-minimal/index.html +++ b/web/public/nl/presets/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Wat kun je wijzigen?

    --formats formaat-id's gescheiden door komma's, of all all - Uit welke formaten de set is opgebouwd. Laat het op all staan voor elk formaat van deze build, of noem de formaten die je systeem accepteert. + Uit welke formaten de set is opgebouwd. Laat het op all staan voor elk formaat van deze build, of noem de formaten die je systeem accepteert. diff --git a/web/public/nl/presets/index.html b/web/public/nl/presets/index.html index deb29c49..51aedd82 100644 --- a/web/public/nl/presets/index.html +++ b/web/public/nl/presets/index.html @@ -162,6 +162,11 @@

    Presets voor testbestanden, een set voor elke testvraag

    Slaat mijn systeem een bestandsnaam op, toont en geeft het die terug, ook als het die niet verwachtte?

    filename-handling

  • +
  • +

    Afbeeldingsformaten

    +

    Neemt mijn systeem afbeeldingen aan in de formaten die schermen en platforms gebruiken?

    +

    picture-sizes

    +
  • Groottegrenzen

    Wordt een groottelimiet precies afgedwongen waar hij is opgegeven?

    diff --git a/web/public/nl/presets/picture-sizes/index.html b/web/public/nl/presets/picture-sizes/index.html new file mode 100644 index 00000000..dd733b28 --- /dev/null +++ b/web/public/nl/presets/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Testafbeeldingen in gangbare formaten - schermen, avatars, sociale media + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presets

    +

    Afbeeldingsformaten

    +

    Neemt mijn systeem afbeeldingen aan in de formaten die schermen en platforms gebruiken?

    +

    + De preset picture-sizes bouwt met één opdracht een hele set echte testbestanden voor deze + vraag, en een manifest.json ernaast dat zegt hoe je systeem op elk bestand moet + reageren. Alles hieronder wordt uit het programma gelezen, bij de standaardwaarden van deze + versie. +

    + + +
    +

    Wat vindt hij meestal?

    +
      +
    • een grens voor breedte of hoogte die voor één vorm bedoeld was en een andere weigert, zoals een profielachtergrond van 1584 px breed
    • +
    • een miniatuur die wordt bijgesneden of platgedrukt omdat de code een liggende afbeelding verwacht en er een staande binnenkomt
    • +
    • een afbeelding met een oneven hoogte, zoals 1200 x 627, geweigerd door een stap die alleen even formaten aanneemt
    • +
    • een 4K-afbeelding die op weg naar een miniatuur zonder tijd of geheugen komt, hoewel het bestand zelf klein is
    • +
    +
    + + +
    +

    Wat zit er in de set?

    +

    Bij de standaardwaarden, zoals tfg preset show picture-sizes het meldt:

    +
    + + + + + + + +
    Bestanden21
    Targets in het recept21
    Totale grootte4 178 420 B
    Formatenjpg
    +
    +

    En wat het manifest van die set van je systeem verwacht:

    +
    + + + + + + + +
    VerwachtBetekenisBestanden
    acceptJe systeem moet het bestand aannemen.21
    +
    +
    + +
    +

    Wat kun je wijzigen?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    InstellingAccepteertStandaardWat het doet
    --groupsgroepsnamen gescheiden door komma's, of allallWelke formaten de set bevat: screens voor schermformaten, avatars voor profielfoto's en social voor omslagfoto's, banners, berichten en miniaturen. Laat het op all staan voor allemaal.
    --contentplaceholder, testtestWat de afbeelding toont. Een testpatroon is om te controleren hoe een bestand wordt gelezen. Een placeholder is een egale kleur met tekst in het midden, om een pagina op te maken voordat de echte afbeeldingen er zijn.
    --formateen formaat-id van de pagina met formatenjpgHet formaat van elk bestand in de set. Het is een optie van de tool zelf, en de preset geeft er alleen een standaardwaarde aan.
    +
    +
    + +
    +

    Hoe draai je hem?

    +

    Bekijk wat de set zou kosten, bouw hem, of neem zijn recept om te bewerken:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Of bouw erop voort in een eigen recept, naast je tests:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/pl/dokumentacja/index.html b/web/public/pl/dokumentacja/index.html index 9fc66ced..16232bce 100644 --- a/web/public/pl/dokumentacja/index.html +++ b/web/public/pl/dokumentacja/index.html @@ -394,6 +394,11 @@

    Czym jest preset?

    Czy mój system zapisze, pokaże i odda nazwę pliku, której się nie spodziewał?

    filename-handling

  • +
  • +

    Rozmiary obrazków

    +

    Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?

    +

    picture-sizes

    +
  • Granice rozmiaru

    Czy limit rozmiaru działa dokładnie tam, gdzie jest zadeklarowany?

    diff --git a/web/public/pl/formaty/index.html b/web/public/pl/formaty/index.html index 1912d6e5..f8c02914 100644 --- a/web/public/pl/formaty/index.html +++ b/web/public/pl/formaty/index.html @@ -572,7 +572,7 @@

    Ustawienia, które przyjmuje każdy format

    attachment_format - identyfikator formatu, tak jak wypisuje go tfg formats + identyfikator formatu, na przykład png albo csv @@ -597,7 +597,7 @@

    Ustawienia, które przyjmuje każdy format

    inline_format - identyfikator formatu obrazka, tak jak wypisuje go tfg formats + identyfikator formatu obrazka, na przykład png albo jpg @@ -722,7 +722,7 @@

    Ustawienia, które przyjmuje każdy format

    inline_format - identyfikator formatu obrazka, tak jak wypisuje go tfg formats + identyfikator formatu obrazka, na przykład png albo jpg @@ -1142,7 +1142,7 @@

    Ustawienia, które przyjmuje każdy format

    inline_format - identyfikator formatu obrazka, tak jak wypisuje go tfg formats + identyfikator formatu obrazka, na przykład png albo jpg @@ -1197,7 +1197,7 @@

    Ustawienia, które przyjmuje każdy format

    entry_format - identyfikator formatu, tak jak wypisuje go tfg formats + identyfikator formatu, na przykład png albo csv @@ -1342,7 +1342,7 @@

    Ustawienia, które przyjmuje każdy format

    entry_format - identyfikator formatu, tak jak wypisuje go tfg formats + identyfikator formatu, na przykład png albo csv diff --git a/web/public/pl/index.html b/web/public/pl/index.html index 6cc4fc10..97f6da2f 100644 --- a/web/public/pl/index.html +++ b/web/public/pl/index.html @@ -276,6 +276,11 @@

    Wybierz pytanie, dostań cały zestaw

    Czy mój system zapisze, pokaże i odda nazwę pliku, której się nie spodziewał?

    filename-handling

  • +
  • +

    Rozmiary obrazków

    +

    Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?

    +

    picture-sizes

    +
  • Granice rozmiaru

    Czy limit rozmiaru działa dokładnie tam, gdzie jest zadeklarowany?

    diff --git a/web/public/pl/presety/empty-and-minimal/index.html b/web/public/pl/presety/empty-and-minimal/index.html index 73af5bee..acd8f273 100644 --- a/web/public/pl/presety/empty-and-minimal/index.html +++ b/web/public/pl/presety/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Co można zmienić?

    --formats identyfikatory formatów rozdzielone przecinkami albo all all - Z jakich formatów powstaje zestaw. Zostaw all, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje Twój system. + Z jakich formatów powstaje zestaw. Zostaw all, żeby dostać każdy format tej wersji, albo wymień te, które przyjmuje Twój system. diff --git a/web/public/pl/presety/index.html b/web/public/pl/presety/index.html index 961e9073..d017bad6 100644 --- a/web/public/pl/presety/index.html +++ b/web/public/pl/presety/index.html @@ -162,6 +162,11 @@

    Presety plików testowych, jeden zestaw na każde pytanie testowe

    Czy mój system zapisze, pokaże i odda nazwę pliku, której się nie spodziewał?

    filename-handling

  • +
  • +

    Rozmiary obrazków

    +

    Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?

    +

    picture-sizes

    +
  • Granice rozmiaru

    Czy limit rozmiaru działa dokładnie tam, gdzie jest zadeklarowany?

    diff --git a/web/public/pl/presety/picture-sizes/index.html b/web/public/pl/presety/picture-sizes/index.html new file mode 100644 index 00000000..1a5542df --- /dev/null +++ b/web/public/pl/presety/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Obrazki testowe w popularnych rozmiarach - ekrany, awatary, media społecznościowe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presety

    +

    Rozmiary obrazków

    +

    Czy mój system przyjmuje obrazki w rozmiarach, jakich używają ekrany i platformy?

    +

    + Preset picture-sizes buduje jednym poleceniem cały zestaw prawdziwych plików testowych do + tego pytania, a obok nich manifest.json, który mówi, jak system ma zareagować na każdy + plik. Wszystko poniżej pochodzi z programu, przy wartościach domyślnych tej wersji. +

    + + +
    +

    Co zwykle znajduje?

    +
      +
    • limit szerokości albo wysokości ustawiony z myślą o jednym kształcie, który odrzuca inny, na przykład tło profilu szerokie na 1584 px
    • +
    • miniatura przycięta albo spłaszczona, bo kod spodziewa się obrazka poziomego, a przychodzi pionowy
    • +
    • obrazek o nieparzystej wysokości, na przykład 1200 x 627, odrzucony przez krok, który przyjmuje tylko parzyste wymiary
    • +
    • obrazek 4K, któremu w drodze do miniatury kończy się czas albo pamięć, choć sam plik jest mały
    • +
    +
    + + +
    +

    Co jest w zestawie?

    +

    Przy wartościach domyślnych, tak jak podaje to tfg preset show picture-sizes:

    +
    + + + + + + + +
    Pliki21
    Cele w przepisie21
    Łączny rozmiar4 178 420 B
    Formatyjpg
    +
    +

    I czego manifest tego zestawu oczekuje od Twojego systemu:

    +
    + + + + + + + +
    OczekiwanieZnaczeniePliki
    acceptSystem powinien przyjąć plik.21
    +
    +
    + +
    +

    Co można zmienić?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    UstawieniePrzyjmujeDomyślnieCo robi
    --groupsnazwy grup rozdzielone przecinkami albo allallJakie rozmiary zawiera zestaw: screens to rozmiary ekranów, avatars to zdjęcia profilowe, a social to okładki, banery, posty i miniatury. Zostaw all, żeby dostać wszystkie.
    --contentplaceholder, testtestCo pokazuje obrazek. Obraz testowy to wzór do sprawdzania, jak plik jest odczytywany. Obraz zastępczy to jednolity kolor z napisem na środku, do układania strony, zanim powstaną prawdziwe obrazki.
    --formatidentyfikator formatu ze strony formatówjpgFormat każdego pliku w zestawie. To flaga samego narzędzia, a preset daje jej tylko wartość domyślną.
    +
    +
    + +
    +

    Jak go uruchomić?

    +

    Sprawdź, ile zestaw będzie kosztował, zbuduj go albo weź jego przepis do edycji:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Albo zbuduj na nim własny przepis, trzymany obok testów:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/presets/empty-and-minimal/index.html b/web/public/presets/empty-and-minimal/index.html index ee42355c..4bda446c 100644 --- a/web/public/presets/empty-and-minimal/index.html +++ b/web/public/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    What can you change?

    --formats format ids separated by commas, or all all - Which formats the set is built from. Leave it at all for every format this build has, or name the ones your system accepts. + Which formats the set is built from. Leave it at all for every format this build has, or name the ones your system accepts. diff --git a/web/public/presets/index.html b/web/public/presets/index.html index 51c8ceda..378bd4a4 100644 --- a/web/public/presets/index.html +++ b/web/public/presets/index.html @@ -162,6 +162,11 @@

    Test file presets, one set for each testing question

    Will my system store, show and give back a file name it did not expect?

    filename-handling

  • +
  • +

    Picture sizes

    +

    Does my system take pictures at the sizes screens and platforms use?

    +

    picture-sizes

    +
  • Size boundaries

    Is a size limit enforced exactly where it is declared?

    diff --git a/web/public/presets/picture-sizes/index.html b/web/public/presets/picture-sizes/index.html new file mode 100644 index 00000000..9ee840a5 --- /dev/null +++ b/web/public/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Test Images at Common Sizes - Screens, Avatars, Social Media + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presets

    +

    Picture sizes

    +

    Does my system take pictures at the sizes screens and platforms use?

    +

    + The picture-sizes preset builds a whole set of real test files for this question in one + command, and a manifest.json beside them saying how your system should react to each + file. Everything below is read from the program, at the defaults of this version. +

    + + +
    +

    What does it usually find?

    +
      +
    • a limit on the width or the height set with one shape in mind that turns away another, such as a profile background 1584 px wide
    • +
    • a thumbnail cut or squashed because the code expects a landscape picture and a portrait one arrives
    • +
    • a picture with an odd height, such as 1200 x 627, refused by a step that only takes even sizes
    • +
    • a 4K picture that runs out of time or memory on its way to a thumbnail, although the file itself is small
    • +
    +
    + + +
    +

    What is in the set?

    +

    At its defaults, as tfg preset show picture-sizes reports it:

    +
    + + + + + + + +
    Files21
    Targets in its recipe21
    Total size4 178 420 B
    Formatsjpg
    +
    +

    And what the manifest of that set expects from your system:

    +
    + + + + + + + +
    ExpectedMeaningFiles
    acceptYour system should take the file.21
    +
    +
    + +
    +

    What can you change?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    SettingTakesDefaultWhat it does
    --groupsgroup names separated by commas, or allallWhich sizes the set holds: screens for the sizes of screens, avatars for profile pictures and social for covers, banners, posts and thumbnails. Leave it at all for every one of them.
    --contentplaceholder, testtestWhat the picture shows. A test pattern is for checking how a file is read. A placeholder is a flat colour with words in the middle, for laying out a page before the real pictures exist.
    --formata format id from the formats pagejpgThe format of every file in the set. It is a flag of the tool itself, and the preset only gives it a default.
    +
    +
    + +
    +

    How do you run it?

    +

    See what the set would cost, build it, or take its recipe to edit:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Or build on it in a recipe of your own, next to your tests:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/pt-br/documentacao/index.html b/web/public/pt-br/documentacao/index.html index 274db6c8..5d9bcdca 100644 --- a/web/public/pt-br/documentacao/index.html +++ b/web/public/pt-br/documentacao/index.html @@ -394,6 +394,11 @@

    O que é um preset?

    Meu sistema vai guardar, mostrar e devolver um nome de arquivo que ele não esperava?

    filename-handling

  • +
  • +

    Tamanhos de imagem

    +

    Meu sistema aceita imagens nos tamanhos que telas e plataformas usam?

    +

    picture-sizes

    +
  • Limites de tamanho

    Um limite de tamanho é aplicado exatamente onde foi declarado?

    diff --git a/web/public/pt-br/formatos/index.html b/web/public/pt-br/formatos/index.html index d648a459..be6357a5 100644 --- a/web/public/pt-br/formatos/index.html +++ b/web/public/pt-br/formatos/index.html @@ -573,7 +573,7 @@

    Configurações que cada formato aceita

    attachment_format - o id de um formato, como o tfg formats lista + o id de um formato, como png ou csv @@ -598,7 +598,7 @@

    Configurações que cada formato aceita

    inline_format - o id de um formato de imagem, como o tfg formats lista + o id de um formato de imagem, como png ou jpg @@ -723,7 +723,7 @@

    Configurações que cada formato aceita

    inline_format - o id de um formato de imagem, como o tfg formats lista + o id de um formato de imagem, como png ou jpg @@ -1143,7 +1143,7 @@

    Configurações que cada formato aceita

    inline_format - o id de um formato de imagem, como o tfg formats lista + o id de um formato de imagem, como png ou jpg @@ -1198,7 +1198,7 @@

    Configurações que cada formato aceita

    entry_format - o id de um formato, como o tfg formats lista + o id de um formato, como png ou csv @@ -1343,7 +1343,7 @@

    Configurações que cada formato aceita

    entry_format - o id de um formato, como o tfg formats lista + o id de um formato, como png ou csv diff --git a/web/public/pt-br/index.html b/web/public/pt-br/index.html index b611c609..746767dd 100644 --- a/web/public/pt-br/index.html +++ b/web/public/pt-br/index.html @@ -278,6 +278,11 @@

    Escolha a pergunta, receba o conjunto inteiro

    Meu sistema vai guardar, mostrar e devolver um nome de arquivo que ele não esperava?

    filename-handling

  • +
  • +

    Tamanhos de imagem

    +

    Meu sistema aceita imagens nos tamanhos que telas e plataformas usam?

    +

    picture-sizes

    +
  • Limites de tamanho

    Um limite de tamanho é aplicado exatamente onde foi declarado?

    diff --git a/web/public/pt-br/presets/empty-and-minimal/index.html b/web/public/pt-br/presets/empty-and-minimal/index.html index c0b432e8..e63ea707 100644 --- a/web/public/pt-br/presets/empty-and-minimal/index.html +++ b/web/public/pt-br/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    O que você pode mudar?

    --formats ids de formato separados por vírgulas, ou all all - De quais formatos o conjunto é feito. Deixe em all para todos os formatos desta versão, ou nomeie os que o seu sistema aceita. + De quais formatos o conjunto é feito. Deixe em all para todos os formatos desta versão, ou nomeie os que o seu sistema aceita. diff --git a/web/public/pt-br/presets/index.html b/web/public/pt-br/presets/index.html index b8f29868..ce0342b2 100644 --- a/web/public/pt-br/presets/index.html +++ b/web/public/pt-br/presets/index.html @@ -163,6 +163,11 @@

    Presets de arquivos de teste, um conjunto para cada pergunta de teste

    Meu sistema vai guardar, mostrar e devolver um nome de arquivo que ele não esperava?

    filename-handling

  • +
  • +

    Tamanhos de imagem

    +

    Meu sistema aceita imagens nos tamanhos que telas e plataformas usam?

    +

    picture-sizes

    +
  • Limites de tamanho

    Um limite de tamanho é aplicado exatamente onde foi declarado?

    diff --git a/web/public/pt-br/presets/picture-sizes/index.html b/web/public/pt-br/presets/picture-sizes/index.html new file mode 100644 index 00000000..fc5ba11d --- /dev/null +++ b/web/public/pt-br/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Imagens de teste em tamanhos comuns - telas, avatares, redes sociais + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presets

    +

    Tamanhos de imagem

    +

    Meu sistema aceita imagens nos tamanhos que telas e plataformas usam?

    +

    + O preset picture-sizes monta com um único comando um conjunto inteiro de arquivos de teste + reais para esta pergunta, e um manifest.json ao lado dizendo como seu sistema deve + reagir a cada arquivo. Tudo abaixo é lido do programa, com os valores padrão desta versão. +

    + + +
    +

    O que ele costuma encontrar?

    +
      +
    • um limite de largura ou altura pensado para um formato de imagem que recusa outro, como um fundo de perfil com 1584 px de largura
    • +
    • uma miniatura cortada ou achatada porque o código espera uma imagem horizontal e chega uma vertical
    • +
    • uma imagem de altura ímpar, como 1200 x 627, recusada por uma etapa que só aceita tamanhos pares
    • +
    • uma imagem 4K que fica sem tempo ou sem memória a caminho de uma miniatura, embora o arquivo seja pequeno
    • +
    +
    + + +
    +

    O que há no conjunto?

    +

    Com os valores padrão, como o tfg preset show picture-sizes informa:

    +
    + + + + + + + +
    Arquivos21
    Targets na sua receita21
    Tamanho total4 178 420 B
    Formatosjpg
    +
    +

    E o que o manifesto desse conjunto espera do seu sistema:

    +
    + + + + + + + +
    EsperadoSignificadoArquivos
    acceptSeu sistema deve aceitar o arquivo.21
    +
    +
    + +
    +

    O que você pode mudar?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ConfiguraçãoAceitaPadrãoO que faz
    --groupsnomes de grupo separados por vírgulas, ou allallQuais tamanhos o conjunto contém: screens para tamanhos de tela, avatars para fotos de perfil e social para capas, banners, publicações e miniaturas. Deixe em all para ter todos.
    --contentplaceholder, testtestO que a imagem mostra. Um padrão de teste serve para verificar como um arquivo é lido. Um espaço reservado é uma cor lisa com texto no meio, para montar uma página antes de existirem as imagens reais.
    --formatum id de formato da página de formatosjpgO formato de cada arquivo do conjunto. É uma opção da própria ferramenta, e o preset apenas dá a ela um valor padrão.
    +
    +
    + +
    +

    Como executar?

    +

    Veja quanto o conjunto custaria, monte-o ou pegue a receita dele para editar:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Ou construa sobre ele em uma receita sua, ao lado dos seus testes:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/ro/documentatie/index.html b/web/public/ro/documentatie/index.html index 5d3d2902..33951502 100644 --- a/web/public/ro/documentatie/index.html +++ b/web/public/ro/documentatie/index.html @@ -395,6 +395,11 @@

    Ce este o presetare?

    Va stoca, va afișa și va returna sistemul meu un nume de fișier la care nu se aștepta?

    filename-handling

  • +
  • +

    Dimensiuni de imagine

    +

    Acceptă sistemul meu imagini la dimensiunile folosite de ecrane și platforme?

    +

    picture-sizes

    +
  • Limite de dimensiune

    Este o limită de dimensiune aplicată exact acolo unde este declarată?

    diff --git a/web/public/ro/formate/index.html b/web/public/ro/formate/index.html index 2e587a51..d402b701 100644 --- a/web/public/ro/formate/index.html +++ b/web/public/ro/formate/index.html @@ -573,7 +573,7 @@

    Setările pe care le acceptă fiecare format

    attachment_format - id-ul unui format, așa cum îl listează tfg formats + id-ul unui format, de exemplu png sau csv @@ -598,7 +598,7 @@

    Setările pe care le acceptă fiecare format

    inline_format - id-ul unui format de imagine, așa cum îl listează tfg formats + id-ul unui format de imagine, de exemplu png sau jpg @@ -723,7 +723,7 @@

    Setările pe care le acceptă fiecare format

    inline_format - id-ul unui format de imagine, așa cum îl listează tfg formats + id-ul unui format de imagine, de exemplu png sau jpg @@ -1143,7 +1143,7 @@

    Setările pe care le acceptă fiecare format

    inline_format - id-ul unui format de imagine, așa cum îl listează tfg formats + id-ul unui format de imagine, de exemplu png sau jpg @@ -1198,7 +1198,7 @@

    Setările pe care le acceptă fiecare format

    entry_format - id-ul unui format, așa cum îl listează tfg formats + id-ul unui format, de exemplu png sau csv @@ -1343,7 +1343,7 @@

    Setările pe care le acceptă fiecare format

    entry_format - id-ul unui format, așa cum îl listează tfg formats + id-ul unui format, de exemplu png sau csv diff --git a/web/public/ro/index.html b/web/public/ro/index.html index 698da962..031b0f6e 100644 --- a/web/public/ro/index.html +++ b/web/public/ro/index.html @@ -277,6 +277,11 @@

    Alege întrebarea, primești setul întreg

    Va stoca, va afișa și va returna sistemul meu un nume de fișier la care nu se aștepta?

    filename-handling

  • +
  • +

    Dimensiuni de imagine

    +

    Acceptă sistemul meu imagini la dimensiunile folosite de ecrane și platforme?

    +

    picture-sizes

    +
  • Limite de dimensiune

    Este o limită de dimensiune aplicată exact acolo unde este declarată?

    diff --git a/web/public/ro/presetari/empty-and-minimal/index.html b/web/public/ro/presetari/empty-and-minimal/index.html index 8ed28755..60e37112 100644 --- a/web/public/ro/presetari/empty-and-minimal/index.html +++ b/web/public/ro/presetari/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Ce poți schimba?

    --formats id-uri de format separate prin virgule, sau all all - Din ce formate este alcătuit setul. Lasă all pentru toate formatele acestei versiuni sau numește-le pe cele pe care le acceptă sistemul tău. + Din ce formate este alcătuit setul. Lasă all pentru toate formatele acestei versiuni sau numește-le pe cele pe care le acceptă sistemul tău. diff --git a/web/public/ro/presetari/index.html b/web/public/ro/presetari/index.html index 78eb6735..7c8b064b 100644 --- a/web/public/ro/presetari/index.html +++ b/web/public/ro/presetari/index.html @@ -163,6 +163,11 @@

    Presetări de fișiere de test, câte un set pentru fiecare întrebare de te

    Va stoca, va afișa și va returna sistemul meu un nume de fișier la care nu se aștepta?

    filename-handling

  • +
  • +

    Dimensiuni de imagine

    +

    Acceptă sistemul meu imagini la dimensiunile folosite de ecrane și platforme?

    +

    picture-sizes

    +
  • Limite de dimensiune

    Este o limită de dimensiune aplicată exact acolo unde este declarată?

    diff --git a/web/public/ro/presetari/picture-sizes/index.html b/web/public/ro/presetari/picture-sizes/index.html new file mode 100644 index 00000000..42dfb325 --- /dev/null +++ b/web/public/ro/presetari/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Imagini de test la dimensiuni uzuale - ecrane, avatare, rețele sociale + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Presetări

    +

    Dimensiuni de imagine

    +

    Acceptă sistemul meu imagini la dimensiunile folosite de ecrane și platforme?

    +

    + Presetarea picture-sizes construiește cu o singură comandă un set întreg de fișiere de test + reale pentru această întrebare, și un manifest.json alături care spune cum trebuie să + reacționeze sistemul tău la fiecare fișier. Tot ce urmează este citit din program, la valorile + implicite ale acestei versiuni. +

    + + +
    +

    Ce găsește de obicei?

    +
      +
    • o limită de lățime sau de înălțime gândită pentru o formă care respinge alta, de exemplu un fundal de profil lat de 1584 px
    • +
    • o miniatură tăiată sau turtită pentru că codul așteaptă o imagine orizontală și sosește una verticală
    • +
    • o imagine cu înălțime impară, de exemplu 1200 x 627, respinsă de un pas care acceptă doar dimensiuni pare
    • +
    • o imagine 4K care rămâne fără timp sau fără memorie în drum spre o miniatură, deși fișierul în sine este mic
    • +
    +
    + + +
    +

    Ce este în set?

    +

    La valorile implicite, așa cum le raportează tfg preset show picture-sizes:

    +
    + + + + + + + +
    Fișiere21
    Targeturi în rețeta lui21
    Dimensiune totală4 178 420 B
    Formatejpg
    +
    +

    Și ce așteaptă manifestul acelui set de la sistemul tău:

    +
    + + + + + + + +
    AșteptatSemnificațieFișiere
    acceptSistemul tău trebuie să accepte fișierul.21
    +
    +
    + +
    +

    Ce poți schimba?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    SetarePrimeșteImplicitCe face
    --groupsnume de grupuri separate prin virgule, sau allallCe dimensiuni conține setul: screens pentru dimensiunile ecranelor, avatars pentru fotografiile de profil și social pentru coperte, bannere, postări și miniaturi. Lasă all pentru toate.
    --contentplaceholder, testtestCe arată imaginea. Un model de test servește la verificarea felului în care este citit un fișier. Un substituent este o culoare uniformă cu text în mijloc, pentru a așeza o pagină înainte să existe imaginile reale.
    --formatun id de format din pagina de formatejpgFormatul fiecărui fișier din set. Este o opțiune a instrumentului însuși, iar presetarea îi dă doar o valoare implicită.
    +
    +
    + +
    +

    Cum o rulezi?

    +

    Vezi cât ar costa setul, construiește-l sau ia-i rețeta ca s-o editezi:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Sau construiește peste ea într-o rețetă proprie, lângă testele tale:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/ru/docs/index.html b/web/public/ru/docs/index.html index ae887366..d6a3e0a0 100644 --- a/web/public/ru/docs/index.html +++ b/web/public/ru/docs/index.html @@ -395,6 +395,11 @@

    Что такое пресет?

    Сохранит, покажет и вернёт ли моя система имя файла, которого не ожидала?

    filename-handling

  • +
  • +

    Размеры изображений

    +

    Принимает ли моя система изображения тех размеров, которые используют экраны и платформы?

    +

    picture-sizes

    +
  • Границы размера

    Применяется ли лимит размера ровно там, где он объявлен?

    diff --git a/web/public/ru/formats/index.html b/web/public/ru/formats/index.html index f0869cb4..6426e58f 100644 --- a/web/public/ru/formats/index.html +++ b/web/public/ru/formats/index.html @@ -572,7 +572,7 @@

    Настройки, которые принимает каждый форм attachment_format - id формата в том виде, как его выводит tfg formats + id формата, например png или csv @@ -597,7 +597,7 @@

    Настройки, которые принимает каждый форм inline_format - id формата изображения в том виде, как его выводит tfg formats + id формата изображения, например png или jpg @@ -722,7 +722,7 @@

    Настройки, которые принимает каждый форм inline_format - id формата изображения в том виде, как его выводит tfg formats + id формата изображения, например png или jpg @@ -1142,7 +1142,7 @@

    Настройки, которые принимает каждый форм inline_format - id формата изображения в том виде, как его выводит tfg formats + id формата изображения, например png или jpg @@ -1197,7 +1197,7 @@

    Настройки, которые принимает каждый форм entry_format - id формата в том виде, как его выводит tfg formats + id формата, например png или csv @@ -1342,7 +1342,7 @@

    Настройки, которые принимает каждый форм entry_format - id формата в том виде, как его выводит tfg formats + id формата, например png или csv diff --git a/web/public/ru/index.html b/web/public/ru/index.html index bfe576ad..13c8c8a5 100644 --- a/web/public/ru/index.html +++ b/web/public/ru/index.html @@ -277,6 +277,11 @@

    Выберите вопрос, получите весь набор

    Сохранит, покажет и вернёт ли моя система имя файла, которого не ожидала?

    filename-handling

  • +
  • +

    Размеры изображений

    +

    Принимает ли моя система изображения тех размеров, которые используют экраны и платформы?

    +

    picture-sizes

    +
  • Границы размера

    Применяется ли лимит размера ровно там, где он объявлен?

    diff --git a/web/public/ru/presets/empty-and-minimal/index.html b/web/public/ru/presets/empty-and-minimal/index.html index 1047793c..7bad342b 100644 --- a/web/public/ru/presets/empty-and-minimal/index.html +++ b/web/public/ru/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Что можно изменить?

    --formats id форматов через запятую или all all - Из каких форматов состоит набор. Оставьте all для всех форматов этой сборки или перечислите те, которые принимает ваша система. + Из каких форматов состоит набор. Оставьте all для всех форматов этой сборки или перечислите те, которые принимает ваша система. diff --git a/web/public/ru/presets/index.html b/web/public/ru/presets/index.html index baf79cda..a733d83b 100644 --- a/web/public/ru/presets/index.html +++ b/web/public/ru/presets/index.html @@ -163,6 +163,11 @@

    Пресеты тестовых файлов, по набору на каж

    Сохранит, покажет и вернёт ли моя система имя файла, которого не ожидала?

    filename-handling

  • +
  • +

    Размеры изображений

    +

    Принимает ли моя система изображения тех размеров, которые используют экраны и платформы?

    +

    picture-sizes

    +
  • Границы размера

    Применяется ли лимит размера ровно там, где он объявлен?

    diff --git a/web/public/ru/presets/picture-sizes/index.html b/web/public/ru/presets/picture-sizes/index.html new file mode 100644 index 00000000..a5798160 --- /dev/null +++ b/web/public/ru/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Тестовые изображения популярных размеров - экраны, аватары, соцсети + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Пресеты

    +

    Размеры изображений

    +

    Принимает ли моя система изображения тех размеров, которые используют экраны и платформы?

    +

    + Пресет picture-sizes одной командой собирает целый набор настоящих тестовых файлов для + этого вопроса и рядом manifest.json с ожидаемой реакцией вашей системы на каждый + файл. Всё ниже прочитано из программы со значениями по умолчанию этой версии. +

    + + +
    +

    Что он обычно находит?

    +
      +
    • ограничение ширины или высоты, заданное под одну форму и отклоняющее другую, например фон профиля шириной 1584 px
    • +
    • миниатюра обрезана или сплющена, потому что код ждёт горизонтальное изображение, а приходит вертикальное
    • +
    • изображение нечётной высоты, например 1200 x 627, отклонённое шагом, который принимает только чётные размеры
    • +
    • изображение 4K, которому по пути к миниатюре не хватает времени или памяти, хотя сам файл маленький
    • +
    +
    + + +
    +

    Что входит в набор?

    +

    Со значениями по умолчанию, как сообщает tfg preset show picture-sizes:

    +
    + + + + + + + +
    Файлов21
    Целей в его рецепте21
    Общий размер4 178 420 B
    Форматыjpg
    +
    +

    И чего манифест этого набора ожидает от вашей системы:

    +
    + + + + + + + +
    ОжидаетсяЗначениеФайлов
    acceptВаша система должна принять файл.21
    +
    +
    + +
    +

    Что можно изменить?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    НастройкаПринимаетПо умолчаниюЧто делает
    --groupsназвания групп через запятую или allallКакие размеры входят в набор: screens для размеров экранов, avatars для фото профиля и social для обложек, баннеров, публикаций и миниатюр. Оставьте all, чтобы получить все.
    --contentplaceholder, testtestЧто показывает изображение. Тестовый шаблон нужен, чтобы проверить, как читается файл. Заглушка - это сплошной цвет с надписью посередине, чтобы верстать страницу до появления настоящих изображений.
    --formatid формата со страницы форматовjpgФормат каждого файла набора. Это флаг самого инструмента, а пресет лишь задаёт ему значение по умолчанию.
    +
    +
    + +
    +

    Как его запустить?

    +

    Посмотрите, чего стоил бы набор, соберите его или возьмите его рецепт для правки:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Или стройте на нём в собственном рецепте рядом с тестами:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/sitemap.xml b/web/public/sitemap.xml index 4e3ed29f..e75265d8 100644 --- a/web/public/sitemap.xml +++ b/web/public/sitemap.xml @@ -33,6 +33,9 @@ https://testingfilesgenerator.donislawdev.com/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/presets/size-boundaries/ @@ -78,6 +81,9 @@ https://testingfilesgenerator.donislawdev.com/ar/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/ar/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/ar/presets/size-boundaries/ @@ -123,6 +129,9 @@ https://testingfilesgenerator.donislawdev.com/cs/predvolby/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/cs/predvolby/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/cs/predvolby/size-boundaries/ @@ -168,6 +177,9 @@ https://testingfilesgenerator.donislawdev.com/de/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/de/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/de/presets/size-boundaries/ @@ -213,6 +225,9 @@ https://testingfilesgenerator.donislawdev.com/es/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/es/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/es/presets/size-boundaries/ @@ -258,6 +273,9 @@ https://testingfilesgenerator.donislawdev.com/fr/prereglages/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/fr/prereglages/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/fr/prereglages/size-boundaries/ @@ -303,6 +321,9 @@ https://testingfilesgenerator.donislawdev.com/hi/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/hi/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/hi/presets/size-boundaries/ @@ -348,6 +369,9 @@ https://testingfilesgenerator.donislawdev.com/id/preset/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/id/preset/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/id/preset/size-boundaries/ @@ -393,6 +417,9 @@ https://testingfilesgenerator.donislawdev.com/it/preset/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/it/preset/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/it/preset/size-boundaries/ @@ -438,6 +465,9 @@ https://testingfilesgenerator.donislawdev.com/ja/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/ja/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/ja/presets/size-boundaries/ @@ -483,6 +513,9 @@ https://testingfilesgenerator.donislawdev.com/ko/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/ko/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/ko/presets/size-boundaries/ @@ -528,6 +561,9 @@ https://testingfilesgenerator.donislawdev.com/nl/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/nl/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/nl/presets/size-boundaries/ @@ -573,6 +609,9 @@ https://testingfilesgenerator.donislawdev.com/pl/presety/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/pl/presety/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/pl/presety/size-boundaries/ @@ -618,6 +657,9 @@ https://testingfilesgenerator.donislawdev.com/pt-br/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/pt-br/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/pt-br/presets/size-boundaries/ @@ -663,6 +705,9 @@ https://testingfilesgenerator.donislawdev.com/ro/presetari/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/ro/presetari/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/ro/presetari/size-boundaries/ @@ -708,6 +753,9 @@ https://testingfilesgenerator.donislawdev.com/ru/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/ru/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/ru/presets/size-boundaries/ @@ -753,6 +801,9 @@ https://testingfilesgenerator.donislawdev.com/th/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/th/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/th/presets/size-boundaries/ @@ -798,6 +849,9 @@ https://testingfilesgenerator.donislawdev.com/tr/hazir-ayarlar/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/tr/hazir-ayarlar/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/tr/hazir-ayarlar/size-boundaries/ @@ -843,6 +897,9 @@ https://testingfilesgenerator.donislawdev.com/uk/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/uk/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/uk/presets/size-boundaries/ @@ -888,6 +945,9 @@ https://testingfilesgenerator.donislawdev.com/vi/preset/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/vi/preset/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/vi/preset/size-boundaries/ @@ -933,6 +993,9 @@ https://testingfilesgenerator.donislawdev.com/zh-hans/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/zh-hans/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/zh-hans/presets/size-boundaries/ @@ -978,6 +1041,9 @@ https://testingfilesgenerator.donislawdev.com/zh-hant/presets/filename-handling/ + + https://testingfilesgenerator.donislawdev.com/zh-hant/presets/picture-sizes/ + https://testingfilesgenerator.donislawdev.com/zh-hant/presets/size-boundaries/ diff --git a/web/public/social.html b/web/public/social.html index c0d07149..30af9760 100644 --- a/web/public/social.html +++ b/web/public/social.html @@ -214,6 +214,7 @@

    Test sets,
    not just files.

    empty-and-minimal filename-handling + picture-sizes size-boundaries tabular-import text-encoding diff --git a/web/public/th/docs/index.html b/web/public/th/docs/index.html index 5e8302fe..e85d7183 100644 --- a/web/public/th/docs/index.html +++ b/web/public/th/docs/index.html @@ -387,6 +387,11 @@

    พรีเซ็ตคืออะไร

    ระบบของฉันจะเก็บ แสดง และส่งคืนชื่อไฟล์ที่ไม่ได้คาดไว้ได้ไหม

    filename-handling

  • +
  • +

    ขนาดรูปภาพ

    +

    ระบบของฉันรับรูปภาพในขนาดที่หน้าจอและแพลตฟอร์มใช้หรือไม่

    +

    picture-sizes

    +
  • ขอบเขตขนาด

    ขีดจำกัดขนาดถูกบังคับใช้ตรงจุดที่ประกาศไว้พอดีหรือไม่

    diff --git a/web/public/th/formats/index.html b/web/public/th/formats/index.html index 57e5abc0..a01cfc67 100644 --- a/web/public/th/formats/index.html +++ b/web/public/th/formats/index.html @@ -570,7 +570,7 @@

    การตั้งค่าที่แต่ละรูปแบบร attachment_format - รหัสของรูปแบบ ตามที่ tfg formats แสดง + รหัสของรูปแบบ เช่น png หรือ csv @@ -595,7 +595,7 @@

    การตั้งค่าที่แต่ละรูปแบบร inline_format - รหัสของรูปแบบรูปภาพ ตามที่ tfg formats แสดง + รหัสของรูปแบบรูปภาพ เช่น png หรือ jpg @@ -720,7 +720,7 @@

    การตั้งค่าที่แต่ละรูปแบบร inline_format - รหัสของรูปแบบรูปภาพ ตามที่ tfg formats แสดง + รหัสของรูปแบบรูปภาพ เช่น png หรือ jpg @@ -1140,7 +1140,7 @@

    การตั้งค่าที่แต่ละรูปแบบร inline_format - รหัสของรูปแบบรูปภาพ ตามที่ tfg formats แสดง + รหัสของรูปแบบรูปภาพ เช่น png หรือ jpg @@ -1195,7 +1195,7 @@

    การตั้งค่าที่แต่ละรูปแบบร entry_format - รหัสของรูปแบบ ตามที่ tfg formats แสดง + รหัสของรูปแบบ เช่น png หรือ csv @@ -1340,7 +1340,7 @@

    การตั้งค่าที่แต่ละรูปแบบร entry_format - รหัสของรูปแบบ ตามที่ tfg formats แสดง + รหัสของรูปแบบ เช่น png หรือ csv diff --git a/web/public/th/index.html b/web/public/th/index.html index c426e697..69aa712b 100644 --- a/web/public/th/index.html +++ b/web/public/th/index.html @@ -276,6 +276,11 @@

    เลือกคำถาม แล้วรับทั้งชุดระบบของฉันจะเก็บ แสดง และส่งคืนชื่อไฟล์ที่ไม่ได้คาดไว้ได้ไหม

    filename-handling

  • +
  • +

    ขนาดรูปภาพ

    +

    ระบบของฉันรับรูปภาพในขนาดที่หน้าจอและแพลตฟอร์มใช้หรือไม่

    +

    picture-sizes

    +
  • ขอบเขตขนาด

    ขีดจำกัดขนาดถูกบังคับใช้ตรงจุดที่ประกาศไว้พอดีหรือไม่

    diff --git a/web/public/th/presets/empty-and-minimal/index.html b/web/public/th/presets/empty-and-minimal/index.html index 56a3dc5b..aead85fb 100644 --- a/web/public/th/presets/empty-and-minimal/index.html +++ b/web/public/th/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    คุณเปลี่ยนอะไรได้บ้าง

    --formats รหัสรูปแบบที่คั่นด้วยจุลภาค หรือ all all - ชุดนี้สร้างจากรูปแบบใดบ้าง ปล่อยเป็น all เพื่อใช้ทุกรูปแบบของบิลด์นี้ หรือระบุเฉพาะรูปแบบที่ระบบของคุณรับ + ชุดนี้สร้างจากรูปแบบใดบ้าง ปล่อยเป็น all เพื่อใช้ทุกรูปแบบของบิลด์นี้ หรือระบุเฉพาะรูปแบบที่ระบบของคุณรับ diff --git a/web/public/th/presets/index.html b/web/public/th/presets/index.html index 5e468bd9..1f014e36 100644 --- a/web/public/th/presets/index.html +++ b/web/public/th/presets/index.html @@ -162,6 +162,11 @@

    พรีเซ็ตไฟล์ทดสอบ หนึ่งชุดส

    ระบบของฉันจะเก็บ แสดง และส่งคืนชื่อไฟล์ที่ไม่ได้คาดไว้ได้ไหม

    filename-handling

  • +
  • +

    ขนาดรูปภาพ

    +

    ระบบของฉันรับรูปภาพในขนาดที่หน้าจอและแพลตฟอร์มใช้หรือไม่

    +

    picture-sizes

    +
  • ขอบเขตขนาด

    ขีดจำกัดขนาดถูกบังคับใช้ตรงจุดที่ประกาศไว้พอดีหรือไม่

    diff --git a/web/public/th/presets/picture-sizes/index.html b/web/public/th/presets/picture-sizes/index.html new file mode 100644 index 00000000..000fb56e --- /dev/null +++ b/web/public/th/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +รูปภาพทดสอบในขนาดที่ใช้บ่อย - หน้าจอ อวาตาร์ โซเชียลมีเดีย + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    พรีเซ็ต

    +

    ขนาดรูปภาพ

    +

    ระบบของฉันรับรูปภาพในขนาดที่หน้าจอและแพลตฟอร์มใช้หรือไม่

    +

    + พรีเซ็ต picture-sizes สร้างชุดไฟล์ทดสอบจริงทั้งชุดสำหรับคำถามนี้ด้วยคำสั่งเดียว และมี + manifest.json อยู่ข้างๆ ที่บอกว่าระบบของคุณควรตอบสนองต่อแต่ละไฟล์อย่างไร + ทุกอย่างด้านล่างอ่านจากโปรแกรม ที่ค่าเริ่มต้นของเวอร์ชันนี้ +

    + + +
    +

    โดยทั่วไปมันพบอะไร

    +
      +
    • ขีดจำกัดความกว้างหรือความสูงที่ตั้งไว้สำหรับรูปทรงหนึ่งแต่ปฏิเสธอีกรูปทรง เช่น พื้นหลังโปรไฟล์กว้าง 1584 px
    • +
    • ภาพขนาดย่อถูกตัดหรือบีบ เพราะโค้ดคาดว่าจะเป็นภาพแนวนอนแต่ได้ภาพแนวตั้งมา
    • +
    • รูปภาพความสูงเป็นเลขคี่ เช่น 1200 x 627 ที่ถูกปฏิเสธโดยขั้นตอนที่รับเฉพาะขนาดเลขคู่
    • +
    • รูปภาพ 4K ที่หมดเวลาหรือหน่วยความจำระหว่างทางไปเป็นภาพขนาดย่อ แม้ตัวไฟล์จะเล็ก
    • +
    +
    + + +
    +

    ในชุดมีอะไร

    +

    ที่ค่าเริ่มต้น ตามที่ tfg preset show picture-sizes รายงาน:

    +
    + + + + + + + +
    ไฟล์21
    target ในสูตรของมัน21
    ขนาดรวม4 178 420 B
    รูปแบบjpg
    +
    +

    และสิ่งที่แมนิเฟสต์ของชุดนั้นคาดหวังจากระบบของคุณ:

    +
    + + + + + + + +
    ที่คาดหวังความหมายไฟล์
    acceptระบบของคุณควรยอมรับไฟล์นี้21
    +
    +
    + +
    +

    คุณเปลี่ยนอะไรได้บ้าง

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    การตั้งค่ารับค่าเริ่มต้นทำอะไร
    --groupsชื่อกลุ่มที่คั่นด้วยจุลภาค หรือ allallชุดนี้มีขนาดใดบ้าง screens สำหรับขนาดหน้าจอ avatars สำหรับรูปโปรไฟล์ และ social สำหรับภาพปก แบนเนอร์ โพสต์ และภาพขนาดย่อ ปล่อยเป็น all เพื่อให้ได้ทั้งหมด
    --contentplaceholder, testtestรูปภาพแสดงอะไร รูปแบบทดสอบใช้ตรวจว่าไฟล์ถูกอ่านอย่างไร ภาพตัวยึดตำแหน่งคือสีพื้นเรียบที่มีข้อความอยู่ตรงกลาง สำหรับจัดหน้าก่อนที่จะมีรูปจริง
    --formatรหัสรูปแบบจากหน้ารูปแบบไฟล์jpgรูปแบบของทุกไฟล์ในชุด เป็นแฟลกของตัวเครื่องมือเอง และพรีเซ็ตเพียงกำหนดค่าเริ่มต้นให้
    +
    +
    + +
    +

    รันอย่างไร

    +

    ดูว่าชุดจะมีต้นทุนเท่าไร สร้างมัน หรือเอาสูตรของมันไปแก้ไข:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    หรือสร้างต่อยอดจากมันในสูตรของคุณเอง ไว้ข้างการทดสอบของคุณ:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/tr/bicimler/index.html b/web/public/tr/bicimler/index.html index 68a561fa..f3be4700 100644 --- a/web/public/tr/bicimler/index.html +++ b/web/public/tr/bicimler/index.html @@ -572,7 +572,7 @@

    Her biçimin kabul ettiği ayarlar

    attachment_format - tfg formats'ın listelediği gibi bir biçimin kimliği + png ya da csv gibi bir biçimin kimliği @@ -597,7 +597,7 @@

    Her biçimin kabul ettiği ayarlar

    inline_format - tfg formats'ın listelediği gibi bir görüntü biçiminin kimliği + png ya da jpg gibi bir görüntü biçiminin kimliği @@ -722,7 +722,7 @@

    Her biçimin kabul ettiği ayarlar

    inline_format - tfg formats'ın listelediği gibi bir görüntü biçiminin kimliği + png ya da jpg gibi bir görüntü biçiminin kimliği @@ -1142,7 +1142,7 @@

    Her biçimin kabul ettiği ayarlar

    inline_format - tfg formats'ın listelediği gibi bir görüntü biçiminin kimliği + png ya da jpg gibi bir görüntü biçiminin kimliği @@ -1197,7 +1197,7 @@

    Her biçimin kabul ettiği ayarlar

    entry_format - tfg formats'ın listelediği gibi bir biçimin kimliği + png ya da csv gibi bir biçimin kimliği @@ -1342,7 +1342,7 @@

    Her biçimin kabul ettiği ayarlar

    entry_format - tfg formats'ın listelediği gibi bir biçimin kimliği + png ya da csv gibi bir biçimin kimliği diff --git a/web/public/tr/dokumantasyon/index.html b/web/public/tr/dokumantasyon/index.html index cac42551..a11505ab 100644 --- a/web/public/tr/dokumantasyon/index.html +++ b/web/public/tr/dokumantasyon/index.html @@ -392,6 +392,11 @@

    Hazır ayar nedir?

    Sistemim beklemediği bir dosya adını saklayıp gösterecek ve geri verecek mi?

    filename-handling

  • +
  • +

    Resim boyutları

    +

    Sistemim ekranların ve platformların kullandığı boyutlardaki resimleri kabul ediyor mu?

    +

    picture-sizes

    +
  • Boyut sınırları

    Bir boyut sınırı tam bildirildiği yerde uygulanıyor mu?

    diff --git a/web/public/tr/hazir-ayarlar/empty-and-minimal/index.html b/web/public/tr/hazir-ayarlar/empty-and-minimal/index.html index d4242cf1..0d849517 100644 --- a/web/public/tr/hazir-ayarlar/empty-and-minimal/index.html +++ b/web/public/tr/hazir-ayarlar/empty-and-minimal/index.html @@ -212,7 +212,7 @@

    Neyi değiştirebilirsiniz?

    --formats virgülle ayrılmış biçim kimlikleri veya all all - Setin hangi biçimlerden oluştuğu. Bu sürümdeki tüm biçimler için all bırakın veya sisteminizin kabul ettiklerini yazın. + Setin hangi biçimlerden oluştuğu. Bu sürümdeki tüm biçimler için all bırakın veya sisteminizin kabul ettiklerini yazın. diff --git a/web/public/tr/hazir-ayarlar/index.html b/web/public/tr/hazir-ayarlar/index.html index 978baa67..18defca1 100644 --- a/web/public/tr/hazir-ayarlar/index.html +++ b/web/public/tr/hazir-ayarlar/index.html @@ -163,6 +163,11 @@

    Test dosyası hazır ayarları, her test sorusu için bir set

    Sistemim beklemediği bir dosya adını saklayıp gösterecek ve geri verecek mi?

    filename-handling

  • +
  • +

    Resim boyutları

    +

    Sistemim ekranların ve platformların kullandığı boyutlardaki resimleri kabul ediyor mu?

    +

    picture-sizes

    +
  • Boyut sınırları

    Bir boyut sınırı tam bildirildiği yerde uygulanıyor mu?

    diff --git a/web/public/tr/hazir-ayarlar/picture-sizes/index.html b/web/public/tr/hazir-ayarlar/picture-sizes/index.html new file mode 100644 index 00000000..4bbcfe12 --- /dev/null +++ b/web/public/tr/hazir-ayarlar/picture-sizes/index.html @@ -0,0 +1,283 @@ + + + + + + +Yaygın boyutlarda test resimleri - ekranlar, avatarlar, sosyal medya + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Hazır ayarlar

    +

    Resim boyutları

    +

    Sistemim ekranların ve platformların kullandığı boyutlardaki resimleri kabul ediyor mu?

    +

    + picture-sizes hazır ayarı, bu soru için tek komutla gerçek test dosyalarından oluşan bütün + bir set ve yanında sisteminizin her dosyaya nasıl tepki vermesi gerektiğini söyleyen bir + manifest.json kurar. Aşağıdaki her şey programdan, bu sürümün varsayılanlarıyla + okunur. +

    + + +
    +

    Genelde ne bulur?

    +
      +
    • bir şekil düşünülerek konmuş ve başka bir şekli reddeden genişlik ya da yükseklik sınırı, örneğin 1584 px genişliğinde bir profil arka planı
    • +
    • kod yatay bir resim beklediği hâlde dikey bir resim geldiği için kırpılan ya da ezilen küçük resim
    • +
    • yalnızca çift boyutları kabul eden bir adımın reddettiği tek yükseklikli bir resim, örneğin 1200 x 627
    • +
    • dosyanın kendisi küçük olsa da küçük resme dönüşürken zamanı ya da belleği tükenen bir 4K resim
    • +
    +
    + + +
    +

    Sette ne var?

    +

    Varsayılanlarda, tfg preset show picture-sizes çıktısının bildirdiği gibi:

    +
    + + + + + + + +
    Dosya21
    Tarifindeki hedefler21
    Toplam boyut4 178 420 B
    Biçimlerjpg
    +
    +

    Ve o setin manifestinin sisteminizden beklediği:

    +
    + + + + + + + +
    BeklenenAnlamıDosya
    acceptSisteminiz dosyayı kabul etmeli.21
    +
    +
    + +
    +

    Neyi değiştirebilirsiniz?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    AyarAldığıVarsayılanNe yapar
    --groupsvirgülle ayrılmış grup adları veya allallSetin hangi boyutları içerdiği: ekran boyutları için screens, profil fotoğrafları için avatars ve kapaklar, afişler, gönderiler ve küçük resimler için social. Hepsi için all bırakın.
    --contentplaceholder, testtestResmin ne gösterdiği. Test deseni bir dosyanın nasıl okunduğunu denetlemek içindir. Yer tutucu, ortasında yazı olan düz bir renktir ve gerçek resimler hazır olmadan sayfayı düzenlemeye yarar.
    --formatbiçimler sayfasındaki bir biçim kimliğijpgSetteki her dosyanın biçimi. Aracın kendi bayrağıdır ve hazır ayar yalnızca ona bir varsayılan verir.
    +
    +
    + +
    +

    Nasıl çalıştırılır?

    +

    Setin neye mal olacağına bakın, kurun veya düzenlemek için tarifini alın:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Ya da testlerinizin yanında kendi tarifinizde onun üzerine kurun:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/tr/index.html b/web/public/tr/index.html index 801bd92d..6829660e 100644 --- a/web/public/tr/index.html +++ b/web/public/tr/index.html @@ -276,6 +276,11 @@

    Soruyu seçin, setin tamamını alın

    Sistemim beklemediği bir dosya adını saklayıp gösterecek ve geri verecek mi?

    filename-handling

  • +
  • +

    Resim boyutları

    +

    Sistemim ekranların ve platformların kullandığı boyutlardaki resimleri kabul ediyor mu?

    +

    picture-sizes

    +
  • Boyut sınırları

    Bir boyut sınırı tam bildirildiği yerde uygulanıyor mu?

    diff --git a/web/public/uk/docs/index.html b/web/public/uk/docs/index.html index f15d7a07..4258bbe2 100644 --- a/web/public/uk/docs/index.html +++ b/web/public/uk/docs/index.html @@ -394,6 +394,11 @@

    Що таке пресет?

    Чи збереже, покаже та поверне моя система ім'я файлу, якого не очікувала?

    filename-handling

  • +
  • +

    Розміри зображень

    +

    Чи приймає моя система зображення тих розмірів, які використовують екрани й платформи?

    +

    picture-sizes

    +
  • Межі розміру

    Чи застосовується ліміт розміру саме там, де його оголошено?

    diff --git a/web/public/uk/formats/index.html b/web/public/uk/formats/index.html index df386ce7..d34c2797 100644 --- a/web/public/uk/formats/index.html +++ b/web/public/uk/formats/index.html @@ -572,7 +572,7 @@

    Налаштування, які приймає кожен формат

    attachment_format - id формату в тому вигляді, як його виводить tfg formats + id формату, наприклад png або csv @@ -597,7 +597,7 @@

    Налаштування, які приймає кожен формат

    inline_format - id формату зображення в тому вигляді, як його виводить tfg formats + id формату зображення, наприклад png або jpg @@ -722,7 +722,7 @@

    Налаштування, які приймає кожен формат

    inline_format - id формату зображення в тому вигляді, як його виводить tfg formats + id формату зображення, наприклад png або jpg @@ -1142,7 +1142,7 @@

    Налаштування, які приймає кожен формат

    inline_format - id формату зображення в тому вигляді, як його виводить tfg formats + id формату зображення, наприклад png або jpg @@ -1197,7 +1197,7 @@

    Налаштування, які приймає кожен формат

    entry_format - id формату в тому вигляді, як його виводить tfg formats + id формату, наприклад png або csv @@ -1342,7 +1342,7 @@

    Налаштування, які приймає кожен формат

    entry_format - id формату в тому вигляді, як його виводить tfg formats + id формату, наприклад png або csv diff --git a/web/public/uk/index.html b/web/public/uk/index.html index 32a85583..c705691e 100644 --- a/web/public/uk/index.html +++ b/web/public/uk/index.html @@ -276,6 +276,11 @@

    Виберіть питання, отримайте весь набір

    Чи збереже, покаже та поверне моя система ім'я файлу, якого не очікувала?

    filename-handling

  • +
  • +

    Розміри зображень

    +

    Чи приймає моя система зображення тих розмірів, які використовують екрани й платформи?

    +

    picture-sizes

    +
  • Межі розміру

    Чи застосовується ліміт розміру саме там, де його оголошено?

    diff --git a/web/public/uk/presets/empty-and-minimal/index.html b/web/public/uk/presets/empty-and-minimal/index.html index c74e75ce..0a9be3e8 100644 --- a/web/public/uk/presets/empty-and-minimal/index.html +++ b/web/public/uk/presets/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Що можна змінити?

    --formats id форматів через кому або all all - З яких форматів складається набір. Залиште all для всіх форматів цієї збірки або перелічіть ті, які приймає ваша система. + З яких форматів складається набір. Залиште all для всіх форматів цієї збірки або перелічіть ті, які приймає ваша система. diff --git a/web/public/uk/presets/index.html b/web/public/uk/presets/index.html index 41cfaaf1..c877eeef 100644 --- a/web/public/uk/presets/index.html +++ b/web/public/uk/presets/index.html @@ -163,6 +163,11 @@

    Пресети тестових файлів, по набору на кож

    Чи збереже, покаже та поверне моя система ім'я файлу, якого не очікувала?

    filename-handling

  • +
  • +

    Розміри зображень

    +

    Чи приймає моя система зображення тих розмірів, які використовують екрани й платформи?

    +

    picture-sizes

    +
  • Межі розміру

    Чи застосовується ліміт розміру саме там, де його оголошено?

    diff --git a/web/public/uk/presets/picture-sizes/index.html b/web/public/uk/presets/picture-sizes/index.html new file mode 100644 index 00000000..54986f7f --- /dev/null +++ b/web/public/uk/presets/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Тестові зображення поширених розмірів - екрани, аватари, соцмережі + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Пресети

    +

    Розміри зображень

    +

    Чи приймає моя система зображення тих розмірів, які використовують екрани й платформи?

    +

    + Пресет picture-sizes однією командою збирає цілий набір справжніх тестових файлів для цього + питання та поруч manifest.json з очікуваною реакцією вашої системи на кожен файл. Усе + нижче прочитано з програми зі значеннями за замовчуванням цієї версії. +

    + + +
    +

    Що він зазвичай знаходить?

    +
      +
    • обмеження ширини або висоти, задане під одну форму, яке відхиляє іншу, наприклад тло профілю завширшки 1584 px
    • +
    • мініатюра обрізана або сплющена, бо код чекає горизонтальне зображення, а надходить вертикальне
    • +
    • зображення непарної висоти, наприклад 1200 x 627, відхилене кроком, який приймає лише парні розміри
    • +
    • зображення 4K, якому дорогою до мініатюри бракує часу або пам'яті, хоча сам файл малий
    • +
    +
    + + +
    +

    Що входить у набір?

    +

    Зі значеннями за замовчуванням, як повідомляє tfg preset show picture-sizes:

    +
    + + + + + + + +
    Файлів21
    Цілей у його рецепті21
    Загальний розмір4 178 420 B
    Форматиjpg
    +
    +

    І чого маніфест цього набору очікує від вашої системи:

    +
    + + + + + + + +
    ОчікуєтьсяЗначенняФайлів
    acceptВаша система має прийняти файл.21
    +
    +
    + +
    +

    Що можна змінити?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    НалаштуванняПриймаєЗа замовчуваннямЩо робить
    --groupsназви груп через кому або allallЯкі розміри містить набір: screens для розмірів екранів, avatars для фото профілю і social для обкладинок, банерів, дописів і мініатюр. Залиште all, щоб отримати всі.
    --contentplaceholder, testtestЩо показує зображення. Тестовий шаблон потрібен, щоб перевірити, як читається файл. Заповнювач - це суцільний колір із написом посередині, щоб верстати сторінку до появи справжніх зображень.
    --formatid формату зі сторінки форматівjpgФормат кожного файлу набору. Це прапорець самого інструмента, а пресет лише задає йому значення за замовчуванням.
    +
    +
    + +
    +

    Як його запустити?

    +

    Подивіться, скільки коштував би набір, зберіть його або візьміть його рецепт для правки:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Або будуйте на ньому у власному рецепті поряд із тестами:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/vi/dinh-dang/index.html b/web/public/vi/dinh-dang/index.html index 15b48178..384682aa 100644 --- a/web/public/vi/dinh-dang/index.html +++ b/web/public/vi/dinh-dang/index.html @@ -570,7 +570,7 @@

    Các thiết lập mỗi định dạng nhận

    attachment_format - id của một định dạng, như tfg formats liệt kê + id của một định dạng, chẳng hạn png hoặc csv @@ -595,7 +595,7 @@

    Các thiết lập mỗi định dạng nhận

    inline_format - id của một định dạng hình ảnh, như tfg formats liệt kê + id của một định dạng hình ảnh, chẳng hạn png hoặc jpg @@ -720,7 +720,7 @@

    Các thiết lập mỗi định dạng nhận

    inline_format - id của một định dạng hình ảnh, như tfg formats liệt kê + id của một định dạng hình ảnh, chẳng hạn png hoặc jpg @@ -1140,7 +1140,7 @@

    Các thiết lập mỗi định dạng nhận

    inline_format - id của một định dạng hình ảnh, như tfg formats liệt kê + id của một định dạng hình ảnh, chẳng hạn png hoặc jpg @@ -1195,7 +1195,7 @@

    Các thiết lập mỗi định dạng nhận

    entry_format - id của một định dạng, như tfg formats liệt kê + id của một định dạng, chẳng hạn png hoặc csv @@ -1340,7 +1340,7 @@

    Các thiết lập mỗi định dạng nhận

    entry_format - id của một định dạng, như tfg formats liệt kê + id của một định dạng, chẳng hạn png hoặc csv diff --git a/web/public/vi/index.html b/web/public/vi/index.html index 0e83d855..892c1266 100644 --- a/web/public/vi/index.html +++ b/web/public/vi/index.html @@ -276,6 +276,11 @@

    Chọn câu hỏi, nhận cả bộ

    Hệ thống của tôi có lưu, hiển thị và trả lại một tên tệp mà nó không ngờ tới không?

    filename-handling

  • +
  • +

    Kích thước hình ảnh

    +

    Hệ thống của tôi có nhận hình ảnh ở các kích thước mà màn hình và nền tảng dùng không?

    +

    picture-sizes

    +
  • Ranh giới kích thước

    Giới hạn kích thước có được áp dụng đúng nơi nó được khai báo không?

    diff --git a/web/public/vi/preset/empty-and-minimal/index.html b/web/public/vi/preset/empty-and-minimal/index.html index df526ae0..7cc99a78 100644 --- a/web/public/vi/preset/empty-and-minimal/index.html +++ b/web/public/vi/preset/empty-and-minimal/index.html @@ -211,7 +211,7 @@

    Bạn có thể đổi gì?

    --formats các id định dạng cách nhau bằng dấu phẩy, hoặc all all - Bộ được dựng từ những định dạng nào. Để all cho mọi định dạng của bản dựng này, hoặc nêu những định dạng hệ thống của bạn chấp nhận. + Bộ được dựng từ những định dạng nào. Để all cho mọi định dạng của bản dựng này, hoặc nêu những định dạng hệ thống của bạn chấp nhận. diff --git a/web/public/vi/preset/index.html b/web/public/vi/preset/index.html index 2866c84d..7201d6d4 100644 --- a/web/public/vi/preset/index.html +++ b/web/public/vi/preset/index.html @@ -162,6 +162,11 @@

    Preset tệp kiểm thử, một bộ cho mỗi câu hỏi kiểm thử

    Hệ thống của tôi có lưu, hiển thị và trả lại một tên tệp mà nó không ngờ tới không?

    filename-handling

  • +
  • +

    Kích thước hình ảnh

    +

    Hệ thống của tôi có nhận hình ảnh ở các kích thước mà màn hình và nền tảng dùng không?

    +

    picture-sizes

    +
  • Ranh giới kích thước

    Giới hạn kích thước có được áp dụng đúng nơi nó được khai báo không?

    diff --git a/web/public/vi/preset/picture-sizes/index.html b/web/public/vi/preset/picture-sizes/index.html new file mode 100644 index 00000000..3a916e31 --- /dev/null +++ b/web/public/vi/preset/picture-sizes/index.html @@ -0,0 +1,282 @@ + + + + + + +Hình ảnh thử ở kích thước phổ biến - màn hình, ảnh đại diện, mạng xã hội + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    Preset

    +

    Kích thước hình ảnh

    +

    Hệ thống của tôi có nhận hình ảnh ở các kích thước mà màn hình và nền tảng dùng không?

    +

    + Preset picture-sizes dựng bằng một lệnh cả một bộ tệp kiểm thử thật cho câu hỏi này, kèm + một manifest.json bên cạnh nêu cách hệ thống của bạn cần phản ứng với từng tệp. Mọi + thứ bên dưới được đọc từ chương trình, ở các giá trị mặc định của phiên bản này. +

    + + +
    +

    Nó thường tìm thấy gì?

    +
      +
    • giới hạn chiều rộng hoặc chiều cao đặt cho một dạng ảnh nhưng từ chối dạng khác, chẳng hạn ảnh nền hồ sơ rộng 1584 px
    • +
    • hình thu nhỏ bị cắt hoặc bị bóp méo vì mã chờ ảnh ngang mà ảnh đến lại là ảnh dọc
    • +
    • ảnh có chiều cao lẻ, chẳng hạn 1200 x 627, bị một bước chỉ nhận kích thước chẵn từ chối
    • +
    • ảnh 4K hết thời gian hoặc bộ nhớ trên đường thành hình thu nhỏ, dù bản thân tệp nhỏ
    • +
    +
    + + +
    +

    Trong bộ có gì?

    +

    Ở các giá trị mặc định, như tfg preset show picture-sizes báo cáo:

    +
    + + + + + + + +
    Tệp21
    Target trong công thức của nó21
    Tổng kích thước4 178 420 B
    Định dạngjpg
    +
    +

    Và điều manifest của bộ đó mong đợi từ hệ thống của bạn:

    +
    + + + + + + + +
    Mong đợiÝ nghĩaTệp
    acceptHệ thống của bạn nên nhận tệp.21
    +
    +
    + +
    +

    Bạn có thể đổi gì?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Thiết lậpNhậnMặc địnhTác dụng
    --groupscác tên nhóm cách nhau bằng dấu phẩy, hoặc allallBộ chứa những kích thước nào: screens cho kích thước màn hình, avatars cho ảnh đại diện và social cho ảnh bìa, biểu ngữ, bài đăng và hình thu nhỏ. Để all để có tất cả.
    --contentplaceholder, testtestHình ảnh hiển thị gì. Mẫu thử dùng để kiểm tra cách một tệp được đọc. Ảnh giữ chỗ là một màu trơn có chữ ở giữa, để dàn trang trước khi có ảnh thật.
    --formatid định dạng từ trang định dạngjpgĐịnh dạng của mọi tệp trong bộ. Đây là một cờ của chính công cụ, và preset chỉ cho nó một giá trị mặc định.
    +
    +
    + +
    +

    Chạy nó thế nào?

    +

    Xem bộ sẽ tốn bao nhiêu, dựng nó, hoặc lấy công thức của nó để chỉnh sửa:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    Hoặc xây trên nó trong công thức của riêng bạn, bên cạnh các bài kiểm thử:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/vi/tai-lieu/index.html b/web/public/vi/tai-lieu/index.html index d96d89c9..5f3c2106 100644 --- a/web/public/vi/tai-lieu/index.html +++ b/web/public/vi/tai-lieu/index.html @@ -389,6 +389,11 @@

    Preset là gì?

    Hệ thống của tôi có lưu, hiển thị và trả lại một tên tệp mà nó không ngờ tới không?

    filename-handling

  • +
  • +

    Kích thước hình ảnh

    +

    Hệ thống của tôi có nhận hình ảnh ở các kích thước mà màn hình và nền tảng dùng không?

    +

    picture-sizes

    +
  • Ranh giới kích thước

    Giới hạn kích thước có được áp dụng đúng nơi nó được khai báo không?

    diff --git a/web/public/zh-hans/docs/index.html b/web/public/zh-hans/docs/index.html index 479005ae..07321d7f 100644 --- a/web/public/zh-hans/docs/index.html +++ b/web/public/zh-hans/docs/index.html @@ -368,6 +368,11 @@

    什么是预设?

    我的系统能否正确保存、显示并返回它没料到的文件名?

    filename-handling

  • +
  • +

    图片尺寸

    +

    我的系统能接受屏幕和平台所用尺寸的图片吗?

    +

    picture-sizes

    +
  • 大小边界

    大小限制是否恰好在声明的位置生效?

    diff --git a/web/public/zh-hans/formats/index.html b/web/public/zh-hans/formats/index.html index e4ea55af..4184ff64 100644 --- a/web/public/zh-hans/formats/index.html +++ b/web/public/zh-hans/formats/index.html @@ -564,7 +564,7 @@

    每种格式接受的设置

    attachment_format - 格式的 id,与 tfg formats 列出的一致 + 格式的 id,例如 png 或 csv @@ -589,7 +589,7 @@

    每种格式接受的设置

    inline_format - 图片格式的 id,与 tfg formats 列出的一致 + 图片格式的 id,例如 png 或 jpg @@ -714,7 +714,7 @@

    每种格式接受的设置

    inline_format - 图片格式的 id,与 tfg formats 列出的一致 + 图片格式的 id,例如 png 或 jpg @@ -1134,7 +1134,7 @@

    每种格式接受的设置

    inline_format - 图片格式的 id,与 tfg formats 列出的一致 + 图片格式的 id,例如 png 或 jpg @@ -1189,7 +1189,7 @@

    每种格式接受的设置

    entry_format - 格式的 id,与 tfg formats 列出的一致 + 格式的 id,例如 png 或 csv @@ -1334,7 +1334,7 @@

    每种格式接受的设置

    entry_format - 格式的 id,与 tfg formats 列出的一致 + 格式的 id,例如 png 或 csv diff --git a/web/public/zh-hans/index.html b/web/public/zh-hans/index.html index f60ca4ca..488b7add 100644 --- a/web/public/zh-hans/index.html +++ b/web/public/zh-hans/index.html @@ -269,6 +269,11 @@

    选好问题,拿到整套文件

    我的系统能否正确保存、显示并返回它没料到的文件名?

    filename-handling

  • +
  • +

    图片尺寸

    +

    我的系统能接受屏幕和平台所用尺寸的图片吗?

    +

    picture-sizes

    +
  • 大小边界

    大小限制是否恰好在声明的位置生效?

    diff --git a/web/public/zh-hans/presets/empty-and-minimal/index.html b/web/public/zh-hans/presets/empty-and-minimal/index.html index 8cc1b357..a40af761 100644 --- a/web/public/zh-hans/presets/empty-and-minimal/index.html +++ b/web/public/zh-hans/presets/empty-and-minimal/index.html @@ -210,7 +210,7 @@

    你可以更改什么?

    --formats 以逗号分隔的格式 id,或 all all - 集合由哪些格式构成。填 all 表示此版本的所有格式,也可以只列出你的系统接受的格式。 + 集合由哪些格式构成。填 all 表示此版本的所有格式,也可以只列出你的系统接受的格式。 diff --git a/web/public/zh-hans/presets/index.html b/web/public/zh-hans/presets/index.html index 490fa2cc..856e65f1 100644 --- a/web/public/zh-hans/presets/index.html +++ b/web/public/zh-hans/presets/index.html @@ -160,6 +160,11 @@

    测试文件预设,每个测试问题一套文件

    我的系统能否正确保存、显示并返回它没料到的文件名?

    filename-handling

  • +
  • +

    图片尺寸

    +

    我的系统能接受屏幕和平台所用尺寸的图片吗?

    +

    picture-sizes

    +
  • 大小边界

    大小限制是否恰好在声明的位置生效?

    diff --git a/web/public/zh-hans/presets/picture-sizes/index.html b/web/public/zh-hans/presets/picture-sizes/index.html new file mode 100644 index 00000000..6bd18e76 --- /dev/null +++ b/web/public/zh-hans/presets/picture-sizes/index.html @@ -0,0 +1,281 @@ + + + + + + +常用尺寸的测试图片 - 屏幕、头像、社交媒体 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    预设

    +

    图片尺寸

    +

    我的系统能接受屏幕和平台所用尺寸的图片吗?

    +

    + picture-sizes 预设用一条命令为这个问题构建出整套真实测试文件,并在旁边放一个 + manifest.json,说明你的系统应如何响应每个文件。以下所有内容都按此版本的默认值从程序中读取。 +

    + + +
    +

    它通常能发现什么?

    +
      +
    • 按一种形状设定的宽度或高度上限拒绝了另一种形状,例如宽 1584 px 的个人资料背景
    • +
    • 代码以为是横向图片,来的却是纵向图片,于是缩略图被裁切或压扁
    • +
    • 高度为奇数的图片,例如 1200 x 627,被只接受偶数尺寸的步骤拒绝
    • +
    • 文件本身很小,生成缩略图时却耗尽时间或内存的 4K 图片
    • +
    +
    + + +
    +

    集合里有什么?

    +

    使用默认值时,如 tfg preset show picture-sizes 所报告的:

    +
    + + + + + + + +
    文件数21
    其配方中的 target 数21
    总大小4 178 420 B
    格式jpg
    +
    +

    以及该集合的清单对你的系统有何预期:

    +
    + + + + + + + +
    预期含义文件数
    accept你的系统应该接受这个文件。21
    +
    +
    + +
    +

    你可以更改什么?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    设置接受默认值作用
    --groups以逗号分隔的组名,或 allall集合包含哪些尺寸:screens 表示屏幕尺寸,avatars 表示头像,social 表示封面、横幅、帖子和缩略图。填 all 表示全部。
    --contentplaceholder, testtest图片显示什么。测试图案用于检查文件如何被读取。占位图是中间有文字的纯色图片,用于在真实图片出现之前排版页面。
    --format格式页面中的格式 idjpg集合中每个文件的格式。它是工具本身的参数,预设只是给它一个默认值。
    +
    +
    + +
    +

    如何运行?

    +

    查看集合的开销、构建它,或取出它的配方来编辑:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    也可以在你自己的配方中基于它构建,放在测试旁边:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/public/zh-hant/docs/index.html b/web/public/zh-hant/docs/index.html index 2c33fe79..2a127faa 100644 --- a/web/public/zh-hant/docs/index.html +++ b/web/public/zh-hant/docs/index.html @@ -368,6 +368,11 @@

    什麼是預設集?

    我的系統能否正確儲存、顯示並傳回它沒料到的檔名?

    filename-handling

  • +
  • +

    圖片尺寸

    +

    我的系統能接受螢幕和平台所用尺寸的圖片嗎?

    +

    picture-sizes

    +
  • 大小邊界

    大小限制是否恰好在宣告的位置生效?

    diff --git a/web/public/zh-hant/formats/index.html b/web/public/zh-hant/formats/index.html index 80ca32ac..ae4e0bc6 100644 --- a/web/public/zh-hant/formats/index.html +++ b/web/public/zh-hant/formats/index.html @@ -564,7 +564,7 @@

    每種格式接受的設定

    attachment_format - 格式的 id,與 tfg formats 列出的相同 + 格式的 id,例如 png 或 csv @@ -589,7 +589,7 @@

    每種格式接受的設定

    inline_format - 圖片格式的 id,與 tfg formats 列出的相同 + 圖片格式的 id,例如 png 或 jpg @@ -714,7 +714,7 @@

    每種格式接受的設定

    inline_format - 圖片格式的 id,與 tfg formats 列出的相同 + 圖片格式的 id,例如 png 或 jpg @@ -1134,7 +1134,7 @@

    每種格式接受的設定

    inline_format - 圖片格式的 id,與 tfg formats 列出的相同 + 圖片格式的 id,例如 png 或 jpg @@ -1189,7 +1189,7 @@

    每種格式接受的設定

    entry_format - 格式的 id,與 tfg formats 列出的相同 + 格式的 id,例如 png 或 csv @@ -1334,7 +1334,7 @@

    每種格式接受的設定

    entry_format - 格式的 id,與 tfg formats 列出的相同 + 格式的 id,例如 png 或 csv diff --git a/web/public/zh-hant/index.html b/web/public/zh-hant/index.html index 4ad5e4f2..caf6731a 100644 --- a/web/public/zh-hant/index.html +++ b/web/public/zh-hant/index.html @@ -269,6 +269,11 @@

    選好問題,拿到整組檔案

    我的系統能否正確儲存、顯示並傳回它沒料到的檔名?

    filename-handling

  • +
  • +

    圖片尺寸

    +

    我的系統能接受螢幕和平台所用尺寸的圖片嗎?

    +

    picture-sizes

    +
  • 大小邊界

    大小限制是否恰好在宣告的位置生效?

    diff --git a/web/public/zh-hant/presets/empty-and-minimal/index.html b/web/public/zh-hant/presets/empty-and-minimal/index.html index 597e8ffa..1e64064e 100644 --- a/web/public/zh-hant/presets/empty-and-minimal/index.html +++ b/web/public/zh-hant/presets/empty-and-minimal/index.html @@ -210,7 +210,7 @@

    你可以變更什麼?

    --formats 以逗號分隔的格式 id,或 all all - 組合由哪些格式構成。填 all 代表此版本的所有格式,也可以只列出你的系統接受的格式。 + 組合由哪些格式構成。填 all 代表此版本的所有格式,也可以只列出你的系統接受的格式。 diff --git a/web/public/zh-hant/presets/index.html b/web/public/zh-hant/presets/index.html index 51fa71f2..69efc3aa 100644 --- a/web/public/zh-hant/presets/index.html +++ b/web/public/zh-hant/presets/index.html @@ -160,6 +160,11 @@

    測試檔案預設集,每個測試問題一組檔案

    我的系統能否正確儲存、顯示並傳回它沒料到的檔名?

    filename-handling

  • +
  • +

    圖片尺寸

    +

    我的系統能接受螢幕和平台所用尺寸的圖片嗎?

    +

    picture-sizes

    +
  • 大小邊界

    大小限制是否恰好在宣告的位置生效?

    diff --git a/web/public/zh-hant/presets/picture-sizes/index.html b/web/public/zh-hant/presets/picture-sizes/index.html new file mode 100644 index 00000000..a8caae6e --- /dev/null +++ b/web/public/zh-hant/presets/picture-sizes/index.html @@ -0,0 +1,281 @@ + + + + + + +常用尺寸的測試圖片 - 螢幕、頭像、社群媒體 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +

    預設集

    +

    圖片尺寸

    +

    我的系統能接受螢幕和平台所用尺寸的圖片嗎?

    +

    + picture-sizes 預設集用一個指令為這個問題建立出整組真實測試檔案,並在旁邊放一個 + manifest.json,說明你的系統應如何回應每個檔案。以下所有內容都依此版本的預設值從程式中讀取。 +

    + + +
    +

    它通常能發現什麼?

    +
      +
    • 依一種形狀設定的寬度或高度上限拒絕了另一種形狀,例如寬 1584 px 的個人檔案背景
    • +
    • 程式碼以為是橫向圖片,來的卻是直向圖片,於是縮圖被裁切或壓扁
    • +
    • 高度為奇數的圖片,例如 1200 x 627,被只接受偶數尺寸的步驟拒絕
    • +
    • 檔案本身很小,產生縮圖時卻耗盡時間或記憶體的 4K 圖片
    • +
    +
    + + +
    +

    組合裡有什麼?

    +

    使用預設值時,如 tfg preset show picture-sizes 所回報的:

    +
    + + + + + + + +
    檔案數21
    其配方中的 target 數21
    總大小4 178 420 B
    格式jpg
    +
    +

    以及該組合的清單對你的系統有何預期:

    +
    + + + + + + + +
    預期意義檔案數
    accept你的系統應該接受這個檔案。21
    +
    +
    + +
    +

    你可以變更什麼?

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    設定接受預設值作用
    --groups以逗號分隔的組名,或 allall組合包含哪些尺寸:screens 代表螢幕尺寸,avatars 代表頭像,social 代表封面、橫幅、貼文和縮圖。填 all 代表全部。
    --contentplaceholder, testtest圖片顯示什麼。測試圖樣用來檢查檔案如何被讀取。佔位圖是中間有文字的純色圖片,用來在真實圖片出現之前排版頁面。
    --format格式頁面中的格式 idjpg組合中每個檔案的格式。它是工具本身的參數,預設集只是給它一個預設值。
    +
    +
    + +
    +

    如何執行?

    +

    查看組合的開銷、建置它,或取出它的配方來編輯:

    +
    tfg preset show picture-sizes
    +tfg generate --preset picture-sizes --out ./picture-sizes
    +tfg preset eject picture-sizes > picture-sizes.yaml
    +

    也可以在你自己的配方中以它為基礎,放在測試旁邊:

    +
    version: 1
    +extends: preset:picture-sizes
    +
    + + +
    + + + + diff --git a/web/social-preview.sha256 b/web/social-preview.sha256 index 958912db..795f9e6a 100644 --- a/web/social-preview.sha256 +++ b/web/social-preview.sha256 @@ -1 +1 @@ -44e8cdf608b1b5fc20836da0bfb126e4b6205cb4fce2be104772741ca2e8353e +d8430d1b3729e4aa6d4405f00a0d790c518555e9805d6d0036fb39cca8b3f966