question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What is the equivalent to `advancedMsg` ?

See original GitHub issue

Hello, during the conversion of my themes from Keycloak Freemarker to keycloakify, I came across this problem. Actually, there’s no equivalent to advancedMsg when using this library, or I didn’t found any.

<#if client.name?has_content>
      ${msg("oauthGrantTitle",advancedMsg(client.name))}
<#else>
      ${msg("oauthGrantTitle",client.clientId)}
</#if>

This is what I’ve tried:

client.name ? msgStr('oauthGrantTitle', msgStr(client.name)) : msg("oauthGrantTitle", client.clientId

but without surprise, I’m getting an error:

  • First typescript error - because they’re not from the same type
  • Second dom error - this means, that no text is being printed to the screen during development.

Do you have an idea how I can do it right ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
stephane-segningcommented, Jul 15, 2021

So after some researches, I came across this page in production: Screenshot 2021-07-15 at 16 20 49

I came accross one of these texts here and here.

It’s as if they were translation messages, but they still have the $ and { } structure.

1reaction
garronejcommented, Jul 12, 2021

Hi,
Looking at [this](https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/theme/beans/AdvancedMessageFormit seems it evaluate a string composed of multiple translation token…
Could you give me the expected input output of advanceMsg?

msgStr('oauthGrantTitle', msgStr(client.name))

When I look at what "oauthGrantTitle" correspond to in english it’s "Grant Access to {0}"

It seems to me that this would do:

msgStr("oauthGrantTitle", client.name ?? client.clientId )

I have added name and clientId to the types definitions for you in v2.0.7

Regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

AdvancedMessage (Qpid ProtonJ2 Parent 1.0.0-M5 API)
Sets the body Section instances to use when encoding this message. AdvancedMessage<E>, clearBodySections(). Clears all current body Section elements ...
Read more >
Perimeta Message Manipulation: Guide for Beginners
So this line adds the line “User-Agent: Metaswitch” to the SIP message if no User-Agent is already present. Here are a few alternative...
Read more >
Neovascularization is prominent in the chronic inflammatory ...
The inflammatory reaction was categorized as: I, low; II, intermediate; and III, advanced MSG inflammatory lesions; and correlated with the histological ...
Read more >
Free MSG File Viewer – Download, Install & Easily Browse ...
MSG Viewer Tool to browse MSG files & access .msg emails messages with attachments without Outlook application installation. Free Download MSG file viewer ......
Read more >
Characterization of a new regulatory CD4 + T cell subset in ...
The inhibition of proliferation resulted equal to 27.7% in the ... on Treg-cell number in the advanced MSG lesions [12, 22, 27].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found