diff --git a/server/scripts/size-baseline.json b/server/scripts/size-baseline.json index a2f7abcd0..2c51dbcc1 100644 --- a/server/scripts/size-baseline.json +++ b/server/scripts/size-baseline.json @@ -8,7 +8,7 @@ "src/nest/atlas/atlas.service.ts": 1166, "src/nest/auth/auth.service.ts": 1115, "src/nest/budget/budget.service.ts": 1607, - "src/nest/collections/collections.service.ts": 1410, + "src/nest/collections/collections.service.ts": 1398, "src/nest/doc-sync/doc-sync.service.ts": 1060, "src/nest/doc-sync/providers/synology-drive.client.ts": 1160, "src/nest/journey/journey-domain.service.ts": 1659, diff --git a/server/src/db/repositories/UserPlaceLinks.repository.ts b/server/src/db/repositories/UserPlaceLinks.repository.ts index 955810fa1..bb859b5a6 100644 --- a/server/src/db/repositories/UserPlaceLinks.repository.ts +++ b/server/src/db/repositories/UserPlaceLinks.repository.ts @@ -54,7 +54,7 @@ export class UserPlaceLinksRepository extends TrekRepository { } /** Links uses no own place of the user holds (`detach` first) to `userPlaceId`; answers the new ids. */ - async insert( + async insertUses( userId: number, userPlaceId: number, uses: readonly LinkedUse[], diff --git a/server/src/db/repositories/UserPlaceMerges.repository.ts b/server/src/db/repositories/UserPlaceMerges.repository.ts index 94102a50c..c6493a0de 100644 --- a/server/src/db/repositories/UserPlaceMerges.repository.ts +++ b/server/src/db/repositories/UserPlaceMerges.repository.ts @@ -18,7 +18,7 @@ export class UserPlaceMergesRepository extends TrekRepository { return this.kysely(); } - async create(userId: number, leadingId: number, mergedId: number, movedLinkIds: string): Promise { + async record(userId: number, leadingId: number, mergedId: number, movedLinkIds: string): Promise { const row = await this.db() .insertInto('user_place_merges') .values({ user_id: userId, leading_id: leadingId, merged_id: mergedId, moved_link_ids: movedLinkIds }) diff --git a/server/src/db/repositories/UserPlaces.repository.ts b/server/src/db/repositories/UserPlaces.repository.ts index eacebe378..bbeedf729 100644 --- a/server/src/db/repositories/UserPlaces.repository.ts +++ b/server/src/db/repositories/UserPlaces.repository.ts @@ -38,7 +38,7 @@ export class UserPlacesRepository extends TrekRepository { return this.kysely(); } - async create(userId: number, facts: UserPlaceFacts): Promise { + async createOwn(userId: number, facts: UserPlaceFacts): Promise { const row = await this.db() .insertInto('user_places') .values({ user_id: userId, ...facts }) diff --git a/server/src/nest/assistant/assistant-tool-offer.ts b/server/src/nest/assistant/assistant-tool-offer.ts index ae6970995..228634774 100644 --- a/server/src/nest/assistant/assistant-tool-offer.ts +++ b/server/src/nest/assistant/assistant-tool-offer.ts @@ -396,8 +396,11 @@ const CORE_TOOL_GROUPS: ToolGroups = { controllers: ['AtlasMcp', 'AtlasGlobeMcp', 'DawarichAtlasMcp'], }, collections: { - about: 'Collections: saved places across trips, their labels and ratings.', - controllers: ['CollectionsMcp'], + about: + 'Collections and all places: saved places across trips, their labels and ratings, every place of the user ' + + 'in one library, the places that are one and the same (linking, merging and undoing a merge, duplicates) ' + + 'and the lists linked to this trip.', + controllers: ['CollectionsMcp', 'PlacesLibraryMcp', 'PlaceIdentitiesMcp', 'TripCollectionsMcp'], }, collab: { about: 'Trip chat: notes, polls, shared links and messages to the people on the trip.', diff --git a/server/src/nest/collections/collections.helpers.ts b/server/src/nest/collections/collections.helpers.ts index bed71f95a..1314abda8 100644 --- a/server/src/nest/collections/collections.helpers.ts +++ b/server/src/nest/collections/collections.helpers.ts @@ -168,3 +168,29 @@ export function placeOrderOf(current: number[], requested: number[]): number[] | if (named.size !== requested.length || requested.some((id) => !held.has(id))) return null; return [...requested, ...current.filter((id) => !named.has(id))]; } + +/** How a trip tag name is compared: trimmed and in lower case. */ +export function tagKeyOf(name: string): string { + return name.trim().toLowerCase(); +} + +/** + * The trip's own tag of each name, in the order of `tags`: the one `known` + * holds, or one `makeTag` makes now (once per name). `known` keeps the new + * ones, so the next place of the same copy reuses them. + */ +export async function tripTagIdsOf( + tags: { name: string; color: string }[], + known: Map, + makeTag: (name: string, color: string) => Promise, +): Promise { + const missing = new Map(tags.filter((t) => !known.has(tagKeyOf(t.name))).map((t) => [tagKeyOf(t.name), t])); + const made = await Promise.all( + [...missing.entries()].map(async ([key, { name, color }]) => [key, await makeTag(name.trim(), color)] as const), + ); + for (const [key, id] of made) known.set(key, id); + return tags.flatMap(({ name }): number[] => { + const id = known.get(tagKeyOf(name)); + return id === undefined ? [] : [id]; + }); +} diff --git a/server/src/nest/collections/collections.service.ts b/server/src/nest/collections/collections.service.ts index 4d3225064..9d143fef8 100644 --- a/server/src/nest/collections/collections.service.ts +++ b/server/src/nest/collections/collections.service.ts @@ -72,7 +72,8 @@ import { NotificationsService } from '../notifications/notifications.service'; import { PlaceImportService, type ExportedCollectionFile } from '../place-import/place-import.service'; import { UnitOfWork } from '../database/unit-of-work'; import { - filePlaceOf, groupByPid, listingWriteOf, parseLinks, placeOrderOf, serializeLinks, tripDedupSet, tripPlaceFields, + filePlaceOf, groupByPid, listingWriteOf, parseLinks, placeOrderOf, serializeLinks, tagKeyOf, tripDedupSet, tripPlaceFields, + tripTagIdsOf, } from './collections.helpers'; // Errors: a DomainError carrying a status; TrekExceptionFilter maps it to that code with an `{ error }` body. @@ -1075,7 +1076,7 @@ export class CollectionsService { const skipped: { id: number; name: string }[] = []; // The whole copy is one logical write — atomic since the post-fold quirk pass. await this.uow.transactional(async () => { - if (carried) for (const t of await this.tags.listByTrip(body.trip_id)) tripTags.set(t.name.trim().toLowerCase(), t.id); + if (carried) for (const t of await this.tags.listByTrip(body.trip_id)) tripTags.set(tagKeyOf(t.name), t.id); tagsBefore = tripTags.size; for (const s of sources) { if (!body.force && isPlaceDuplicate({ @@ -1093,7 +1094,9 @@ export class CollectionsService { image_url: s.image_url, google_place_id: s.google_place_id, google_ftid: s.google_ftid, website: s.website, phone: s.phone, osm_id: s.osm_id, }); - await this.tags.insertIgnore(newPlaceId, await this.tripTagIds(body.trip_id, userId, carried?.[s.id] ?? [], tripTags)); + const tagIds = await tripTagIdsOf(carried?.[s.id] ?? [], tripTags, async (name, color) => + (await this.tags.createTag({ user_id: userId, trip_id: body.trip_id, name, color })).id); + await this.tags.insertIgnore(newPlaceId, tagIds); // Ratings of trip members travel along (#1435); nothing is mirrored back. const votes = await this.collectionPlaceRatings.listForPlace(s.id); for (const v of votes) if (tripMemberIds.has(v.user_id)) await this.tripPlaceRatings.insertIgnore(newPlaceId, v.user_id, v.rating); @@ -1110,19 +1113,6 @@ export class CollectionsService { return { copied: created.length, skipped, created }; } - /** The trip's own tag of each name: the one it has, or one made now; `known` keeps the new ones for the next place. */ - private async tripTagIds(tripId: number, userId: number, tags: { name: string; color: string }[], known: Map): Promise { - const keyOf = (name: string) => name.trim().toLowerCase(); - const missing = [...new Map(tags.filter(t => !known.has(keyOf(t.name))).map(t => [keyOf(t.name), t])).entries()]; - const made = await Promise.all(missing.map(async ([key, { name, color }]) => - [key, (await this.tags.createTag({ user_id: userId, trip_id: tripId, name: name.trim(), color })).id] as const)); - for (const [key, id] of made) known.set(key, id); - return tags.flatMap(({ name }): number[] => { - const id = known.get(keyOf(name)); - return id === undefined ? [] : [id]; - }); - } - // ------------------------------------------------------------------------- // Library-wide membership lookup (inspector indicator) // ------------------------------------------------------------------------- diff --git a/server/src/nest/places-library/place-identities.service.ts b/server/src/nest/places-library/place-identities.service.ts index 0246c20e1..efd7d9ba4 100644 --- a/server/src/nest/places-library/place-identities.service.ts +++ b/server/src/nest/places-library/place-identities.service.ts @@ -81,7 +81,7 @@ export class PlaceIdentitiesService { const target = request.identity_id === undefined ? { facts: await this.factsOfUse(reach, first) } : { id: request.identity_id }; const identityId = await this.uow.transactional(async () => { - const id = 'id' in target ? target.id : await this.identities.create(user.id, target.facts); + const id = 'id' in target ? target.id : await this.identities.createOwn(user.id, target.facts); await this.attach(user.id, id, uses, 'user'); await this.identities.touch(user.id, id); await this.prune(user.id); @@ -130,7 +130,7 @@ export class PlaceIdentitiesService { await this.links.moveTo(user.id, moved, leadId); await this.identities.setMergedInto(user.id, restId, leadId); await this.identities.touch(user.id, leadId); - const mergeId = await this.merges.create( + const mergeId = await this.merges.record( user.id, leadId, restId, @@ -197,14 +197,14 @@ export class PlaceIdentitiesService { linkedBy: 'user' | 'merge', ): Promise { await this.links.detach(userId, uses); - await this.links.insert(userId, id, uses, linkedBy); + await this.links.insertUses(userId, id, uses, linkedBy); } /** The entry's own place, made from its first use when it has none yet. Runs inside the caller's transaction. */ private async materialize(userId: number, rows: EntryRows): Promise { if (rows.identity) return rows.identity.id; const first = firstUseOf(rows); - const id = await this.identities.create(userId, { + const id = await this.identities.createOwn(userId, { name: first.name, lat: first.lat, lng: first.lng, diff --git a/server/tests/helpers/places-library-fixture.ts b/server/tests/helpers/places-library-fixture.ts index c558ea2a1..923762916 100644 --- a/server/tests/helpers/places-library-fixture.ts +++ b/server/tests/helpers/places-library-fixture.ts @@ -154,9 +154,10 @@ export async function seedLibrary(orm: FactoryOrm) { export type LibraryFixture = Awaited>; /** - * The keys of `me`'s entries by name. Café Central's two entries tie on the - * name and then go by their anchor (`id * 4 + kind`, a trip place's kind 1, - * a saved place's 2), so their order follows the ids the seed got. + * The keys of `me`'s entries by name. Two entries of the same name go by their + * anchor (`id * 4 + kind`, a trip place's kind 1, a saved place's 2; a saved + * place grouped with a trip place takes the trip place's), so the order of a + * tie follows the ids the seed got. */ export function expectedKeysByName(f: LibraryFixture): string[] { const { places, saved } = f; @@ -167,16 +168,23 @@ export function expectedKeysByName(f: LibraryFixture): string[] { `list:${saved.hiddenCopy.id}`, `trip:${places.hotel.id}`, `list:${saved.lunch.id}`, - `list:${saved.namesake.id}`, - `trip:${places.museum.id}`, + ...museumTie(f), `list:${saved.pantheon.id}`, ]; } +/** Two entries of one name, in the order their anchors give. */ +function byAnchor(trip: number, list: number): string[] { + const pair = [`list:${list}`, `trip:${trip}`]; + return list * 4 + 2 < trip * 4 + 1 ? pair : [...pair].reverse(); +} + /** The two entries named Café Central, in the order their anchors give. */ export function cafeTie(f: LibraryFixture): string[] { - const conflicting = f.saved.conflicting.id * 4 + 2; - const cafe = f.places.cafe.id * 4 + 1; - const pair = [`list:${f.saved.conflicting.id}`, `trip:${f.places.cafe.id}`]; - return conflicting < cafe ? pair : [...pair].reverse(); + return byAnchor(f.places.cafe.id, f.saved.conflicting.id); +} + +/** The two entries named Museum (the trip place with its saved copy, and the namesake), as their anchors give. */ +export function museumTie(f: LibraryFixture): string[] { + return byAnchor(f.places.museum.id, f.saved.namesake.id); } diff --git a/server/tests/unit/db/entities-index.test.ts b/server/tests/unit/db/entities-index.test.ts index fed2ab095..63da47024 100644 --- a/server/tests/unit/db/entities-index.test.ts +++ b/server/tests/unit/db/entities-index.test.ts @@ -60,14 +60,17 @@ describe('ALL_ENTITIES', () => { * + assistant_attachments, the files attached in the trip chat, kept with their conversation * + mail_ingest_addresses, _prefs, _cursor, _messages and _candidates, the forwarded * booking mails, the bookings read from them and the switches and addresses behind them - * + trip_addon_overrides, the owner's per-trip on or off for a trip addon) + * + trip_addon_overrides, the owner's per-trip on or off for a trip addon + * + user_places, user_place_links, user_place_merges and user_place_merge_dismissals, + * a user's own place identities, the uses they group, the merges and the dismissed pairs + * + trip_collection_links, the lists a trip links) * is registered, and no two share a class name (a silent duplicate would * shadow one of them in `orm.getMetadata()`, exactly the kind of drift * `entity-schema-parity.test.ts` can't see — it iterates the metadata map, * which de-duplicates by class name). */ - it('ENT-003: exactly 174 entities, every class name unique', () => { - expect(ALL_ENTITIES.length).toBe(174); + it('ENT-003: exactly 179 entities, every class name unique', () => { + expect(ALL_ENTITIES.length).toBe(179); const names = ALL_ENTITIES.map((s) => s.meta.className); expect(new Set(names).size).toBe(names.length); }); diff --git a/server/tests/unit/db/entity-class-fields.test.ts b/server/tests/unit/db/entity-class-fields.test.ts index 1686829b7..068096cf5 100644 --- a/server/tests/unit/db/entity-class-fields.test.ts +++ b/server/tests/unit/db/entity-class-fields.test.ts @@ -67,7 +67,10 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'; // id, transport, mailbox; mail_ingest_messages: id, transport, dedupe_hash, user_id, size; mail_ingest_candidates: // id, message_id, user_id (each row is written whole by the mail import, which always knows all of them). // + trip_addon_overrides: trip_id, addon_id, enabled (an override is only ever written whole, by the trip owner). -const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 635; +// + user_places: id, user_id, name; user_place_links: id, user_place_id, user_id; user_place_merges: id, user_id, +// leading_id, merged_id, moved_link_ids; user_place_merge_dismissals: id, user_id, key_a, key_b; +// trip_collection_links: id, trip_id, collection_id (each row is written whole by the places library or the trip). +const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 653; describe('entity class fields never carry a NaN initialiser (task-4-review-shape.md, Important 1)', () => { it('CLASSFIELD-001: new X() has no own property whose value is NaN, across all 133 entities', () => { diff --git a/server/tests/unit/nest/places-library/places-library.service.test.ts b/server/tests/unit/nest/places-library/places-library.service.test.ts index e45451c0f..5daea637d 100644 --- a/server/tests/unit/nest/places-library/places-library.service.test.ts +++ b/server/tests/unit/nest/places-library/places-library.service.test.ts @@ -13,7 +13,13 @@ import { PlacesLibraryService, type LibraryUser } from '../../../../src/nest/pla import { createSnapshotTestDb } from '../../../helpers/db-mock'; import { updateRows } from '../../../helpers/factories/rows'; import { oneByOne } from '../../../helpers/one-by-one'; -import { cafeTie, expectedKeysByName, seedLibrary, type LibraryFixture } from '../../../helpers/places-library-fixture'; +import { + cafeTie, + expectedKeysByName, + museumTie, + seedLibrary, + type LibraryFixture, +} from '../../../helpers/places-library-fixture'; import { resetTestDb } from '../../../helpers/test-db'; import { createTestModule, type TestModule } from '../../../helpers/test-module'; import { createTestOrm, type TestOrm } from '../../../helpers/test-orm'; @@ -148,8 +154,7 @@ describe('PlacesLibraryService.list', () => { ...cafeTie(f), `list:${f.saved.hiddenCopy.id}`, `list:${f.saved.lunch.id}`, - `list:${f.saved.namesake.id}`, - `trip:${f.places.museum.id}`, + ...museumTie(f), ]); expect(await by({ trip_id: f.rome.id })).toEqual([`trip:${f.places.forum.id}`]); expect(await by({ status: 'visited' })).toEqual([`list:${f.saved.pantheon.id}`]); diff --git a/shared/src/i18n/ar/collection.ts b/shared/src/i18n/ar/collection.ts index 45fb1936b..6a1b234ec 100644 --- a/shared/src/i18n/ar/collection.ts +++ b/shared/src/i18n/ar/collection.ts @@ -149,6 +149,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'مثال: طوكيو 2025', 'collections.listColor': 'اللون', 'collections.listIcon': 'الرمز', + 'collections.ratingBadge': 'بمتوسط تقييم {rating}', 'collections.allSaved': 'كل المحفوظات', 'collections.myLists': 'قوائمي', 'collections.allSavedSubtitle': 'كل مكان حفظته، من جميع قوائمك معًا.', diff --git a/shared/src/i18n/az/collection.ts b/shared/src/i18n/az/collection.ts index 1bcd6611b..400077f44 100644 --- a/shared/src/i18n/az/collection.ts +++ b/shared/src/i18n/az/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'məs. Tokio 2025', 'collections.listColor': 'Rəng', 'collections.listIcon': 'Simvol', + 'collections.ratingBadge': 'Orta qiymət: {rating}', 'collections.allSaved': 'Bütün saxlanılanlar', 'collections.myLists': 'Siyahılarım', 'collections.allSavedSubtitle': 'Saxladığınız hər məkan, bütün siyahılarınızdan birlikdə.', diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts index 1fe509e43..0a61c021e 100644 --- a/shared/src/i18n/br/collection.ts +++ b/shared/src/i18n/br/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'ex.: Tóquio 2025', 'collections.listColor': 'Cor', 'collections.listIcon': 'Ícone', + 'collections.ratingBadge': 'Nota média {rating}', 'collections.allSaved': 'Todos os salvos', 'collections.myLists': 'Minhas listas', 'collections.allSavedSubtitle': 'Todos os lugares que você salvou, de todas as suas listas juntas.', diff --git a/shared/src/i18n/ca/collection.ts b/shared/src/i18n/ca/collection.ts index 93f9ad577..a8e9dfc2f 100644 --- a/shared/src/i18n/ca/collection.ts +++ b/shared/src/i18n/ca/collection.ts @@ -100,6 +100,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'p. ex. Tòquio 2025', 'collections.listColor': 'Color', 'collections.listIcon': 'Icona', + 'collections.ratingBadge': 'Valoració mitjana de {rating}', 'collections.allSaved': 'Tot el desat', 'collections.myLists': 'Les meves llistes', 'collections.allSavedSubtitle': 'Tots els llocs que has desat, de totes les teves llistes junts.', diff --git a/shared/src/i18n/cs/collection.ts b/shared/src/i18n/cs/collection.ts index ab0efbfee..34566258d 100644 --- a/shared/src/i18n/cs/collection.ts +++ b/shared/src/i18n/cs/collection.ts @@ -112,6 +112,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'např. Tokio 2025', 'collections.listColor': 'Barva', 'collections.listIcon': 'Ikona', + 'collections.ratingBadge': 'Průměrné hodnocení {rating}', 'collections.allSaved': 'Vše uložené', 'collections.myLists': 'Moje seznamy', 'collections.allSavedSubtitle': 'Každé místo, které jste uložili, ze všech vašich seznamů dohromady.', diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts index 65d739a04..14077475e 100644 --- a/shared/src/i18n/es/collection.ts +++ b/shared/src/i18n/es/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'p. ej. Tokio 2025', 'collections.listColor': 'Color', 'collections.listIcon': 'Icono', + 'collections.ratingBadge': 'Valoración media de {rating}', 'collections.allSaved': 'Todos los guardados', 'collections.myLists': 'Mis listas', 'collections.allSavedSubtitle': 'Todos los lugares que guardaste, de todas tus listas juntas.', diff --git a/shared/src/i18n/et/collection.ts b/shared/src/i18n/et/collection.ts index 8e38c9c90..507012ff7 100644 --- a/shared/src/i18n/et/collection.ts +++ b/shared/src/i18n/et/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'Nt Tokyo 2025', 'collections.listColor': 'Värv', 'collections.listIcon': 'Ikoon', + 'collections.ratingBadge': 'Keskmine hinne {rating}', 'collections.allSaved': 'Kõik salvestatud', 'collections.myLists': 'Minu nimekirjad', 'collections.allSavedSubtitle': 'Iga koht, mille oled salvestanud, kõigist sinu nimekirjadest koos.', diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts index 91481f583..1457363c6 100644 --- a/shared/src/i18n/fr/collection.ts +++ b/shared/src/i18n/fr/collection.ts @@ -102,6 +102,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'p. ex. Tokyo 2025', 'collections.listColor': 'Couleur', 'collections.listIcon': 'Icône', + 'collections.ratingBadge': 'Note moyenne de {rating}', 'collections.allSaved': 'Tous les enregistrés', 'collections.myLists': 'Mes listes', 'collections.allSavedSubtitle': 'Chaque lieu enregistré, toutes vos listes réunies.', diff --git a/shared/src/i18n/gr/collection.ts b/shared/src/i18n/gr/collection.ts index 5aa6fbd18..701791a4d 100644 --- a/shared/src/i18n/gr/collection.ts +++ b/shared/src/i18n/gr/collection.ts @@ -102,6 +102,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'π.χ. Τόκιο 2025', 'collections.listColor': 'Χρώμα', 'collections.listIcon': 'Εικονίδιο', + 'collections.ratingBadge': 'Μέση βαθμολογία {rating}', 'collections.allSaved': 'Όλα τα αποθηκευμένα', 'collections.myLists': 'Οι λίστες μου', 'collections.allSavedSubtitle': 'Κάθε μέρος που έχεις αποθηκεύσει, από όλες τις λίστες σου μαζί.', diff --git a/shared/src/i18n/he/collection.ts b/shared/src/i18n/he/collection.ts index fd760b492..67d45d192 100644 --- a/shared/src/i18n/he/collection.ts +++ b/shared/src/i18n/he/collection.ts @@ -110,6 +110,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'למשל טוקיו 2025', 'collections.listColor': 'צבע', 'collections.listIcon': 'סמל', + 'collections.ratingBadge': 'דירוג ממוצע {rating}', 'collections.allSaved': 'כל השמורים', 'collections.myLists': 'הרשימות שלי', 'collections.allSavedSubtitle': 'כל מקום ששמרתם, מכל הרשימות שלכם יחד.', diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts index 062079312..5c5ff7466 100644 --- a/shared/src/i18n/hu/collection.ts +++ b/shared/src/i18n/hu/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'pl. Tokió 2025', 'collections.listColor': 'Szín', 'collections.listIcon': 'Ikon', + 'collections.ratingBadge': 'Átlagos értékelés: {rating}', 'collections.allSaved': 'Összes mentett', 'collections.myLists': 'Listáim', 'collections.allSavedSubtitle': 'Minden elmentett hely, az összes listádból együtt.', diff --git a/shared/src/i18n/id/collection.ts b/shared/src/i18n/id/collection.ts index 87b52749d..932794697 100644 --- a/shared/src/i18n/id/collection.ts +++ b/shared/src/i18n/id/collection.ts @@ -89,6 +89,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'mis. Tokyo 2025', 'collections.listColor': 'Warna', 'collections.listIcon': 'Ikon', + 'collections.ratingBadge': 'Rata-rata dinilai {rating}', 'collections.allSaved': 'Semua tersimpan', 'collections.myLists': 'Daftarku', 'collections.allSavedSubtitle': 'Semua tempat yang kamu simpan, dari seluruh daftarmu sekaligus.', diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts index 89bc452f0..2be336f60 100644 --- a/shared/src/i18n/it/collection.ts +++ b/shared/src/i18n/it/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'es. Tokyo 2025', 'collections.listColor': 'Colore', 'collections.listIcon': 'Icona', + 'collections.ratingBadge': 'Valutazione media di {rating}', 'collections.allSaved': 'Tutti i salvati', 'collections.myLists': 'Le mie liste', 'collections.allSavedSubtitle': 'Ogni luogo che hai salvato, da tutte le tue liste insieme.', diff --git a/shared/src/i18n/ja/collection.ts b/shared/src/i18n/ja/collection.ts index 7c819c981..e4b0f4745 100644 --- a/shared/src/i18n/ja/collection.ts +++ b/shared/src/i18n/ja/collection.ts @@ -87,6 +87,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': '例: 東京 2025', 'collections.listColor': '色', 'collections.listIcon': 'アイコン', + 'collections.ratingBadge': '平均評価 {rating}', 'collections.allSaved': 'すべての保存済み', 'collections.myLists': 'マイリスト', 'collections.allSavedSubtitle': '保存したすべての場所を、すべてのリストをまとめて表示します。', diff --git a/shared/src/i18n/ko/collection.ts b/shared/src/i18n/ko/collection.ts index 9862615eb..f0c541769 100644 --- a/shared/src/i18n/ko/collection.ts +++ b/shared/src/i18n/ko/collection.ts @@ -88,6 +88,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': '예: 도쿄 2025', 'collections.listColor': '색상', 'collections.listIcon': '아이콘', + 'collections.ratingBadge': '평균 평점 {rating}', 'collections.allSaved': '모든 저장 항목', 'collections.myLists': '내 목록', 'collections.allSavedSubtitle': '저장한 모든 장소를 모든 목록에서 한데 모아 보여 줍니다.', diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts index c78013f7c..ea38deedd 100644 --- a/shared/src/i18n/nl/collection.ts +++ b/shared/src/i18n/nl/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'bijv. Tokio 2025', 'collections.listColor': 'Kleur', 'collections.listIcon': 'Pictogram', + 'collections.ratingBadge': 'Gemiddeld beoordeeld met {rating}', 'collections.allSaved': 'Alle opgeslagen', 'collections.myLists': 'Mijn lijsten', 'collections.allSavedSubtitle': 'Elke plek die je hebt opgeslagen, uit al je lijsten samen.', diff --git a/shared/src/i18n/pl/collection.ts b/shared/src/i18n/pl/collection.ts index 958d581ac..5c9792bcb 100644 --- a/shared/src/i18n/pl/collection.ts +++ b/shared/src/i18n/pl/collection.ts @@ -125,6 +125,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'np. Tokio 2025', 'collections.listColor': 'Kolor', 'collections.listIcon': 'Ikona', + 'collections.ratingBadge': 'Średnia ocena {rating}', 'collections.allSaved': 'Wszystkie zapisane', 'collections.myLists': 'Moje listy', 'collections.allSavedSubtitle': 'Każde zapisane miejsce, ze wszystkich Twoich list razem.', diff --git a/shared/src/i18n/ru/collection.ts b/shared/src/i18n/ru/collection.ts index 4b85ce516..ad662a5c3 100644 --- a/shared/src/i18n/ru/collection.ts +++ b/shared/src/i18n/ru/collection.ts @@ -124,6 +124,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'например, Токио 2025', 'collections.listColor': 'Цвет', 'collections.listIcon': 'Значок', + 'collections.ratingBadge': 'Средняя оценка {rating}', 'collections.allSaved': 'Все сохранённые', 'collections.myLists': 'Мои списки', 'collections.allSavedSubtitle': 'Каждое сохранённое место из всех ваших списков вместе.', diff --git a/shared/src/i18n/sk/collection.ts b/shared/src/i18n/sk/collection.ts index 21ea0a7d1..8a285342c 100644 --- a/shared/src/i18n/sk/collection.ts +++ b/shared/src/i18n/sk/collection.ts @@ -113,6 +113,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'napr. Tokio 2025', 'collections.listColor': 'Farba', 'collections.listIcon': 'Ikona', + 'collections.ratingBadge': 'Priemerné hodnotenie {rating}', 'collections.allSaved': 'Všetko uložené', 'collections.myLists': 'Moje zoznamy', 'collections.allSavedSubtitle': 'Každé uložené miesto zo všetkých vašich zoznamov dokopy.', diff --git a/shared/src/i18n/sv/collection.ts b/shared/src/i18n/sv/collection.ts index 96c50aa39..9b3f863fa 100644 --- a/shared/src/i18n/sv/collection.ts +++ b/shared/src/i18n/sv/collection.ts @@ -100,6 +100,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 't.ex. Tokyo 2025', 'collections.listColor': 'Färg', 'collections.listIcon': 'Ikon', + 'collections.ratingBadge': 'Betyg {rating} i snitt', 'collections.allSaved': 'Alla sparade', 'collections.myLists': 'Mina listor', 'collections.allSavedSubtitle': 'Varje plats du har sparat, från alla dina listor samlade.', diff --git a/shared/src/i18n/th/collection.ts b/shared/src/i18n/th/collection.ts index cd194a1e6..8af1f7e51 100644 --- a/shared/src/i18n/th/collection.ts +++ b/shared/src/i18n/th/collection.ts @@ -86,6 +86,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'เช่น โตเกียว 2025', 'collections.listColor': 'สี', 'collections.listIcon': 'ไอคอน', + 'collections.ratingBadge': 'คะแนนเฉลี่ย {rating}', 'collections.allSaved': 'บันทึกทั้งหมดแล้ว', 'collections.myLists': 'รายการของฉัน', 'collections.allSavedSubtitle': 'ทุกสถานที่ที่คุณบันทึกไว้ จากทุกรายการรวมกัน', diff --git a/shared/src/i18n/tr/collection.ts b/shared/src/i18n/tr/collection.ts index 6d81fdab5..16bb070ce 100644 --- a/shared/src/i18n/tr/collection.ts +++ b/shared/src/i18n/tr/collection.ts @@ -101,6 +101,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'örn. Tokyo 2025', 'collections.listColor': 'Renk', 'collections.listIcon': 'Simge', + 'collections.ratingBadge': 'Ortalama puan {rating}', 'collections.allSaved': 'Tüm kayıtlılar', 'collections.myLists': 'Listelerim', 'collections.allSavedSubtitle': 'Kaydettiğin her yer, tüm listelerinden bir arada.', diff --git a/shared/src/i18n/uk/collection.ts b/shared/src/i18n/uk/collection.ts index 7428435f1..a3d6ccd7c 100644 --- a/shared/src/i18n/uk/collection.ts +++ b/shared/src/i18n/uk/collection.ts @@ -124,6 +124,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'напр., Токіо 2025', 'collections.listColor': 'Колір', 'collections.listIcon': 'Значок', + 'collections.ratingBadge': 'Середня оцінка {rating}', 'collections.allSaved': 'Усі збережені', 'collections.myLists': 'Мої списки', 'collections.allSavedSubtitle': 'Кожне збережене місце з усіх ваших списків разом.', diff --git a/shared/src/i18n/vi/collection.ts b/shared/src/i18n/vi/collection.ts index 62fc96284..fafed89d5 100644 --- a/shared/src/i18n/vi/collection.ts +++ b/shared/src/i18n/vi/collection.ts @@ -89,6 +89,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': 'vd. Tokyo 2025', 'collections.listColor': 'Màu', 'collections.listIcon': 'Biểu tượng', + 'collections.ratingBadge': 'Đánh giá trung bình {rating}', 'collections.allSaved': 'Tất cả đã lưu', 'collections.myLists': 'Danh sách của tôi', 'collections.allSavedSubtitle': 'Mọi địa điểm bạn đã lưu, từ tất cả danh sách gộp lại.', diff --git a/shared/src/i18n/zh-TW/collection.ts b/shared/src/i18n/zh-TW/collection.ts index 578a43b15..fe1c9f14b 100644 --- a/shared/src/i18n/zh-TW/collection.ts +++ b/shared/src/i18n/zh-TW/collection.ts @@ -86,6 +86,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': '例如:東京 2025', 'collections.listColor': '顏色', 'collections.listIcon': '圖示', + 'collections.ratingBadge': '平均評分 {rating}', 'collections.allSaved': '全部已儲存', 'collections.myLists': '我的清單', 'collections.allSavedSubtitle': '你儲存的所有地點,來自全部清單的彙整。', diff --git a/shared/src/i18n/zh/collection.ts b/shared/src/i18n/zh/collection.ts index 3f18ca820..1478cf581 100644 --- a/shared/src/i18n/zh/collection.ts +++ b/shared/src/i18n/zh/collection.ts @@ -86,6 +86,7 @@ const collection: TranslationStrings = { 'collections.listNamePlaceholder': '例如:东京 2025', 'collections.listColor': '颜色', 'collections.listIcon': '图标', + 'collections.ratingBadge': '平均评分 {rating}', 'collections.allSaved': '全部已保存', 'collections.myLists': '我的清单', 'collections.allSavedSubtitle': '你保存的所有地点,来自全部清单的汇总。',