-
Notifications
You must be signed in to change notification settings - Fork 21
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
Thellimist/pi 1060 add drawer to all cards #118
Conversation
var formattedMessage = formatMessage({ | ||
id: this.props.text + '.' + integrationName, | ||
defaultMessage: formatMessage({ id: this.props.text }) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach is annoying in dev cause of console.errors's printed. But it is a viable solution to support translations for different integrations. We can use this approach for card.title.wordpress
, card.title.magento
and similar translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're basically assuming one of these will fail? What about this?
let integrationKey = this.props.text + '.' + integrationName;
const stringExists = !!this.props.intl.messages[integrationKey];
var formattedMessage = formatMessage({id: stringExists ? integrationKey : this.props.text});
@@ -70,6 +70,7 @@ | |||
"intl": "^1.1.0", | |||
"jest": "^19.0.2", | |||
"lodash": "^3.10.1", | |||
"marked": "^0.3.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the package is abandoned. I would recommend using alternative.
Some texts don't use markdown. I'll double check that with Garreth