Skip to content

Commit

Permalink
chore: update i18n context name
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Aug 29, 2023
1 parent fb6cc24 commit b3c8a89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const pDefer = require('p-defer')
const logger = require('./common/logger')

/**
* @typedef { 'tray' | 'tray-menu-state' | 'tray.update-menu' | 'countlyDeviceId' | 'manualCheckForUpdates' | 'startIpfs' | 'stopIpfs' | 'restartIpfs' | 'getIpfsd' | 'launchWebUI' | 'webui' | 'splashScreen' | 'i18n_init_done' } ContextProperties
* @typedef { 'tray' | 'tray-menu-state' | 'tray.update-menu' | 'countlyDeviceId' | 'manualCheckForUpdates' | 'startIpfs' | 'stopIpfs' | 'restartIpfs' | 'getIpfsd' | 'launchWebUI' | 'webui' | 'splashScreen' | 'i18n.initDone' } ContextProperties
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = async function () {
}
})
logger.info('[i18n] init done')
ctx.setProp('i18n_init_done', true)
ctx.setProp('i18n.initDone', true)

ipcMain.on(ipcMainEvents.LANG_UPDATED, async (_, lang) => {
if (lang === store.get('language')) {
Expand Down
2 changes: 1 addition & 1 deletion src/tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function buildMenu () {
* we need to wait for i18n to be ready before we translate the tray menu
* @type {boolean}
*/
await ctx.getProp('i18n_init_done')
await ctx.getProp('i18n.initDone')

// @ts-expect-error
return Menu.buildFromTemplate([
Expand Down

0 comments on commit b3c8a89

Please sign in to comment.