-
-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Labels
Description
Describe the bug
The warnings displayed in the skill modal and the sidebar panel in the diff view are currently hardcoded strings returned by the server and do not use translation keys.
npmx.dev/server/utils/compare.ts
Lines 241 to 244 in e0a31c3
| const warnings: string[] = [] | |
| if (fileChanges.truncated) { | |
| warnings.push(`File list truncated to ${MAX_FILES_COMPARE} files`) | |
| } |
npmx.dev/server/utils/skills.ts
Lines 165 to 174 in e0a31c3
| export function validateSkill(frontmatter: SkillFrontmatter): SkillWarning[] { | |
| const warnings: SkillWarning[] = [] | |
| if (!frontmatter.license) { | |
| warnings.push({ type: 'warning', message: 'No license specified' }) | |
| } | |
| if (!frontmatter.compatibility) { | |
| warnings.push({ type: 'warning', message: 'No compatibility info' }) | |
| } | |
| return warnings | |
| } |
Additional context
I'd like to make these warnings use translation keys, but I'm not sure what the best approach would be:
Returning i18n keys directly from the API doesn‘t appear to be a common pattern in this project. Would it be preferable to move the warning generation entirely to the client instead, similar to the other client-side warning patterns already used in this project?
Reactions are currently unavailable