mirror of
https://github.com/mue/mue.git
synced 2026-07-17 05:54:14 +02:00
feat(Language): add locale formatting option and update translations
This commit is contained in:
@@ -4,7 +4,7 @@ import { useT, useTranslation } from 'contexts/TranslationContext';
|
||||
import { MdOutlineOpenInNew, MdSearch, MdComputer } from 'react-icons/md';
|
||||
import { TextField, InputAdornment } from '@mui/material';
|
||||
|
||||
import { Radio } from 'components/Form/Settings';
|
||||
import { Radio, Checkbox } from 'components/Form/Settings';
|
||||
|
||||
import languages from '@/i18n/languages.json';
|
||||
|
||||
@@ -100,6 +100,13 @@ const LanguageOptions = () => {
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ marginBottom: '16px' }}>
|
||||
<Checkbox
|
||||
name="localeFormatting"
|
||||
text={t('modals.main.settings.sections.language.locale_formatting')}
|
||||
category="other"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 16 }}>
|
||||
<TextField
|
||||
placeholder={t('modals.main.settings.sections.language.search')}
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Header, CustomActions } from 'components/Layout/Settings';
|
||||
import { ClearModal } from './ClearModal';
|
||||
|
||||
import { saveFile } from 'utils/saveFile';
|
||||
import { formatNumber } from 'utils/formatNumber';
|
||||
import variables from 'config/variables';
|
||||
import {
|
||||
getLocalisedAchievementData,
|
||||
@@ -82,7 +83,7 @@ const Stats = () => {
|
||||
const StatsElement = ({ title, value }) => (
|
||||
<div>
|
||||
<span className="subtitle">{title}</span>
|
||||
<span>{value}</span>
|
||||
<span>{formatNumber(value)}</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
|
||||
import { convertTimezone } from 'utils/date';
|
||||
import { formatPercentage } from 'utils/formatNumber';
|
||||
import { AnalogClock } from './components/AnalogClock';
|
||||
import { VerticalClock } from './components/VerticalClock';
|
||||
import EventBus from 'utils/eventbus';
|
||||
@@ -33,7 +34,7 @@ const Clock = () => {
|
||||
|
||||
switch (localStorage.getItem('timeType')) {
|
||||
case 'percentageComplete':
|
||||
setTime((now.getHours() / 24).toFixed(2).replace('0.', '') + '%');
|
||||
setTime(formatPercentage(now.getHours() / 24));
|
||||
setAmpm('');
|
||||
break;
|
||||
case 'analogue':
|
||||
|
||||
Reference in New Issue
Block a user