-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localize simulator #2368
Localize simulator #2368
Conversation
localize combinational analysis prompt populate JSON with strings for combinationalAnalysis introdue banana-i18n in combinationalAnalysis
localize tooltip avoid duplication in embed.js and sequential/clock.js
modules testbench sequential correction in duplication of keys
theme names localization is not possible currently as they are json keys rendered on frontend this is because when theme is set it is stored into local storage now when user changes locale we will have json key in hindi but stored key will be in english varilable will hold undefined and application will break
ContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
); | ||
$("#clockProperty").append( | ||
`<div>Time: <input class='objectPropertyAttributeEmbed' min='50' type='number' style='width:48px' step='10' name='changeClockTime' value='${simulationArea.timePeriod}'></div>` | ||
`<div>${banana.i18n('embed-clock-property-time-period')} <input class='objectPropertyAttributeEmbed' min='50' type='number' style='width:48px' step='10' name='changeClockTime' value='${simulationArea.timePeriod}'></div>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
); | ||
$("#clockProperty").append( | ||
`<div>Clock: <label class='switch'> <input type='checkbox' ${ | ||
`<div>${banana.i18n('clock')} <label class='switch'> <input type='checkbox' ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
$('#moduleProperty-inner').append(`<p><span>${banana.i18n('ux-module-property-project')}:</span> <input id='projname' class='objectPropertyAttribute' type='text' autocomplete='off' name='setProjectName' value='${getProjectName() || banana.i18n('untitled')}'></p>`); | ||
$('#moduleProperty-inner').append(`<p><span>${banana.i18n('ux-module-property-circuit')}:</span> <input id='circname' class='objectPropertyAttribute' type='text' autocomplete='off' name='changeCircuitName' value='${globalScope.name || banana.i18n('untitled')}'></p>`); | ||
$('#moduleProperty-inner').append(`<p><span>${banana.i18n('ux-module-property-clock-time')}:</span> <input class='objectPropertyAttribute' min='50' type='number' style='width:100px' step='10' name='changeClockTime' value='${simulationArea.timePeriod}'></p>`); | ||
$('#moduleProperty-inner').append(`<p><span>${banana.i18n('ux-module-property-clock-enable')}:</span> <label class='switch'> <input type='checkbox' ${['', 'checked'][simulationArea.clockEnabled + 0]} class='objectPropertyAttributeChecked' name='changeClockEnable' > <span class='slider'></span></label></p>`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 2 locations. Consider refactoring.
Code Climate has analyzed commit 6e6f975 and detected 22 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
@Shivansh2407 @ShreyaPrasad1209 I would like to have your review and opinions for translations in this PR. also I would request you to test this PR locally and provide your opinions and suggestions for the same. Thanks in advance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
We can move this to vue-js simulator |
Localize simulator
This PR is general PR for review, code is merged in the codebase via separate PR's
Describe the changes you have made in this PR -
Rest of the strings belong to ERB template in Rails side, PR contains complete localization in JS side
Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.