Markdown Converter
Agent skill for markdown-converter
This is a React TypeScript application for learning Cantonese vocabulary. It's designed as a mobile-first language learning app with Swedish as the primary interface language, featuring interactive quizzes to help users practice Swedish-to-Cantonese translations.
Sign in to like and favorite skills
This is a React TypeScript application for learning Cantonese vocabulary. It's designed as a mobile-first language learning app with Swedish as the primary interface language, featuring interactive quizzes to help users practice Swedish-to-Cantonese translations.
App.tsx - Main application wrapper with theme provider and routingHeader.tsx - Top navigation with app title and pinyin toggleBottomNav.tsx - Fixed bottom navigation for mobile experienceHome.tsx - Landing page with feature overviewQuiz.tsx - Core quiz functionality with setup, questions, and resultstranslations/ - Internationalization system supporting Swedish (primary) and Englishcantonese-quiz-difficulty - Quiz difficulty settingcantonese-quiz-category - Selected vocabulary categorycantonese-quiz-questionCount - Number of questions per quizuseT() for i18nVocabulary data is stored in JSON files with this structure:
interface VocabularyItem { swedish: string; // Swedish word characters: string; // Chinese characters pinyin: string; // Romanized pronunciation difficulty: number; // 1-5 difficulty rating }
animals.json)food.json)family.json)actions.json)items.json)sv.ts)en.ts)translate(key, params)xs (mobile), md+ (desktop)display: "grid")src/ ├── components/ # React components ├── translations/ # i18n files ├── *.json # Vocabulary data files ├── App.tsx # Main app component └── index.tsx # App entry point
sv.ts and en.ts filesusedWords Set to prevent duplicatessx prop for component stylingxs, md breakpointsinterface ComponentProps { required: string; optional?: boolean; withDefault?: number; } const Component: React.FC<ComponentProps> = ({ required, optional = false, withDefault = 10 }) => { // component implementation };
const { t, translate } = useT(); // Simple translation <Typography>{t.home.welcome}</Typography> // Translation with parameters <Typography> {translate(t.quiz.questionNumber, { current: "1", total: "10" })} </Typography>
const getSavedSetting = (key: string, defaultValue: any) => { try { const saved = localStorage.getItem(`cantonese-quiz-${key}`); return saved ? JSON.parse(saved) : defaultValue; } catch { return defaultValue; } }; const saveSetting = (key: string, value: any) => { try { localStorage.setItem(`cantonese-quiz-${key}`, JSON.stringify(value)); } catch { // Silently ignore localStorage errors } };
// Filter out used words to prevent repeats const availableWords = vocabulary.filter((item) => !usedWords.has(item.swedish)); // Add to used words after selection setUsedWords((prev) => { const newSet = new Set(prev); newSet.add(correctItem.swedish); return newSet; });
Remember: This app prioritizes user experience with smooth mobile interactions, persistent settings, and clear feedback. Always consider the mobile-first experience and Swedish language context when making changes.