Skip to content
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

Referencing parameterized terms without parameters #269

Open
stasm opened this issue Jun 7, 2019 · 3 comments
Open

Referencing parameterized terms without parameters #269

stasm opened this issue Jun 7, 2019 · 3 comments
Labels

Comments

@stasm
Copy link
Contributor

stasm commented Jun 7, 2019

Referencing parameterized terms is legal syntax in Fluent 1.0:

-term = {$case ->
    [lower] value
   *[upper] Value
}

## All three messages format to the same value.
hello1 = Hello, {-term}
hello2 = Hello, {-term()}
hello3 = Hello, {-term(case: "upper")}

Without parameters, the default variant is selected. Should the resolver also report an error / warning?

@stasm stasm added the resolver label Jun 7, 2019
@eemeli
Copy link
Member

eemeli commented Jun 9, 2019

This probably depends on the resolution of #272.

@Pike
Copy link
Contributor

Pike commented Jun 27, 2019

In the case of multi-variant branding, I think it's OK for some variations to have sub-optimal term shapes. Think of an online shop system (or Firefox/Thunderbird).

I'd say that all three ways in the example are OK.

There is the scenario where you have hello4 = Hello, {-term(casa: "upper")}, and you'd like to know. I think the solutions for this lie in tooling/editing support, though, and not the runtime.

There are variations of the "tooling/editing" story that are "build time", remembering the elm impl, for example. But I look at that as a build time static analysis much more than a build time resolver.

@caridy
Copy link

caridy commented Nov 24, 2021

From what I can tell, this works as described in the description. Can this issue be closed?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants