Skip to content

Commit

Permalink
Very basic decoding steps description, no var replacement yet
Browse files Browse the repository at this point in the history
  • Loading branch information
baltpeter committed Apr 10, 2023
1 parent 5f45cf4 commit 9e0c572
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
33 changes: 32 additions & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,36 @@
"tracker-list-datenanfragen-link": { "other": "Get company information on datarequests.org" },
"tracker-list-datenanfragen-link-domain": { "other": "datarequests.org" },
"tracker-list-exodus-link": { "other": "Go to tracker entry in the Exodus database." },
"tracker-list-tracker-adapters-heading": { "other": "Tracker adapters" }
"tracker-list-tracker-adapters-heading": { "other": "Tracker adapters" },

"decoding-step-function-parseQueryString": {
"one": "Parse `{{ .input }}` as a query string.",
"other": "Parse every element in `{{ .mapInput }}` as a query string."
},
"decoding-step-function-parseJson": {
"one": "Parse `{{ .input }}` as JSON.",
"other": "Parse every element in `{{ .mapInput }}` as JSON."
},
"decoding-step-function-decodeBase64": {
"one": "Decode `{{ .input }}` as a Base64 string.",
"other": "Decode every element in `{{ .mapInput }}` as a Base64 string."
},
"decoding-step-function-decodeUrl": {
"one": "Decode `{{ .input }}` as a URL-encoded (percent-encoded) string.",
"other": "Decode every element in `{{ .mapInput }}` as a URL-encoded (percent-encoded) string."
},
"decoding-step-function-decodeProtobuf": {
"one": "Decode `{{ .input }}` as a protocol buffer (Protobuf).",
"other": "Decode every element in `{{ .mapInput }}` as a protocol buffer (Protobuf)."
},
"decoding-step-function-ensureArray": {
"one": "Wrap `{{ .input }}` in an array if it isn’t one already.",
"other": "Wrap every element in `{{ .mapInput }}` in an array if it isn’t one already."
},
"decoding-step-function-getProperty": {
"one": "Get the property at JSONPath `{{ .options.path }}` in `{{ .input }}`.",
"other": "Get the property at JSONPath `{{ .options.path }}` for every element in `{{ .mapInput }}`."
},

"decoding-step-store": { "other": "Store that in `{{ .output }}`." }
}
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>{{ T "tracker-single-decoding-steps-heading" }}</h2>
<div class="book-tabs-content markdown-inner">
<ol>
{{ range . }}
<li><code>{{ .function }}</code></li>
<li>{{ partial "decoding-step.html" . }}</li>
{{ end }}
</ol>
</div>
Expand Down
10 changes: 10 additions & 0 deletions layouts/partials/decoding-step.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ (
T (printf "decoding-step-function-%s" .function)
(dict
"count" (cond (isset . "input") 1 2)
"input" .input
"mapInput" .mapInput
"options" .options
)
) | markdownify }}
{{ T "decoding-step-store" (dict "output" .output) | markdownify }}

0 comments on commit 9e0c572

Please sign in to comment.