Skip to content

Add use case for source expression attribute #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2024
Merged
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
14 changes: 13 additions & 1 deletion exploration/expression-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Status: **Proposed**
<dd>@eemeli</dd>
<dt>First proposed</dt>
<dd>2023-08-27</dd>
<dt>Pull Request</dt>
<dt>Pull Requests</dt>
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/458">#458</a></dd>
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/772">#772</a></dd>
</dl>
</details>

Expand Down Expand Up @@ -96,6 +97,17 @@ At least the following expression attributes should be considered:
- `canCopy`, `canDelete`, `canOverlap`, `canReorder`, etc. — Flags supported by
XLIFF 2 inline elements

- Attributes used to represent features of other localization syntaxes
when parsed to a MessageFormat 2 data model.

- `source` — A literal value representing the source syntax of an expression.

> Example selector representing an Xcode stringsdict `NSStringLocalizedFormatKey` value:
>
> ```
> .match {$count :number @source=|%#@count@|}
> ```

## Requirements

Attributes can be assigned to any expression,
Expand Down