Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions docs/authoring/dynamic_phrasing_based_on_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ slug: dynamic_phrasing_based_on_values
---

Docassemble has several clever features that you can use in templates
and in the body of your interview to automatically rephrase text in a
and in the body of your interview to automatically rephrase text in a
context specific way depending on:

1. the length of a list
Expand All @@ -15,7 +15,7 @@ context specific way depending on:
In general, these features are useful short-hand solutions for problems that
you could also solve with ordinary conditional text (e.g., an `if` statement).

These are covered in more depth in the documentation for
These are covered in more depth in the documentation for
[DAList](https://docassemble.org/docs/objects.html#DAList), although it may be hard to
find the specific functions on that fairly long documentation page without internal anchors. The best solution
to learn more may be to read about the method on this page, then visit the DAList documentation page
Expand All @@ -31,6 +31,34 @@ It's often safe to use the grammar shortcuts inside a template (because it will
to avoid them inside the interview itself.
:::

## What do to instead for text that will be translated

Instead of using the special grammar functions below, use conditional logic at the sentence level
when the text might be translated in the future.

You might want to use the special [`label`/`field` syntax](https://docassemble.org/docs/fields.html#label) to make it
easier to use conditional logic on the `field` level. This syntax allows you to use multi-line `mako` conditional
syntax.

For example:

```yaml
question: |
% if children.number_gathered() > 1:
Where do the children live?
% else:
Where does your child live?
% endif
fields:
- label: |
% if children.number_gathered() > 1:
Children's address
% else:
Child's address
% endif
field: children.shared_address
```

## Show the person's full name, without abbreviation

By default, Docassemble abbreviates an individual's middle name, so
Expand Down
123 changes: 0 additions & 123 deletions docs/components/formfyxer/docx_wrangling.md

This file was deleted.

Loading
Loading