There are a surprising number of uncapitalized language names, among other grammatical errors, in this callout of the lack of i18n considerations. Also, while "ice" in French is indeed "glace" (not capitalized btw), "ice cream" is actually "crème glacée", and "Eis" (which, you're right, German writers would capitalize) refers just to "ice", not "ice cream".
I know that "glace" in French is not capitalized, I wanted to go with the same format from the buttons.
I wanted to point out that the implementation is pretty fragile if the business decides one day that more languages need to be supported
something like the following would be safe ass the text will most likely be used as a i18n key depending on the library that is used
handleClick(itemName){if(this.props[`order${itemName}`]===undefined){return()=>{console.log("I'm sorry. We don't have that menu item.")};}returnthis.props[`order${itemName}`];}<buttononClick={this.handleClick(this.props.text)}>{this.props.text}// this.props.text = "Pizza", "Cheeseburger" or "Ice Cream"</button>
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are a surprising number of uncapitalized language names, among other grammatical errors, in this callout of the lack of i18n considerations. Also, while "ice" in French is indeed "glace" (not capitalized btw), "ice cream" is actually "crème glacée", and "Eis" (which, you're right, German writers would capitalize) refers just to "ice", not "ice cream".
I know that "glace" in French is not capitalized, I wanted to go with the same format from the buttons.
I wanted to point out that the implementation is pretty fragile if the business decides one day that more languages need to be supported
something like the following would be safe ass the text will most likely be used as a i18n key depending on the library that is used