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

Display help message when fluent arg was referenced incorrectly #104217

Merged
merged 1 commit into from
Nov 11, 2022

Commits on Nov 9, 2022

  1. Display help message when fluent arg was referenced incorrectly

    The fluent argument syntax is a little special and easy to get wrong, so
    we emit a small help message when someone gets it wrong.
    
    Example:
    ```
    parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}`
    ```
    panics with
    ```
    thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter`
    help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead
    attr: `None`
    args: `FluentArgs([("delimiter", String("}"))])`
    errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21
    ```
    Noratrieb committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    bd3c4fb View commit details
    Browse the repository at this point in the history