Skip to content

Commit

Permalink
Fix formatting (LDML45 cleanup) (#764)
Browse files Browse the repository at this point in the history
* Fix formatting

* Fix @srl295's name

* Missing 'dfn' for bidi strategy

* Add 'dfn' to dynamic message

* Minor formatting fix

* Add missing 'dfn'
  • Loading branch information
aphillips authored Apr 10, 2024
1 parent f41c7d7 commit d83b098
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
## Introduction

One of the challenges in adapting software to work for
users with different languages and cultures is the need for **_dynamic messages_**.
users with different languages and cultures is the need for **_<dfn>dynamic messages</dfn>_**.
Whenever a user interface needs to present data as part of a larger string,
that data needs to be formatted (and the message may need to be altered)
to make it culturally accepted and grammatically correct.
Expand Down
2 changes: 1 addition & 1 deletion spec/appendices.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Tim Chevalier,
Mihai Niță,
Shane F. Carr,
Mark Davis,
Stephen R. Loomis,
Steven R. Loomis,
Caleb Maclennan,
David Filip,
Daniel Minor,
Expand Down
14 changes: 7 additions & 7 deletions spec/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ an appropriate error MUST be emitted and a _fallback value_ MAY be used as the f

Formatting of a _message_ is defined by the following operations:

- **_Expression and Markup Resolution_** determines the value of an _expression_ or _markup_,
- **_<dfn>Expression and Markup Resolution</dfn>_** determines the value of an _expression_ or _markup_,
with reference to the current _formatting context_.
This can include multiple steps,
such as looking up the value of a variable and calling formatting functions.
Expand All @@ -39,15 +39,15 @@ Formatting of a _message_ is defined by the following operations:
> have already been evaluated in the order in which the relevant _declarations_
> and _selectors_ appear in the _message_.
- **_Pattern Selection_** determines which of a message's _patterns_ is formatted.
- **_<dfn>Pattern Selection</dfn>_** determines which of a message's _patterns_ is formatted.
For a message with no _selectors_, this is simple as there is only one _pattern_.
With _selectors_, this will depend on their resolution.

At the start of _pattern selection_,
if the _message_ contains any _reserved statements_,
emit an _Unsupported Statement_ error.

- **_Formatting_** takes the resolved values of the selected _pattern_,
- **_<dfn>Formatting</dfn>_** takes the resolved values of the selected _pattern_,
and produces the formatted result for the _message_.
Depending on the implementation, this result could be a single concatenated string,
an array of objects, an attributed string, or some other locally appropriate data type.
Expand All @@ -60,7 +60,7 @@ and the observable behavior of the formatter matches that described here.

## Formatting Context

A message's **_formatting context_** represents the data and procedures that are required
A message's **_<dfn>formatting context</dfn>_** represents the data and procedures that are required
for the message's _expression resolution_, _pattern selection_ and _formatting_.

At a minimum, it includes:
Expand Down Expand Up @@ -348,7 +348,7 @@ The resolution of _markup_ MUST always succeed.
### Fallback Resolution
A **_fallback value_** is the resolved value for an _expression_ that fails to resolve.
A **_<dfn>fallback value</dfn>_** is the resolved value for an _expression_ that fails to resolve.
An _expression_ fails to resolve when:
Expand Down Expand Up @@ -833,10 +833,10 @@ isolating such parts to ensure that the formatted value displays correctly in a
>
> ![image](https://github.com/unicode-org/message-format-wg/assets/69082/6cc7f16f-8d9b-400b-a333-ae2ddb316edb)
A **_bidirectional isolation strategy_** is functionality in the formatter's
A **_<dfn>bidirectional isolation strategy<dfn>_** is functionality in the formatter's
processing of a _message_ that produces bidirectional output text that is ready for display.
The **_Default Bidi Strategy_** is a _bidirectional isolation strategy_ that uses
The **_<dfn>Default Bidi Strategy<dfn>_** is a _bidirectional isolation strategy_ that uses
isolating Unicode control characters around _placeholder_'s formatted values.
It is primarily intended for use in plain-text strings, where markup or other mechanisms
are not available.
Expand Down
8 changes: 4 additions & 4 deletions spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ _Duplicate Declaration_ error during processing:
A _local-declaration_ MAY overwrite an external input value as long as the
external input value does not appear in a previous _declaration_.

> [!Note]
> [!NOTE]
> These restrictions only apply to _declarations_.
> A _placeholder_ or _selector_ can apply a different annotation to a _variable_
> than one applied to the same _variable_ named in a _declaration_.
Expand Down Expand Up @@ -226,7 +226,7 @@ reserved-statement = reserved-keyword [s reserved-body] 1*([s] expression)
reserved-keyword = "." name
```
> [!Note]
> [!NOTE]
> The `reserved-keyword` ABNF rule is a simplification,
> as it MUST NOT be considered to match any of the existing keywords
> `.input`, `.local`, or `.match`.
Expand Down Expand Up @@ -619,7 +619,7 @@ private-use-annotation = private-start [[s] reserved-body]
private-start = "^" / "&"
```
> [!Note]
> [!NOTE]
> Users are cautioned that _private-use annotations_ cannot be reliably exchanged
> and can result in errors during formatting.
> It is generally a better idea to use the function registry
Expand Down Expand Up @@ -719,7 +719,7 @@ on the pairing, ordering, or contents of _markup_ during _formatting_.
## Attributes
**_Attributes_ are reserved for standardization by future versions of this specification.**
**_Attributes_ are reserved for standardization by future versions of this specification._**
Examples in this section are meant to be illustrative and
might not match future requirements or usage.
Expand Down

0 comments on commit d83b098

Please sign in to comment.