Skip to content

Commit

Permalink
fix #1760 search for native names as well on languages page
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Weber committed Jan 18, 2019
1 parent 530ca8f commit b4f3a29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/src/components/pages/languages/languages.tsx
Expand Up @@ -173,6 +173,7 @@ class LanguagesPage extends React.PureComponent<Props, State> {
};

handleQueryChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const { getString } = this.props;
const { inProgress, launched, selectedSection } = this.state;
const query = event.target.value;

Expand All @@ -181,7 +182,10 @@ class LanguagesPage extends React.PureComponent<Props, State> {
? languages.filter(({ locale }: any) => {
const q = query.toLowerCase();
return (
locale.toLowerCase().includes(q) ||
locale.includes(q) ||
getString(locale)
.toLowerCase()
.includes(q) ||
(NATIVE_NAMES[locale] || '').toLowerCase().includes(q)
);
})
Expand Down

0 comments on commit b4f3a29

Please sign in to comment.