Skip to content

Commit

Permalink
Use "map" instead of "dictionary"
Browse files Browse the repository at this point in the history
Updates #2085
  • Loading branch information
jmooring committed Aug 8, 2023
1 parent 704dd5d commit f89e8eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content/en/content-management/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions content/en/functions/dict.md
Original file line number Diff line number Diff line change
@@ -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: []
---
Expand Down
4 changes: 1 addition & 3 deletions content/en/functions/jsonify.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
---
Expand Down

0 comments on commit f89e8eb

Please sign in to comment.