diff --git a/src/components/OnboardingCard.tsx b/src/components/OnboardingCard.tsx index fe89aaaf..997c9a73 100644 --- a/src/components/OnboardingCard.tsx +++ b/src/components/OnboardingCard.tsx @@ -1,8 +1,11 @@ +import { Trans, useTranslation } from 'react-i18next'; import './OnboardingCard.scss'; import { ShortcutHint } from './ShortcutHint'; import { WidgetCard } from './WidgetCard'; export const OnboardingCard = () => { + const { t } = useTranslation(); + return ( { withAnimation={false} >
-

Fresh start, huh?

-
- Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab. -
-
- Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones. -
-
- If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme. -
-
- Oh, and we also have a command menu for quick access. Just hit (explore more shortcuts by pressing ). -
+

{t('onboarding.title')}

+
{t('onboarding.p1')}
+
{t('onboarding.p2')}
+
{t('onboarding.p3')}
- This card will disappear once you add your first widget. + + +
+
{t('onboarding.p5')}
); diff --git a/src/components/ShortcutsHelp.tsx b/src/components/ShortcutsHelp.tsx index 563c1d1e..08022dac 100644 --- a/src/components/ShortcutsHelp.tsx +++ b/src/components/ShortcutsHelp.tsx @@ -1,70 +1,66 @@ +import { useTranslation } from 'react-i18next'; import { ShortcutHint } from './ShortcutHint'; import './ShortcutsHelp.scss'; export const ShortcutsHelp = () => { + const { t } = useTranslation(); return (
-
Show/hide shortcuts cheatsheet
+
{t("shortcuts.showCheatsheet")}
-
Show/hide settings
+
{t("shortcuts.toggleSettings")}
-
Display command menu
+
{t("shortcuts.displayCommandMenu")}
-
Close command menu or modal window
+
{t("shortcuts.closeMenuOrModal")}
-
Switch to folder above
+
{t("shortcuts.switchToFolderAbove")}
-
+
-
Switch to folder below
+
{t("shortcuts.switchToFolderBelow")}
-
- Switch to 1st folder (works with other numbers too!) -
+
{t("shortcuts.switchToNFolder")}
-
- Edit current folder -
+
{t("shortcuts.editCurrentFolder")}
-
- Add new widget to current folder -
+
{t("shortcuts.addNewWidget")}
); } \ No newline at end of file diff --git a/src/components/WhatsNew.tsx b/src/components/WhatsNew.tsx index 1da3846a..06ece2a5 100644 --- a/src/components/WhatsNew.tsx +++ b/src/components/WhatsNew.tsx @@ -4,13 +4,17 @@ import './WhatsNew.scss'; import { analyticsEnabledAtom } from '@utils/analytics'; import { Checkbox } from './Checkbox'; import { useAtomWithStorage } from '@utils/storage'; +import { useTranslation } from 'react-i18next'; export const WhatsNew = () => { const [analyticsEnabled, setAnalyticsEnabled] = useAtomWithStorage(analyticsEnabledAtom); - + const { t, i18n } = useTranslation(); return (
+ {i18n.language !== 'en' &&
+ {t('availableOnlyInEnglish')} +
}

1.7.0

@@ -18,8 +22,8 @@ export const WhatsNew = () => {
  • Added option to open bookmarks in a new tab. Contribution from @bil0ak. Thanks!
  • Added Ecosia as search provider to Internet search widget. Contribution from @Radeox. Thanks!
  • - Settings grown to be quite lengthy for single modal, so in this version they got reorganized - into separate screens. And we have two new options: to hide "Edit folder" button and to + Settings grown to be quite lengthy for single modal, so in this version they got reorganized + into separate screens. And we have two new options: to hide "Edit folder" button and to change page title.
  • @@ -34,7 +38,7 @@ export const WhatsNew = () => {

    • - Open Anori tab by clicking on extension icon in top right + Open Anori tab by clicking on extension icon in top right corner (especially useful for Opera users).
    • @@ -46,17 +50,17 @@ export const WhatsNew = () => {

    - I also added analytics to better understand which functions you use the most and which aren't + I also added analytics to better understand which functions you use the most and which aren't used. Analytics is opt-in, so Anori won't send any data if you don't enable analytics. And even when enabled, extension doesn't send any private info. All it collect is: how much folders you have, which widgets you use, which theme you use, how many custom icons you have, how often - you use keyboard shortcuts. Anori doesn't send name of your folder, or URL of bookmarks, or + you use keyboard shortcuts. Anori doesn't send name of your folder, or URL of bookmarks, or content of your notes.

    - I kindly ask you to enable this feature, as it will help me to develop better product. - You can always change your choice in settings. + I kindly ask you to enable this feature, as it will help me to develop better product. + You can always change your choice in settings.

    Enable sending analytics diff --git a/src/components/command-menu/CommandMenu.tsx b/src/components/command-menu/CommandMenu.tsx index 4a860366..da985fc8 100644 --- a/src/components/command-menu/CommandMenu.tsx +++ b/src/components/command-menu/CommandMenu.tsx @@ -8,6 +8,7 @@ import { wait } from '@utils/misc'; import { ScrollArea } from '@components/ScrollArea'; import { useHotkeys } from '@utils/hooks'; import { trackEvent } from '@utils/analytics'; +import { useTranslation } from 'react-i18next'; const ON_COMMAND_INPUT_TIMEOUT = 300; @@ -46,6 +47,7 @@ export const CommandMenu = () => { const [open, setOpen] = useState(false); const [query, setQuery] = useState(''); const [actions, setActions] = useState([]); + const { t } = useTranslation(); useEffect(() => { loadActionsByQuery(''); @@ -54,13 +56,13 @@ export const CommandMenu = () => { useHotkeys('meta+k', () => setOpen((open) => !open), []); return ( - - + +
    - {!!query && No results found.} - {!query && Nothing here yet. Try adding some widgets to folder.} + {!!query && {t('noResults')}} + {!query && {t('commandMenu.noWidgets')}} {actions.filter(({ items }) => items.length !== 0).map(({ plugin, items }) => { return ( diff --git a/src/pages/newtab/settings/Settings.tsx b/src/pages/newtab/settings/Settings.tsx index 0069e667..bb3b96f2 100644 --- a/src/pages/newtab/settings/Settings.tsx +++ b/src/pages/newtab/settings/Settings.tsx @@ -28,7 +28,7 @@ import { atom, useAtom } from 'jotai'; import { Modal } from '@components/Modal'; import { setPageTitle } from '@utils/mount'; import { ShortcutsHelp } from '@components/ShortcutsHelp'; -import { useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { Select } from '@components/Select'; import { Language, SHOW_LANGUAGE_SELECT_IN_SETTINGS, availableTranslations, availableTranslationsPrettyNames, switchTranslationLanguage } from '@translations/index'; @@ -42,16 +42,7 @@ type DraftCustomIcon = { type SettingScreen = 'main' | 'general' | 'custom-icons' | 'folders' | 'plugins' | 'theme' | 'import-export' | 'about-help'; const currentScreenAtom = atom('main'); -const screenPrettyName = { - 'main': 'Settings', - 'general': 'General settings', - 'custom-icons': 'Custom icons', - 'folders': 'Folders', - 'plugins': 'Plugins settings', - 'theme': 'Theme', - 'import-export': 'Import & export', - 'about-help': 'Help & about the extension', -} as const; + const ScreenButton = ({ icon, name, ...props }: { icon: string, name: string } & ComponentProps<"button">) => { return ( + {hasDraftIconsWithInvalidName && + } - {!hasDraftIconsWithInvalidName && } + {!hasDraftIconsWithInvalidName && } } - {draftCustomIcons.length === 0 && - + {draftCustomIcons.length === 0 && + } ) }; const FoldersScreen = (props: ComponentProps) => { const { folders, setFolders, createFolder, updateFolder, removeFolder } = useFolders(); + const { t } = useTranslation(); return ( @@ -291,7 +283,7 @@ const FoldersScreen = (props: ComponentProps) => { ) }; @@ -358,42 +350,64 @@ const ImportExportScreen = (props: ComponentProps) => { window.location.reload(); }; + const { t } = useTranslation(); + const { addNewCustomIcon } = useCustomIcons(); return ( -
    Here you can backup your settings or restore older backup.
    +
    {t('settings.importExport.info')}
    - - + +
    ) }; const HelpAboutScreen = (props: ComponentProps) => { + const { t, i18n } = useTranslation(); return (

    - Anori is free and open source extension. Source code can be found on GitHub. - If you would like to propose a feature or report a bug, please - create new issue in repository. - If you just want to say thanks you can give a star to that repo :). + + . + +

    - + {i18n.language !== 'en' &&

    + {t('settings.aboutHelp.onlyEnglishPlease')} +

    }

    - If you would like to modify this extension, add you own plugin or widget, please refer to readme for more info. + + +

    - Follow author on Twitter and support Ukraine. + + + +

    -

    Shortcuts

    +

    {t('shortcuts.title')}

    ) }; export const SettingsModal = ({ onClose }: { onClose: () => void }) => { + const { t } = useTranslation(); + const screenPrettyName = { + 'main': t('settings.title'), + 'general': t('settings.general.title'), + 'custom-icons': t('settings.customIcons.title'), + 'folders': t('settings.folders.title'), + 'plugins': t('settings.pluginSettings.title'), + 'theme': t('settings.theme.title'), + 'import-export': t('settings.importExport.title'), + 'about-help': t('settings.aboutHelp.title'), + } as const; + const [screen, setScreen] = useAtom(currentScreenAtom); const mainScreenEnter = { x: '-30%', opacity: 0 }; diff --git a/src/pages/newtab/start.tsx b/src/pages/newtab/start.tsx index 36ca215b..3549de65 100644 --- a/src/pages/newtab/start.tsx +++ b/src/pages/newtab/start.tsx @@ -22,6 +22,7 @@ import clsx from 'clsx'; import { CompactModeProvider, useSizeSettings } from '@utils/compact'; import { getAllCustomIcons } from '@utils/custom-icons'; import { initTranslation } from '@translations/index'; +import { useTranslation } from 'react-i18next'; const Start = () => { @@ -52,6 +53,7 @@ const Start = () => { const [shortcutsHelpVisible, setShortcutsHelpVisible] = useState(false); const [whatsNewVisible, setWhatsNewVisible] = useState(false); const [hasUnreadReleaseNotes, setHasUnreadReleaseNotes] = useBrowserStorageValue('hasUnreadReleaseNotes', false); + const {t} = useTranslation(); useHotkeys('meta+up, alt+up', () => swithFolderUp()); useHotkeys('meta+down, alt+down', () => swithFolderDown()); @@ -87,7 +89,7 @@ const Start = () => { { setWhatsNewVisible(true); @@ -97,7 +99,7 @@ const Start = () => { setSettingsVisible(true)} whileHover={{ rotate: 180 }} transition={{ type: 'spring', duration: 0.1 }} @@ -115,11 +117,11 @@ const Start = () => { {settingsVisible && setSettingsVisible(false)} />} - {shortcutsHelpVisible && setShortcutsHelpVisible(false)}> + {shortcutsHelpVisible && setShortcutsHelpVisible(false)}> } - {whatsNewVisible && setWhatsNewVisible(false)}> + {whatsNewVisible && setWhatsNewVisible(false)}> } diff --git a/src/translations/de.json b/src/translations/de.json new file mode 100644 index 00000000..3c181cf4 --- /dev/null +++ b/src/translations/de.json @@ -0,0 +1,205 @@ +{ + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" + } + } +} \ No newline at end of file diff --git a/src/translations/en.json b/src/translations/en.json index bb38321f..3c181cf4 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -7,10 +7,6 @@ "import": "Import", "noResults": "No results", "example": "Example", - "settings": { - "general": "General", - "customIcons": "Custom icons" - }, "weekday0": "Monday", "weekday1": "Tuesday", "weekday2": "Wednesday", @@ -23,6 +19,91 @@ "search": "Search...", "loading": "Loading...", "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, "bookmark-plugin": { diff --git a/src/translations/es.json b/src/translations/es.json index 251f3d4c..3c181cf4 100644 --- a/src/translations/es.json +++ b/src/translations/es.json @@ -1,8 +1,205 @@ { - "extension": { + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + "settings": { - "general": "Genéricas", - "customIcons": "Iconos personalizados" + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" } } } \ No newline at end of file diff --git a/src/translations/fr.json b/src/translations/fr.json new file mode 100644 index 00000000..3c181cf4 --- /dev/null +++ b/src/translations/fr.json @@ -0,0 +1,205 @@ +{ + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" + } + } +} \ No newline at end of file diff --git a/src/translations/index.ts b/src/translations/index.ts index ae6ca259..7a295b48 100644 --- a/src/translations/index.ts +++ b/src/translations/index.ts @@ -3,21 +3,46 @@ import { initReactI18next } from 'react-i18next'; import enTranslation from './en.json'; import esTranslation from './es.json'; +import deTranslation from './de.json'; +import frTranslation from './fr.json'; +import uaTranslation from './ua.json'; +import zhCnTranslation from './zh-cn.json'; +import zhTwanslation from './zh-tw.json'; import { storage } from '@utils/storage'; import moment from 'moment'; import 'moment/locale/es'; +import 'moment/locale/de'; +import 'moment/locale/uk'; +import 'moment/locale/fr'; +import 'moment/locale/zh-cn'; +import 'moment/locale/zh-tw'; export const SHOW_LANGUAGE_SELECT_IN_SETTINGS = false; -export const availableTranslations = ['en', 'es'] as const; +export const availableTranslations = ['en', 'es', 'de', 'fr', 'uk', 'zh-tw', 'zh-cn'] as const; export type Language = typeof availableTranslations[number]; export const availableTranslationsPrettyNames = { 'en': 'English', - 'es': 'Español' + 'es': 'Español', + 'de': 'Deutsch', + 'fr': 'Français', + 'uk': 'Українська', + 'zh-cn': 'Chinese', + 'zh-tw': 'Chinese (Taiwan)', } satisfies Record; +const resources = { + en: enTranslation, + es: esTranslation, + de: deTranslation, + fr: frTranslation, + uk: uaTranslation, + 'zh-cn': zhCnTranslation, + 'zh-tw': zhTwanslation, +} satisfies Record; + export const initTranslation = async () => { const lang = await storage.getOne('language'); i18n.use(initReactI18next).init({ @@ -28,10 +53,7 @@ export const initTranslation = async () => { interpolation: { escapeValue: false, // not needed for react as it escapes by default }, - resources: { - en: enTranslation, - es: esTranslation, - } + resources, }); }; diff --git a/src/translations/ua.json b/src/translations/ua.json new file mode 100644 index 00000000..3c181cf4 --- /dev/null +++ b/src/translations/ua.json @@ -0,0 +1,205 @@ +{ + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" + } + } +} \ No newline at end of file diff --git a/src/translations/zh-cn.json b/src/translations/zh-cn.json new file mode 100644 index 00000000..3c181cf4 --- /dev/null +++ b/src/translations/zh-cn.json @@ -0,0 +1,205 @@ +{ + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" + } + } +} \ No newline at end of file diff --git a/src/translations/zh-tw.json b/src/translations/zh-tw.json new file mode 100644 index 00000000..3c181cf4 --- /dev/null +++ b/src/translations/zh-tw.json @@ -0,0 +1,205 @@ +{ + "translation": { + "icon": "Icon", + "title": "Title", + "url": "URL", + "save": "Save", + "import": "Import", + "noResults": "No results", + "example": "Example", + "weekday0": "Monday", + "weekday1": "Tuesday", + "weekday2": "Wednesday", + "weekday3": "Thursday", + "weekday4": "Friday", + "weekday5": "Saturday", + "weekday6": "Sunday", + "timezone": "Timezone", + "startTypingToSearch": "Start typing to search...", + "search": "Search...", + "loading": "Loading...", + "lastUpdatedAt": "Last updated at {{datetime}}", + "home": "Home", + "availableOnlyInEnglish": "Available only in English", + + "whatsNew": "What's new", + + "settings": { + "title": "Settings", + "general": { + "title": "General", + "language": "Language", + "newTabTitle": "New tab title", + "newTabTitleHint": "We can't set icon for new page, but you can try using emoji here 😉", + "enableAnalytics": "Enable sending analytics", + "analyticsHintP1": "Analytics helps me better understand how users interact with Anori and which features are used the most. I doesn't share any private info like content of notes or URL of bookmarks.", + "analyticsHintP2": "This helps me to develop better product so I ask you to enable sending analytics.", + "stealFocus": "Steal focus from addressbar", + "stealFocusHint": "If enabled, this will force browser to move focus from address bar to this page when opening new tab and you will be able to use command menu (Cmd+K) without needing to move focus to page manually (by clicking or pressing Tab).", + "automaticCompact": "Automatically switch to compact mode based on screen size", + "useCompact": "Use compact mode", + "showAnimationOnOpen": "Show animation on open", + "showAnimationOnOpenHint": "If enabled, extension will show quick loading animation which will hide initial flicker of loading data and provide better look.", + "hideEditButton": "Hide \"Edit folder\" button", + "hideEditButtonHint": "Extra minimalistic, yeah." + }, + "customIcons": { + "title": "Custom icons", + "incorrectFormat": "Please provide valid file(s). Anori supports .png, .jpg, .gif, .jpeg and .svg", + "noIcons": "You don't have any custom icons yet.", + "invalidNames": "Some of icons have invalid name, please fix them before saving.", + "saveIcons": "Save icons", + "supportedFormats": "We support png, jpg, gif and svg and recommend using square images with size between 128 and 256 pixels (not applicable to svg).", + "importIcons": "Import icons" + }, + "folders": { + "title": "Folders", + "createNew": "Create new folder" + }, + "pluginSettings": { + "title": "Plugin settings" + }, + "theme": { + "title": "Theme" + }, + "importExport": { + "title": "Import & export", + "info": "Here you can backup your settings or restore older backup.", + "import": "Import", + "export": "Export" + }, + "aboutHelp": { + "title": "Help & about the extension", + "onlyEnglishPlease": "I (author of the project) don't speak a lot of languages, so please file your issues in English. Thanks!", + "p1": "Anori is free and open source extension. Source code can be found on <0>GitHub. If you would like to propose a feature or report a bug, please create <1>new issue in repository. If you just want to say thanks you can give a star to that repo :).", + "p2": "If you would like to modify this extension, add you own plugin or widget, please refer to <0>readme for more info.", + "p3": "Follow author on <0>Twitter and <1>support Ukraine." + } + }, + + "shortcuts": { + "title": "Shortcuts", + "showCheatsheet": "Show/hide shortcuts cheatsheet", + "toggleSettings": "Show/hide settings", + "displayCommandMenu": "Display command menu", + "closeMenuOrModal": "Close command menu or modal window", + "switchToFolderAbove": "Switch to folder above", + "switchToFolderBelow": "Switch to folder below", + "switchToNFolder": "Switch to 1st folder (works with other numbers too!)", + "editCurrentFolder": "Edit current folder", + "addNewWidget": "Add new widget to current folder" + }, + + "onboarding": { + "title": "Fresh start, huh?", + "p1": "Hello! I'm onboarding card, and my mission here is to help you set up your perfect new tab.", + "p2": "Click on pencil in top right corner. This will switch the page into editing mode. Here you can add new widgets and reposition or remove existing ones.", + "p3": "If you click on the gear icon in the bottom left corner, you'll open settings. There you can manage your folders (which you find on the sidebar to the left) and change theme.", + "p4": "Oh, and we also have a command menu for quick access. Just hit <0 /> (explore more shortcuts by pressing <1 />).", + "p5": "This card will disappear once you add your first widget." + }, + + "commandMenu": { + "name": "Global Command Menu", + "placeholder": "Enter command", + "noWidgets": "Nothing here yet. Try adding some widgets to folder." + }, + + + "bookmark-plugin": { + "name": "Bookmarks", + "widgetSizeSName": "Bookmark - size S", + "widgetSizeMName": "Bookmark - size M", + "openInNewTab": "Open in a new tab", + "searchBookmarks": "Search bookmarks" + }, + "calendar-plugin": { + "name": "Calendar", + "widgetName": "Calendar", + "firstDayOfWeek": "First day of week" + }, + "datetime-plugin": { + "name": "Date and time", + "widgetName": "Date and time", + "withoutDate": "Without date", + "timeFormat": "Time format", + "dateFormat": "Date format", + "24hours": "24 hours" + }, + + "notes-plugin": { + "name": "Notes", + "widgetSizeSName": "Notes - size S", + "widgetSizeMName": "Notes - size M", + "widgetSizeLName": "Notes - size L", + "noteTitle": "Note title", + "noteText": "Text of note...", + "exampleTitle": "Shopping list", + "exampleText": "Veggies, ketchup, cheese, flour, olive oil" + }, + + "recently-closed-plugin": { + "name": "Recently closed tabs", + "widgetSizeSName": "Recently closed tabs - size S", + "widgetSizeMName": "Recently closed tabs - size M", + "tab": "Tab", + "window": "Window" + }, + + "search-plugin": { + "name": "Internet search", + "widgetName": "Search", + "searchProviderForQ": "Search {{provider}} for «{{query}}»" + }, + + "system-status-plugin": { + "name": "System status", + "ramLoad": "RAM load", + "cpuLoad": "CPU load" + }, + "tasks-plugin": { + "name": "Tasks", + "widgetSizeMName": "Tasks - size M", + "widgetSizeLName": "Tasks - size L", + "todo": "ToDo", + "completeTask": "Complete «{{task}}»", + "taskDescription": "Task description...", + "noTasks": "No tasks here yet", + "exampleTask0": "Stupid walk for stupid mental health", + "exampleTask1": "Lay on couch", + "exampleTask2": "Lay on floor", + "exampleTask3": "Try not to cry" + }, + + "top-sites-plugin": { + "name": "Top sites", + "widgetHorizontal": "Top sites - horizontal", + "widgetVertical": "Top sites - vertical" + }, + + "weather-plugin": { + "name": "Weather", + "weatherForecast": "Weather forecast", + "forecast": "forecast", + "currentWeather": "Current weather", + "kmh": "km/h", + "ms": "m/s", + "mph": "mph", + "clearSky": "Clear sky", + "partlyCloudy": "Partly cloudy", + "fog": "Fog", + "drizzle": "Drizzle", + "freezingDrizzle": "Freezing drizzle", + "rain": "Rain", + "freezingRain": "Freezing rain", + "snow": "Snow", + "rainShower": "Rain shower", + "thunderstorm": "Thunderstorm", + "unknownCode": "Unknown weather code", + "selectCity": "Select city", + "temperatureUnit": "Temperature unit", + "speedUnit": "Wind speed unit", + "weatherCode": "weather code {{code}}" + } + } +} \ No newline at end of file diff --git a/src/utils/user-data/types.ts b/src/utils/user-data/types.ts index e629a619..5d66933c 100644 --- a/src/utils/user-data/types.ts +++ b/src/utils/user-data/types.ts @@ -1,7 +1,7 @@ import { LayoutItem, LayoutItemSize } from "@utils/grid"; import { ComponentType } from "react"; import { Theme } from "./theme"; -import { Language } from "@translations/index"; +import { Language, translate } from "@translations/index"; export type StorageContent = { folders: Folder[], @@ -48,7 +48,9 @@ export type WidgetInFolderWithMeta = export const homeFolder = { id: 'home', - name: 'Home', + get name() { + return translate('home'); + }, icon: 'ion:home' } satisfies Folder;