From bdb9c51efbc34135e4a075e8084f7e39e8137417 Mon Sep 17 00:00:00 2001 From: Laurens Deprost Date: Thu, 27 Aug 2020 15:00:08 +0200 Subject: [PATCH 1/9] chore: Add extra texts for tooltips in NoteDetailToolbar --- src/locales/enUS.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/locales/enUS.ts b/src/locales/enUS.ts index 50c097b8b0..8fb3de1444 100644 --- a/src/locales/enUS.ts +++ b/src/locales/enUS.ts @@ -13,6 +13,7 @@ export default { 'general.networkError': 'Network Error', // Storage + 'storage.storage': 'Storage', 'storage.name': 'Storage Name', 'storage.noStorage': 'No storages', 'storage.create': 'Create Storage', @@ -34,6 +35,7 @@ export default { 'storage.syncDate': 'Last synced at', //Folder + 'folder.folder': 'Folder', 'folder.create': 'New Folder', 'folder.rename': 'Rename Folder', 'folder.renameMessage': @@ -44,6 +46,7 @@ export default { //Tag 'tag.tag': 'Tags', + 'tag.add': 'Add Tag', 'tag.remove': 'Remove Tag', 'tag.removeMessage': 'The tag will be untagged from all notes.', @@ -67,6 +70,11 @@ export default { 'note.createkeymessage2': 'Select a storage', 'note.createkeymessage3': 'to create a new note', 'note.restore': 'Restore', + 'note.edit': 'Edit', + 'note.splitView': 'Split View', + 'note.preview': 'Preview', + 'note.trash': 'Trash', + 'note.export': 'Export', //Bookmark 'bookmark.remove': 'Remove Bookmark', From dfb4a9309ea73c82fca111780a753d1e6a40dbed Mon Sep 17 00:00:00 2001 From: Laurens Deprost Date: Thu, 27 Aug 2020 15:01:25 +0200 Subject: [PATCH 2/9] chore: Add title prop --- src/components/atoms/ToolbarIconButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/atoms/ToolbarIconButton.tsx b/src/components/atoms/ToolbarIconButton.tsx index af3f423c0f..23db096a9c 100644 --- a/src/components/atoms/ToolbarIconButton.tsx +++ b/src/components/atoms/ToolbarIconButton.tsx @@ -30,16 +30,18 @@ const ToolbarButtonContainer = styled.button` interface ToolbarButtonProps { iconPath: string - active?: boolean + active?: boolean, + title?: string, onClick: React.MouseEventHandler } const ToolbarButton = React.forwardRef( - ({ iconPath, onClick, active = false }: ToolbarButtonProps, ref) => ( + ({ iconPath, onClick, active = false, title }: ToolbarButtonProps, ref) => ( From cdddcda4f40d467a2adbdb10dd7d63ad6bc3e207 Mon Sep 17 00:00:00 2001 From: Laurens Deprost Date: Thu, 27 Aug 2020 15:03:05 +0200 Subject: [PATCH 3/9] feat: Add tooltips --- src/components/atoms/TagNavigatorListItem.tsx | 5 +++++ src/components/molecules/NoteDetailTagNavigator.tsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/atoms/TagNavigatorListItem.tsx b/src/components/atoms/TagNavigatorListItem.tsx index b036afe72a..4f875f310c 100644 --- a/src/components/atoms/TagNavigatorListItem.tsx +++ b/src/components/atoms/TagNavigatorListItem.tsx @@ -4,6 +4,7 @@ import styled from '../../lib/styled' import { mdiClose } from '@mdi/js' import { flexCenter } from '../../lib/styled/styleFunctions' import { useRouter } from '../../lib/router' +import { useTranslation } from 'react-i18next' const TagItem = styled.li` margin-right: 5px; @@ -65,10 +66,13 @@ const TagNavigatorListItem = ({ currentTagName, removeTagByName, }: TagNavigatorListItemProps) => { + const { t } = useTranslation() const { push } = useRouter() + return ( { push(`/app/storages/${storageId}/tags/${tag}/${noteId}`) }} @@ -77,6 +81,7 @@ const TagNavigatorListItem = ({ {tag} { removeTagByName(tag) }} diff --git a/src/components/molecules/NoteDetailTagNavigator.tsx b/src/components/molecules/NoteDetailTagNavigator.tsx index 6021a31074..dcae6b4eb4 100644 --- a/src/components/molecules/NoteDetailTagNavigator.tsx +++ b/src/components/molecules/NoteDetailTagNavigator.tsx @@ -7,6 +7,7 @@ import { useRouteParams } from '../../lib/router' import ToolbarButton from '../atoms/ToolbarIconButton' import TagNavigatorListItem from '../atoms/TagNavigatorListItem' import TagNavigatorNewTagPopup from '../atoms/TagNavigatorNewTagPopup' +import { useTranslation } from 'react-i18next' const Container = styled.div` display: flex; @@ -48,6 +49,8 @@ const NoteDetailTagNavigator = ({ appendTagByName, removeTagByName, }: NoteDetailTagNavigatorProps) => { + const { t } = useTranslation() + const routeParams = useRouteParams() const currentTagName = useMemo(() => { @@ -94,7 +97,7 @@ const NoteDetailTagNavigator = ({ return ( <> - + {' '} @@ -112,6 +115,7 @@ const NoteDetailTagNavigator = ({ })} Date: Thu, 27 Aug 2020 15:04:15 +0200 Subject: [PATCH 4/9] feat: Add tooltips to folder navigator --- src/components/molecules/NoteDetailFolderNavigator.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/molecules/NoteDetailFolderNavigator.tsx b/src/components/molecules/NoteDetailFolderNavigator.tsx index 3d64642175..d332ebacef 100644 --- a/src/components/molecules/NoteDetailFolderNavigator.tsx +++ b/src/components/molecules/NoteDetailFolderNavigator.tsx @@ -4,6 +4,7 @@ import { mdiBookOpen, mdiSlashForward } from '@mdi/js' import Icon from '../atoms/Icon' import { useRouter, useRouteParams } from '../../lib/router' import { flexCenter } from '../../lib/styled/styleFunctions' +import { useTranslation } from 'react-i18next' const Container = styled.div` display: flex; @@ -60,6 +61,8 @@ const NoteDetailFolderNavigator = ({ noteId, noteFolderPathname, }: NoteDetailFolderNavigatorProps) => { + const { t } = useTranslation() + const { push } = useRouter() const routeParams = useRouteParams() @@ -87,12 +90,18 @@ const NoteDetailFolderNavigator = ({ return folderDataList }, [noteFolderPathname]) + const storageTooltip = `${t('storage.storage')} ${storageName}: ${t('general.allnote')}`; + + const getFolderTooltip = (foldername: string) => + `${t('folder.folder')} ${foldername}: ${t('general.allnote')}`; + return ( ) => { event.preventDefault() @@ -106,6 +115,7 @@ const NoteDetailFolderNavigator = ({ { push( `/app/storages/${storageId}/notes${folderData.pathname}/${noteId}` From ee04570519e5b2b6ec0548a3408fb12000d7be90 Mon Sep 17 00:00:00 2001 From: Laurens Deprost Date: Thu, 27 Aug 2020 15:04:42 +0200 Subject: [PATCH 5/9] feat: Add tooltips to note detail toolbar --- .../molecules/NoteDetailToolbar.tsx | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/components/molecules/NoteDetailToolbar.tsx b/src/components/molecules/NoteDetailToolbar.tsx index ba9eb8d6a8..26d19c6530 100644 --- a/src/components/molecules/NoteDetailToolbar.tsx +++ b/src/components/molecules/NoteDetailToolbar.tsx @@ -25,6 +25,7 @@ import { } from '../../lib/exports' import { usePreferences } from '../../lib/preferences' import { usePreviewStyle } from '../../lib/preview' +import { useTranslation } from 'react-i18next' const NoteDetailToolbarContainer = styled.div` display: flex; @@ -68,6 +69,8 @@ const NoteDetailToolbar = ({ bookmarkNote, unbookmarkNote, }: NoteDetailToolbarProps) => { + const { t } = useTranslation() + const storageTags = useMemo(() => { if (storage == null) return [] return values(storage.tagMap).map((tag) => tag.name) @@ -135,34 +138,51 @@ const NoteDetailToolbar = ({ {note.trashed ? ( <> - - + + ) : ( - - )} + + )} From 9416a0af84c105141e6c9e690aa7fd570e602eb7 Mon Sep 17 00:00:00 2001 From: Laurens Deprost Date: Tue, 1 Sep 2020 18:44:49 +0200 Subject: [PATCH 6/9] refactor: Move tooltip logic inside FolderNavItem component --- .../molecules/NoteDetailFolderNavigator.tsx | 116 ++++++++++++------ 1 file changed, 80 insertions(+), 36 deletions(-) diff --git a/src/components/molecules/NoteDetailFolderNavigator.tsx b/src/components/molecules/NoteDetailFolderNavigator.tsx index d332ebacef..e71243467f 100644 --- a/src/components/molecules/NoteDetailFolderNavigator.tsx +++ b/src/components/molecules/NoteDetailFolderNavigator.tsx @@ -5,6 +5,7 @@ import Icon from '../atoms/Icon' import { useRouter, useRouteParams } from '../../lib/router' import { flexCenter } from '../../lib/styled/styleFunctions' import { useTranslation } from 'react-i18next' +import { useDb } from '../../lib/db' const Container = styled.div` display: flex; @@ -22,7 +23,7 @@ const IconContainer = styled.div` color: ${({ theme }) => theme.navButtonColor}; ` -const FolderNavItem = styled.button` +const FolderNavItemButton = styled.button` background-color: transparent; border: none; white-space: nowrap; @@ -55,14 +56,17 @@ interface FolderData { pathname: string } -const NoteDetailFolderNavigator = ({ - storageId, - storageName, - noteId, - noteFolderPathname, -}: NoteDetailFolderNavigatorProps) => { - const { t } = useTranslation() +interface FolderNavItemProps { + path: string + children?: React.ReactNode +} +const FolderNavItem: React.FC = ({ + children, + path, +}: FolderNavItemProps) => { + const { t } = useTranslation() + const db = useDb() const { push } = useRouter() const routeParams = useRouteParams() @@ -73,6 +77,70 @@ const NoteDetailFolderNavigator = ({ return routeParams.folderPathname }, [routeParams]) + const parsePath = (path: string) => { + const result = { + storageId: '', + storageName: '', + folderName: '', + folderPath: '', + } + + const storageMatch = /\/storages\/(.*)\/notes/.exec(path) + if (storageMatch) { + const storage = db.storageMap[storageMatch[1]] + if (storage) { + result.storageId = storage.id + result.storageName = storage.name + } + } + const folderMatch = /\/notes\/(.*)\//.exec(path) + if (folderMatch) { + result.folderPath = `/${folderMatch[1]}` + + const folderNameMatch = /[^/]*$/.exec(result.folderPath) + if (folderNameMatch) { + result.folderName = folderNameMatch[0] + } + } + return result + } + + const { storageName, folderName, folderPath } = parsePath(path) + const getStorageTooltip = (storageName: string) => + `${t('storage.storage')} ${storageName}: ${t('general.allnote')}` + + const getFolderTooltip = (foldername: string) => + `${t('folder.folder')} ${foldername}: ${t('general.allnote')}` + + const tooltip = folderName + ? getFolderTooltip(folderName) + : getStorageTooltip(storageName) + + const isActive = + currentFolderPathname === folderPath || + (!folderName && currentFolderPathname === '/') + + return ( + ) => { + event.preventDefault() + push(path) + }} + className={isActive ? 'active' : ''} + > + {folderName ? folderName : storageName} + {children} + + ) +} + +const NoteDetailFolderNavigator = ({ + storageId, + noteId, + noteFolderPathname, +}: NoteDetailFolderNavigatorProps) => { const folderDataList = useMemo(() => { if (noteFolderPathname === '/') { return [] @@ -90,43 +158,19 @@ const NoteDetailFolderNavigator = ({ return folderDataList }, [noteFolderPathname]) - const storageTooltip = `${t('storage.storage')} ${storageName}: ${t('general.allnote')}`; - - const getFolderTooltip = (foldername: string) => - `${t('folder.folder')} ${foldername}: ${t('general.allnote')}`; - return ( - ) => { - event.preventDefault() - push(`/app/storages/${storageId}/notes/${noteId}`) - }} - className={currentFolderPathname === '/' ? 'active' : ''} - > - {storageName} - + + {folderDataList.map((folderData) => ( { - push( - `/app/storages/${storageId}/notes${folderData.pathname}/${noteId}` - ) - }} - className={ - currentFolderPathname === folderData.pathname ? 'active' : '' - } - > - {folderData.name} - + path={`/app/storages/${storageId}/notes${folderData.pathname}/${noteId}`} + /> ))} From 23be3d6e5b54cf0f6ba531814dba38f6ffd46a7c Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Thu, 3 Sep 2020 15:04:03 +0900 Subject: [PATCH 7/9] Refactor NoteDetailNavigator --- .../atoms/NoteDetailNavigatorItem.tsx | 24 +++ .../molecules/NoteDetailFolderNavigator.tsx | 180 ------------------ .../molecules/NoteDetailNavigator.tsx | 141 ++++++++++++++ .../molecules/NoteDetailToolbar.tsx | 16 +- src/locales/enUS.ts | 2 +- 5 files changed, 174 insertions(+), 189 deletions(-) create mode 100644 src/components/atoms/NoteDetailNavigatorItem.tsx delete mode 100644 src/components/molecules/NoteDetailFolderNavigator.tsx create mode 100644 src/components/molecules/NoteDetailNavigator.tsx diff --git a/src/components/atoms/NoteDetailNavigatorItem.tsx b/src/components/atoms/NoteDetailNavigatorItem.tsx new file mode 100644 index 0000000000..da57f34cd3 --- /dev/null +++ b/src/components/atoms/NoteDetailNavigatorItem.tsx @@ -0,0 +1,24 @@ +import styled from '../../lib/styled' + +const NoteDetailNavigatorItem = styled.button` + background-color: transparent; + border: none; + white-space: nowrap; + cursor: pointer; + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + transition: color 200ms ease-in-out; + color: ${({ theme }) => theme.navItemColor}; + user-select: none; + &:hover { + color: ${({ theme }) => theme.navButtonHoverColor}; + } + + &:active, + &.active { + color: ${({ theme }) => theme.navButtonActiveColor}; + } +` + +export default NoteDetailNavigatorItem diff --git a/src/components/molecules/NoteDetailFolderNavigator.tsx b/src/components/molecules/NoteDetailFolderNavigator.tsx deleted file mode 100644 index e71243467f..0000000000 --- a/src/components/molecules/NoteDetailFolderNavigator.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import React, { useMemo, MouseEvent } from 'react' -import styled from '../../lib/styled' -import { mdiBookOpen, mdiSlashForward } from '@mdi/js' -import Icon from '../atoms/Icon' -import { useRouter, useRouteParams } from '../../lib/router' -import { flexCenter } from '../../lib/styled/styleFunctions' -import { useTranslation } from 'react-i18next' -import { useDb } from '../../lib/db' - -const Container = styled.div` - display: flex; - align-items: center; - color: ${({ theme }) => theme.navButtonColor}; - overflow: hidden; -` - -const IconContainer = styled.div` - width: 24px; - height: 24px; - ${flexCenter} - background-color: transparent; - border: none; - color: ${({ theme }) => theme.navButtonColor}; -` - -const FolderNavItemButton = styled.button` - background-color: transparent; - border: none; - white-space: nowrap; - cursor: pointer; - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - transition: color 200ms ease-in-out; - color: ${({ theme }) => theme.navItemColor}; - user-select: none; - &:hover { - color: ${({ theme }) => theme.navButtonHoverColor}; - } - - &:active, - &.active { - color: ${({ theme }) => theme.navButtonActiveColor}; - } -` - -interface NoteDetailFolderNavigatorProps { - storageId: string - storageName: string - noteId: string - noteFolderPathname: string -} - -interface FolderData { - name: string - pathname: string -} - -interface FolderNavItemProps { - path: string - children?: React.ReactNode -} - -const FolderNavItem: React.FC = ({ - children, - path, -}: FolderNavItemProps) => { - const { t } = useTranslation() - const db = useDb() - const { push } = useRouter() - const routeParams = useRouteParams() - - const currentFolderPathname = useMemo(() => { - if (routeParams.name !== 'storages.notes') { - return null - } - return routeParams.folderPathname - }, [routeParams]) - - const parsePath = (path: string) => { - const result = { - storageId: '', - storageName: '', - folderName: '', - folderPath: '', - } - - const storageMatch = /\/storages\/(.*)\/notes/.exec(path) - if (storageMatch) { - const storage = db.storageMap[storageMatch[1]] - if (storage) { - result.storageId = storage.id - result.storageName = storage.name - } - } - const folderMatch = /\/notes\/(.*)\//.exec(path) - if (folderMatch) { - result.folderPath = `/${folderMatch[1]}` - - const folderNameMatch = /[^/]*$/.exec(result.folderPath) - if (folderNameMatch) { - result.folderName = folderNameMatch[0] - } - } - return result - } - - const { storageName, folderName, folderPath } = parsePath(path) - const getStorageTooltip = (storageName: string) => - `${t('storage.storage')} ${storageName}: ${t('general.allnote')}` - - const getFolderTooltip = (foldername: string) => - `${t('folder.folder')} ${foldername}: ${t('general.allnote')}` - - const tooltip = folderName - ? getFolderTooltip(folderName) - : getStorageTooltip(storageName) - - const isActive = - currentFolderPathname === folderPath || - (!folderName && currentFolderPathname === '/') - - return ( - ) => { - event.preventDefault() - push(path) - }} - className={isActive ? 'active' : ''} - > - {folderName ? folderName : storageName} - {children} - - ) -} - -const NoteDetailFolderNavigator = ({ - storageId, - noteId, - noteFolderPathname, -}: NoteDetailFolderNavigatorProps) => { - const folderDataList = useMemo(() => { - if (noteFolderPathname === '/') { - return [] - } - const folderNames = noteFolderPathname.slice(1).split('/') - let pathname = '' - const folderDataList = [] - for (const folderName of folderNames) { - pathname += '/' + folderName - folderDataList.push({ - name: folderName, - pathname, - }) - } - return folderDataList - }, [noteFolderPathname]) - - return ( - - - - - - - {folderDataList.map((folderData) => ( - - - - - ))} - - ) -} - -export default NoteDetailFolderNavigator diff --git a/src/components/molecules/NoteDetailNavigator.tsx b/src/components/molecules/NoteDetailNavigator.tsx new file mode 100644 index 0000000000..202289a960 --- /dev/null +++ b/src/components/molecules/NoteDetailNavigator.tsx @@ -0,0 +1,141 @@ +import React, { useMemo, MouseEvent } from 'react' +import styled from '../../lib/styled' +import { mdiBookOpen, mdiSlashForward } from '@mdi/js' +import Icon from '../atoms/Icon' +import { useRouter, useRouteParams } from '../../lib/router' +import { flexCenter } from '../../lib/styled/styleFunctions' +import { useTranslation } from 'react-i18next' +import NoteDetailNavigatorItem from '../atoms/NoteDetailNavigatorItem' + +const Container = styled.div` + display: flex; + align-items: center; + color: ${({ theme }) => theme.navButtonColor}; + overflow: hidden; +` + +const IconContainer = styled.div` + width: 24px; + height: 24px; + ${flexCenter} + background-color: transparent; + border: none; + color: ${({ theme }) => theme.navButtonColor}; +` + +interface NoteDetailFolderNavigatorProps { + storageId: string + storageName: string + noteId: string + noteFolderPathname: string +} + +interface FolderData { + name: string + pathname: string +} + +interface FolderNavItemProps { + active: boolean + storageId: string + storageName: string + folderName: string + folderPathname: string + noteId: string +} + +const NavigatorFolderItem: React.FC = ({ + active, + storageId, + storageName, + folderName, + folderPathname, + noteId, +}: FolderNavItemProps) => { + const { t } = useTranslation() + const { push } = useRouter() + + return ( + ) => { + event.preventDefault() + push(`/app/storages/${storageId}/notes${folderPathname}/${noteId}`) + }} + className={active ? 'active' : ''} + > + {folderName} + + ) +} + +const NoteDetailFolderNavigator = ({ + storageId, + storageName, + noteId, + noteFolderPathname, +}: NoteDetailFolderNavigatorProps) => { + const { t } = useTranslation() + const { push } = useRouter() + const routeParams = useRouteParams() + + const folderDataList = useMemo(() => { + if (noteFolderPathname === '/') { + return [] + } + const folderNames = noteFolderPathname.slice(1).split('/') + let pathname = '' + const folderDataList = [] + for (const folderName of folderNames) { + pathname += '/' + folderName + folderDataList.push({ + name: folderName, + pathname, + }) + } + return folderDataList + }, [noteFolderPathname]) + + const currentFolderPathname = useMemo(() => { + if (routeParams.name !== 'storages.notes') { + return null + } + return routeParams.folderPathname + }, [routeParams]) + + return ( + + + + + ) => { + event.preventDefault() + push(`/app/storages/${storageId}/notes/${noteId}`) + }} + className={currentFolderPathname === '/' ? 'active' : ''} + > + {storageName} + + + {folderDataList.map((folderData) => { + return ( + + + + + ) + })} + + ) +} + +export default NoteDetailFolderNavigator diff --git a/src/components/molecules/NoteDetailToolbar.tsx b/src/components/molecules/NoteDetailToolbar.tsx index 26d19c6530..4485bbf6a7 100644 --- a/src/components/molecules/NoteDetailToolbar.tsx +++ b/src/components/molecules/NoteDetailToolbar.tsx @@ -15,7 +15,7 @@ import { borderBottom, flexCenter } from '../../lib/styled/styleFunctions' import ToolbarIconButton from '../atoms/ToolbarIconButton' import { ViewModeType } from '../../lib/generalStatus' import ToolbarSeparator from '../atoms/ToolbarSeparator' -import NoteDetailFolderNavigator from './NoteDetailFolderNavigator' +import NoteDetailNavigator from './NoteDetailNavigator' import NoteDetailTagNavigator from './NoteDetailTagNavigator' import { values } from '../../lib/db/utils' import { MenuTypes, useContextMenu } from '../../lib/contextMenu' @@ -120,7 +120,7 @@ const NoteDetailToolbar = ({ return ( - ) : ( - - )} + + )} Date: Thu, 3 Sep 2020 15:13:54 +0900 Subject: [PATCH 8/9] Rename allNote to allNotes --- src/locales/de.ts | 2 +- src/locales/esES.ts | 2 +- src/locales/frFR.ts | 2 +- src/locales/itIT.ts | 2 +- src/locales/ja.ts | 2 +- src/locales/ko.ts | 2 +- src/locales/ptBR.ts | 2 +- src/locales/ukUA.ts | 2 +- src/locales/zhCN.ts | 2 +- src/locales/zhHK.ts | 2 +- src/locales/zhTW.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/locales/de.ts b/src/locales/de.ts index 201877e136..ad84beaff8 100644 --- a/src/locales/de.ts +++ b/src/locales/de.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'Abbrechen', 'general.attachments': 'Anhänge', 'general.trash': 'Papierkorb', - 'general.allnote': 'Alle Notizen', + 'general.allNotes': 'Alle Notizen', 'general.signin': 'Anmelden', 'general.signOut': 'Abmelden', 'general.save': 'Speichern', diff --git a/src/locales/esES.ts b/src/locales/esES.ts index be2673b844..c6db4d1b19 100644 --- a/src/locales/esES.ts +++ b/src/locales/esES.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'Cancelar', 'general.attachments': 'Archivos adjuntos', 'general.trash': 'Basura', - 'general.allnote': 'Todas las notas', + 'general.allNotess': 'Todas las notas', 'general.signin': 'Iniciar sesión', 'general.signOut': 'Cerrar sesión', 'general.save': 'Guardar', diff --git a/src/locales/frFR.ts b/src/locales/frFR.ts index 779c071486..3d180ec93f 100644 --- a/src/locales/frFR.ts +++ b/src/locales/frFR.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'Annuler', 'general.attachments': 'Pièces jointes', 'general.trash': 'Corbeille', - 'general.allnote': 'Toutes les notes', + 'general.allNotess': 'Toutes les notes', 'general.signin': 'Se connecter', 'general.signOut': 'Se déconnecter', 'general.save': 'Sauvegarder', diff --git a/src/locales/itIT.ts b/src/locales/itIT.ts index 984472bc03..bbe6d725da 100644 --- a/src/locales/itIT.ts +++ b/src/locales/itIT.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'Annulla', 'general.attachments': 'Allegati', 'general.trash': 'Cestino', - 'general.allnote': 'Tutte le note', + 'general.allNotess': 'Tutte le note', 'general.signin': 'Accedi', 'general.signOut': 'Disconnetti', 'general.save': 'Salva', diff --git a/src/locales/ja.ts b/src/locales/ja.ts index 16219bec22..ee800b2fb6 100644 --- a/src/locales/ja.ts +++ b/src/locales/ja.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'キャンセル', 'general.attachments': '画像', 'general.trash': 'ゴミ箱', - 'general.allnote': '全てのノート', + 'general.allNotess': '全てのノート', 'general.signin': 'サインイン', 'general.signOut': 'サインアウト', 'general.save': '保存', diff --git a/src/locales/ko.ts b/src/locales/ko.ts index 264917f2ae..4fd01724ce 100644 --- a/src/locales/ko.ts +++ b/src/locales/ko.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': '취소', 'general.attachments': '첨부파일', 'general.trash': '휴지통', - 'general.allnote': '전체 노트', + 'general.allNotes': '전체 노트', 'general.signin': '로그인', 'general.signOut': '로그아웃', 'general.save': '저장', diff --git a/src/locales/ptBR.ts b/src/locales/ptBR.ts index 1fee1aed8e..dbd5c9bf82 100644 --- a/src/locales/ptBR.ts +++ b/src/locales/ptBR.ts @@ -5,7 +5,7 @@ 'general.cancel': 'Cancelar', 'general.attachments': 'Anexos', 'general.trash': 'Lixo', - 'general.allnote': 'All Notes', + 'general.allNotes': 'All Notes', 'general.signin': 'Logar', 'general.signOut': 'Sair', 'general.save': 'Salvar', diff --git a/src/locales/ukUA.ts b/src/locales/ukUA.ts index 11c04ba6b3..7a4b4bb64a 100644 --- a/src/locales/ukUA.ts +++ b/src/locales/ukUA.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': 'Скасувати', 'general.attachments': 'Вкладення', 'general.trash': 'Сміття', - 'general.allnote': 'Усі примітки', + 'general.allNotes': 'Усі примітки', 'general.signin': 'Увійти', 'general.signOut': 'Вийти', 'general.save': 'Зберегти', diff --git a/src/locales/zhCN.ts b/src/locales/zhCN.ts index 89cebf5ad2..9dbe0d7800 100644 --- a/src/locales/zhCN.ts +++ b/src/locales/zhCN.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': '取消', 'general.attachments': '附件', 'general.trash': '回收站', - 'general.allnote': '所有笔记', + 'general.allNotes': '所有笔记', 'general.signin': '登录', 'general.signOut': '登出', 'general.save': '保存', diff --git a/src/locales/zhHK.ts b/src/locales/zhHK.ts index 54acc3b56a..0fc1453e6e 100644 --- a/src/locales/zhHK.ts +++ b/src/locales/zhHK.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': '取消', 'general.attachments': '附件', 'general.trash': '垃圾筒', - 'general.allnote': '所有筆記', + 'general.allNotes': '所有筆記', 'general.signin': '登入', 'general.signOut': '登出', 'general.save': '儲存', diff --git a/src/locales/zhTW.ts b/src/locales/zhTW.ts index af9bb6e644..6adb6880cd 100644 --- a/src/locales/zhTW.ts +++ b/src/locales/zhTW.ts @@ -5,7 +5,7 @@ export default { 'general.cancel': '取消', 'general.attachments': '附加檔案', 'general.trash': '資源回收桶', - 'general.allnote': '所有筆記', + 'general.allNotes': '所有筆記', 'general.signin': '登入', 'general.signOut': '登出', 'general.save': '存檔', From a7c8af86bbbf4ae769649e9b0c377e5c0f16e567 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Thu, 3 Sep 2020 16:22:58 +0900 Subject: [PATCH 9/9] FIx title and locales --- src/components/atoms/TagNavigatorListItem.tsx | 4 ++-- src/components/molecules/NoteDetailNavigator.tsx | 6 ++---- src/components/molecules/NoteDetailTagNavigator.tsx | 2 +- src/components/molecules/TagListFragment.tsx | 2 +- src/locales/de.ts | 2 +- src/locales/enUS.ts | 3 ++- src/locales/esES.ts | 2 +- src/locales/frFR.ts | 2 +- src/locales/itIT.ts | 2 +- src/locales/ja.ts | 2 +- src/locales/ko.ts | 2 +- src/locales/ptBR.ts | 2 +- src/locales/ukUA.ts | 2 +- src/locales/zhCN.ts | 2 +- src/locales/zhHK.ts | 2 +- src/locales/zhTW.ts | 2 +- src/mobile/components/molecules/TagListFragment.tsx | 2 +- 17 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/components/atoms/TagNavigatorListItem.tsx b/src/components/atoms/TagNavigatorListItem.tsx index 4f875f310c..2e950161d9 100644 --- a/src/components/atoms/TagNavigatorListItem.tsx +++ b/src/components/atoms/TagNavigatorListItem.tsx @@ -72,7 +72,7 @@ const TagNavigatorListItem = ({ return ( { push(`/app/storages/${storageId}/tags/${tag}/${noteId}`) }} @@ -81,7 +81,7 @@ const TagNavigatorListItem = ({ {tag} { removeTagByName(tag) }} diff --git a/src/components/molecules/NoteDetailNavigator.tsx b/src/components/molecules/NoteDetailNavigator.tsx index 202289a960..d6e8ecac0d 100644 --- a/src/components/molecules/NoteDetailNavigator.tsx +++ b/src/components/molecules/NoteDetailNavigator.tsx @@ -52,12 +52,11 @@ const NavigatorFolderItem: React.FC = ({ folderPathname, noteId, }: FolderNavItemProps) => { - const { t } = useTranslation() const { push } = useRouter() return ( ) => { event.preventDefault() push(`/app/storages/${storageId}/notes${folderPathname}/${noteId}`) @@ -75,7 +74,6 @@ const NoteDetailFolderNavigator = ({ noteId, noteFolderPathname, }: NoteDetailFolderNavigatorProps) => { - const { t } = useTranslation() const { push } = useRouter() const routeParams = useRouteParams() @@ -109,7 +107,7 @@ const NoteDetailFolderNavigator = ({ ) => { event.preventDefault() push(`/app/storages/${storageId}/notes/${noteId}`) diff --git a/src/components/molecules/NoteDetailTagNavigator.tsx b/src/components/molecules/NoteDetailTagNavigator.tsx index dcae6b4eb4..3d8d53e4da 100644 --- a/src/components/molecules/NoteDetailTagNavigator.tsx +++ b/src/components/molecules/NoteDetailTagNavigator.tsx @@ -97,7 +97,7 @@ const NoteDetailTagNavigator = ({ return ( <> - + {' '} diff --git a/src/components/molecules/TagListFragment.tsx b/src/components/molecules/TagListFragment.tsx index a0aef4698a..06b1e4b7f5 100644 --- a/src/components/molecules/TagListFragment.tsx +++ b/src/components/molecules/TagListFragment.tsx @@ -88,7 +88,7 @@ const TagListFragment = ({ storage }: TagListFragmentProps) => { 0 ? tagListIsFolded : undefined} onFoldButtonClick={() => { toggleSideNavOpenedItem(tagListNavItemId) diff --git a/src/locales/de.ts b/src/locales/de.ts index ad84beaff8..186f0d8cda 100644 --- a/src/locales/de.ts +++ b/src/locales/de.ts @@ -43,7 +43,7 @@ export default { 'folder.removeMessage': 'Alle Notizen und Unterordner werden gelöscht.', //Tag - 'tag.tag': 'Tag', + 'tag.tags': 'Tag', 'tag.remove': 'Tag löschen', 'tag.removeMessage': 'Das Tag wird von allen Notizen entfernt.', diff --git a/src/locales/enUS.ts b/src/locales/enUS.ts index cc9c38dc40..34c985d100 100644 --- a/src/locales/enUS.ts +++ b/src/locales/enUS.ts @@ -45,9 +45,10 @@ export default { 'folder.removeMessage': 'All notes and subfolders will be deleted.', //Tag - 'tag.tag': 'Tags', + 'tag.tags': 'Tags', 'tag.add': 'Add Tag', 'tag.remove': 'Remove Tag', + 'tag.removeX': 'Remove #{{tag}}', 'tag.removeMessage': 'The tag will be untagged from all notes.', //Note diff --git a/src/locales/esES.ts b/src/locales/esES.ts index c6db4d1b19..e9246aecd8 100644 --- a/src/locales/esES.ts +++ b/src/locales/esES.ts @@ -45,7 +45,7 @@ export default { 'Todas las notas y subcarpetas van a ser eliminadas.', //Tag - 'tag.tag': 'Etiqueta', + 'tag.tags': 'Etiqueta', 'tag.remove': 'Eliminar etiqueta', 'tag.removeMessage': 'Vas a quitar esta etiqueta de todas las notas.', diff --git a/src/locales/frFR.ts b/src/locales/frFR.ts index 3d180ec93f..6322d4efb7 100644 --- a/src/locales/frFR.ts +++ b/src/locales/frFR.ts @@ -45,7 +45,7 @@ export default { 'Toutes les notes et sous-dossiers seront supprimés.', //Tag - 'tag.tag': 'Tags', + 'tag.tags': 'Tags', 'tag.remove': 'Supprimer Tag', 'tag.removeMessage': 'Le tag sera retiré de toutes les notes.', diff --git a/src/locales/itIT.ts b/src/locales/itIT.ts index bbe6d725da..28feb536bd 100644 --- a/src/locales/itIT.ts +++ b/src/locales/itIT.ts @@ -43,7 +43,7 @@ export default { 'folder.removeMessage': 'Tutte le note e sottocartelle sarnno eliminate.', //Tag - 'tag.tag': 'Tags', + 'tag.tags': 'Tags', 'tag.remove': 'Rimuovi Tag', 'tag.removeMessage': 'Il tag verrà rimosso da tutte le note', diff --git a/src/locales/ja.ts b/src/locales/ja.ts index ee800b2fb6..4fe577e017 100644 --- a/src/locales/ja.ts +++ b/src/locales/ja.ts @@ -42,7 +42,7 @@ export default { 'folder.removeMessage': 'フォルダを削除すると全てのノートも削除されます', //Tag - 'tag.tag': 'タグ', + 'tag.tags': 'タグ', 'tag.remove': 'タグを削除する', 'tag.removeMessage': '全てのノートからタグが削除されます', diff --git a/src/locales/ko.ts b/src/locales/ko.ts index 4fd01724ce..aed8061d88 100644 --- a/src/locales/ko.ts +++ b/src/locales/ko.ts @@ -41,7 +41,7 @@ export default { 'folder.removeMessage': '모든 폴더와 하위폴더가 삭제됩니다.', //Tag - 'tag.tag': '태그', + 'tag.tags': '태그', 'tag.remove': '태그 제거', 'tag.removeMessage': '해당 태그가 모든 노트에서 제거됩니다.', diff --git a/src/locales/ptBR.ts b/src/locales/ptBR.ts index dbd5c9bf82..1df3b0f858 100644 --- a/src/locales/ptBR.ts +++ b/src/locales/ptBR.ts @@ -44,7 +44,7 @@ 'folder.removeMessage': 'Todas as notas e sub-pastas serão deletadas.', //Tag - 'tag.tag': 'Tags', + 'tag.tags': 'Tags', 'tag.remove': 'Remover Tag', 'tag.removeMessage': 'A Tag será removida de todas as notas.', diff --git a/src/locales/ukUA.ts b/src/locales/ukUA.ts index 7a4b4bb64a..37d8758fbb 100644 --- a/src/locales/ukUA.ts +++ b/src/locales/ukUA.ts @@ -42,7 +42,7 @@ export default { 'folder.removeMessage': 'Усі нотатки та папки будуть видалені.', // Tag - 'tag.tag': 'Теги', + 'tag.tags': 'Теги', 'tag.remove': 'Видалити тег', 'tag.removeMessage': 'Тег буде відмічений від усіх нотаток.', diff --git a/src/locales/zhCN.ts b/src/locales/zhCN.ts index 9dbe0d7800..94ecbe8a11 100644 --- a/src/locales/zhCN.ts +++ b/src/locales/zhCN.ts @@ -41,7 +41,7 @@ export default { 'folder.removeMessage': '所有笔记和子文件夹将被删除.', //Tag - 'tag.tag': '标签', + 'tag.tags': '标签', 'tag.remove': '移除标签', 'tag.removeMessage': '这个标签将从所有笔记中被移除.', diff --git a/src/locales/zhHK.ts b/src/locales/zhHK.ts index 0fc1453e6e..7e2060038b 100644 --- a/src/locales/zhHK.ts +++ b/src/locales/zhHK.ts @@ -41,7 +41,7 @@ export default { 'folder.removeMessage': '所有筆記和子資料夾將被刪除.', //Tag - 'tag.tag': '標籤', + 'tag.tags': '標籤', 'tag.remove': '移除標籤', 'tag.removeMessage': '這個標籤將從所有筆記中被移除.', diff --git a/src/locales/zhTW.ts b/src/locales/zhTW.ts index 6adb6880cd..25544d8940 100644 --- a/src/locales/zhTW.ts +++ b/src/locales/zhTW.ts @@ -41,7 +41,7 @@ export default { 'folder.removeMessage': '所有筆記和子資料夾將會被刪除。', //Tag - 'tag.tag': '標籤', + 'tag.tags': '標籤', 'tag.remove': '移除標籤', 'tag.removeMessage': '此標籤將從所有筆記中被移除。', diff --git a/src/mobile/components/molecules/TagListFragment.tsx b/src/mobile/components/molecules/TagListFragment.tsx index 05ebe7d212..6bb3ce6e65 100644 --- a/src/mobile/components/molecules/TagListFragment.tsx +++ b/src/mobile/components/molecules/TagListFragment.tsx @@ -92,7 +92,7 @@ const TagListFragment = ({ storage }: TagListFragmentProps) => { 0 ? tagListIsFolded : undefined} onFoldButtonClick={() => { toggleSideNavOpenedItem(tagListNavItemId)