Fix spelling of generateLangOptions
This commit is contained in:
parent
a73359094a
commit
dc546ddcb4
|
@ -1,13 +1,13 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import browser from "webextension-polyfill";
|
import browser from "webextension-polyfill";
|
||||||
import genelateLangOptions from "src/common/genelateLangOptions";
|
import generateLangOptions from "src/common/generateLangOptions";
|
||||||
import openUrl from "src/common/openUrl";
|
import openUrl from "src/common/openUrl";
|
||||||
import "../styles/Footer.scss";
|
import "../styles/Footer.scss";
|
||||||
|
|
||||||
export default class Footer extends Component {
|
export default class Footer extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.langList = genelateLangOptions();
|
this.langList = generateLangOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLinkClick = async () => {
|
handleLinkClick = async () => {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import browser from "webextension-polyfill";
|
import browser from "webextension-polyfill";
|
||||||
import genelateLangOptions from "src/common/genelateLangOptions";
|
import generateLangOptions from "src/common/generateLangOptions";
|
||||||
|
|
||||||
const getDefaultLangs = () => {
|
const getDefaultLangs = () => {
|
||||||
const uiLang = browser.i18n.getUILanguage();
|
const uiLang = browser.i18n.getUILanguage();
|
||||||
const langOptions = genelateLangOptions();
|
const langOptions = generateLangOptions();
|
||||||
|
|
||||||
const shouldUseUiLang = langOptions.some(lang => lang.value == uiLang);
|
const shouldUseUiLang = langOptions.some(lang => lang.value == uiLang);
|
||||||
const targetLang = shouldUseUiLang ? uiLang : "en";
|
const targetLang = shouldUseUiLang ? uiLang : "en";
|
||||||
|
@ -12,7 +12,7 @@ const getDefaultLangs = () => {
|
||||||
return { targetLang, secondTargetLang };
|
return { targetLang, secondTargetLang };
|
||||||
};
|
};
|
||||||
|
|
||||||
const langListOptions = genelateLangOptions();
|
const langListOptions = generateLangOptions();
|
||||||
const defaultLangs = getDefaultLangs();
|
const defaultLangs = getDefaultLangs();
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
|
Loading…
Reference in a new issue