Refactor welcome modal and sections to use translation context

- Replaced variable-based message retrieval with translation context in Welcome.jsx, Final.jsx, ImportSettings.jsx, Intro.jsx, PrivacyOptions.jsx, StyleSelection.jsx, and ThemeSelection.jsx components.
- Updated button texts and section titles to utilize the new translation method for better localization support.
- Cleaned up unused imports and improved code readability by removing unnecessary else statements in deepLinking.js and load.js.
- Ensured all localization files end with a newline for consistency.
This commit is contained in:
alexsparkes
2026-02-04 19:33:39 +00:00
parent 6044b02749
commit 1c7fe206af
118 changed files with 955 additions and 1142 deletions

View File

@@ -1,3 +1,4 @@
import { useT } from 'contexts';
import variables from 'config/variables';
import { useState, useEffect, useRef } from 'react';
@@ -7,6 +8,7 @@ import EventBus from 'utils/eventbus';
import './date.scss';
const DateWidget = () => {
const t = useT();
const [date, setDate] = useState('');
const [weekNumber, setWeekNumber] = useState(null);
const [display, setDisplay] = useState('block');
@@ -29,7 +31,7 @@ const DateWidget = () => {
dateToday.setMonth(0, 1 + ((4 - dateToday.getDay() + 7) % 7));
}
const weekLabel = variables.getMessage('widgets.date.week');
const weekLabel = t('widgets.date.week');
const weekNum = 1 + Math.ceil((firstThursday - dateToday) / 604800000);
const weekText = weekLabel.includes('{number}')
? weekLabel.replace('{number}', weekNum)