[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:
@@ -122,3 +122,7 @@ export const RELOAD_CURRENT_VIEW = 'reload-current-view';
|
||||
|
||||
export const PING_DOMAIN = 'ping-domain';
|
||||
export const PING_DOMAIN_RESPONSE = 'ping-domain-response';
|
||||
|
||||
export const GET_LANGUAGE_INFORMATION = 'get-language-information';
|
||||
export const RETRIEVED_LANGUAGE_INFORMATION = 'retrieved-language-information';
|
||||
export const GET_AVAILABLE_LANGUAGES = 'get-available-languages';
|
||||
|
@@ -328,6 +328,10 @@ export class Config extends EventEmitter {
|
||||
return this.combinedData?.autoCheckForUpdates;
|
||||
}
|
||||
|
||||
get appLanguage() {
|
||||
return this.combinedData?.appLanguage;
|
||||
}
|
||||
|
||||
// initialization/processing methods
|
||||
|
||||
/**
|
||||
|
@@ -6,5 +6,5 @@ export const BASIC_AUTH_PERMISSION = 'canBasicAuth';
|
||||
|
||||
// Permission descriptions
|
||||
export const PERMISSION_DESCRIPTION = {
|
||||
[BASIC_AUTH_PERMISSION]: 'Web Authentication',
|
||||
[BASIC_AUTH_PERMISSION]: 'common.permissions.canBasicAuth',
|
||||
};
|
||||
|
@@ -59,10 +59,6 @@ export function getServerView(srv: MattermostServer, tab: Tab) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getTabViewName(serverName: string, tabType: string) {
|
||||
return `${serverName}___${tabType}`;
|
||||
}
|
||||
|
||||
export function getTabDisplayName(tabType: TabType) {
|
||||
switch (tabType) {
|
||||
case TAB_MESSAGING:
|
||||
@@ -76,6 +72,10 @@ export function getTabDisplayName(tabType: TabType) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getTabViewName(serverName: string, tabType: string) {
|
||||
return `${serverName}___${tabType}`;
|
||||
}
|
||||
|
||||
export function canCloseTab(tabType: TabType) {
|
||||
return tabType !== TAB_MESSAGING;
|
||||
}
|
||||
|
@@ -60,6 +60,10 @@ function isVersionGreaterThanOrEqualTo(currentVersion: string, compareVersion: s
|
||||
return true;
|
||||
}
|
||||
|
||||
export function t(s: string) {
|
||||
return s;
|
||||
}
|
||||
|
||||
export default {
|
||||
getDisplayBoundaries,
|
||||
runMode,
|
||||
|
Reference in New Issue
Block a user