UX Overhaul Part 2 (#3112)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-08-16 19:37:12 -05:00 committed by GitHub
parent 0247bc5012
commit 3d8aa2ad24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
192 changed files with 14808 additions and 1874 deletions

View file

@ -59,22 +59,25 @@ export class UtilityService {
* @param libraryType
* @param includeHash For comics only, includes a # which is used for numbering on cards
* @param includeSpace Add a space at the end of the string. if includeHash and includeSpace are true, only hash will be at the end.
* @param plural Pluralize word
* @returns
*/
formatChapterName(libraryType: LibraryType, includeHash: boolean = false, includeSpace: boolean = false) {
switch(libraryType) {
formatChapterName(libraryType: LibraryType, includeHash: boolean = false, includeSpace: boolean = false, plural: boolean = false) {
const extra = plural ? 's' : '';
switch(libraryType) {
case LibraryType.Book:
case LibraryType.LightNovel:
return this.translocoService.translate('common.book-num') + (includeSpace ? ' ' : '');
return this.translocoService.translate('common.book-num' + extra) + (includeSpace ? ' ' : '');
case LibraryType.Comic:
case LibraryType.ComicVine:
if (includeHash) {
return this.translocoService.translate('common.issue-hash-num');
}
return this.translocoService.translate('common.issue-num') + (includeSpace ? ' ' : '');
return this.translocoService.translate('common.issue-num' + extra) + (includeSpace ? ' ' : '');
case LibraryType.Images:
case LibraryType.Manga:
return this.translocoService.translate('common.chapter-num') + (includeSpace ? ' ' : '');
return this.translocoService.translate('common.chapter-num' + extra) + (includeSpace ? ' ' : '');
}
}