Use "map" instead of "dictionary"

This commit is contained in:
Joe Mooring 2023-08-08 08:01:07 -07:00 committed by GitHub
parent 704dd5da68
commit cacd0e461d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 9 deletions

View File

@ -390,7 +390,7 @@ This article has 101 words.
### Query a singular/plural translation
In other to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
To enable pluralization when translating, pass a map with a numeric `.Count` property to the `i18n` function. The example below uses `.ReadingTime` variable which has a built-in `.Count` property.
```go-html-template
{{ i18n "readingTime" .ReadingTime }}

View File

@ -1,11 +1,11 @@
---
title: dict
description: Creates a dictionary from a list of key and value pairs.
description: Creates a map from a list of key and value pairs.
categories: [functions]
menu:
docs:
parent: functions
keywords: [dictionary]
keywords: [collections]
signature: ["dict KEY VALUE [KEY VALUE]..."]
relatedfuncs: []
---

View File

@ -6,7 +6,7 @@ menu:
docs:
parent: functions
keywords: []
signature: ["echoParam DICTIONARY KEY"]
signature: ["echoParam MAP KEY"]
relatedfuncs: []
---

View File

@ -39,7 +39,7 @@ The above will overlay `$logo` in the upper left corner of `$img` (at position `
Using the `Text` filter, you can add text to an image.
{{% funcsig %}}
images.Text TEXT DICT)
images.Text TEXT MAP)
{{% /funcsig %}}
The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.

View File

@ -10,9 +10,7 @@ signature: ["jsonify INPUT", "jsonify OPTIONS INPUT"]
relatedfuncs: [plainify]
---
Jsonify encodes a given object to JSON.
To customize the printing of the JSON, pass a dictionary of options as the first
To customize the printing of the JSON, pass a map of options as the first
argument. Supported options are "prefix" and "indent". Each JSON element in
the output will begin on a new line beginning with *prefix* followed by one or
more copies of *indent* according to the indentation nesting.

View File

@ -5,7 +5,7 @@ categories: [functions]
menu:
docs:
parent: functions
keywords: [dictionary]
keywords: [collections]
signature: ["collections.Merge MAP MAP...", "merge MAP MAP..."]
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
---