Skip to content

Commit

Permalink
fix: try fix build error on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Aug 12, 2024
1 parent 5ada8cb commit 4fa48a2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions electron-app/ecoindex-app/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"Upgrade": "Upgrade",
"Url(s) Measure (Simple mode)": "Url(s) Measure (Simple mode)",
"Version de l'application": "Version de l'application",
"Version of the application": "Version of the application",
"View": "View",
"You can change the application language in the menu, Language.": "Vous pouvez changer la langue de l'application dans le menu, Language.",
"You have an error but you think it's a bug. Report to the developper by clicking the button (datas are saved to your clipboard) and send theim by mail to ": "You have an error but you think it's a bug. Report to the developper by clicking the button (datas are saved to your clipboard) and send theim by mail to ",
Expand Down
1 change: 1 addition & 0 deletions electron-app/ecoindex-app/src/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"Upgrade": "Mettre à jour",
"Url(s) Measure (Simple mode)": "Mesure d'URLs (mode simple)",
"Version de l'application": "Version de l'application",
"Version of the application": "Version de l'application",
"View": "Affichage",
"You can change the application language in the menu, Language.": "Vous pouvez modifier la langue de l'application dans le menu Language.",
"You have an error but you think it's a bug. Report to the developper by clicking the button (datas are saved to your clipboard) and send theim by mail to ": "Vous avez une erreur mais vous pensez qu'il s'agit d'un bogue. Signalez-le au développeur en cliquant sur le bouton (les données sont enregistrées dans votre presse-papiers) et envoyez-le par courrier à ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { version } from 'react'
// 3. Update if necessay

/**
* Check is Mandatory is installed on host.
* Check if LighthousePluginEcoindex (Mandatory) is installed on host.
* @param _event IpcMainEvent | IpcMainInvokeEvent
* @returns boolean
*/
Expand Down
6 changes: 0 additions & 6 deletions electron-app/ecoindex-app/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,14 @@ import Updater from './Updater'
import fixPath from 'fix-path'
import { handleGetNodeVersion } from './handlers/HandleGetNodeVersion'
import { handleHomeDir } from './handlers/HandleHomeDir'
import { handleInstallPuppeteerBrowser } from './handlers/PuppeteerBrowserInstall'
import { handleInstallSudoPuppeteerBrowser } from './handlers/SudoPuppeteerBrowserInstall'
import { handleIsJsonConfigFileExist } from './handlers/HandleIsJsonConfigFileExist'
import { handleJsonReadAndReload } from './handlers/HandleJsonReadAndReload'
import { handleNodeInstalled } from './handlers/HandleGetNodeDir_NpmDir'
import { handlePluginInstalled } from './handlers/HandlePluginInstalled'
import { handleSelectFolder } from './handlers/HandleSelectFolder'
import { handleWorkDir } from './handlers/HandleWorkDir'
import { handle_CMD_Actions } from './handlers/HandleCMDActions'
import i18n from '../configs/i18next.config'
import { isAdmin } from './handlers/IsAdminOnHost'
import { isLighthousePluginEcoindexInstalled } from './handlers/IsLighthousePluginEcoindexInstalled'
import { isLighthousePluginEcoindexInstalled_old } from './handlers/isLighthousePluginEcoindexInstalled_old'
import { isLighthousePluginEcoindexMustBeInstallOrUpdated } from './handlers/IsLighthousePluginEcoindexMustBeInstallOrUpdated'
import { isPupperteerBrowserInstalled } from './handlers/IsPuppeteerBrowserInstalled'
import log from 'electron-log/main'
import os from 'os'
Expand Down
2 changes: 1 addition & 1 deletion electron-app/ecoindex-app/src/renderer/HelloWindow/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function HelloApp() {
</Button>
</div>
<div className="prose prose-sm text-center font-semibold dark:prose-invert">
{t("Version de l'application")}: {pkg.version}
{t('Version of the application')}: {pkg.version}
</div>
</div>
)
Expand Down
21 changes: 10 additions & 11 deletions electron-app/ecoindex-app/src/renderer/MainWindow/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { SimplePanMesure } from '../components/simple-pan'
import { SimpleTooltip } from '../components/simple-tooltip'
import { TabsContent } from '@radix-ui/react-tabs'
import { TypographyP } from '../ui/typography/TypographyP'
import { getMainWindow } from '@/shared/memory'
import i18nResources from '../../configs/i18nResources'
import log from 'electron-log/renderer'
import packageJson from '../../../package.json'
Expand All @@ -34,7 +33,7 @@ import { useTranslation } from 'react-i18next'
const frontLog = log.scope('front/App')

function TheApp() {
const [language, setLanguage] = useState('en')
// const [language, setLanguage] = useState('en')
const [progress, setProgress] = useState(0)
const [isJsonFromDisk, setIsJsonFromDisk] = useState(false)
const [nodeVersion, setNodeVersion] = useState('')
Expand Down Expand Up @@ -500,14 +499,14 @@ function TheApp() {
/**
* Detect language change.
*/
useEffect(() => {
// window.languageChange.language((value) => {
// setLanguage(value)
// })
// useEffect(() => {
// // window.languageChange.language((value) => {
// // setLanguage(value)
// // })

// i18next.changeLanguage(language)
frontLog.debug('language', language)
}, [language])
// // i18next.changeLanguage(language)
// frontLog.debug('language', language)
// }, [language])

/**
* Display information in log and check if App is ready.
Expand Down Expand Up @@ -757,7 +756,7 @@ function TheApp() {
<TabsContent value="simple-mesure">
<SimplePanMesure
appReady={appReady}
language={language}
language={i18nResources.language}
simpleMesures={runSimpleMesures}
urlsList={urlsList}
setUrlsList={setUrlsList}
Expand All @@ -768,7 +767,7 @@ function TheApp() {
<JsonPanMesure
appReady={appReady}
isJsonFromDisk={isJsonFromDisk}
language={language}
language={i18nResources.language}
jsonDatas={jsonDatas}
setJsonDatas={setJsonDatas}
mesure={() =>
Expand Down

0 comments on commit 4fa48a2

Please sign in to comment.