File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type Props = $ReadOnly<{|
2727export default function InvalidNarrow ( props : Props ) : Node {
2828 return (
2929 < View style = { styles . container } >
30- < ZulipTextIntl style = { styles . text } text = "That conversation doesn' t seem to exist." />
30+ < ZulipTextIntl style = { styles . text } text = "That conversation doesn’ t seem to exist." />
3131 </ View >
3232 ) ;
3333}
Original file line number Diff line number Diff line change 119119 "Username" : " Username" ,
120120 "Password" : " Password" ,
121121 "Why not start the conversation?" : " Why not start the conversation?" ,
122- "That conversation doesn' t seem to exist." : " That conversation doesn' t seem to exist." ,
122+ "That conversation doesn’ t seem to exist." : " That conversation doesn’ t seem to exist." ,
123123 "Request timed out." : " Request timed out." ,
124124 "Sign in with {method}" : " Sign in with {method}" ,
125125 "Invalid input" : " Invalid input" ,
Original file line number Diff line number Diff line change @@ -165,6 +165,20 @@ function getPossibleUiStrings(possibleUiStringFilePaths) {
165165}
166166
167167function main ( ) {
168+ // Mobile's style is to use curly quotes. They look nicer, but also: since
169+ // v3, react-intl uses the single straight quote as an escape character:
170+ // https://formatjs.io/docs/intl-messageformat/#features
171+ const messagesWithStraightQuotes = Object . values ( messages_en ) . filter ( message =>
172+ / [ ' " ] / . test ( message ) ,
173+ ) ;
174+ if ( messagesWithStraightQuotes . length > 0 ) {
175+ console . error (
176+ 'Found messages in static/translations/messages_en.json that have straight quotes. Please use smart quotes: “” and ‘’.' ,
177+ ) ;
178+ console . error ( messagesWithStraightQuotes ) ;
179+ process . exit ( 1 ) ;
180+ }
181+
168182 const possibleUiStrings = getPossibleUiStrings ( getPossibleUiStringFilePaths ( ) ) ;
169183
170184 // Check each key ("message ID" in formatjs's lingo) against
You can’t perform that action at this time.
0 commit comments