-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Multiple Languages): Convert EditComponentPrompt input to Transl…
…atableInput (#1585) * Pass in ComponentContent to EditComponentPrompt instead of prompt. This will let us convert the input to TranslatableInput. * Convert EditComponentPrompt input into TranslatableInput
- Loading branch information
1 parent
0ad71fd
commit 4202c0a
Showing
19 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
26 changes: 14 additions & 12 deletions
26
src/app/authoring-tool/edit-component-prompt/edit-component-prompt.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<mat-form-field class="prompt" appearance="fill"> | ||
<mat-label i18n>Prompt</mat-label> | ||
<textarea | ||
matInput | ||
[(ngModel)]="prompt" | ||
(ngModelChange)="promptChangedEvent.next($event)" | ||
placeholder="Enter Prompt Here" | ||
i18n-placeholder | ||
cdkTextareaAutosize | ||
> | ||
</textarea> | ||
</mat-form-field> | ||
<translatable-input [content]="componentContent" key="prompt" class="prompt" appearance="fill"> | ||
<mat-form-field> | ||
<mat-label i18n>Prompt</mat-label> | ||
<textarea | ||
matInput | ||
[(ngModel)]="componentContent.prompt" | ||
(ngModelChange)="promptChangedEvent.next($event)" | ||
placeholder="Enter Prompt Here" | ||
i18n-placeholder | ||
cdkTextareaAutosize | ||
> | ||
</textarea> | ||
</mat-form-field> | ||
</translatable-input> |
10 changes: 4 additions & 6 deletions
10
src/app/authoring-tool/edit-component-prompt/edit-component-prompt.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { ComponentContent } from '../../../assets/wise5/common/ComponentContent'; | ||
|
||
@Component({ | ||
selector: 'edit-component-prompt', | ||
styles: ['.prompt {width: 100%; }'], | ||
styles: ['.prompt {width: 100%; mat-form-field { width:100%} }'], | ||
templateUrl: 'edit-component-prompt.component.html' | ||
}) | ||
export class EditComponentPrompt { | ||
@Input() | ||
prompt: string; | ||
|
||
@Output() | ||
promptChangedEvent = new EventEmitter<string>(); | ||
@Input() componentContent: ComponentContent; | ||
@Output() promptChangedEvent = new EventEmitter<string>(); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/animation/animation-authoring/animation-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ents/audioOscillator/audio-oscillator-authoring/audio-oscillator-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ts/wise5/components/conceptMap/concept-map-authoring/concept-map-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ponents/dialogGuidance/dialog-guidance-authoring/dialog-guidance-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sets/wise5/components/discussion/discussion-authoring/discussion-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/draw/draw-authoring/draw-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/graph/graph-authoring/graph-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/label/label-authoring/label-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/match/match-authoring/match-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ponents/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/peerChat/peer-chat-authoring/peer-chat-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mponents/showGroupWork/show-group-work-authoring/show-group-work-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../wise5/components/showMyWork/show-my-work-authoring/show-my-work-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/summary/summary-authoring/summary-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/assets/wise5/components/table/table-authoring/table-authoring.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters