Two adjacent i18n leaks in /tools/fristenrechner "Was kommt nach…" mode,
same pattern as t-paliad-112's deadline_rules fix but on event_deadlines:
A) title_de empty for all 70 rows. The DTO already falls back to title
silently, so DE locale rendered English titles ("Statement of Defence",
"Decision of the EPO", …). Backfilled via mig 035 with UPC RoP DE
terminology that matches the trigger_events.name_de translations from
mig 033, so the picker label and the deadline row read the same.
B) notes column carries English text on rows 50, 52, 70 (DE-named column
was DE-only in spec, but seeds slipped EN strings through). Mig 036
adds a parallel notes_en column following the t-112 mig 032 pattern,
copies the existing English into notes_en, and replaces notes with
proper DE for those three rows.
Render path:
- service: select notes_en, plumb through EventDeadlineResult.NotesEN
- frontend: getLang() === "en" ? (notesEN || notes) : notes (mirrors the
proceeding-tree timeline branch already in fristenrechner.ts)
45 lines
2.1 KiB
SQL
45 lines
2.1 KiB
SQL
-- t-paliad-116 B: paliad.event_deadlines.notes_en column + DE/EN swap
|
|
-- for the three rows that ship English text in the (DE-named) notes
|
|
-- column.
|
|
--
|
|
-- The DTO has long emitted `notes` directly into the EN render, so the
|
|
-- pattern matches t-112 mig 032 for deadline_rules: add a parallel
|
|
-- notes_en column, render path prefers _en when locale=EN and falls
|
|
-- back to notes (DE) when NULL.
|
|
--
|
|
-- Three rows currently leak English into the DE locale (ids 50, 52, 70):
|
|
-- 50, 52: "Or 20 Working days, whichever is longer"
|
|
-- 70: "The 262.2 application can also be filed for opponent
|
|
-- submissions to protect confidential information disclosed
|
|
-- by the opponent."
|
|
-- For those rows we (1) copy the existing English string verbatim into
|
|
-- notes_en, and (2) overwrite notes with the proper DE translation so
|
|
-- the DE locale stops leaking.
|
|
|
|
ALTER TABLE paliad.event_deadlines
|
|
ADD COLUMN IF NOT EXISTS notes_en text;
|
|
|
|
COMMENT ON COLUMN paliad.event_deadlines.notes_en IS
|
|
'English translation of notes. Render path prefers this column when '
|
|
'the active locale is EN; falls back to notes (DE) when NULL.';
|
|
|
|
-- Step 1: preserve current English text in notes_en for the three rows
|
|
-- that have it.
|
|
UPDATE paliad.event_deadlines SET notes_en = CASE id
|
|
WHEN 50 THEN 'Or 20 Working days, whichever is longer'
|
|
WHEN 52 THEN 'Or 20 Working days, whichever is longer'
|
|
WHEN 70 THEN 'The 262.2 application can also be filed for opponent submissions to protect confidential information disclosed by the opponent.'
|
|
ELSE notes_en
|
|
END
|
|
WHERE id IN (50, 52, 70);
|
|
|
|
-- Step 2: replace the leaking English text in the DE-named notes column
|
|
-- with proper DE translations.
|
|
UPDATE paliad.event_deadlines SET notes = CASE id
|
|
WHEN 50 THEN 'Oder 20 Werktage, je nachdem, was länger ist'
|
|
WHEN 52 THEN 'Oder 20 Werktage, je nachdem, was länger ist'
|
|
WHEN 70 THEN 'Der Antrag nach Regel 262.2 kann auch für Schriftsätze der einsprechenden Partei gestellt werden, um vertrauliche Informationen zu schützen, die von der einsprechenden Partei offengelegt wurden.'
|
|
ELSE notes
|
|
END
|
|
WHERE id IN (50, 52, 70);
|