From ae43ad851f8d0026eb73b04b1051dfd7207b72d8 Mon Sep 17 00:00:00 2001 From: vivek Date: Fri, 26 Dec 2025 20:55:38 +0530 Subject: [PATCH 1/7] i18n: modernize and clean up translations for multiple locales - Cleaned up Hindi (hi) translation file (removed duplicates, fixed indentation) - Updated Preferences and Nav sections for hi, es-419, zh-CN, it, ja, de, and fr-CA - Aligned Help menu keys across locales with en-US structure --- .../IDE/components/Preferences/index.jsx | 18 +- translations/locales/de/translations.json | 4 +- translations/locales/en-US/translations.json | 1 + translations/locales/es-419/translations.json | 15 +- translations/locales/fr-CA/translations.json | 4 +- translations/locales/hi/translations.json | 457 +----------------- translations/locales/it/translations.json | 12 +- translations/locales/ja/translations.json | 15 +- translations/locales/zh-CN/translations.json | 22 +- 9 files changed, 92 insertions(+), 456 deletions(-) diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index aa3a4b68a6..4435811039 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -151,7 +151,7 @@ export default function Preferences() { return (
- p5.js Web Editor | Preferences + {t('Preferences.TitleHelmet')} @@ -584,7 +584,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5Sound(true)); }} aria-label={`${t('Preferences.SoundAddon')} ${t( - 'Preferences.AddonOn' + 'Preferences.AddonOnARIA' )}`} name="soundaddon" id="soundaddon-on" @@ -601,7 +601,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5Sound(false)); }} aria-label={`${t('Preferences.SoundAddon')} ${t( - 'Preferences.AddonOff' + 'Preferences.AddonOffARIA' )}`} name="soundaddon" id="soundaddon-off" @@ -641,7 +641,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5PreloadAddon(true)) } aria-label={`${t('Preferences.PreloadAddon')} ${t( - 'Preferences.AddonOn' + 'Preferences.AddonOnARIA' )}`} name="preloadaddon" id="preloadaddon-on" @@ -661,7 +661,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5PreloadAddon(false)) } aria-label={`${t('Preferences.PreloadAddon')} ${t( - 'Preferences.AddonOff' + 'Preferences.AddonOffARIA' )}`} name="preloadaddon" id="preloadaddon-off" @@ -688,7 +688,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5ShapesAddon(true)) } aria-label={`${t('Preferences.ShapesAddon')} ${t( - 'Preferences.AddonOn' + 'Preferences.AddonOnARIA' )}`} name="shapesaddon" id="shapesaddon-on" @@ -708,7 +708,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5ShapesAddon(false)) } aria-label={`${t('Preferences.ShapesAddon')} ${t( - 'Preferences.AddonOff' + 'Preferences.AddonOffARIA' )}`} name="shapesaddon" id="shapesaddon-off" @@ -735,7 +735,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5DataAddon(true)) } aria-label={`${t('Preferences.DataAddon')} ${t( - 'Preferences.AddonOn' + 'Preferences.AddonOnARIA' )}`} name="dataaddon" id="dataaddon-on" @@ -752,7 +752,7 @@ export default function Preferences() { updateHTML(versionInfo.setP5DataAddon(false)) } aria-label={`${t('Preferences.DataAddon')} ${t( - 'Preferences.AddonOff' + 'Preferences.AddonOffARIA' )}`} name="dataaddon" id="dataaddon-off" diff --git a/translations/locales/de/translations.json b/translations/locales/de/translations.json index 9c763d16b1..363e654111 100644 --- a/translations/locales/de/translations.json +++ b/translations/locales/de/translations.json @@ -27,7 +27,9 @@ "Title": "Hilfe", "KeyboardShortcuts": "Tastenkürzel", "Reference": "Referenz", - "About": "Über" + "ReportBug": "Fehler melden", + "ChatOnDiscord": "Auf Discord chatten", + "PostOnTheForum": "Im Forum posten" }, "Lang": "Sprache", "BackEditor": "Zurück zum Editor", diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json index 1d254a5afc..60d951571e 100644 --- a/translations/locales/en-US/translations.json +++ b/translations/locales/en-US/translations.json @@ -177,6 +177,7 @@ "OpenARIA": "Open console" }, "Preferences": { + "TitleHelmet": "p5.js Web Editor | Preferences", "Settings": "Settings", "GeneralSettings": "General Settings", "Accessibility": "Accessibility", diff --git a/translations/locales/es-419/translations.json b/translations/locales/es-419/translations.json index 3694eba545..71ec03cf4b 100644 --- a/translations/locales/es-419/translations.json +++ b/translations/locales/es-419/translations.json @@ -27,7 +27,9 @@ "Title": "Ayuda", "KeyboardShortcuts": "Atajos", "Reference": "Referencia", - "About": "Acerca de" + "ReportBug": "Reportar un error", + "ChatOnDiscord": "Chat en Discord", + "PostOnTheForum": "Publicar en el foro" }, "Lang": "Lenguaje", "BackEditor": "Regresa al editor", @@ -184,7 +186,16 @@ "SoundAddon": "p5.sound.js Add-on Biblioteca", "PreloadAddon": "p5.js 1.x Compatibility Add-on Biblioteca — Precarga", "ShapesAddon": "p5.js 1.x Compatibility Add-on Biblioteca — formas", - "DataAddon": "p5.js 1.x Compatibility Add-on Biblioteca — Estructuras de datos" + "DataAddon": "p5.js 1.x Compatibility Add-on Biblioteca — Estructuras de datos", + "AddonOnARIA": "activado", + "AddonOffARIA": "desactivado", + "TitleHelmet": "Editor Web p5.js | Preferencias", + "CustomVersionTitle": "¿Gestionando tus propias bibliotecas? ¡Genial!", + "CustomVersionInfo": "La versión de p5.js se está gestionando actualmente en el código de index.html. Esto significa que no se puede ajustar desde esta pestaña.", + "CustomVersionReset": "Si deseas utilizar las bibliotecas predeterminadas, puedes reemplazar las etiquetas de script en index.html por las siguientes:", + "SoundReference": "Ver la referencia de p5.sound compatible con p5.js {{version}}", + "CopyToClipboardSuccess": "¡Copiado al portapapeles!", + "CopyToClipboardFailure": "No pudimos copiar el texto, intenta seleccionarlo y copiarlo manualmente." }, "KeyboardShortcuts": { "Title": " Atajos de teclado", diff --git a/translations/locales/fr-CA/translations.json b/translations/locales/fr-CA/translations.json index f3b1767a75..48e158a5ce 100644 --- a/translations/locales/fr-CA/translations.json +++ b/translations/locales/fr-CA/translations.json @@ -28,7 +28,9 @@ "Title": "Aide", "KeyboardShortcuts": "Raccourcis clavier", "Reference": "Référence", - "About": "À propos" + "ReportBug": "Signaler un bogue", + "ChatOnDiscord": "Discuter sur Discord", + "PostOnTheForum": "Publier sur le forum" }, "Lang": "Langue", "BackEditor": "Retour à l'éditeur", diff --git a/translations/locales/hi/translations.json b/translations/locales/hi/translations.json index 13d7a61aca..97abee29a6 100644 --- a/translations/locales/hi/translations.json +++ b/translations/locales/hi/translations.json @@ -1,441 +1,14 @@ { - "Nav": { - "File": { - "Title": "फाइल", - "New": "नई", - "Share": "भेजें", - "Duplicate": "प्रतिलिपि बनाएँ", - "Open": "खोलें", - "Download": "डाउनलोड", - "AddToCollection": "संग्रह में जोड़ें", - "Examples": "उदाहरण" - }, - "Edit": { - "Title": "संपादित करे", - "TidyCode": "कोड साफ़ करें", - "Find": "खोज", - "Replace": "बदली करें" - }, - "Sketch": { - "Title": "चित्र", - "AddFile": "फाइल जोड़ें", - "AddFolder": "फोल्डर जोड़ें", - "Run": "चलाएं", - "Stop": "रोकें" - }, - "Help": { - "Title": "मदद", - "KeyboardShortcuts": "कीबोर्ड शॉर्टकट", - "Reference": "रिफरेन्स", - "About": "अधिक जानकारी" - }, - "Lang": "भाषा", - "BackEditor": "एडिटर पर वापस जाएं", - "WarningUnsavedChanges": "क्या आप इस पेज को छोड़ना चाहते हैं? आपके पास अनसेव्ड परिवर्तन हैं।", - "Login": "लॉग इन", - "LoginOr": "या", - "SignUp": "साइन अप", - "Auth": { - "Welcome": "स्वागत है", - "Hello": "नमस्ते", - "MyAccount": "मेरा अकाउंट", - "My": "मेरा", - "MySketches": "मेरे स्केच", - "MyCollections": "मेरे संग्रह", - "Asset": "संपत्ति", - "MyAssets": "मेरी संपत्तियाँ", - "LogOut": "लॉग आउट" - } - }, - "Banner": { - "Copy": "Donate Today! Support p5.js and the Processing Foundation." - }, - "CodemirrorFindAndReplace": { - "ToggleReplace": "टॉगल बदली करें", - "Find": "खोज", - "FindPlaceholder": "फ़ाइलों में खोजें", - "Replace": "बदली करें", - "ReplaceAll": "सबको बदली करें", - "ReplacePlaceholder": "बदलने के लिए पाठ", - "Regex": "रेगुलर एक्सप्रेशन", - "CaseSensitive": "केस सेंसिटिव", - "WholeWords": "संपूर्ण शब्द", - "Previous": "पिछला", - "Next": "अगला", - "NoResults": "कोई परिणाम नहीं", - "Close": "बंद करे" - }, - "LoginForm": { - "UsernameOrEmail": "ईमेल या यूजरनेम", - "UsernameOrEmailARIA": "ईमेल या यूजरनेम", - "Password": "पासवर्ड", - "PasswordARIA": "पासवर्ड", - "Submit": "लॉग इन", - "Errors": { - "invalidCredentials": "अमान्य ईमेल या पासवर्ड।" - } - }, - "LoginView": { - "Title": "p5.js वेब एडिटर | लॉग इन", - "Login": "लॉग इन", - "LoginOr": "या", - "SignUp": "साइन अप", - "Email": "ईमेल", - "Username": "यूजरनेम", - "DontHaveAccount": "अकाउंट नहीं है? ", - "ForgotPassword": "पासवर्ड भूल गए? ", - "ResetPassword": "पासवर्ड रीसेट करें" - }, - "SocialAuthButton": { - "Connect": "कनेक्ट {{serviceauth}} अकाउंट", - "Unlink": "अनलिंक {{serviceauth}} अकाउंट", - "Login": "{{serviceauth}} से लोगिन करें", - "LogoARIA": "{{serviceauth}} प्रतीक चिन्ह" - }, - "About": { - "Title": "के बारे में", - "TitleHelmet": "p5.js वेब एडिटर | के बारे में", - "Headline": "p5.js एडिटर के साथ p5.js स्केच बनाएं, शेयर करें और रीमिक्स करें।", - "IntroDescription1": "p5.js एक मुफ्त, ओपन-सोर्स जावास्क्रिप्ट लाइब्रेरी है जिससे कोडिंग सीखने और कला बनाने में मदद मिलती है। p5.js एडिटर का उपयोग करके, आप बिना कुछ भी डाउनलोड या कॉन्फ़िगर किए p5.js स्केच बना सकते हैं, शेयर कर सकते हैं और रीमिक्स कर सकते हैं।", - "IntroDescription2": "हमारा मानना है कि सॉफ़्टवेयर और इसे सीखने के उपकरण यथासंभव खुले और समावेशी होने चाहिए। आप प्रोसेसिंग फाउंडेशन को दान करके इस कार्य का समर्थन कर सकते हैं, जो संगठन p5.js का समर्थन करता है। आपका दान p5.js के लिए सॉफ़्टवेयर विकास, कोड उदाहरण और ट्यूटोरियल जैसे शिक्षा संसाधन, फेलोशिप और सामुदायिक कार्यक्रमों का समर्थन करता है।", - "Contribute": "योगदान", - "NewP5": "p5.js पर नये?", - "Report": "बग रिपोर्ट", - "Learn": "सीखें", - "WebEditor": "वेब संपादक", - "Resources": "साधन", - "Libraries": "लाइब्रेरीज़", - "Forum": "समूह", - "Examples": "उदाहरण", - "Home": "होम", - "Twitter": "ट्विटर", - "Instagram": "इंस्टाग्राम", - "Discord": "डिस्कॉर्ड", - "PrivacyPolicy": "गोपनीयता नीति", - "TermsOfUse": "उपयोग की शर्तें", - "CodeOfConduct": "आचार संहिता", - "DiscordCTA": "डिस्कॉर्ड से जुड़ें", - "ForumCTA": "समूह से जुड़ें", - "Socials": "सोशल मीडिया", - "Email": "ईमेल", - "Youtube": "यूट्यूब", - "Github": "गिटहब", - "Reference": "रेफरेंस", - "Donate": "दान करें", - "GetInvolved": "शामिल हों", - "X": "एक्स", - "LinkDescriptions": { - "Home": "p5.js और हमारे समुदाय के बारे में अधिक जानें।", - "Examples": "संक्षिप्त उदाहरणों के साथ p5.js की संभावनाओं का पता लगाएं।", - "CodeOfConduct": "हमारी सामुदायिक स्थिति और आचार संहिता पढ़ें।", - "Libraries": "समुदाय द्वारा बनाई गई लाइब्रेरीज़ के साथ p5.js की संभावनाओं का विस्तार करें।", - "Reference": "p5.js कोड के हर हिस्से के लिए आसान व्याख्याएं खोजें।", - "Donate": "प्रोसेसिंग फाउंडेशन को दान देकर इस काम का समर्थन करें।", - "Contribute": "गिटहब पर ओपन-सोर्स p5.js एडिटर में योगदान दें।", - "Report": "p5.js एडिटर के साथ टूटे या गलत व्यवहार की रिपोर्ट करें।", - "Forum": "समुदाय द्वारा बनाई गई लाइब्रेरीज़ के साथ p5.js की संभावनाओं का विस्तार करें।", - "Discord": "समुदाय द्वारा बनाई गई लाइब्रेरीज़ के साथ p5.js की संभावनाओं का विस्तार करें।" - } - }, - "Toast": { - "OpenedNewSketch": "नया स्केच खोला", - "SketchSaved": "स्केच सेव किया", - "SketchFailedSave": "स्केच सेव करने में असमर्थ", - "AutosaveEnabled": "ऑटोसेव चालू", - "LangChange": "भाषा बदली", - "SettingsSaved": "सेटिंग्स सेव की", - "EmptyCurrentPass": "वर्तमान पासवर्ड फ़ील्ड खाली है", - "IncorrectCurrentPass": "वर्तमान पासवर्ड गलत है ", - "DefaultError":"कुछ गलत हो गया", - "UserNotFound": "उपयोगकर्ता नहीं मिला", - "NetworkError": "नेटवर्क त्रुटि" - }, - "Toolbar": { - "Preview": "पूर्वावलोकन", - "Auto-refresh": "ऑटो-रिफ़्रेश", - "OpenPreferencesARIA": "प्राथमिकताएँ खोलें", - "PlaySketchARIA": "स्केच चलाएं", - "PlayOnlyVisualSketchARIA": "केवल दृश्य स्केच चलाएं", - "StopSketchARIA": "स्केच बंद करे", - "EditSketchARIA": "स्केच का नाम संपादित करें", - "NewSketchNameARIA": "नया स्केच नाम", - "By": " द्वारा ", - "CustomLibraryVersion": "कस्टम p5.js संस्करण", - "VersionPickerARIA": "संस्करण चयनकर्ता", - "NewVersionPickerARIA": "संस्करण चयनकर्ता" - }, - "Console": { - "Title": "कंसोल", - "Clear": "साफ़ करें", - "ClearARIA": "कंसोल साफ़ करें", - "Close": "बंद करें", - "CloseARIA": "कंसोल बंद करें", + "Nav": { + "File": { + "Title": "फाइल", + "New": "नई", + "Share": "भेजें", + "Duplicate": "प्रतिलिपि बनाएँ", "Open": "खोलें", - "OpenARIA": "कंसोल खोलें" - }, - "Preferences": { - "Settings": "सेटिंग्स", - "GeneralSettings": "सामान्य सेटिंग्स", - "Accessibility": "ऐक्सेसबिलिटी", - "LibraryManagement": "लाइब्रेरी प्रबंधन", - "Theme": "थीम", - "LightTheme": "लाइट", - "LightThemeARIA": "लाइट थीम चालू", - "DarkTheme": "डार्क", - "DarkThemeARIA": "डार्क थीम चालू", - "HighContrastTheme": "ज़्यादा कंट्रास्ट", - "HighContrastThemeARIA": "ज़्यादा कंट्रास्ट थीम चालू", - "TextSize": "शब्दों का साइज", - "DecreaseFont": "कम करें", - "DecreaseFontARIA": "फॉन्ट साइज़ कम करें", - "IncreaseFont": "बढ़ाएं", - "IncreaseFontARIA": "फॉन्ट साइज़ बढ़ाएं", - "FontSize": "फ़ॉन्ट आकार", - "SetFontSize": "फ़ॉन्ट आकार सेट करें", - "Autosave": "ऑटोसेव", - "On": "चालू", - "AutosaveOnARIA": "ऑटोसेव चालू", - "Off": "बंद", - "AutosaveOffARIA": "ऑटोसेव बंद", - "AutocloseBracketsQuotes": "ऑटोक्लोज ब्रैकिट और क्वोट", - "AutocloseBracketsQuotesOnARIA": "ऑटोक्लोज ब्रैकिट और क्वोट चालू", - "AutocloseBracketsQuotesOffARIA": "ऑटोक्लोज ब्रैकिट और क्वोट बंद", - "AutocompleteHinter": "ऑटोकम्प्लीट हिंटर", - "AutocompleteHinterOnARIA": "ऑटोकम्प्लीट हिंटर चालू", - "AutocompleteHinterOffARIA": "ऑटोकम्प्लीट हिंटर बंद", - "WordWrap": "वर्ड रैप", - "WordWrapOnARIA": "वर्डरैप चालू", - "WordWrapOffARIA": "वर्डरैप बंद", - "LineNumbers": "लाइन नम्बर्ज़", - "LineNumbersOnARIA": "लाइन नम्बर्ज़ चालू", - "LineNumbersOffARIA": "लाइन नम्बर्ज़ बंद", - "LintWarningSound": "लिन्ट वॉर्निंग साउन्ड", - "LintWarningOnARIA": "लिन्ट वॉर्निंग चालू", - "LintWarningOffARIA": "लिन्ट वॉर्निंग बंद", - "PreviewSound": "प्रीव्यू साउन्ड", - "PreviewSoundARIA": "प्रीव्यू साउन्ड", - "AccessibleTextBasedCanvas": "ऐक्सेसबल टेक्स्ट-आधारित कैन्वस", - "UsedScreenReader": "स्क्रीन रीडर के साथ उपयोग किया", - "PlainText": "प्लेन-टेक्स्ट", - "TextOutputARIA": "टेक्स्ट आउटपुट चालू", - "TableText": "टेबल-टेक्स्ट", - "TableOutputARIA": "टेबल आउटपुट चालू", - "LibraryVersion": "p5.js संस्करण", - "LibraryVersionInfo": "p5.js का एक [नया 2.0 संस्करण](https://github.com/processing/p5.js/releases/) उपलब्ध है! यह अगस्त 2026 में डिफ़ॉल्ट बन जाएगा, इसलिए इस समय का उपयोग इसे आज़माने और बग्स की रिपोर्ट करने के लिए करें। क्या आप 1.x से 2.0 में स्केच को स्थानांतरित करने में रुचि रखते हैं? [संगतता और स्थानांतरण संसाधनों](https://github.com/processing/p5.js-compatibility) को देखें।", - "SoundAddon": "p5.sound.js Add-on लाइब्रेरी", - "PreloadAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — प्रीलोड", - "ShapesAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — आकार", - "DataAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — डेटा संरचनाएँ" - }, - "KeyboardShortcuts": { - "Title": " कीबोर्ड शॉर्टकट", - "ShortcutsFollow": "कोड संपादन कीबोर्ड शॉर्टकट अनुसरण करते हैं", - "SublimeText": "सबलाइम टेक्स्ट शॉर्टकट", - "CodeEditing": { - "Tidy": "साफ", - "FindText": "शब्द ढूंढे", - "FindNextMatch": "अगला मिलान खोजें", - "FindPrevMatch": "पिछला मिलान ढूंढें", - "ReplaceTextMatch": "शब्द मिलान बदलें", - "IndentCodeLeft": "इंडेंट कोड लेफ्ट", - "IndentCodeRight": "इंडेंट कोड राइट", - "CommentLine": "टिप्पणी लाइन", - "FindNextTextMatch": "अगला शब्द मिलान खोजें", - "FindPreviousTextMatch": "पिछला शब्द मिलान खोजें", - "CodeEditing": "कोड संपादन", - "ColorPicker": "इनलाइन कलर पिकर दिखाएँ", - "CreateNewFile": "नया फ़ाइल बनाएँ" - - }, - "General": "सामान्य", - "GeneralSelection": { - "StartSketch": "स्केच शुरू करें", - "StopSketch": "स्केच रोकें", - "TurnOnAccessibleOutput": "सुलभ आउटपुट चालू करें", - "TurnOffAccessibleOutput": "सुलभ आउटपुट बंद करें", - "Reference": "हिंटर में चुने गए आइटम के लिए रेफरेंस जाएँ" - } - }, - "Sidebar": { - "Title": "स्केच फ़ाइलें", - "ToggleARIA": "खुले / बंद स्केच विकल्प टॉगल करें", - "AddFolder": "फ़ोल्डर बनाएँ", - "AddFolderARIA": "फ़ोल्डर जोड़ें", - "AddFile": "फ़ाइल बनाएँ", - "AddFileARIA": "फ़ाइल जोड़ें", - "UploadFile": "फ़ाइल अपलोड करें", - "UploadFileARIA": "फ़ाइल अपलोड करें" - }, - "FileNode": { - "OpenFolderARIA": "फ़ोल्डर सामग्री खोलें", - "CloseFolderARIA": "फ़ोल्डर सामग्री बंद करें", - "ToggleFileOptionsARIA": "खुले / बंद फ़ाइल विकल्प टॉगल करें", - "AddFolder": "फ़ोल्डर बनाएँ", - "AddFolderARIA": "फ़ोल्डर जोड़ें", - "AddFile": "फ़ाइल बनाएँ", - "AddFileARIA": "फ़ाइल जोड़ें", - "UploadFile": "फ़ाइल अपलोड करें", - "UploadFileARIA": "फ़ाइल अपलोड करें", - "Rename": "नाम बदलने", - "Delete": "मिटाना" - }, - "Common": { - "SiteName": "p5.js वेब एडिटर", - "Error": "ग़लती", - "ErrorARIA": "ग़लती", - "Save": "सेव", - "p5logoARIA": "p5.js लोगो", - "DeleteConfirmation": "क्या आप पक्का {{name}} को डिलीट करना चाहते हैं?" - }, - "IDEView": { - "SubmitFeedback": "प्रतिपुष्टि दें", - "SubmitFeedbackARIA": "प्रतिपुष्टि दें", - "AddCollectionTitle": "संग्रह में जोड़े", - "AddCollectionARIA":"संग्रह में जोड़े", - "ShareTitle": "शेयर", - "ShareARIA":"शेयर" - }, - "NewFileModal": { - "Title": "फ़ाइल बनाएँ", - "CloseButtonARIA": "नई फ़ाइल मोडल बंद करें", - "EnterName": "कृपया एक नाम दर्ज करें", - "InvalidType": "अमान्य फ़ाइल प्रकार। मान्य एक्सटेंशन हैं .js, .css, .json, .xml, .stl, .txt, .csv, .tsv, .mtl, .frag, और .vert." - }, - "NewFileForm": { - "AddFileSubmit": "फाइल जोडें", - "Placeholder": "नाम" - }, - "NewFolderModal": { - "Title": "फोल्डर बनाएं", - "CloseButtonARIA": "नया फ़ोल्डर मोडल बंद करें", - "EnterName": "कृपया नाम दर्ज करें", - "EmptyName": "फ़ोल्डर नाम में केवल रिक्त स्थान नहीं हो सकते", - "InvalidExtension": "फ़ोल्डर नाम में एक्सटेंशन नहीं हो सकता" - }, - "NewFolderForm": { - "AddFolderSubmit": "फोल्डर जोड़ें", - "Placeholder": "नाम" - }, - "ResetPasswordForm": { - "Email": "रेजिस्ट्रेशन के लिए उपयोग किया गया ईमेल", - "EmailARIA": "ईमेल", - "Submit": "पासवर्ड रीसेट ईमेल भेजें" - }, - "ResetPasswordView": { - "Title": "p5.js वेब एडिटर | रीसेट पासवर्ड", - "Reset": "अपना पासवर्ड रीसेट करें", - "Submitted": "आपका पासवर्ड रीसेट ईमेल शीघ्र ही आ जाना चाहिए। यदि ईमेल ना दिखे, तो अपने स्पैम फ़ोल्डर जांचें।", - "Login": "लॉग इन", - "LoginOr": "या", - "SignUp": "साइन अप" - }, - "ReduxFormUtils": { - "errorInvalidEmail": "कृपया वैध ईमेल एड्रेस लिखें", - "errorEmptyEmail": "कृपया ईमेल एड्रेस लिखें", - "errorPasswordMismatch": "पासवर्डों को मेल खाना अनिवार्य है", - "errorEmptyPassword": "कृपया पासवर्ड लिखें", - "errorShortPassword": "पासवर्ड कम से कम ६ अक्षरों का होना चाहिए", - "errorConfirmPassword": "कृपया पासवर्ड कान्फर्मेशन दर्ज करें", - "errorNewPassword": "कृपया एक नया पासवर्ड दर्ज करें या वर्तमान पासवर्ड को खाली छोड़ दें।", - "errorEmptyUsername": "कृपया यूजरनेम लिखें", - "errorLongUsername": "यूजरनेम २० अक्षरों से कम होना चाहिए।", - "errorValidUsername": "यूजरनेम में केवल संख्या, अक्षर, पिरीअड्, डैश और अंडरस्कोर शामिल होना चाहिए।", - "errorNewPasswordRepeat":"नया पासवर्ड वर्तमान पासवर्ड से भिन्न होना चाहिए।." - - }, - "NewPasswordView": { - "Title": "p5.js वेब एडिटर | नया पासवर्ड", - "Description": "नया पासवर्ड सेट करें", - "TokenInvalidOrExpired":"पासवर्ड रीसेट टोकन अमान्य है या एक्सपायर हो गया है।", - "EmptyPassword": "कृपया पासवर्ड दर्ज करें", - "PasswordConfirmation": "कृपया पासवर्ड कान्फर्मेशन दर्ज करें", - "PasswordMismatch": "पासवर्डों को मेल खाना अनिवार्य है" - }, - "AccountForm": { - "Email": "ईमेल", - "EmailARIA": "ईमेल", - "Unconfirmed": "कन्फर्म नहीं है", - "EmailSent": "कान्फर्मेशन भेज दिया, अपना ईमेल देखें", - "Resend": "कान्फर्मेशन ईमेल दोबारा भेजें", - "UserName": "यूजरनेम", - "UserNameARIA": "यूजरनेम", - "CurrentPassword": "वर्तमान पासवर्ड", - "CurrentPasswordARIA": "वर्तमान पासवर्ड", - "NewPassword": "नया पासवर्ड", - "NewPasswordARIA": "नया पासवर्ड", - "SaveAccountDetails": "खाता विवरण सहेजें" - }, - "AccountView": { - "SocialLogin": "सामाजिक लॉग इन", - "SocialLoginDescription": "p5.js वेब संपादक में लॉग इन करने के लिए अपने GitHub या Google खाते का उपयोग करें।", - "Title": "p5.js वेब संपादक | खाता सेटिंग्स", - "Settings": "मेरा खाता", - "AccountTab": "खाता", - "AccessTokensTab": "टोकन का उपयोग" - }, - "APIKeyForm": { - "ConfirmDelete": "क्या आप वाकई {{key_label}} को डिलीट करना चाहते हैं ?", - "Summary": "पर्सनल एक्सेस टोकन पासवर्ड की तरह काम करते हैं और ऑटोमेटिड स्क्रिप्ट को एडिटर API की अनुमति देते हैं।\n प्रत्येक स्क्रिप्ट जिसे एक्सेस की आवश्यकता है, उसके लिए एक टोकन बनाएं।", - "CreateToken": "नया टोकन बनाएं", - "TokenLabel": "यह टोकन किस लिए है?", - "TokenPlaceholder": "यह टोकन किस लिए है? उदाहरण इम्पोर्ट स्क्रिप्ट", - "CreateTokenSubmit": "बनाएँ", - "NoTokens": "आपके पास कोई मौजूदा टोकन नहीं है।", - "NewTokenTitle": "आपका नया एक्सेस टोकन", - "NewTokenInfo": "अपना नया पर्सनल एक्सेस टोकन कॉपी करना सुनिश्चित करें।\n आप इसे फिर से नहीं देख पाएंगे!", - "ExistingTokensTitle": "मौजूदा टोकन" - }, - "APIKeyList": { - "Name": "नाम", - "Created": "बनाने की तारीख", - "LastUsed": "आखरी इस्तेमाल", - "Actions": "ऐक्शन्ज़", - "Never": "कभी नहीं", - "DeleteARIA": "डिलीट API Key" - }, - "NewPasswordForm": { - "Title": "पासवर्ड", - "TitleARIA": "पासवर्ड", - "ConfirmPassword": "कन्फर्म पासवर्ड", - "ConfirmPasswordARIA": "कन्फर्म पासवर्ड", - "SubmitSetNewPassword": "नया पासवर्ड सेट करें" - }, - "SignupForm": { - "Title": "यूजरनेम", - "TitleARIA": "यूजरनेम", - "Email": "ईमेल", - "EmailARIA": "ईमेल", - "Password": "पासवर्ड", - "PasswordARIA": "पासवर्ड", - "ConfirmPassword": "कन्फर्म पासवर्ड", - "ConfirmPasswordARIA": "कन्फर्म पासवर्ड", - "SubmitSignup": "साइन अप" - }, - "SignupView": { - "Title": "p5.js वेब एडिटर | साइन अप", - "Description": "साइन अप", - "Or": "या", - "AlreadyHave": "पहले से ही अकाउंट है?", - "Login": "लॉग इन", - "Warning": "साइन अप करके, आप p5.js संपादक की उपयोग की <0>शर्तों और <1>गोपनीयता नीति से सहमत होते हैं।" - }, - "EmailVerificationView": { - "Title": "p5.js वेब एडिटर | ईमेल वेरीफिकेशन", - "Verify": "अपना ईमेल व्हेरिफाय करें", - "InvalidTokenNull": "वह लिंक अमान्य है।", - "Checking": "टोकन की पुष्टि की जा रही है, कृपया प्रतीक्षा करें...", - "Verified": "सबकुछ ठीक है। आपके ईमेल का पुष्टीकरण हो चुका है।", - "InvalidState": "टोकन अमान्य है या समाप्त हो गया है।" - }, - "AssetList": { - "Title": "p5.js वेब एडिटर | मेरे ऐसेट", - "ToggleOpenCloseARIA": "टॉगल ओपेन/क्लोज़ ऐसेट ऑप्शन्ज़", - "Delete": "डिलीट", - "OpenNewTab": "नये टैब में खोलें", - "NoUploadedAssets": "कोई ऐसेट अपलोड नही की।", - "HeaderName": "नाम", - "HeaderSize": "साइज़", - "HeaderSketch": "स्केच" + "Download": "डाउनलोड", + "AddToCollection": "संग्रह में जोड़ें", + "Examples": "उदाहरण" }, "Edit": { "Title": "संपादित करे", @@ -458,20 +31,27 @@ "ChatOnDiscord": "डिस्कॉर्ड पर चैट करें", "PostOnTheForum": "फ़ोरम पर पोस्ट करें" }, + "Lang": "भाषा", "BackEditor": "एडिटर पर वापस जाएं", "WarningUnsavedChanges": "क्या आप इस पेज को छोड़ना चाहते हैं? आपके पास अनसेव्ड परिवर्तन हैं।", "Login": "लॉग इन", "LoginOr": "या", "SignUp": "साइन अप", "Auth": { + "Welcome": "स्वागत है", "Hello": "नमस्ते", "MyAccount": "मेरा अकाउंट", + "My": "मेरा", "MySketches": "मेरे स्केच", "MyCollections": "मेरे संग्रह", - "MyAssets": "मेरे ऐसेट", + "Asset": "संपत्ति", + "MyAssets": "मेरी संपत्तियाँ", "LogOut": "लॉग आउट" } }, + "Banner": { + "Copy": "Donate Today! Support p5.js and the Processing Foundation." + }, "CodemirrorFindAndReplace": { "ToggleReplace": "टॉगल बदली करें", "FindPlaceholder": "फ़ाइलों में खोजें", @@ -591,6 +171,7 @@ "OpenARIA": "कंसोल खोलें" }, "Preferences": { + "TitleHelmet": "p5.js वेब एडिटर | प्राथमिकताएँ", "Settings": "सेटिंग्स", "GeneralSettings": "सामान्य सेटिंग्स", "Accessibility": "ऐक्सेसबिलिटी", @@ -643,6 +224,8 @@ "PreloadAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — प्रीलोड", "ShapesAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — आकार", "DataAddon": "p5.js 1.x Compatibility Add-on लाइब्रेरी — डेटा संरचनाएँ", + "AddonOnARIA": "चालू", + "AddonOffARIA": "बंद", "CustomVersionTitle": "अपनी लाइब्रेरीज़ का प्रबंधन स्वयं कर रहे हैं? अच्छा!", "CustomVersionInfo": "p5.js का संस्करण वर्तमान में index.html के कोड में प्रबंधित किया जा रहा है। इसका मतलब है कि इसे इस टैब से समायोजित नहीं किया जा सकता है।", "CustomVersionReset": "यदि आप डिफ़ॉल्ट लाइब्रेरीज़ का उपयोग करना चाहते हैं, तो आप index.html में स्क्रिप्ट टैग्स को निम्नलिखित से बदल सकते हैं:", diff --git a/translations/locales/it/translations.json b/translations/locales/it/translations.json index 28dd939f18..f0664a8ebf 100644 --- a/translations/locales/it/translations.json +++ b/translations/locales/it/translations.json @@ -27,7 +27,9 @@ "Title": "Aiuto", "KeyboardShortcuts": "Scorciatoie tastiera", "Reference": "Riferimenti", - "About": "Informazioni" + "ReportBug": "Segnala un bug", + "ChatOnDiscord": "Chatta su Discord", + "PostOnTheForum": "Posta sul forum" }, "Lang": "Lingua", "BackEditor": "Torna a Editor", @@ -138,6 +140,7 @@ "OpenARIA": "Apri terminale" }, "Preferences": { + "TitleHelmet": "p5.js Web Editor | Preferenze", "Settings": "Impostazioni", "GeneralSettings": "Impostazioni generali", "Accessibility": "Accessibilità", @@ -186,7 +189,12 @@ "SoundAddon": "p5.sound.js Add-on", "PreloadAddon": "p5.js 1.x Compatibility Add-on Library — Precaricamento", "ShapesAddon": "p5.js 1.x Compatibility Add-on Library — Forme", - "DataAddon": "p5.js 1.x Compatibility Add-on Library — Strutture di dati" + "DataAddon": "p5.js 1.x Compatibility Add-on Library — Strutture di dati", + "AddonOnARIA": "attivo", + "AddonOffARIA": "disattivo", + "SoundReference": "Visualizza il riferimento per p5.sound compatibile con p5.js {{version}}", + "CopyToClipboardSuccess": "Copiato negli appunti!", + "CopyToClipboardFailure": "Non è stato possibile copiare il testo, prova a selezionarlo e copiarlo manualmente." }, "KeyboardShortcuts": { "Title": " Scorciatoie tastiera", diff --git a/translations/locales/ja/translations.json b/translations/locales/ja/translations.json index bb65617c9c..ba9588f44f 100644 --- a/translations/locales/ja/translations.json +++ b/translations/locales/ja/translations.json @@ -27,7 +27,9 @@ "Title": "ヘルプ", "KeyboardShortcuts": "キーボードショートカット", "Reference": "リファレンス(英語)", - "About": "ウェブエディタについて" + "ReportBug": "バグ報告", + "ChatOnDiscord": "Discordでチャット", + "PostOnTheForum": "フォーラムに投稿" }, "Lang": "言語", "BackEditor": "エディタに戻る", @@ -177,7 +179,16 @@ "PlainText": "プレーンテキスト", "TextOutputARIA": "テキスト出力 オン", "TableText": "テーブルテキスト", - "TableOutputARIA": "テーブルテキスト出力 オン" + "TableOutputARIA": "テーブルテキスト出力 オン", + "LibraryManagement": "ライブラリ管理", + "LibraryVersion": "p5.js バージョン", + "SoundAddon": "p5.sound.js アドオン・ライブラリ", + "PreloadAddon": "p5.js 1.x 互換性アドオン・ライブラリ — Preload", + "ShapesAddon": "p5.js 1.x 互換性アドオン・ライブラリ — Shapes", + "DataAddon": "p5.js 1.x 互換性アドオン・ライブラリ — Data & Events", + "AddonOnARIA": "オン", + "AddonOffARIA": "オフ", + "TitleHelmet": "p5.js ウェブエディタ | 設定" }, "KeyboardShortcuts": { "Title": " キーボードショートカット", diff --git a/translations/locales/zh-CN/translations.json b/translations/locales/zh-CN/translations.json index ff59d90b03..c4cfe2cec5 100644 --- a/translations/locales/zh-CN/translations.json +++ b/translations/locales/zh-CN/translations.json @@ -27,7 +27,9 @@ "Title": "帮助", "KeyboardShortcuts": "快捷键", "Reference": "参考文档", - "About": "关于" + "ReportBug": "报告问题", + "ChatOnDiscord": "在 Discord 上聊天", + "PostOnTheForum": "在论坛上发布" }, "Lang": "语言", "BackEditor": "回到编辑器", @@ -180,7 +182,23 @@ "PlainText": "纯文本", "TextOutputARIA": "打开文字输出", "TableText": "表格文本", - "TableOutputARIA": "打开表格文本" + "TableOutputARIA": "打开表格文本", + "TitleHelmet": "p5.js 在线编辑器 | 设置", + "LibraryManagement": "库管理", + "LibraryVersion": "p5.js 版本", + "LibraryVersionInfo": "p5.js 的 [新 2.0 版本](https://github.com/processing/p5.js/releases/) 已发布!它将在 2026 年 8 月成为默认版本,因此请花点时间测试并报告错误。有兴趣将项目从 1.x 迁移到 2.0 吗?查看 [兼容性和迁移资源。](https://github.com/processing/p5.js-compatibility)", + "CustomVersionTitle": "正在管理您自己的库?太棒了!", + "CustomVersionInfo": "p5.js 的版本目前正在 index.html 的代码中进行管理。这意味着它不能从此标签页中进行调整。", + "CustomVersionReset": "如果您想使用默认库,可以将 index.html 中的 script 标签替换为以下内容:", + "SoundAddon": "p5.sound.js Add-on 库", + "PreloadAddon": "p5.js 1.x 兼容性 Add-on 库 — Preload", + "ShapesAddon": "p5.js 1.x 兼容性 Add-on 库 — Shapes", + "DataAddon": "p5.js 1.x 兼容性 Add-on 库 — Data & Events", + "AddonOnARIA": "开启", + "AddonOffARIA": "关闭", + "SoundReference": "查看与 p5.js {{version}} 兼容的 p5.sound 参考文档", + "CopyToClipboardSuccess": "已复制到剪贴板!", + "CopyToClipboardFailure": "我们无法复制文本,请尝试手动选择并复制。" }, "KeyboardShortcuts": { "Title": "快捷键", From 5914393439e6097516793195e7436ba3fad33e16 Mon Sep 17 00:00:00 2001 From: vivek Date: Sat, 27 Dec 2025 12:56:37 +0530 Subject: [PATCH 2/7] i18n: add missing p5.js 2.0 release keys to Italian translation --- translations/locales/it/translations.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/translations/locales/it/translations.json b/translations/locales/it/translations.json index f0664a8ebf..0b2655328a 100644 --- a/translations/locales/it/translations.json +++ b/translations/locales/it/translations.json @@ -186,6 +186,9 @@ "TableOutputARIA": "Testo in tabella attivo", "LibraryVersion": "Versione di p5.js", "LibraryVersionInfo": "È disponibile una [nuova versione 2.0](https://github.com/processing/p5.js/releases/) di p5.js! Diventerà la versione predefinita ad agosto 2026, quindi approfitta di questo tempo per provarla e segnalare eventuali bug. Interessato a migrare gli schizzi da 1.x a 2.0? Consulta le [risorse di compatibilità e transizione.](https://github.com/processing/p5.js-compatibility)", + "CustomVersionTitle": "Gestisci le tue librerie? Ottimo!", + "CustomVersionInfo": "La versione di p5.js è attualmente gestita nel codice di index.html. Ciò significa che non può essere regolata da questa scheda.", + "CustomVersionReset": "Se desideri utilizzare le librerie predefinite, puoi sostituire i tag script in index.html con i seguenti:", "SoundAddon": "p5.sound.js Add-on", "PreloadAddon": "p5.js 1.x Compatibility Add-on Library — Precaricamento", "ShapesAddon": "p5.js 1.x Compatibility Add-on Library — Forme", From 30803db81bf56401642b0b7ab382dc6e6b924f81 Mon Sep 17 00:00:00 2001 From: vivek Date: Sat, 27 Dec 2025 13:11:52 +0530 Subject: [PATCH 3/7] Migrate Modal, Toast, and Admonition to TypeScript --- client/modules/IDE/components/Admonition.jsx | 22 ------------ .../IDE/components/Admonition.test.tsx | 19 +++++++++++ client/modules/IDE/components/Admonition.tsx | 15 ++++++++ .../modules/IDE/components/Modal.stories.jsx | 3 +- .../IDE/components/{Modal.jsx => Modal.tsx} | 34 +++++++------------ ...odal.unit.test.jsx => Modal.unit.test.tsx} | 2 +- .../modules/IDE/components/NewFileModal.jsx | 2 +- .../modules/IDE/components/NewFolderModal.jsx | 2 +- .../IDE/components/Preferences/index.jsx | 2 +- .../{Toast.test.jsx => Toast.test.tsx} | 2 +- .../IDE/components/{Toast.jsx => Toast.tsx} | 10 +++--- .../IDE/components/UploadFileModal.jsx | 2 +- client/modules/IDE/pages/IDEView.jsx | 2 +- client/modules/User/pages/AccountView.tsx | 2 +- 14 files changed, 62 insertions(+), 57 deletions(-) delete mode 100644 client/modules/IDE/components/Admonition.jsx create mode 100644 client/modules/IDE/components/Admonition.test.tsx create mode 100644 client/modules/IDE/components/Admonition.tsx rename client/modules/IDE/components/{Modal.jsx => Modal.tsx} (63%) rename client/modules/IDE/components/{Modal.unit.test.jsx => Modal.unit.test.tsx} (98%) rename client/modules/IDE/components/{Toast.test.jsx => Toast.test.tsx} (97%) rename client/modules/IDE/components/{Toast.jsx => Toast.tsx} (80%) diff --git a/client/modules/IDE/components/Admonition.jsx b/client/modules/IDE/components/Admonition.jsx deleted file mode 100644 index 8d9a6c6db1..0000000000 --- a/client/modules/IDE/components/Admonition.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -export default function Admonition({ children, title }) { - return ( -
-

- {title} -

- {children} -
- ); -} - -Admonition.propTypes = { - title: PropTypes.string.isRequired, - children: PropTypes.node -}; - -Admonition.defaultProps = { - children: undefined -}; diff --git a/client/modules/IDE/components/Admonition.test.tsx b/client/modules/IDE/components/Admonition.test.tsx new file mode 100644 index 0000000000..70398e621b --- /dev/null +++ b/client/modules/IDE/components/Admonition.test.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { render, screen } from '../../../test-utils'; +import { Admonition } from './Admonition'; + +describe('Admonition', () => { + it('renders the title', () => { + render(); + expect(screen.getByText('Important')).toBeVisible(); + }); + + it('renders children', () => { + render( + + Be careful! + + ); + expect(screen.getByText('Be careful!')).toBeVisible(); + }); +}); diff --git a/client/modules/IDE/components/Admonition.tsx b/client/modules/IDE/components/Admonition.tsx new file mode 100644 index 0000000000..07cbaf27fc --- /dev/null +++ b/client/modules/IDE/components/Admonition.tsx @@ -0,0 +1,15 @@ +import React, { ReactNode } from 'react'; + +interface AdmonitionProps { + children?: ReactNode; + title: string; +} + +export const Admonition = ({ children, title }: AdmonitionProps) => ( +
+

+ {title} +

+ {children} +
+); diff --git a/client/modules/IDE/components/Modal.stories.jsx b/client/modules/IDE/components/Modal.stories.jsx index e73fbd6e28..ec5006ae1e 100644 --- a/client/modules/IDE/components/Modal.stories.jsx +++ b/client/modules/IDE/components/Modal.stories.jsx @@ -1,5 +1,4 @@ -import React from 'react'; -import Modal from './Modal'; +import { Modal } from './Modal'; export default { title: 'IDE/Modal', diff --git a/client/modules/IDE/components/Modal.jsx b/client/modules/IDE/components/Modal.tsx similarity index 63% rename from client/modules/IDE/components/Modal.jsx rename to client/modules/IDE/components/Modal.tsx index c3456373c0..49eabae956 100644 --- a/client/modules/IDE/components/Modal.jsx +++ b/client/modules/IDE/components/Modal.tsx @@ -1,19 +1,25 @@ import classNames from 'classnames'; -import PropTypes from 'prop-types'; -import React from 'react'; +import React, { ReactNode } from 'react'; import { useModalClose } from '../../../common/useModalClose'; import ExitIcon from '../../../images/exit.svg'; -// Common logic from NewFolderModal, NewFileModal, UploadFileModal +interface ModalProps { + title: string; + onClose: () => void; + closeAriaLabel: string; + contentClassName?: string; + children: ReactNode; +} -const Modal = ({ +// Common logic from NewFolderModal, NewFileModal, UploadFileModal +export const Modal = ({ title, onClose, closeAriaLabel, - contentClassName, + contentClassName = '', children -}) => { - const modalRef = useModalClose(onClose); +}: ModalProps) => { + const modalRef = useModalClose(onClose); return (
@@ -33,17 +39,3 @@ const Modal = ({
); }; - -Modal.propTypes = { - title: PropTypes.string.isRequired, - onClose: PropTypes.func.isRequired, - closeAriaLabel: PropTypes.string.isRequired, - contentClassName: PropTypes.string, - children: PropTypes.node.isRequired -}; - -Modal.defaultProps = { - contentClassName: '' -}; - -export default Modal; diff --git a/client/modules/IDE/components/Modal.unit.test.jsx b/client/modules/IDE/components/Modal.unit.test.tsx similarity index 98% rename from client/modules/IDE/components/Modal.unit.test.jsx rename to client/modules/IDE/components/Modal.unit.test.tsx index 82c58f8316..c97d9607f0 100644 --- a/client/modules/IDE/components/Modal.unit.test.jsx +++ b/client/modules/IDE/components/Modal.unit.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { fireEvent, render, screen } from '../../../test-utils'; -import Modal from './Modal'; +import { Modal } from './Modal'; describe('Modal', () => { it('can render title', () => { diff --git a/client/modules/IDE/components/NewFileModal.jsx b/client/modules/IDE/components/NewFileModal.jsx index bf56249279..062902073e 100644 --- a/client/modules/IDE/components/NewFileModal.jsx +++ b/client/modules/IDE/components/NewFileModal.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useDispatch } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import Modal from './Modal'; +import { Modal } from './Modal'; import NewFileForm from './NewFileForm'; import { closeNewFileModal } from '../actions/ide'; diff --git a/client/modules/IDE/components/NewFolderModal.jsx b/client/modules/IDE/components/NewFolderModal.jsx index bd521ae970..808fc29780 100644 --- a/client/modules/IDE/components/NewFolderModal.jsx +++ b/client/modules/IDE/components/NewFolderModal.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { closeNewFolderModal } from '../actions/ide'; -import Modal from './Modal'; +import { Modal } from './Modal'; import NewFolderForm from './NewFolderForm'; const NewFolderModal = () => { diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index 4435811039..430abb0207 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -27,7 +27,7 @@ import VersionPicker from '../VersionPicker'; import { updateFileContent } from '../../actions/files'; import { CmControllerContext } from '../../pages/IDEView'; import Stars from '../Stars'; -import Admonition from '../Admonition'; +import { Admonition } from '../Admonition'; import TextArea from '../TextArea'; export default function Preferences() { diff --git a/client/modules/IDE/components/Toast.test.jsx b/client/modules/IDE/components/Toast.test.tsx similarity index 97% rename from client/modules/IDE/components/Toast.test.jsx rename to client/modules/IDE/components/Toast.test.tsx index f02fa42eae..e9948ae991 100644 --- a/client/modules/IDE/components/Toast.test.jsx +++ b/client/modules/IDE/components/Toast.test.tsx @@ -7,7 +7,7 @@ import { waitFor } from '../../../test-utils'; import { showToast } from '../actions/toast'; -import Toast from './Toast'; +import { Toast } from './Toast'; describe(`Toast`, () => { it('is hidden by default', () => { diff --git a/client/modules/IDE/components/Toast.jsx b/client/modules/IDE/components/Toast.tsx similarity index 80% rename from client/modules/IDE/components/Toast.jsx rename to client/modules/IDE/components/Toast.tsx index 882d101748..5e7c886515 100644 --- a/client/modules/IDE/components/Toast.jsx +++ b/client/modules/IDE/components/Toast.tsx @@ -2,16 +2,18 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; import { hideToast } from '../actions/toast'; - +import { RootState } from '../../../reducers'; import ExitIcon from '../../../images/exit.svg'; -export default function Toast() { - const { text, isVisible } = useSelector((state) => state.toast); +export const Toast = () => { + const { text, isVisible } = useSelector((state: RootState) => state.toast); const dispatch = useDispatch(); const { t } = useTranslation(); + if (!isVisible) { return null; } + return (

{t(text)}

@@ -24,4 +26,4 @@ export default function Toast() {
); -} +}; diff --git a/client/modules/IDE/components/UploadFileModal.jsx b/client/modules/IDE/components/UploadFileModal.jsx index 72fc8cabc5..aca528f8d5 100644 --- a/client/modules/IDE/components/UploadFileModal.jsx +++ b/client/modules/IDE/components/UploadFileModal.jsx @@ -7,7 +7,7 @@ import { getConfig } from '../../../utils/getConfig'; import { closeUploadFileModal } from '../actions/ide'; import FileUploader from './FileUploader'; import { getreachedTotalSizeLimit } from '../selectors/users'; -import Modal from './Modal'; +import { Modal } from './Modal'; import { parseNumber } from '../../../utils/parseStringToType'; const limit = parseNumber(getConfig('UPLOAD_LIMIT')) || 250000000; diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index d81930a327..101e79f6b6 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -8,7 +8,7 @@ import IDEKeyHandlers from '../components/IDEKeyHandlers'; import Sidebar from '../components/Sidebar'; import PreviewFrame from '../components/PreviewFrame'; import Console from '../components/Console'; -import Toast from '../components/Toast'; +import { Toast } from '../components/Toast'; import { updateFileContent } from '../actions/files'; import { autosaveProject, diff --git a/client/modules/User/pages/AccountView.tsx b/client/modules/User/pages/AccountView.tsx index 225e9e42e8..2d9db220f8 100644 --- a/client/modules/User/pages/AccountView.tsx +++ b/client/modules/User/pages/AccountView.tsx @@ -15,7 +15,7 @@ import Nav from '../../IDE/components/Header/Nav'; import ErrorModal from '../../IDE/components/ErrorModal'; import { hideErrorModal } from '../../IDE/actions/ide'; import Overlay from '../../App/components/Overlay'; -import Toast from '../../IDE/components/Toast'; +import { Toast } from '../../IDE/components/Toast'; import { RootState } from '../../../reducers'; function SocialLoginPanel() { From 533ab76642c089d229fff15c61b12ae9b2a6f3b0 Mon Sep 17 00:00:00 2001 From: vivek Date: Sat, 27 Dec 2025 18:35:06 +0530 Subject: [PATCH 4/7] Address Copilot feedback: Complete missing translation keys in fr-CA, de, ja, and hi --- translations/locales/de/translations.json | 18 +++++++++++++++++- translations/locales/fr-CA/translations.json | 13 +++++++++++-- translations/locales/hi/translations.json | 1 + translations/locales/ja/translations.json | 9 ++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/translations/locales/de/translations.json b/translations/locales/de/translations.json index 363e654111..58ee3d0af7 100644 --- a/translations/locales/de/translations.json +++ b/translations/locales/de/translations.json @@ -137,9 +137,11 @@ "OpenARIA": "Konsole öffnen" }, "Preferences": { + "TitleHelmet": "p5.js Web Editor | Einstellungen", "Settings": "Einstellungen", "GeneralSettings": "Allgemeine Einstellungen", "Accessibility": "Bedienungshilfen", + "LibraryManagement": "Bibliotheksverwaltung", "Theme": "Erscheinungsbild", "LightTheme": "Hell", "LightThemeARIA": "Erscheinungsbild Hell an", @@ -176,7 +178,21 @@ "PlainText": "Nur Text", "TextOutputARIA": "Text Ausgabe an", "TableText": "Tabellarisch", - "TableOutputARIA": "Tabellarische Ausgabe an" + "TableOutputARIA": "Tabellarische Ausgabe an", + "LibraryVersion": "p5.js Version", + "LibraryVersionInfo": "Es gibt ein [neues 2.0 Release](https://github.com/processing/p5.js/releases/) von p5.js! Im August 2026 wird es zum Standard, also nimm dir Zeit, es auszuprobieren und Fehler zu melden. Möchtest du Sketche von 1.x auf 2.0 umstellen? Schau dir die [Ressourcen für Kompatibilität und Übergang an.](https://github.com/processing/p5.js-compatibility)", + "CustomVersionTitle": "Eigene Bibliotheken verwalten? Schön!", + "CustomVersionInfo": "Die Version von p5.js wird derzeit im Code von index.html verwaltet. Das bedeutet, dass sie nicht über diesen Reiter angepasst werden kann.", + "CustomVersionReset": "Wenn du die Standardbibliotheken verwenden möchtest, kannst du die Script-Tags in index.html durch die folgenden ersetzen:", + "SoundAddon": "p5.sound.js Add-on Bibliothek", + "PreloadAddon": "p5.js 1.x Kompatibilitäts-Add-on-Bibliothek — Preload", + "ShapesAddon": "p5.js 1.x Kompatibilitäts-Add-on-Bibliothek — Shapes", + "DataAddon": "p5.js 1.x Kompatibilitäts-Add-on-Bibliothek — Data & Events", + "AddonOnARIA": "ein", + "AddonOffARIA": "aus", + "SoundReference": "Sieh dir die Referenz für p5.sound an, die mit p5.js {{version}} kompatibel ist", + "CopyToClipboardSuccess": "In die Zwischenablage kopiert!", + "CopyToClipboardFailure": "Der Text konnte nicht kopiert werden. Versuche, ihn manuell auszuwählen und zu kopieren." }, "KeyboardShortcuts": { "Title": "Tastenkürzel", diff --git a/translations/locales/fr-CA/translations.json b/translations/locales/fr-CA/translations.json index 48e158a5ce..b154c1b6ed 100644 --- a/translations/locales/fr-CA/translations.json +++ b/translations/locales/fr-CA/translations.json @@ -141,8 +141,9 @@ "OpenARIA": "Ouvrir la console" }, "Preferences": { - "Settings": "Paramètres", - "GeneralSettings": "Paramètres généraux", + "TitleHelmet": "Éditeur Web p5.js | Préférences", + "Settings": "Paramètres", + "GeneralSettings": "Paramètres généraux", "Accessibility": "Accessibilité", "LibraryManagement": "Gestion de bibliothèque", "Theme": "Thème", @@ -184,10 +185,18 @@ "TableOutputARIA": "sortie tableau de texte activée", "LibraryVersion": "Version de p5.js", "LibraryVersionInfo": "Une [nouvelle version 2.0](https://github.com/processing/p5.js/releases/) de p5.js est disponible ! Elle deviendra la version par défaut en août 2026, alors profitez de ce temps pour la tester et signaler les bogues. Intéressé à migrer vos esquisses de 1.x vers 2.0 ? Consultez les [ressources de compatibilité et de transition.](https://github.com/processing/p5.js-compatibility)", + "CustomVersionTitle": "Vous gérez vos propres bibliothèques ? C'est bien !", + "CustomVersionInfo": "La version de p5.js est actuellement gérée dans le code de index.html. Cela signifie qu'elle ne peut pas être ajustée à partir de cet onglet.", + "CustomVersionReset": "Si vous souhaitez utiliser les bibliothèques par défaut, vous pouvez remplacer les balises script dans index.html par les suivantes :", "SoundAddon": "p5.sound.js Add-on Bibliothèque", "PreloadAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Préchargement", "ShapesAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Formes", "DataAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Structures de données", + "AddonOnARIA": "activé", + "AddonOffARIA": "désactivé", + "SoundReference": "Voir la référence pour p5.sound compatible avec p5.js {{version}}", + "CopyToClipboardSuccess": "Copié dans le presse-papier !", + "CopyToClipboardFailure": "Nous n'avons pas pu copier le texte, essayez de le sélectionner et de le copier manuellement.", "Sound": "Son", "SoundOutputARIA": "sortie son activée" }, diff --git a/translations/locales/hi/translations.json b/translations/locales/hi/translations.json index 97abee29a6..6ab78e04d3 100644 --- a/translations/locales/hi/translations.json +++ b/translations/locales/hi/translations.json @@ -55,6 +55,7 @@ "CodemirrorFindAndReplace": { "ToggleReplace": "टॉगल बदली करें", "FindPlaceholder": "फ़ाइलों में खोजें", + "Find": "खोज", "Replace": "बदली करें", "ReplaceAll": "सबको बदली करें", "ReplacePlaceholder": "बदलने के लिए पाठ", diff --git a/translations/locales/ja/translations.json b/translations/locales/ja/translations.json index ba9588f44f..cdf599ef41 100644 --- a/translations/locales/ja/translations.json +++ b/translations/locales/ja/translations.json @@ -188,7 +188,14 @@ "DataAddon": "p5.js 1.x 互換性アドオン・ライブラリ — Data & Events", "AddonOnARIA": "オン", "AddonOffARIA": "オフ", - "TitleHelmet": "p5.js ウェブエディタ | 設定" + "TitleHelmet": "p5.js ウェブエディタ | 設定", + "LibraryVersionInfo": "p5.jsの[新しい2.0リリース](https://github.com/processing/p5.js/releases/)が利用可能です!2026年8月にはデフォルトになる予定ですので、この機会にテストしてバグを報告してください。スケッチを1.xから2.0へ移行することに興味がありますか?[互換性と移行のリソース](https://github.com/processing/p5.js-compatibility)を確認してください。", + "CustomVersionTitle": "独自のライブラリを管理していますか?素晴らしい!", + "CustomVersionInfo": "p5.jsのバージョンは現在index.htmlのコード内で管理されています。つまり、このタブからは調整できません。", + "CustomVersionReset": "デフォルトのライブラリを使用したい場合は、index.htmlのスクリプトタグを以下のものに置き換えることができます。", + "SoundReference": "p5.js {{version}} と互換性のある p5.sound のリファレンスを表示", + "CopyToClipboardSuccess": "クリップボードにコピーしました!", + "CopyToClipboardFailure": "テキストをコピーできませんでした。手動で選択してコピーしてください。" }, "KeyboardShortcuts": { "Title": " キーボードショートカット", From a89aa301b65986c57c95936399a54f7ae2713b8f Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 28 Dec 2025 09:20:29 +0530 Subject: [PATCH 5/7] Migrate TextArea and FloatingActionButton to TypeScript with tests --- .../FloatingActionButton.stories.jsx | 2 +- .../components/FloatingActionButton.test.tsx | 41 +++++++++++++++++++ ...ionButton.jsx => FloatingActionButton.tsx} | 31 ++++++++------ .../IDE/components/Preferences/index.jsx | 2 +- .../modules/IDE/components/TextArea.test.tsx | 38 +++++++++++++++++ .../components/{TextArea.jsx => TextArea.tsx} | 20 ++++----- client/modules/IDE/pages/IDEView.jsx | 2 +- 7 files changed, 109 insertions(+), 27 deletions(-) create mode 100644 client/modules/IDE/components/FloatingActionButton.test.tsx rename client/modules/IDE/components/{FloatingActionButton.jsx => FloatingActionButton.tsx} (71%) create mode 100644 client/modules/IDE/components/TextArea.test.tsx rename client/modules/IDE/components/{TextArea.jsx => TextArea.tsx} (76%) diff --git a/client/modules/IDE/components/FloatingActionButton.stories.jsx b/client/modules/IDE/components/FloatingActionButton.stories.jsx index d80247a0d9..f83ac58a79 100644 --- a/client/modules/IDE/components/FloatingActionButton.stories.jsx +++ b/client/modules/IDE/components/FloatingActionButton.stories.jsx @@ -1,4 +1,4 @@ -import FloatingActionButton from './FloatingActionButton'; +import { FloatingActionButton } from './FloatingActionButton'; export default { title: 'IDE/FloatingActionButton', diff --git a/client/modules/IDE/components/FloatingActionButton.test.tsx b/client/modules/IDE/components/FloatingActionButton.test.tsx new file mode 100644 index 0000000000..4d636907f7 --- /dev/null +++ b/client/modules/IDE/components/FloatingActionButton.test.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { render, screen, fireEvent } from '../../../test-utils'; +import { FloatingActionButton } from './FloatingActionButton'; +import { startSketch, stopSketch } from '../actions/ide'; + +jest.mock('../actions/ide', () => ({ + startSketch: jest.fn(() => ({ type: 'START_SKETCH' })), + stopSketch: jest.fn(() => ({ type: 'STOP_SKETCH' })) +})); + +describe('FloatingActionButton', () => { + const defaultProps = { + syncFileContent: jest.fn(), + offsetBottom: 20 + }; + + it('renders PlayIcon when not playing', () => { + render(, { + initialState: { ide: { isPlaying: false } } + }); + // PlayIcon is rendered (SVG) + expect(screen.getByRole('button')).toBeInTheDocument(); + }); + + it('calls syncFileContent and startSketch when clicked and not playing', () => { + render(, { + initialState: { ide: { isPlaying: false } } + }); + fireEvent.click(screen.getByRole('button')); + expect(defaultProps.syncFileContent).toHaveBeenCalled(); + expect(startSketch).toHaveBeenCalled(); + }); + + it('calls stopSketch when clicked and playing', () => { + render(, { + initialState: { ide: { isPlaying: true } } + }); + fireEvent.click(screen.getByRole('button')); + expect(stopSketch).toHaveBeenCalled(); + }); +}); diff --git a/client/modules/IDE/components/FloatingActionButton.jsx b/client/modules/IDE/components/FloatingActionButton.tsx similarity index 71% rename from client/modules/IDE/components/FloatingActionButton.jsx rename to client/modules/IDE/components/FloatingActionButton.tsx index 52d2827523..5a6900c88e 100644 --- a/client/modules/IDE/components/FloatingActionButton.jsx +++ b/client/modules/IDE/components/FloatingActionButton.tsx @@ -2,11 +2,11 @@ import React from 'react'; import styled from 'styled-components'; import classNames from 'classnames'; import { useDispatch, useSelector } from 'react-redux'; -import PropTypes from 'prop-types'; import PlayIcon from '../../../images/triangle-arrow-right.svg'; import StopIcon from '../../../images/stop.svg'; import { prop, remSize } from '../../../theme'; import { startSketch, stopSketch } from '../actions/ide'; +import { RootState } from '../../../reducers'; const Button = styled.button` position: fixed; @@ -38,8 +38,16 @@ const Button = styled.button` } `; -const FloatingActionButton = ({ syncFileContent, offsetBottom }) => { - const isPlaying = useSelector((state) => state.ide.isPlaying); +interface FloatingActionButtonProps { + syncFileContent: () => void; + offsetBottom: number; +} + +export const FloatingActionButton = ({ + syncFileContent, + offsetBottom +}: FloatingActionButtonProps) => { + const isPlaying = useSelector((state: RootState) => state.ide.isPlaying); const dispatch = useDispatch(); return ( @@ -53,17 +61,16 @@ const FloatingActionButton = ({ syncFileContent, offsetBottom }) => { if (!isPlaying) { syncFileContent(); dispatch(startSketch()); - } else dispatch(stopSketch()); + } else { + dispatch(stopSketch()); + } }} > - {isPlaying ? : } + {isPlaying ? ( +