Branching scenario: Make text translatable in editor

Description

All text is currently hardcoded in the branching scenario editor and need to be added to a language pack.

For example look at h5p-editor-three-image.

Context can be used to get the text as seen there. If a file is a functional component, don’t introduce context to it, but send the text in as a prop.

Acceptance Criteria

None

Activity

Show:
Hanna Eide Solstad
January 27, 2021, 10:35 AM

Great adding all that text to the language file. I did however find more missing translations as linked to below. Please fix all this as well as my comments on the commit.

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/content-type-editor/BranchingOptions.js#L58

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/content-type-editor/BranchingOptions.js#L128

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/preview/PreviewInfoPopup.js#L17

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Canvas.js#L1418

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Canvas.js#L1430

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Canvas.js#L1442

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Canvas.js#L1522

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/ContentTypeMenu.js#L208

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/ContentTypeMenu.js#L233

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/ContentTypeMenu.js#L236

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/QuickInfoMenu.js#L58

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/SubMenu.js#L16

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/TabViewSettings.js#L153

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Toolbar.js#L160

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Toolbar.js#L170

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/Toolbar.js#L187

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/editor.js#L63

  • All tour massages inside editor.js

  • The whole render function in editor.js

  •  

Remove TODO:

https://github.com/h5p/h5p-editor-branching-scenario/blob/32584aa53e32c8ac23863c933d85c53679c089df/src/scripts/components/ContentTypeMenu.js#L13

Could you change the name of the helpers file to something more descriptive?

Hanna Eide Solstad
January 27, 2021, 7:24 PM

Looks like all text is added now. Very good. I still see the todo here https://github.com/h5p/h5p-editor-branching-scenario/blob/5a5252e06acefe34c1e8f70036abc98a580370a4/src/scripts/components/ContentTypeMenu.js#L13 and that the tooltipScoringOptions has html tags in it.

Done

Assignee

Simon Date

Reporter

Hanna Eide Solstad

Labels

Funding

None

Code reviewer

Hanna Eide Solstad

Released

None

Time tracking

0m

Time remaining

0m

Sprint

None

Priority

Medium