[MM-14058] Add support for i18n (#2190)
* Add language files * Add react-intl, mmjstool, setup for adding translations * Translated main module * Translations for renderer * A few minor fixes * More fixes * Add CI, add missing menu translations, other cleanup * Added setting to manually select the language of the app * Force English for E2e * Unit tests * Fix mmjstool * Move set language to before update menu * PR feedback
This commit is contained in:
@@ -7,6 +7,8 @@ import {app, nativeImage, Tray, systemPreferences, nativeTheme} from 'electron';
|
||||
|
||||
import {UPDATE_TRAY} from 'common/communication';
|
||||
|
||||
import {localizeMessage} from 'main/i18nManager';
|
||||
|
||||
import WindowManager from '../windows/windowManager';
|
||||
import * as AppState from '../appState';
|
||||
|
||||
@@ -95,11 +97,11 @@ export function setupTray(icontheme: string) {
|
||||
|
||||
AppState.on(UPDATE_TRAY, (anyExpired, anyMentions, anyUnreads) => {
|
||||
if (anyMentions) {
|
||||
setTray('mention', 'You have been mentioned');
|
||||
setTray('mention', localizeMessage('main.tray.tray.mention', 'You have been mentioned'));
|
||||
} else if (anyUnreads) {
|
||||
setTray('unread', 'You have unread channels');
|
||||
setTray('unread', localizeMessage('main.tray.tray.unread', 'You have unread channels'));
|
||||
} else if (anyExpired) {
|
||||
setTray('mention', 'Session Expired: Please sign in to continue receiving notifications.');
|
||||
setTray('mention', localizeMessage('main.tray.tray.expired', 'Session Expired: Please sign in to continue receiving notifications.'));
|
||||
} else {
|
||||
setTray('normal', app.name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user