How do we use a constant's value as a lingui id? #1112
-
I have constant like so: So, the result we want is: Is there a way to do it? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
So far, I am using it like so.
Later, I can use it like so.
So far, it's only working in |
Beta Was this translation helpful? Give feedback.
-
We ended up using it like this:
The id generation next to the actual constant, with comments making sure that devs always keep the macro and the actual string the same. This way Lingui generates the id, and the constant is set with the literal text and not with the translation. |
Beta Was this translation helpful? Give feedback.
We ended up using it like this:
The id generation next to the actual constant, with comments making sure that devs always keep the macro and the actual string the same.
This way Lingui generates the id, and the constant is set with the literal text and not with the translation.