Skip to content

Localization Question #3178

Answered by jboileau99
jboileau99 asked this question in Q&A
Jul 26, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

One way I can achieve what I want is by changing the code to:

render() {

    const actions = {
      ACCESS: () => msg('ACCESS'),
      DELETE: () => msg('DELETE'),
      MODIFY: () => msg('MODIFY'),
    }

    return html`
      <div class="prompt-heading">${this.prompt}</div>
      <div class="actions-container">
        ${Object.values(actions).map(
          a =>
            html`<action-item
              action-name=${a()}
              action-description=""
              ?disabled=${true}
            ></action-item>`
        )}
      </div>
    `;
  }

Is this the right solution, or is there some other way that I'm missing?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aomarks
Comment options

Answer selected by aomarks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants