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

Localization: how to pass a <key> into a <key> #82

Closed
ildar170975 opened this issue Jul 20, 2022 · 2 comments
Closed

Localization: how to pass a <key> into a <key> #82

ildar170975 opened this issue Jul 20, 2022 · 2 comments

Comments

@ildar170975
Copy link

ildar170975 commented Jul 20, 2022

This code shows a localized "Home" or "Away" strings:

      - type: custom:template-entity-row
        entity: person.ildar
        name: localized
        state: _(component.device_tracker.state._.{{states(config.entity)}})

Here component.device_tracker.state._.home and component.device_tracker.state._.not_home keys are used.

Some keys have "internal" keys, like:

ui.errors.config.key_missing: "Required key ''{key}'' is missing.”

To show the whole message, I need to pass a "key" into it.

How should I combine the _(ui.errors.config.key_missing) and this "internal" key?

@ildar170975
Copy link
Author

Potentially may be closed by this PR: #85

@thomasloven
Copy link
Owner

Fixed by #85

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

No branches or pull requests

2 participants