Skip to content
Snippets Groups Projects
Unverified Commit 92175e0b authored by Noah Moss's avatar Noah Moss Committed by GitHub
Browse files

Allow multi-line strings using `str` in translation macros (#22901)


* allow str form as the first argument to deferred-tru

* add tests and update doc strings

* migrate more setting descriptions

* Handle multiline translation sources

```clojure
enumerate=> x
(deferred-tru
 (str
  "Whether an introductory modal should be shown after the next database connection is added. "
  "Defaults to false if any non-default database has already finished syncing for this instance."))
enumerate=> (form->string-for-translation x)
"Whether an introductory modal should be shown after the next database connection is added. Defaults to false if any non-default database has already finished syncing for this instance."
```

We get the form from `(g/grasp <file> ::translate)` which returns the
`x`. And then simply pick through it for either a string literal or a
call to `(str <literal>+)`

Co-authored-by: default avatardan sutton <dan@dpsutton.com>
parent 4eb558a8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment