From 149bc8ad0d0b62fe1bb760d29c24b5fd277e817d Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:51:27 +0200 Subject: [PATCH] Remove duplicated i18n strings --- public/locales/en.json | 7 ++----- src/components/MigrateDialog.tsx | 2 +- src/components/chapter/ChapterCard.tsx | 2 +- src/components/chapter/ChapterList.tsx | 4 ++-- src/components/manga/MangaDetails.tsx | 2 +- src/components/settings/downloads/DownloadAheadSetting.tsx | 2 +- src/screens/Browse.tsx | 4 ++-- src/screens/Manga.tsx | 2 +- src/screens/SourceMangas.tsx | 2 +- src/screens/settings/Backup.tsx | 4 ++-- src/screens/settings/BrowseSettings.tsx | 2 +- src/screens/settings/DownloadSettings.tsx | 2 +- 12 files changed, 16 insertions(+), 19 deletions(-) diff --git a/public/locales/en.json b/public/locales/en.json index 31829887..612d2cc1 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -149,7 +149,6 @@ "downloaded": "Downloaded" } }, - "title": "Chapter", "title_one": "Chapter", "title_other": "Chapters" }, @@ -295,7 +294,8 @@ "updating": "Updating" } }, - "title": "Extensions" + "title_one": "Extension", + "title_other": "Extensions" }, "global": { "button": { @@ -339,7 +339,6 @@ }, "date": { "label": { - "day": "Day", "day_one": "Day", "day_other": "Days", "today": "Today", @@ -701,7 +700,6 @@ "reload_from_source": "Reload data from source", "status": "Status" }, - "title": "Manga", "title_one": "Manga", "title_other": "Manga" }, @@ -1155,7 +1153,6 @@ }, "title": "Local source" }, - "title": "Source", "title_one": "Source", "title_other": "Sources" }, diff --git a/src/components/MigrateDialog.tsx b/src/components/MigrateDialog.tsx index e5ff09df..2375552b 100644 --- a/src/components/MigrateDialog.tsx +++ b/src/components/MigrateDialog.tsx @@ -75,7 +75,7 @@ export const MigrateDialog = ({ mangaIdToMigrateTo, onClose }: { mangaIdToMigrat setMigrationFlag('migrateChapters', checked)} /> diff --git a/src/components/chapter/ChapterCard.tsx b/src/components/chapter/ChapterCard.tsx index 56ce558c..3be182ff 100644 --- a/src/components/chapter/ChapterCard.tsx +++ b/src/components/chapter/ChapterCard.tsx @@ -113,7 +113,7 @@ export const ChapterCard: React.FC = (props: IProps) => { {chapter.isBookmarked && } {showChapterNumber - ? `${t('chapter.title')} ${chapter.chapterNumber}` + ? `${t('chapter.title_one')} ${chapter.chapterNumber}` : chapter.name} diff --git a/src/components/chapter/ChapterList.tsx b/src/components/chapter/ChapterList.tsx index 31d4c033..5191e587 100644 --- a/src/components/chapter/ChapterList.tsx +++ b/src/components/chapter/ChapterList.tsx @@ -123,7 +123,7 @@ export const ChapterList: React.FC = ({ manga, isRefreshing }) => { if (selectedChapters.length) { return ( - + {(handleClose) => ( )} @@ -163,7 +163,7 @@ export const ChapterList: React.FC = ({ manga, isRefreshing }) => { - {`${visibleChapters.length} ${t('chapter.title', { + {`${visibleChapters.length} ${t('chapter.title_one', { count: visibleChapters.length, })}`} diff --git a/src/components/manga/MangaDetails.tsx b/src/components/manga/MangaDetails.tsx index 7036b938..7fa35f75 100644 --- a/src/components/manga/MangaDetails.tsx +++ b/src/components/manga/MangaDetails.tsx @@ -211,7 +211,7 @@ export const MangaDetails: React.FC = ({ manga }) => { - + diff --git a/src/components/settings/downloads/DownloadAheadSetting.tsx b/src/components/settings/downloads/DownloadAheadSetting.tsx index 1b9e31d5..a2c7f521 100644 --- a/src/components/settings/downloads/DownloadAheadSetting.tsx +++ b/src/components/settings/downloads/DownloadAheadSetting.tsx @@ -67,7 +67,7 @@ export const DownloadAheadSetting = ({ showSlider dialogDescription={t('download.settings.download_ahead.label.description')} dialogDisclaimer={t('download.settings.download_ahead.label.disclaimer')} - valueUnit={t('chapter.title')} + valueUnit={t('chapter.title_one')} handleUpdate={updateSetting} disabled={!shouldDownloadAhead} /> diff --git a/src/screens/Browse.tsx b/src/screens/Browse.tsx index bb4ced65..b27253a4 100644 --- a/src/screens/Browse.tsx +++ b/src/screens/Browse.tsx @@ -30,8 +30,8 @@ export function Browse() { return ( setTabNum(newTab)}> - - + + diff --git a/src/screens/Manga.tsx b/src/screens/Manga.tsx index 1329d82a..61d16906 100644 --- a/src/screens/Manga.tsx +++ b/src/screens/Manga.tsx @@ -51,7 +51,7 @@ export const Manga: React.FC = () => { }, [manga]); useEffect(() => { - setTitle(manga?.title ?? t('manga.title')); + setTitle(manga?.title ?? t('manga.title_one')); setAction(null); return () => { diff --git a/src/screens/SourceMangas.tsx b/src/screens/SourceMangas.tsx index 69360ef2..59afdeda 100644 --- a/src/screens/SourceMangas.tsx +++ b/src/screens/SourceMangas.tsx @@ -410,7 +410,7 @@ export function SourceMangas() { ); useEffect(() => { - setTitle(source?.displayName ?? t('source.title')); + setTitle(source?.displayName ?? t('source.title_one')); setAction( <> diff --git a/src/screens/settings/Backup.tsx b/src/screens/settings/Backup.tsx index 113c709a..9888aba4 100644 --- a/src/screens/settings/Backup.tsx +++ b/src/screens/settings/Backup.tsx @@ -293,7 +293,7 @@ export function Backup() { minValue={1} maxValue={31} stepSize={1} - valueUnit={t('global.date.label.day')} + valueUnit={t('global.date.label.day_one')} showSlider handleUpdate={(interval: number) => updateSetting('backupInterval', interval)} /> @@ -305,7 +305,7 @@ export function Backup() { minValue={0} maxValue={1000} stepSize={1} - valueUnit={t('global.date.label.day')} + valueUnit={t('global.date.label.day_one')} showSlider handleUpdate={(ttl: number) => updateSetting('backupTTL', ttl)} /> diff --git a/src/screens/settings/BrowseSettings.tsx b/src/screens/settings/BrowseSettings.tsx index c4b3f90e..79194c60 100644 --- a/src/screens/settings/BrowseSettings.tsx +++ b/src/screens/settings/BrowseSettings.tsx @@ -102,7 +102,7 @@ export const BrowseSettings = () => { value: serverSettings.maxSourcesInParallel, count: serverSettings.maxSourcesInParallel, })} - valueUnit={t('source.title')} + valueUnit={t('source.title_one')} value={serverSettings.maxSourcesInParallel} defaultValue={6} minValue={1} diff --git a/src/screens/settings/DownloadSettings.tsx b/src/screens/settings/DownloadSettings.tsx index b7e2f125..1e9b62a8 100644 --- a/src/screens/settings/DownloadSettings.tsx +++ b/src/screens/settings/DownloadSettings.tsx @@ -197,7 +197,7 @@ export const DownloadSettings = () => { minValue={0} maxValue={20} showSlider - valueUnit={t('chapter.title')} + valueUnit={t('chapter.title_one')} handleUpdate={(autoDownloadNewChaptersLimit) => updateSetting('autoDownloadNewChaptersLimit', autoDownloadNewChaptersLimit) }