fix: use rtlLocales exported from crowdin

pull/3205/head
Audric Ackermann 7 months ago
parent d1f527d573
commit c3436a07c6
No known key found for this signature in database

@ -5,4 +5,4 @@ export enum LOCALE_DEFAULTS {
oxen_foundation = 'Oxen Foundation',
}
export const rtlLocales = ['ar', 'fa', 'he', 'ps', 'ur'] as const;
export const rtlLocales = ['ar', 'fa', 'he', 'ps', 'ur'] ;

@ -30,6 +30,7 @@ import { Registration } from '../util/registration';
import { Storage, isSignInByLinking } from '../util/storage';
import { getOppositeTheme, isThemeMismatched } from '../util/theme';
import { getLocale } from '../util/i18n/shared';
import { rtlLocales } from '../localization/constants';
// Globally disable drag and drop
document.body.addEventListener(
@ -291,8 +292,6 @@ async function start() {
});
function switchBodyToRtlIfNeeded() {
const rtlLocales = ['fa', 'ar', 'he'];
const loc = getLocale();
if (rtlLocales.includes(loc) && !document.getElementById('body')?.classList.contains('rtl')) {
document.getElementById('body')?.classList.add('rtl');

Loading…
Cancel
Save