From c9b936a57ecf5c2993dd4e638b3d0a1ce2646149 Mon Sep 17 00:00:00 2001 From: Ross Moody Date: Sun, 29 Aug 2021 11:16:48 -0700 Subject: [PATCH] Version 3.9 (#114) * localization setup * Update image-modal.tsx * localization strings * update * update * Update package.json --- extension/_locales/en/messages.json | 419 ++++++++++++++++++ extension/manifest.json | 7 +- package.json | 2 +- .../components/card/card-action-cors.tsx | 3 +- .../components/card/card-action-footer.tsx | 12 +- .../components/card/card-action-menu.tsx | 15 +- src/build/components/card/card-footer.tsx | 6 +- .../components/drawer/code-view-header.tsx | 8 +- .../components/drawer/drawer-content.tsx | 5 +- src/build/components/drawer/index.tsx | 4 +- .../drawer/svgo/quick-configurations.tsx | 9 +- .../components/drawer/svgo/svgo-plugins.ts | 169 ++++--- src/build/components/footer/copyright.tsx | 30 +- .../components/footer/social-media-links.tsx | 8 +- src/build/components/gallery/data-gallery.tsx | 5 +- .../components/gallery/empty-gallery.tsx | 4 +- src/build/components/gallery/index.tsx | 15 +- src/build/components/index.ts | 2 + .../components/modals/filename-modal.tsx | 8 +- src/build/components/modals/image-modal.tsx | 22 +- src/build/components/navbar/index.tsx | 4 +- src/build/components/navbar/theme-toggle.tsx | 4 +- src/build/components/toolbar/data-toolbar.tsx | 9 +- src/build/components/utils/localization.ts | 7 + 24 files changed, 606 insertions(+), 171 deletions(-) create mode 100644 extension/_locales/en/messages.json create mode 100644 src/build/components/utils/localization.ts diff --git a/extension/_locales/en/messages.json b/extension/_locales/en/messages.json new file mode 100644 index 00000000..d31f12b5 --- /dev/null +++ b/extension/_locales/en/messages.json @@ -0,0 +1,419 @@ +{ + "appName": { + "message": "SVG Gobbler" + }, + "appDesc": { + "message": "Download and optimize icons, logos, and vector SVGs." + }, + "nav_fb": { + "message": "Send feedback" + }, + "nav_theme": { + "message": "Theme toggle" + }, + "toolbar_qty": { + "message": "available SVG" + }, + "toolbar_download": { + "message": "Download all" + }, + "toolbar_tooltip": { + "message": "Drop SVGs anywhere on this page to upload" + }, + "toolbar_upload": { + "message": "Upload" + }, + "gallery_load": { + "message": "Loading SVGs" + }, + "gallery_show": { + "message": "Show more" + }, + "gallery_upload": { + "message": "Upload SVG" + }, + "gallery_noAvailTitle": { + "message": "No available SVGs to gobble" + }, + "gallery_noAvailDesc": { + "message": "Upload your own SVGs to this page to optimize them using SVGO" + }, + "gallery_uploadTitle": { + "message": "Upload an SVG" + }, + "gallery_uploadDesc": { + "message": "Upload SVGs onto this page to optimize" + }, + "gallery_errorTitle": { + "message": "Shucks, something went wrong" + }, + "gallery_errorDesc": { + "message": "Close this page and give it another try or upload your own SVGs" + }, + "modals_save": { + "message": "Save" + }, + "modals_filename": { + "message": "Filename" + }, + "modals_fileType": { + "message": ".svg" + }, + "modals_fileType_png": { + "message": ".png" + }, + "modals_exportImage": { + "message": "Export image" + }, + "modals_height": { + "message": "Height" + }, + "modals_width": { + "message": "Width" + }, + "modals_px": { + "message": "px" + }, + "footer_title": { + "message": "SVG Gobbler is an open source initiative by " + }, + "footer_titleName": { + "message": "Ross Moody" + }, + "footer_desc": { + "message": "If you find it helpful, please leave a review on the " + }, + "footer_portfolio": { + "message": "https://rossmoody.com/" + }, + "footer_or": { + "message": "or " + }, + "footer_chrome": { + "message": "Chrome Web Store" + }, + "footer_chromeLink": { + "message": "https://chrome.google.com/webstore/detail/svg-gobbler/mpbmflcodadhgafbbakjeahpandgcbch?hl=en" + }, + "footer_firefox": { + "message": "Firefox Addon Marketplace" + }, + "footer_firefoxLink": { + "message": "https://addons.mozilla.org/en-US/firefox/addon/svg-gobbler/" + }, + "footer_twitter": { + "message": "http://www.twitter.com/_rossmoody" + }, + "footer_github": { + "message": "https://github.com/rossmoody/svg-gobbler" + }, + "drawer_details": { + "message": "Code details" + }, + "drawer_labelNone": { + "message": "None" + }, + "drawer_labelSvgo": { + "message": "SVGO default" + }, + "drawer_labelCustom": { + "message": "Custom" + }, + "drawer_quick": { + "message": "Quick configuration" + }, + "drawer_optim": { + "message": "Optimizations" + }, + "drawer_svg": { + "message": "SVG" + }, + "drawer_react": { + "message": "React" + }, + "drawer_copy": { + "message": "Copy" + }, + "card_open": { + "message": "Open in new tab" + }, + "card_copy_title": { + "message": "Copied to clipboard" + }, + "card_copy_desc": { + "message": "The SVG has been copied to your clipboard and is ready to be pasted." + }, + "card_copy_action": { + "message": "Copy" + }, + "card_dl_orig": { + "message": "Download original" + }, + "card_dl_opt": { + "message": "Download optimized" + }, + "card_menu_exportPng": { + "message": "Export as PNG…" + }, + "card_menu_viewCode": { + "message": "View code…" + }, + "card_menu_dl_opt": { + "message": "Download optimized" + }, + "card_menu_copy_opt": { + "message": "Copy optimized" + }, + "card_menu_toast_optTitle": { + "message": "Copied to clipboard" + }, + "card_menu_toast_optDesc": { + "message": "The SVG has been successfully optimized using SVGO's default settings and is available in your clipboard." + }, + "card_menu_type": { + "message": "type" + }, + "card_menu_size": { + "message": "Size" + }, + "svgo_title_beaut": { + "message": "Beautify markup" + }, + "svgo_desc_beaut": { + "message": "Format and indent markup" + }, + "svgo_title_cleanAtt": { + "message": "Cleanup attributes" + }, + "svgo_desc_cleanAtt": { + "message": "Cleanup attributes from new lines, trailing, and repeating spaces" + }, + "svgo_title_cleanBg": { + "message": "Cleanup enable-background" + }, + "svgo_desc_cleanBg": { + "message": "Remove or cleanup enable-background attribute when it coincides with width and height" + }, + "svgo_title_cleanId": { + "message": "Cleanup id attributes" + }, + "svgo_desc_cleanId": { + "message": "Remove unused and minify used IDs" + }, + "svgo_title_cleanNum": { + "message": "Cleanup numeric values" + }, + "svgo_desc_cleanNum": { + "message": "Round numeric values to the fixed precision and remove default px units" + }, + "svgo_title_coll": { + "message": "Collapse groups" + }, + "svgo_desc_coll": { + "message": "Collapse redundant groups" + }, + "svgo_title_convCol": { + "message": "Convert colors" + }, + "svgo_desc_convCol": { + "message": "Convert colors from rgb() to #rrggbb and #rrggbb to #rgb)" + }, + "svgo_title_convEllip": { + "message": "Convert ellipsis to circle" + }, + "svgo_desc_convEllip": { + "message": "Convert non-eccentric to " + }, + "svgo_title_convPath": { + "message": "Convert path data" + }, + "svgo_desc_convPath": { + "message": "Convert and optimize path data to relative or absolute - whichever is shorter" + }, + "svgo_title_convShape": { + "message": "Convert shape to path" + }, + "svgo_desc_convShape": { + "message": "Optimize and combine basic shapes to " + }, + "svgo_title_convTran": { + "message": "Convert transform" + }, + "svgo_desc_convTran": { + "message": "Collapse multiple transforms into one" + }, + "svgo_title_inl": { + "message": "Inline styles" + }, + "svgo_desc_inl": { + "message": "Move and merge styles from