fix(calendar): correct mistyped toastui template keys so translations apply - #231
Open
lmzr wants to merge 3 commits into
Open
fix(calendar): correct mistyped toastui template keys so translations apply#231lmzr wants to merge 3 commits into
lmzr wants to merge 3 commits into
Conversation
Two template callbacks were registered under misspelled keys, so
toastui-calendar never invoked them and rendered its hardcoded English
labels instead:
- poupSave -> popupSave (event popup "Save" button)
- allDayTitle -> alldayTitle (week/day all-day row label)
The i18next keys t('Save') and t('All Day') already existed in every
populated translation file; only the template names were wrong, so the
fix is code-side only. Bug present in master since gristlabs#65.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
toastui-calendar merges the `template-alldayTitle` class onto its own default vnode, but wraps a *string*-returning template in a fresh `.template-alldayTitle` element instead — so our translated label lost the built-in `.left-content` table-cell styling and rendered oversized and top-aligned in the all-day panel. Re-apply that styling (table-cell, 11px, right-aligned, middle) to the wrapper class so the localized label matches the library default: vertically centered, small font. Verified live via CDP (offset 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for boisterous-sunburst-a5c941 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The all-day title cell is pinned to the 72px hour-gutter width but laid out as `display: table`, where that's only a minimum: a nowrap label longer than "All day" (e.g. "Toute la journée") widened it and shifted the whole all-day row ~17px right. Let the label wrap so the cell keeps the gutter width and the day-cells stay aligned in any language. Verified via CDP: fr-FR 17px -> 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two template callbacks in the calendar widget were registered under misspelled keys, so toastui-calendar never invoked them and rendered its hardcoded English labels:
poupSave→popupSave(event popup "Save" button)allDayTitle→alldayTitle(week/day all-day row label)The i18next keys (
t('Save'),t('All Day')) already existed in every populated translation file; only the template names were wrong. Bug present since #65.Follow-up (2nd commit): once
alldayTitlefires, it returns a string, which toastui wraps in a bare.template-alldayTitleelement (it only merges the class onto its own default vnode). That dropped the built-in.left-contentcell styling, leaving the label oversized and top-aligned. A CSS rule re-appliesdisplay:table-cell; font-size:11px; text-align:right; vertical-align:middleto the wrapper, restoring the default look — now translated.