Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 58 additions & 5 deletions apps/web/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,6 @@
"ENDED": "Beendet",
"OTHER": "Sonstige"
},
"spendAndClicks": "Ausgaben {spend} · Klicks {clicks}",
"actions": {
"label": "Aktionen für {name}",
"pause": "Pausieren",
Expand Down Expand Up @@ -3230,18 +3229,18 @@
"title": "Kampagnen konnten nicht geladen werden"
}
},
"new": "Neue Kampagne"
"new": "Neue Kampagne",
"budgetPerDay": "{budget}/Tag"
},
"newCampaign": {
"title": "Neue Kampagne",
"back": "Zurück zu den Kampagnen",
"inAccount": "{provider}-Konto {name}",
"note": {
"google_ads": "Kampagnen werden pausiert erstellt. Setze sie hier fort, wenn sie bereit sind.",
"meta_ads": "Kampagnen werden pausiert erstellt. Füge Anzeigengruppen und Anzeigen im Meta Ads Manager hinzu und setze sie dann hier fort."
},
"sections": {
"type": "Typ",
"type": "Kampagnentyp",
"basics": "Grundlagen",
"targeting": "Targeting",
"ad": "Anzeige"
Expand Down Expand Up @@ -3424,6 +3423,61 @@
"businessNameRequired": "Gib den Firmennamen ein.",
"longHeadlineRequired": "Gib eine lange Überschrift ein.",
"failed": "Kampagne konnte nicht erstellt werden"
},
"steps": {
"type": "Kampagnentyp",
"basics": "Grundlagen",
"targeting": "Targeting",
"keywords": "Keywords",
"ad": "Anzeige",
"review": "Überprüfen"
},
"wizard": {
"stepsLabel": "Schritte",
"stepOf": "Schritt {current} von {total}: {step}",
"backTo": "Zurück zu {step}",
"goTo": "Zu {step}",
"back": "Zurück",
"next": "Weiter"
},
"typeTitle": "Wo sollen deine Anzeigen erscheinen?",
"typeIntro": "Wähle eine Option. Sie lässt sich nach dem Erstellen der Kampagne nicht mehr ändern.",
"needs": {
"title": "Das brauchst du",
"keywords": "Keywords, nach denen Menschen suchen",
"searchTexts": "{minHeadlines} bis {maxHeadlines} Überschriften und {minDescriptions} bis {maxDescriptions} Beschreibungen",
"displayTexts": "Bis zu {maxHeadlines} Überschriften, eine lange Überschrift und bis zu {maxDescriptions} Beschreibungen",
"businessName": "Den Namen deines Unternehmens",
"images": "Ein Querformat- und ein quadratisches Bild",
"finalUrl": "Die Seite, auf der Menschen landen"
},
"preview": {
"title": "Vorschau",
"searchLabel": "Vorschau der Suchanzeige",
"displayLabel": "Vorschau der Displayanzeige",
"sponsored": "Gesponsert",
"note": "Google kombiniert deine Texte und Bilder, um herauszufinden, was funktioniert. Die echte Anzeige kann daher anders aussehen.",
"another": "Andere Kombination zeigen",
"noImage": "Noch kein Bild",
"open": "Öffnen"
},
"review": {
"title": "Zusammenfassung",
"dailyBudget": "Tagesbudget",
"edit": "Bearbeiten",
"editLabel": "{section} bearbeiten",
"schedule": {
"label": "Zeitraum",
"range": "{start} bis {end}",
"from": "Ab {start}",
"until": "Bis {end}",
"none": "Kein Start- oder Enddatum"
}
},
"setupFailed": {
"title": "Das Kampagnenformular konnte nicht geladen werden",
"body": "Prüfe deine Verbindung und versuche es erneut.",
"retry": "Erneut versuchen"
}
},
"campaignDetails": {
Expand Down Expand Up @@ -3516,7 +3570,6 @@
},
"editCampaign": {
"title": "Kampagne bearbeiten",
"back": "Zurück zur Kampagne",
"submit": "Änderungen speichern",
"reviewNote": "Beim Speichern wird die Anzeige erneut von Google geprüft.",
"startDateLocked": "Das Startdatum lässt sich nicht mehr ändern, sobald die Kampagne gestartet ist.",
Expand Down
63 changes: 58 additions & 5 deletions apps/web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,6 @@
"ENDED": "Ended",
"OTHER": "Other"
},
"spendAndClicks": "Spend {spend} · clicks {clicks}",
"actions": {
"label": "Actions for {name}",
"pause": "Pause",
Expand Down Expand Up @@ -3230,18 +3229,18 @@
"title": "Failed to load campaigns"
}
},
"new": "New campaign"
"new": "New campaign",
"budgetPerDay": "{budget}/day"
},
"newCampaign": {
"title": "New campaign",
"back": "Back to campaigns",
"inAccount": "{provider} account {name}",
"note": {
"google_ads": "Campaigns are created paused. Resume one here when it is ready.",
"meta_ads": "Campaigns are created paused. Add ad sets and ads in Meta Ads Manager, then resume here."
},
"sections": {
"type": "Type",
"type": "Campaign type",
"basics": "Basics",
"targeting": "Targeting",
"ad": "Ad"
Expand Down Expand Up @@ -3424,6 +3423,61 @@
"businessNameRequired": "Enter the business name.",
"longHeadlineRequired": "Enter a long headline.",
"failed": "Failed to create campaign"
},
"steps": {
"type": "Campaign type",
"basics": "Basics",
"targeting": "Targeting",
"keywords": "Keywords",
"ad": "Ad",
"review": "Review"
},
"wizard": {
"stepsLabel": "Steps",
"stepOf": "Step {current} of {total}: {step}",
"backTo": "Back to {step}",
"goTo": "Go to {step}",
"back": "Back",
"next": "Next"
},
"typeTitle": "Where should your ads show?",
"typeIntro": "Pick one. It can't be changed once the campaign is created.",
"needs": {
"title": "You'll need",
"keywords": "Keywords people search for",
"searchTexts": "{minHeadlines} to {maxHeadlines} headlines and {minDescriptions} to {maxDescriptions} descriptions",
"displayTexts": "Up to {maxHeadlines} headlines, a long headline and up to {maxDescriptions} descriptions",
"businessName": "Your business name",
"images": "A landscape and a square image",
"finalUrl": "The page people land on"
},
"preview": {
"title": "Preview",
"searchLabel": "Search ad preview",
"displayLabel": "Display ad preview",
"sponsored": "Sponsored",
"note": "Google mixes your texts and images to find what works, so the real ad can look different.",
"another": "Show another combination",
"noImage": "No image yet",
"open": "Open"
},
"review": {
"title": "Summary",
"dailyBudget": "Daily budget",
"edit": "Edit",
"editLabel": "Edit {section}",
"schedule": {
"label": "Schedule",
"range": "{start} to {end}",
"from": "From {start}",
"until": "Until {end}",
"none": "No start or end date"
}
},
"setupFailed": {
"title": "Failed to load the campaign form",
"body": "Check your connection and try again.",
"retry": "Try again"
}
},
"campaignDetails": {
Expand Down Expand Up @@ -3516,7 +3570,6 @@
},
"editCampaign": {
"title": "Edit campaign",
"back": "Back to campaign",
"submit": "Save changes",
"reviewNote": "Saving sends the ad back to Google's review.",
"startDateLocked": "The start date can't change once a campaign has started.",
Expand Down
63 changes: 58 additions & 5 deletions apps/web/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,6 @@
"ENDED": "Finalizada",
"OTHER": "Otro"
},
"spendAndClicks": "Gasto {spend} · clics {clicks}",
"actions": {
"label": "Acciones para {name}",
"pause": "Pausar",
Expand Down Expand Up @@ -3230,18 +3229,18 @@
"title": "No se pudieron cargar las campañas"
}
},
"new": "Nueva campaña"
"new": "Nueva campaña",
"budgetPerDay": "{budget}/día"
},
"newCampaign": {
"title": "Nueva campaña",
"back": "Volver a las campañas",
"inAccount": "Cuenta de {provider} {name}",
"note": {
"google_ads": "Las campañas se crean en pausa. Reanúdala aquí cuando esté lista.",
"meta_ads": "Las campañas se crean en pausa. Añade conjuntos de anuncios y anuncios en Meta Ads Manager y reanúdalas aquí."
},
"sections": {
"type": "Tipo",
"type": "Tipo de campaña",
"basics": "Datos básicos",
"targeting": "Segmentación",
"ad": "Anuncio"
Expand Down Expand Up @@ -3424,6 +3423,61 @@
"businessNameRequired": "Introduce el nombre de la empresa.",
"longHeadlineRequired": "Introduce un título largo.",
"failed": "No se pudo crear la campaña"
},
"steps": {
"type": "Tipo de campaña",
"basics": "Datos básicos",
"targeting": "Segmentación",
"keywords": "Palabras clave",
"ad": "Anuncio",
"review": "Revisión"
},
"wizard": {
"stepsLabel": "Pasos",
"stepOf": "Paso {current} de {total}: {step}",
"backTo": "Volver a {step}",
"goTo": "Ir a {step}",
"back": "Atrás",
"next": "Siguiente"
},
"typeTitle": "¿Dónde quieres que aparezcan tus anuncios?",
"typeIntro": "Elige una. No se puede cambiar una vez creada la campaña.",
"needs": {
"title": "Necesitarás",
"keywords": "Palabras clave que la gente busca",
"searchTexts": "De {minHeadlines} a {maxHeadlines} títulos y de {minDescriptions} a {maxDescriptions} descripciones",
"displayTexts": "Hasta {maxHeadlines} títulos, un título largo y hasta {maxDescriptions} descripciones",
"businessName": "El nombre de tu empresa",
"images": "Una imagen horizontal y una cuadrada",
"finalUrl": "La página a la que llega la gente"
},
"preview": {
"title": "Vista previa",
"searchLabel": "Vista previa del anuncio de búsqueda",
"displayLabel": "Vista previa del anuncio de display",
"sponsored": "Patrocinado",
"note": "Google combina tus textos e imágenes para encontrar lo que funciona, así que el anuncio real puede verse diferente.",
"another": "Mostrar otra combinación",
"noImage": "Aún no hay imagen",
"open": "Abrir"
},
"review": {
"title": "Resumen",
"dailyBudget": "Presupuesto diario",
"edit": "Editar",
"editLabel": "Editar {section}",
"schedule": {
"label": "Calendario",
"range": "Del {start} al {end}",
"from": "Desde el {start}",
"until": "Hasta el {end}",
"none": "Sin fecha de inicio ni de fin"
}
},
"setupFailed": {
"title": "No se pudo cargar el formulario de la campaña",
"body": "Comprueba tu conexión y vuelve a intentarlo.",
"retry": "Reintentar"
}
},
"campaignDetails": {
Expand Down Expand Up @@ -3516,7 +3570,6 @@
},
"editCampaign": {
"title": "Editar campaña",
"back": "Volver a la campaña",
"submit": "Guardar cambios",
"reviewNote": "Al guardar, el anuncio vuelve a revisión de Google.",
"startDateLocked": "La fecha de inicio no se puede cambiar una vez iniciada la campaña.",
Expand Down
13 changes: 0 additions & 13 deletions apps/web/src/app/(app)/ads/ads-query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
campaignsHref,
loadAdsSearchParams,
loadCampaignDetailsSearchParams,
loadNewCampaignSearchParams,
selectAccount,
} from "./ads-query";

Expand Down Expand Up @@ -56,18 +55,6 @@ describe("selectAccount", () => {
});
});

describe("loadNewCampaignSearchParams", () => {
it("reads the project and the account", () => {
expect(
loadNewCampaignSearchParams({ projectId: "p1", accountId: "a2" }),
).toEqual({ projectId: "p1", accountId: "a2" });
expect(loadNewCampaignSearchParams({})).toEqual({
projectId: null,
accountId: null,
});
});
});

describe("campaignsHref", () => {
it("opens the Campaigns tab of the account", () => {
expect(campaignsHref("p1", "a2")).toBe(
Expand Down
10 changes: 0 additions & 10 deletions apps/web/src/app/(app)/ads/ads-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ export function selectAccount(
return accounts.find(({ id }) => id === accountId) ?? accounts[0];
}

/**
* The Campaigns tab of one account, where the create and details pages lead
* back to. A `range` is kept when given.
*/
export function campaignsHref(
projectId: string,
accountId: string,
Expand Down Expand Up @@ -71,12 +67,6 @@ export function campaignEditHref(
return `/ads/campaigns/${encodeURIComponent(campaignId)}/edit?${new URLSearchParams({ projectId, accountId, range })}`;
}

/** The create page's URL state: the project and the account to create in. */
export const loadNewCampaignSearchParams = createLoader({
projectId: parseAsString,
accountId: parseAsString,
});

/** The details page's URL state: the project, the account and the range. */
export const loadCampaignDetailsSearchParams = createLoader({
projectId: parseAsString,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { AdsEditCampaignModal } from "@/app/ads/components/ads-edit-campaign-modal";

export default function AdsCampaignEditLoading() {
return <AdsEditCampaignModal loading />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { SearchParams } from "nuqs/server";

import { AdsCampaignEdit } from "@/app/ads/campaigns/campaign-edit";

export { generateMetadata } from "@/app/ads/campaigns/[campaignId]/edit/page";

// Wait for the current session and project access before rendering.
export const instant = false;

export default async function AdsCampaignEditModalPage(props: {
params: Promise<{ campaignId: string }>;
searchParams: Promise<SearchParams>;
}) {
return AdsCampaignEdit(props);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function AdsCampaignModalFallback() {
return null;
}
Loading
Loading