-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
added settings for language control #101
Conversation
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.
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.
String keys are confusing, can you rename it to its English equivalent, like this:
{
"Previous page": "Previous page",
"Next page": "Next page",
....
}
I'm using atom
so there is tool to replace all strings in the project in case you need something like that.
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.
src/components/toolbar/select.js
Outdated
<label style={{ marginTop: '5px', marginRight: '5px' }}> | ||
<Icon path={icon} size={'22px'} className={'villain-icon'} /> | ||
</label> | ||
<select onClick={this.handleClick}> |
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 there's a label missing for this input. That makes it hard for people using screen readers or voice control to use the input.
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.
Added label as icon.
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.
it needs a for
attribute or you can just wrap the select component inside the label.
I think better to just wrap it ^^
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.
Wrapped under label tag. Also i have capitalized locale code for better visibility.
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.
Just a small change on the select component: #101 (comment)
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.
👏 You fixed the issue(s)! Great work.
@sprakash57 Nice great contribution, probably I'll end up removing the select component from the toolbar itself, because there is no more space on the toolbar. see: #13 #34 |
@sprakash57 Does the auto language detection works ? |
|
@@ -75,7 +75,7 @@ class ZoomControls extends Component { | |||
<Button | |||
type={'icon'} | |||
icon={mdiMinus} | |||
tooltip={messages['zoom.out']} | |||
tooltip={messages['Zoom out']} |
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.
this should use the new Localize
implementation
@@ -66,7 +66,7 @@ class ZoomControls extends Component { | |||
<React.Fragment> | |||
<Button | |||
type={'icon'} | |||
tooltip={messages['zoom.in']} | |||
tooltip={messages['Zoom in']} |
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.
this should use the new Localize
implementation
src/context.js
Outdated
@@ -23,6 +24,7 @@ const defaultState = { | |||
fullscreen: false, | |||
showControls: false, | |||
autoHideControls: false, | |||
changeLang: Localization.getLanguage(), |
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.
this should use localization.getInterfaceLanguage()
also rename to language
@@ -68,6 +70,11 @@ export class ReaderProvider extends Component { | |||
})) | |||
} | |||
|
|||
toggleLang = lang => { |
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.
rename to toggleLanguage
for readability
@sprakash57 Can you add language |
can you fix the conflicts ? |
PR Checklist
Please check all that apply to this PR using "x":
PR Type
What kind of change does this PR introduce?
Fixes
Issue Number: #76 #92
What is the current behavior?
What is the new behavior?
Other information