Skip to content

Commit f5af1df

Browse files
committed
first and second translation key pass
1. replacing displayed text that matches `/{['"`]/` with translation keys 2. replacing all `gui.` keys that are pm-only text with `pm.`
1 parent 4ed7f68 commit f5af1df

File tree

20 files changed

+237
-82
lines changed

20 files changed

+237
-82
lines changed

src/components/controls/controls.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const messages = defineMessages({
1818
description: 'Green flag button title'
1919
},
2020
pauseTitle: {
21-
id: 'gui.controls.pause',
21+
id: 'pm.controls.pause',
2222
defaultMessage: 'Pause',
2323
description: 'Pause button title'
2424
},

src/components/crash-message/crash-message.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ const CrashMessage = props => (
6262
className={styles.reloadButton}
6363
onClick={downloadLogs}
6464
>
65-
{'Download Error'}
65+
<FormattedMessage
66+
defaultMessage="Download Error"
67+
description="Button to download the console contents in a .pml file"
68+
id="pm.crashMessage.downloadError"
69+
/>
6670
</button>
6771
</Box>
6872
</div>

src/components/custom-procedures/custom-procedures.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ const CustomProcedures = props => (
240240
<FormattedMessage
241241
defaultMessage="Add an input"
242242
description="Label for button to add a command input"
243-
id="gui.customProcedures.addAnInputCommand"
243+
id="pm.customProcedures.addAnInputCommand"
244244
/>
245245
</div>
246246
<div className={styles.optionDescription}>
247247
<FormattedMessage
248248
defaultMessage="branch"
249249
description="Description of the command input type"
250-
id="gui.customProcedures.commandType"
250+
id="pm.customProcedures.commandType"
251251
/>
252252
</div>
253253
</div>
@@ -286,7 +286,7 @@ const CustomProcedures = props => (
286286
<FormattedMessage
287287
defaultMessage="Return Text or Number"
288288
description="Label for block to return text"
289-
id="gui.customProcedures.returnText"
289+
id="pm.customProcedures.returnText"
290290
/>
291291
</div>
292292
</div>
@@ -304,7 +304,7 @@ const CustomProcedures = props => (
304304
<FormattedMessage
305305
defaultMessage="Return a Boolean"
306306
description="Label for block to return a boolean"
307-
id="gui.customProcedures.returnABoolean"
307+
id="pm.customProcedures.returnABoolean"
308308
/>
309309
</div>
310310
</div>
@@ -323,7 +323,7 @@ const CustomProcedures = props => (
323323
<FormattedMessage
324324
defaultMessage="Normal block"
325325
description="Label for block to be a normal stack block"
326-
id="gui.customProcedures.normalBlock"
326+
id="pm.customProcedures.normalBlock"
327327
/>
328328
</div>
329329
</div>
@@ -341,7 +341,7 @@ const CustomProcedures = props => (
341341
<FormattedMessage
342342
defaultMessage="Ending block"
343343
description="Label for block to be an ending block for a stack"
344-
id="gui.customProcedures.endingBlock"
344+
id="pm.customProcedures.endingBlock"
345345
/>
346346
</div>
347347
</div>

src/components/direction-picker/direction-picker.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const messages = defineMessages({
4242
defaultMessage: 'All Around'
4343
},
4444
lookAt: {
45-
id: 'gui.directionPicker.rotationStyles.lookAt',
45+
id: 'pm.directionPicker.rotationStyles.lookAt',
4646
description: 'Button to change to the look at rotation style',
4747
defaultMessage: 'Look At'
4848
},
@@ -52,7 +52,7 @@ const messages = defineMessages({
5252
defaultMessage: 'Left/Right'
5353
},
5454
upDown: {
55-
id: 'gui.directionPicker.rotationStyles.upDown',
55+
id: 'pm.directionPicker.rotationStyles.upDown',
5656
description: 'Button to change to the up-down rotation style',
5757
defaultMessage: 'Up/Down'
5858
},

src/components/gui/gui.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ const GUIComponent = props => {
280280
<FormattedMessage
281281
defaultMessage="Variables"
282282
description="Button to get to the variables panel"
283-
id="gui.gui.variablesTab"
283+
id="pm.gui.variablesTab"
284284
/>
285285
</ContextMenuWrapTab>
286286
</Tab>);
@@ -293,7 +293,7 @@ const GUIComponent = props => {
293293
<FormattedMessage
294294
defaultMessage="Files"
295295
description="Button to get to the files panel"
296-
id="gui.gui.filesTab"
296+
id="pm.gui.filesTab"
297297
/>
298298
</ContextMenuWrapTab>
299299
</Tab>);
@@ -430,7 +430,7 @@ const GUIComponent = props => {
430430
{isCreating ? (
431431
<Loader
432432
isFullScreen
433-
messageId={isPlayground ? "gui.loader.playground" : "gui.loader.creating"}
433+
messageId={isPlayground ? "pm.loader.playground" : "gui.loader.creating"}
434434
/>
435435
) : null}
436436
{isBrowserSupported() ? null : (
@@ -577,7 +577,7 @@ const GUIComponent = props => {
577577
<FormattedMessage
578578
defaultMessage="Variables"
579579
description="Button to get to the variables panel"
580-
id="gui.gui.variablesTab"
580+
id="pm.gui.variablesTab"
581581
/>
582582
</div>
583583
</MenuItem>}
@@ -590,7 +590,7 @@ const GUIComponent = props => {
590590
<FormattedMessage
591591
defaultMessage="Files"
592592
description="Button to get to the files panel"
593-
id="gui.gui.filesTab"
593+
id="pm.gui.filesTab"
594594
/>
595595
</div>
596596
</MenuItem>} */}

src/components/loader/loader.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const mainMessages = {
3535
id="gui.loader.creating"
3636
/>
3737
),
38-
'gui.loader.playground': (
38+
'pm.loader.playground': (
3939
<FormattedMessage
4040
defaultMessage="Loading Playground"
4141
description="Playground load message"
42-
id="gui.loader.playground"
42+
id="pm.loader.playground"
4343
/>
4444
)
4545
};

src/components/menu-bar/menu-bar.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,14 +695,22 @@ class MenuBar extends React.Component {
695695
<MenuItem
696696
onClick={this.props.onStartFolderUpload}
697697
>
698-
{"Load from a folder"}
698+
<FormattedMessage
699+
defaultMessage="Load from a folder"
700+
description="Loads the contents of a folder as if it was a project zip"
701+
id="pm.menuBar.loadFromFolder"
702+
/>
699703
</MenuItem>
700704
<SB3Downloader>{(_className, downloadProject, extended) => (
701705
<React.Fragment>
702706
<MenuItem
703707
onClick={this.getSaveToComputerHandler(extended.saveAsFolder)}
704708
>
705-
{"Export project to folder"}
709+
<FormattedMessage
710+
defaultMessage="Export project to folder"
711+
description="Exports the contents of a project save to a folder"
712+
id="pm.menuBar.ExportToFolder"
713+
/>
706714
</MenuItem>
707715
</React.Fragment>
708716
)}</SB3Downloader>

src/components/menu-bar/share-button.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ShareButton extends React.Component {
170170
{isEdit ? <FormattedMessage
171171
defaultMessage="Upload Edits"
172172
description="Text for uploading edits for projects on PenguinMod"
173-
id="gui.menuBar.pmedit"
173+
id="pm.menuBar.pmedit"
174174
/> :
175175
(isRemix ?
176176
<FormattedMessage
@@ -181,7 +181,7 @@ class ShareButton extends React.Component {
181181
<FormattedMessage
182182
defaultMessage="Upload"
183183
description="Label for project share button"
184-
id="gui.menuBar.pmshare"
184+
id="pm.menuBar.pmshare"
185185
/>)}
186186
{this.state.loading ? (
187187
<img

src/components/sound-editor/sound-editor.jsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,26 @@ const messages = defineMessages({
140140
id: 'gui.soundEditor.mute',
141141
description: 'Title of the button to apply the mute effect',
142142
defaultMessage: 'Mute'
143+
},
144+
lowPass: {
145+
id: 'pm.soundEditor.lowPass',
146+
description: 'Title of the button to apply low pass on audio',
147+
defaultMessage: 'Low Pass'
148+
},
149+
highPass: {
150+
id: 'pm.soundEditor.highPass',
151+
description: 'Title of the button to apply high pass on audio',
152+
defaultMessage: 'High Pass'
153+
},
154+
format: {
155+
id: 'pm.soundEditor.format',
156+
description: 'Title of the button that opens the audio formatting menu',
157+
defaultMessage: 'Format'
158+
},
159+
modify: {
160+
id: 'pm.soundEditor.modify',
161+
description: 'Title of the button that opens the modify sound menu',
162+
defaultMessage: 'Modify'
143163
}
144164
});
145165

@@ -299,7 +319,7 @@ const SoundEditor = props => (
299319
<IconButton
300320
className={styles.effectButton}
301321
img={modifyIcon}
302-
title={"Modify"}
322+
title={<FormattedMessage {...messages.modify} />}
303323
onClick={props.onModifySound}
304324
/>
305325
<IconButton
@@ -366,19 +386,19 @@ const SoundEditor = props => (
366386
<IconButton
367387
className={styles.effectButton}
368388
img={lowpassIcon}
369-
title={"Low Pass"}
389+
title={<FormattedMessage {...messages.lowPass} />}
370390
onClick={props.onLowPass}
371391
/>
372392
<IconButton
373393
className={styles.effectButton}
374394
img={highpassIcon}
375-
title={"High Pass"}
395+
title={<FormattedMessage {...messages.highPass} />}
376396
onClick={props.onHighPass}
377397
/>
378398
<IconButton
379399
className={styles.effectButton}
380400
img={formatIcon}
381-
title={"Format"}
401+
title={<FormattedMessage {...messages.format} />}
382402
onClick={props.onFormatSound}
383403
/>
384404
</div>

src/containers/backdrop-library.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ const messages = defineMessages({
1313
defaultMessage: 'Choose a Backdrop',
1414
description: 'Heading for the backdrop library',
1515
id: 'gui.costumeLibrary.chooseABackdrop'
16+
},
17+
libraryHeader: {
18+
defaultMessage: 'Backdrops',
19+
description: 'Header for the backdrop asset picker',
20+
id: 'pm.costumeLibrary.backdropsHeader'
1621
}
1722
});
1823

@@ -46,7 +51,7 @@ class BackdropLibrary extends React.Component {
4651
data={getBackdropLibrary()}
4752
id="backdropLibrary"
4853
actor="CostumeLibrary"
49-
header={"Backdrops"}
54+
header={this.props.intl.formatMessage(messages.libraryHeader)}
5055
tags={backdropTags}
5156
title={this.props.intl.formatMessage(messages.libraryTitle)}
5257
onItemSelected={this.handleItemSelect}

0 commit comments

Comments
 (0)