Skip to content
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

crude i18n support #2539

Merged
merged 3 commits into from
Jun 12, 2019
Merged

crude i18n support #2539

merged 3 commits into from
Jun 12, 2019

Conversation

kauffj
Copy link
Member

@kauffj kauffj commented Jun 7, 2019

This adds a basic language selector, stores the language setting, refreshes the UI on change, and adds the first polish language file.

Much of this should be improved for multiple language support and so there is a better ongoing workflow, but this should help @Madiator2011 continue his work (@jsigwart).

@kauffj kauffj requested a review from neb-b June 7, 2019 21:12
@lbry-bot lbry-bot assigned neb-b and unassigned kauffj Jun 7, 2019
<Header />
<SideBar />
<Header language={language} />
<SideBar language={language} />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanyesmunt I did this to trigger re-renders when the language changes. Is this the proper way to do this [given the __ function is not a React component]?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this moment menu not work :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodxana it should now

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on the standup, but I would move these to {header, sideBar}/index.js

theme: string,
updateBlockHeight: () => void,
toggleEnhancedLayout: () => void,
enhancedLayout: boolean,
};

class App extends React.PureComponent<Props> {
componentWillMount() {
// eslint-disable-next-line
UNSAFE_componentWillMount() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed to componentDidMount

@lbry-bot lbry-bot assigned kauffj and unassigned neb-b Jun 10, 2019
Copy link

@neb-b neb-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments

<Header />
<SideBar />
<Header language={language} />
<SideBar language={language} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on the standup, but I would move these to {header, sideBar}/index.js

@kauffj kauffj merged commit 7a77709 into master Jun 12, 2019
@lyoshenka lyoshenka deleted the language_setting branch August 5, 2019 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants