Improve manga type detection internationalization

This commit is contained in:
schroda
2026-07-11 01:24:23 +02:00
parent 453e0959e8
commit beddcdb297
3 changed files with 89 additions and 16 deletions

View File

@@ -161,11 +161,60 @@ export const SOURCES_BY_MANGA_TYPE: Record<MangaType, string[]> = {
// @ts-ignore - see comment
// oxlint-disable-next-line no-unused-vars
const MANGA_TAG_DESCRIPTORS_BY_MANGA_TYPE: Record<MangaType, MessageDescriptor[]> = {
[MangaType.MANGA]: [msg`Manga`],
[MangaType.COMIC]: [msg`Comic`],
[MangaType.WEBTOON]: [msg`Webtoon`, msg`Long strip`],
[MangaType.MANHWA]: [msg`Manhwa`, msg`Long strip`],
[MangaType.MANHUA]: [msg`Manhua`, msg`Long strip`],
[MangaType.MANGA]: [
msg({
id: 'entry-type-detection-manga',
message: 'Manga',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
],
[MangaType.COMIC]: [
msg({
id: 'entry-type-detection-comic',
message: 'Comic',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
],
[MangaType.WEBTOON]: [
msg({
id: 'entry-type-detection-webtoon',
message: 'Webtoon',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
msg({
id: 'entry-type-detection-long-strip',
message: 'Long strip',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
],
[MangaType.MANHWA]: [
msg({
id: 'entry-type-detection-manhwa',
message: 'Manhwa',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
msg({
id: 'entry-type-detection-long-strip',
message: 'Long strip',
}),
],
[MangaType.MANHUA]: [
msg({
id: 'entry-type-detection-manhua',
message: 'Manhua',
comment:
'Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")',
}),
msg({
id: 'entry-type-detection-long-strip',
message: 'Long strip',
}),
],
};
/**

View File

@@ -915,8 +915,10 @@ msgstr "Color filter blend mode"
msgid "Comfortable grid"
msgstr "Comfortable grid"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "Comic"
msgid "entry-type-detection-comic"
msgstr "Comic"
#: src/base/components/GridLayouts.tsx
@@ -2344,8 +2346,10 @@ msgstr "Logged in"
msgid "Logging in to {trackerName}…"
msgstr "Logging in to {trackerName}…"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "Long strip"
msgid "entry-type-detection-long-strip"
msgstr "Long strip"
#: src/features/device/screens/DeviceSetting.tsx
@@ -2358,13 +2362,18 @@ msgstr ""
"UI specific settings that are stored on the server are per device.\n"
"This makes it possible to have e.g. different settings on a desktop and a smartphone"
#: src/features/manga/Manga.constants.ts
#: src/features/manga/screens/Manga.tsx
#: src/features/reader/settings/behaviour/components/ReaderSettingExitMode.tsx
#: src/features/tracker/Tracker.constants.ts
msgid "Manga"
msgstr "Manga"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "entry-type-detection-manga"
msgstr "Manga"
#: src/features/settings/screens/Appearance.tsx
msgid "Manga item width"
msgstr "Manga item width"
@@ -2373,16 +2382,26 @@ msgstr "Manga item width"
msgid "Manga thumbnail as background"
msgstr "Manga thumbnail as background"
#: src/features/manga/Manga.constants.ts
#: src/features/tracker/Tracker.constants.ts
msgid "Manhua"
msgstr "Manhua"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "entry-type-detection-manhua"
msgstr "Manhua"
#: src/features/tracker/Tracker.constants.ts
msgid "Manhwa"
msgstr "Manhwa"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "entry-type-detection-manhwa"
msgstr "Manhwa"
#: src/features/migration/MigrationManager.ts
msgid "Manual migration search for \"{title}\""
msgstr "Manual migration search for \"{title}\""
@@ -4096,11 +4115,16 @@ msgstr "Warning"
msgid "Weblate"
msgstr "Weblate"
#: src/features/manga/Manga.constants.ts
#: src/features/reader/settings/ReaderSettings.constants.tsx
msgid "Webtoon"
msgstr "Webtoon"
#. Used to detect the type of an entry by using it to check if the genre/tags of an entry includes this string. This is NOT shown to any user. Do NOT include any unnecessary text or characters, this will break the type detection (e.g. "MangaInMyLanguage (Manga)")
#. js-lingui-explicit-id
#: src/features/manga/Manga.constants.ts
msgid "entry-type-detection-webtoon"
msgstr "Webtoon"
#: src/features/settings/screens/About.tsx
#: src/features/settings/screens/Settings.tsx
#: src/features/settings/screens/WebUISettings.tsx