[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:
@@ -8,6 +8,8 @@ import {Notification, shell} from 'electron';
|
||||
import {PLAY_SOUND} from 'common/communication';
|
||||
import {TAB_MESSAGING} from 'common/tabs/TabView';
|
||||
|
||||
import {localizeMessage} from 'main/i18nManager';
|
||||
|
||||
import WindowManager from '../windows/windowManager';
|
||||
|
||||
import {displayMention, displayDownloadCompleted, currentNotifications} from './index';
|
||||
@@ -58,6 +60,10 @@ jest.mock('../windows/windowManager', () => ({
|
||||
switchTab: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('main/i18nManager', () => ({
|
||||
localizeMessage: jest.fn(),
|
||||
}));
|
||||
|
||||
describe('main/notifications', () => {
|
||||
describe('displayMention', () => {
|
||||
beforeEach(() => {
|
||||
@@ -152,6 +158,7 @@ describe('main/notifications', () => {
|
||||
|
||||
describe('displayDownloadCompleted', () => {
|
||||
it('should open file when clicked', () => {
|
||||
localizeMessage.mockReturnValue('test_filename');
|
||||
displayDownloadCompleted(
|
||||
'test_filename',
|
||||
'/path/to/file',
|
||||
|
Reference in New Issue
Block a user