fix: migrate all hardcoded eyebrow labels and text to CMS to fix locale bleeding
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
import re
|
||||
|
||||
with open("scripts/seed.ts", "r") as f:
|
||||
content = f.read()
|
||||
|
||||
# homeLayoutPl
|
||||
content = content.replace(
|
||||
"blockType: 'trustBar',",
|
||||
"blockType: 'trustBar',\n eyebrow: 'Zaufanie',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'uniqueValue',\n title: 'Rozliczenia bez bariery językowej',",
|
||||
"blockType: 'uniqueValue',\n eyebrow: 'Wartość',\n title: 'Rozliczenia bez bariery językowej',\n features: [{ text: 'Bez barier językowych' }, { text: 'Indywidualne podejście' }],"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'stats',\n items:",
|
||||
"blockType: 'stats',\n eyebrow: 'Statystyki',\n items:"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'servicesList',\n title:",
|
||||
"blockType: 'servicesList',\n eyebrow: 'Usługi',\n title:"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'process',\n title: 'Jak to działa',",
|
||||
"blockType: 'process',\n eyebrow: 'Proces',\n title: 'Jak to działa',\n subtitle: 'Prosty i przejrzysty proces rozliczenia w 3 krokach — bez zbędnych formalności.',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'affiliation',\n title: 'Zaufanie i bezpieczeństwo',",
|
||||
"blockType: 'affiliation',\n eyebrow: 'Zaufanie',\n title: 'Zaufanie i bezpieczeństwo',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'faqTeaser',\n title:",
|
||||
"blockType: 'faqTeaser',\n eyebrow: 'FAQ',\n title:"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'finalCta',\n title: 'Gotowy na wyższy zwrot podatku?',",
|
||||
"blockType: 'finalCta',\n eyebrow: 'Kontakt',\n title: 'Gotowy na wyższy zwrot podatku?',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'finalCta',\n title: 'Masz pytania dotyczące Twojego rozliczenia?',",
|
||||
"blockType: 'finalCta',\n eyebrow: 'Kontakt',\n title: 'Masz pytania dotyczące Twojego rozliczenia?',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'servicesDetailed',\n title: 'Czym się zajmuję',",
|
||||
"blockType: 'servicesDetailed',\n eyebrow: 'Usługi',\n title: 'Czym się zajmuję',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'eligibility',\n title: 'Dla kogo — zakres uprawnień doradczych wg §4 Nr. 11 StBerG',",
|
||||
"blockType: 'eligibility',\n eyebrow: 'Zakres uprawnień doradczych',\n title: 'Dla kogo — zakres uprawnień doradczych wg §4 Nr. 11 StBerG',"
|
||||
)
|
||||
|
||||
# homeLayoutDe
|
||||
content = content.replace(
|
||||
"blockType: 'uniqueValue',\n title: 'Steuererklärungen ohne Sprachbarriere',",
|
||||
"blockType: 'uniqueValue',\n eyebrow: 'Wert',\n title: 'Steuererklärungen ohne Sprachbarriere',\n features: [{ text: 'Ohne Sprachbarrieren' }, { text: 'Individueller Ansatz' }],"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'process',\n title: 'Wie es funktioniert',",
|
||||
"blockType: 'process',\n eyebrow: 'Prozess',\n title: 'Wie es funktioniert',\n subtitle: 'Ein einfacher und transparenter 3-Schritte-Abrechnungsprozess — ohne unnötige Formalitäten.',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'affiliation',\n title: 'Vertrauen und Sicherheit',",
|
||||
"blockType: 'affiliation',\n eyebrow: 'Vertrauen',\n title: 'Vertrauen und Sicherheit',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'finalCta',\n title: 'Bereit für eine höhere Steuererstattung?',",
|
||||
"blockType: 'finalCta',\n eyebrow: 'Kontakt',\n title: 'Bereit für eine höhere Steuererstattung?',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'finalCta',\n title: 'Haben Sie Fragen zu Ihrer Steuererklärung?',",
|
||||
"blockType: 'finalCta',\n eyebrow: 'Kontakt',\n title: 'Haben Sie Fragen zu Ihrer Steuererklärung?',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'servicesDetailed',\n title: 'Was ich anbiete',",
|
||||
"blockType: 'servicesDetailed',\n eyebrow: 'Leistungen',\n title: 'Was ich anbiete',"
|
||||
)
|
||||
content = content.replace(
|
||||
"blockType: 'eligibility',\n title: 'Beratungsbefugnis gemäß § 4 Nr. 11 StBerG',",
|
||||
"blockType: 'eligibility',\n eyebrow: 'Umfang der Beratungsbefugnis',\n title: 'Beratungsbefugnis gemäß § 4 Nr. 11 StBerG',"
|
||||
)
|
||||
|
||||
# The missing ones for DE (Stats, ServicesList, FAQ)
|
||||
content = re.sub(
|
||||
r"blockType: 'stats',\n items: \[\n \{\n stat: '20\+',",
|
||||
r"blockType: 'stats',\n eyebrow: 'Statistiken',\n items: [\n {\n stat: '20+',",
|
||||
content, count=1
|
||||
)
|
||||
content = re.sub(
|
||||
r"blockType: 'servicesList',\n title: 'Was ich anbiete',",
|
||||
r"blockType: 'servicesList',\n eyebrow: 'Leistungen',\n title: 'Was ich anbiete',",
|
||||
content, count=1
|
||||
)
|
||||
content = re.sub(
|
||||
r"blockType: 'faqTeaser',\n title: 'Häufige Fragen',",
|
||||
r"blockType: 'faqTeaser',\n eyebrow: 'FAQ',\n title: 'Häufige Fragen',",
|
||||
content, count=1
|
||||
)
|
||||
|
||||
with open("scripts/seed.ts", "w") as f:
|
||||
f.write(content)
|
||||
Reference in New Issue
Block a user