Skip to content

Commit

Permalink
refactor(front): sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Oct 21, 2024
1 parent a732d1c commit 9850aad
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Checkbox, FormControlLabel, Box, Tooltip } from '@mui/material';
import { Box, Checkbox, FormControlLabel, Tooltip } from '@mui/material';
import { Controller, useFormContext } from 'react-hook-form';

import { STORAGE } from '@/lib/storage';

import type { FormProps } from './';
import type { FormProps } from './ConvertForm';
import type { ReactNode } from 'react';

type PickBooleans<T> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { TextField, Grid2 as Grid } from '@mui/material';
import { Grid2 as Grid, TextField } from '@mui/material';
import { Controller, useFormContext } from 'react-hook-form';

import { setPathToStorage } from './ConvertForm';

import type { FormProps } from './';
import type { FormProps } from './ConvertForm';
import type { ReactNode } from 'react';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { TextField, Grid2 as Grid, type TextFieldProps } from '@mui/material';
import { Grid2 as Grid, TextField, type TextFieldProps } from '@mui/material';
import { Controller, useFormContext } from 'react-hook-form';

import { SelectPathButton } from '@/components/molecules/SelectPathButton';
import { getParent } from '@/lib/path';
import { STORAGE } from '@/lib/storage';

import { type PathFormKeys, setPathToStorage, type FormProps } from './ConvertForm';
import { type FormProps, type PathFormKeys, setPathToStorage } from './ConvertForm';

import type { ReactNode } from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const RemoveOarButton = () => {
return (
<ButtonWithToolTip
buttonName={t('remove-oar-btn')}
onClick={handleClick}
icon={loading ? <CircularProgressWithLabel value={progress} /> : <DeleteIcon />}
onClick={handleClick}
tooltipTitle={<p>{t('remove-oar-tooltip')}</p>}
variant='contained'
/>
Expand Down
2 changes: 1 addition & 1 deletion gui/frontend/src/lib/path/parseDarPath.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect } from 'vitest';
import { describe, expect, it } from 'vitest';

import { parseDarPath } from './parseDarPath';

Expand Down
19 changes: 11 additions & 8 deletions test/sample_scripts/custom_translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// clearCustomTranslation();

function setCustomTranslation() {
/** ref: https://github.com/SARDONYX-sard/dar-to-oar/blob/0.8.1/locales/en-US.json */
/** ref: https://github.com/SARDONYX-sard/dar-to-oar/blob/0.9.0/locales/en-US.json */
const i18n = {
'all-clear-btn': 'All Clear',
'backup-dialog-all-checked-label': 'Check all',
Expand All @@ -31,7 +31,7 @@
'convert-form-author-name-helper': '[Optional]',
'convert-form-author-placeholder': 'Name',
'convert-form-dar-helper': '[Required] Path of dir containing "DynamicAnimationReplacer".',
'convert-form-dar-helper2': '"C:\\[...]/Mod Name/" -> Convert 1st & 3rd person',
'convert-form-dar-helper2': '"C:/[...]/Mod Name/" -> Convert 1st & 3rd person',
'convert-form-dar-helper3': '"[...]/animations/DynamicAnimationReplacer" -> Convert 3rd person',
'convert-form-dar-label': 'DAR(source) Directory',
'convert-form-mapping-1st-label': 'Mapping Table Path(For _1st_person)',
Expand Down Expand Up @@ -68,6 +68,9 @@
'import-lang-btn': 'Import Language',
'import-lang-tooltip': 'Import any language from a Json file. (automatically reloads for validation).',
'import-lang-tooltip2': 'Note: For invalid Json, fall back to English. (See Wiki for how to write Json)',
'infer-btn': 'Infer',
'infer-btn-tooltip':
'Infer OAR and ModName from DAR (input). (Even if each item is not entered without this function, it is inferred to some extent on the back-end side.)',
'lang-preset-auto': 'Auto',
'lang-preset-custom': 'Custom',
'lang-preset-label': 'Language',
Expand All @@ -89,19 +92,19 @@
'open-log-dir-btn': 'Log(dir)',
'open-log-dir-tooltip': 'Open the log storage location.',
'open-log-tooltip': 'Open current log file.(Rotate to a new log file each time the application is launched.)',
'progress-btn': 'ProgressBar',
'progress-btn-tooltip': 'Display detail progress',
'progress-btn-tooltip2': '',
'progress-btn': 'Progress',
'progress-btn-tooltip': 'Let the back-end report detailed progress.',
'progress-btn-tooltip2': '(conversion may be slightly slower)',
'remove-oar-btn': 'Remove OAR',
'remove-oar-failed': 'Not found "OpenAnimationReplacer" directory',
'remove-oar-specify-error': 'DAR or OAR dir must be specified.',
'remove-oar-success': 'Removed OAR directory.',
'remove-oar-tooltip':
'Find and delete OAR dir from "OAR(destination) Directory"(or "DAR(source) Directory*" if not specified).',
'run-parallel-btn-tooltip': 'Use multi-threading.',
'run-parallel-btn-tooltip': 'Attempt file-by-file parallel conversion.',
'run-parallel-btn-tooltip2':
'Note: More than twice the processing speed can be expected, but the concurrent processing results in thread termination timings being out of order, so log writes will be out of order as well, greatly reducing readability of the logs.',
'run-parallel-label': 'Run Parallel',
'Pros: extremely fast conversion / Cons: entries in logs are out of order and difficult to read',
'run-parallel-label': 'Parallel',
'select-btn': 'Select',
'tab-label-backup': 'Backup',
'tab-label-editor': 'Editor / Preset',
Expand Down

0 comments on commit 9850aad

Please sign in to comment.