Skip to content

Allow all inline expressions as named arguments #230

Open
@stasm

Description

@stasm

This was originally filed as #188 concerning VariantExpressions which was since removed from the Fluent Syntax. However, the same problem remains in named arguments to call expressions.

Given a term defined as follows:

-thing = { $count ->
    *[one] thing
    [other] things
}

Should we allow this?

you-own = You have { $count ->
    *[one] a {-thing(count: $count)}
    [other] {-thing(count: $count)}
}.

Right now, only NumberLiterals and StringLiterals can be passed as named arguments, so the work around is to pass the names of requested variants explicitly:

you-own = You have { $count ->
    *[one] a {-thing(count: "one"}
    [other] {-thing(count: "other")}
}.

Or:

you-own = You have { $count ->
    *[one] a {-thing(count: 1}
    [other] {-thing(count: "other")}
}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FUTUREIdeas and requests to consider after Fluent 1.0syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions