diff --git a/src/api/gramjs/methods/settings.ts b/src/api/gramjs/methods/settings.ts index 271ac19f0..6b852ba35 100644 --- a/src/api/gramjs/methods/settings.ts +++ b/src/api/gramjs/methods/settings.ts @@ -20,7 +20,7 @@ import { buildCollectionByKey } from '../../../util/iteratees'; import localDb from '../localDb'; const MAX_INT_32 = 2 ** 31 - 1; -const BETA_LANG_CODES = ['ar', 'fa']; +const BETA_LANG_CODES = ['ar', 'fa', 'id', 'ko', 'uz']; export function updateProfile({ firstName, diff --git a/src/components/left/main/LeftMainHeader.tsx b/src/components/left/main/LeftMainHeader.tsx index 182b78183..d5e4f004a 100644 --- a/src/components/left/main/LeftMainHeader.tsx +++ b/src/components/left/main/LeftMainHeader.tsx @@ -166,6 +166,10 @@ const LeftMainHeader: FC = ({ disableHistoryBack(); }; + const handleOpenTipsChat = () => { + openTipsChat({ langCode: lang.code }); + }; + const isSearchFocused = ( Boolean(globalSearchChatId) || content === LeftColumnContent.GlobalSearch @@ -235,7 +239,7 @@ const LeftMainHeader: FC = ({ {lang('TelegramFeatures')} diff --git a/src/components/left/settings/SettingsHeader.tsx b/src/components/left/settings/SettingsHeader.tsx index dbfc2d2fe..fe1bc0376 100644 --- a/src/components/left/settings/SettingsHeader.tsx +++ b/src/components/left/settings/SettingsHeader.tsx @@ -167,7 +167,7 @@ const SettingsHeader: FC = ({ positionX="right" > - Delete Folder + {lang('Delete')} )} @@ -228,16 +228,16 @@ const SettingsHeader: FC = ({ diff --git a/src/components/left/settings/SettingsPrivacyActiveSessions.tsx b/src/components/left/settings/SettingsPrivacyActiveSessions.tsx index 802be3135..48c839758 100644 --- a/src/components/left/settings/SettingsPrivacyActiveSessions.tsx +++ b/src/components/left/settings/SettingsPrivacyActiveSessions.tsx @@ -96,7 +96,9 @@ const SettingsPrivacyActiveSessions: FC = function renderOtherSessions(sessions: ApiSession[]) { return (
-

Other Sessions

+

+ {lang('OtherSessions')} +

{sessions.map(renderSession)}
diff --git a/src/config.ts b/src/config.ts index 5a2f9933f..753fad374 100644 --- a/src/config.ts +++ b/src/config.ts @@ -141,6 +141,7 @@ export const DEFAULT_LANG_CODE = 'en'; export const DEFAULT_LANG_PACK = 'android'; export const LANG_PACKS = ['android', 'ios', 'tdesktop', 'macos'] as const; export const TIPS_USERNAME = 'TelegramTips'; +export const LOCALIZED_TIPS = ['ar', 'pt-br', 'id', 'it', 'ko', 'ms', 'pl', 'es', 'tr']; export const FEEDBACK_URL = 'https://bugs.telegram.org/?tag_ids=41&sort=time'; export const LIGHT_THEME_BG_COLOR = '#A2AF8E'; export const DARK_THEME_BG_COLOR = '#0F0F0F'; diff --git a/src/modules/actions/api/chats.ts b/src/modules/actions/api/chats.ts index 03feb0ff0..0846dcba0 100644 --- a/src/modules/actions/api/chats.ts +++ b/src/modules/actions/api/chats.ts @@ -15,6 +15,7 @@ import { RE_TME_INVITE_LINK, RE_TME_LINK, TIPS_USERNAME, + LOCALIZED_TIPS, } from '../../../config'; import { callApi } from '../../../api/gramjs'; import { @@ -131,8 +132,14 @@ addReducer('openSupportChat', (global, actions) => { })(); }); -addReducer('openTipsChat', (global, actions) => { - actions.openChatByUsername({ username: TIPS_USERNAME }); +addReducer('openTipsChat', (global, actions, payload) => { + const { langCode } = payload; + + const usernamePostfix = langCode === 'pt-br' + ? 'BR' + : LOCALIZED_TIPS.includes(langCode) ? (langCode as string).toUpperCase() : ''; + + actions.openChatByUsername({ username: `${TIPS_USERNAME}${usernamePostfix}` }); }); addReducer('loadMoreChats', (global, actions, payload) => {