diff --git a/import.sql b/import.sql index 2ccabfec5..e3471043d 100644 --- a/import.sql +++ b/import.sql @@ -118,9 +118,12 @@ CREATE TABLE IF NOT EXISTS `npwd_marketplace_listings` CREATE TABLE IF NOT EXISTS `npwd_marketplace_reports` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `listing_id` int(11) DEFAULT NULL, - `profile` varchar(255) DEFAULT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `listing_id` int(11) DEFAULT NULL, + `profile` varchar(255) DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, PRIMARY KEY (id) ); @@ -181,8 +184,8 @@ CREATE TABLE IF NOT EXISTS `npwd_calls` CREATE TABLE IF NOT EXISTS npwd_phone_gallery ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `identifier` varchar(48) DEFAULT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `identifier` varchar(48) DEFAULT NULL, `image` varchar(255) NOT NULL, PRIMARY KEY (id), INDEX `identifier` (`identifier`) diff --git a/package.json b/package.json index c5d73ffb1..913a83c50 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@octokit/core": "^3.5.1", "husky": "^7.0.4", "lerna": "^4.0.0", - "prettier": "^2.4.1", + "prettier": "^2.5.0", "pretty-quick": "^3.1.2" }, "scripts": { diff --git a/phone/src/apps/contacts/hooks/useContactsAPI.ts b/phone/src/apps/contacts/hooks/useContactsAPI.ts index 3a5740772..8b802aeb1 100644 --- a/phone/src/apps/contacts/hooks/useContactsAPI.ts +++ b/phone/src/apps/contacts/hooks/useContactsAPI.ts @@ -22,7 +22,7 @@ export const useContactsAPI = () => { }).then((serverResp) => { if (serverResp.status !== 'ok') { return addAlert({ - message: t('CONTACTS.ADD_FAILED'), + message: t('CONTACTS.FEEDBACK.ADD_FAILED'), type: 'error', }); } @@ -30,7 +30,7 @@ export const useContactsAPI = () => { // Sanity checks maybe? addLocalContact(serverResp.data); addAlert({ - message: t('CONTACTS.ADD_SUCCESS'), + message: t('CONTACTS.FEEDBACK.ADD_SUCCESS'), type: 'success', }); history.replace(referral); @@ -49,7 +49,7 @@ export const useContactsAPI = () => { }).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('CONTACTS.UPDATE_FAILED'), + message: t('CONTACTS.FEEDBACK.UPDATE_FAILED'), type: 'error', }); } @@ -62,7 +62,7 @@ export const useContactsAPI = () => { }); addAlert({ - message: t('CONTACTS.UPDATE_SUCCESS'), + message: t('CONTACTS.FEEDBACK.UPDATE_SUCCESS'), type: 'success', }); @@ -77,7 +77,7 @@ export const useContactsAPI = () => { fetchNui(ContactEvents.DELETE_CONTACT, { id }).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('CONTACTS.DELETE_FAILED'), + message: t('CONTACTS.FEEDBACK.DELETE_FAILED'), type: 'error', }); } @@ -86,7 +86,7 @@ export const useContactsAPI = () => { deleteLocalContact(id); addAlert({ - message: t('CONTACTS.DELETE_SUCCESS'), + message: t('CONTACTS.FEEDBACK.DELETE_SUCCESS'), type: 'success', }); }); diff --git a/phone/src/apps/dialer/components/DialerInput.tsx b/phone/src/apps/dialer/components/DialerInput.tsx index e3019a6d8..074023499 100644 --- a/phone/src/apps/dialer/components/DialerInput.tsx +++ b/phone/src/apps/dialer/components/DialerInput.tsx @@ -48,7 +48,7 @@ export const DialerInput: React.FC = () => { return ( set(e.target.value)} diff --git a/phone/src/apps/dialer/components/DialerNavBar.tsx b/phone/src/apps/dialer/components/DialerNavBar.tsx index f26ea1c11..79e3bfd1a 100644 --- a/phone/src/apps/dialer/components/DialerNavBar.tsx +++ b/phone/src/apps/dialer/components/DialerNavBar.tsx @@ -31,14 +31,14 @@ const DialerNavBar: React.FC = () => { return ( } to="/phone" /> { to="/phone/dial" /> { return (

- {t('APPS_DIALER_NO_HISTORY')} + {t('DIALER.NO_HISTORY')} 😞 diff --git a/phone/src/apps/marketplace/components/MarketplaceList/ListingActions.tsx b/phone/src/apps/marketplace/components/MarketplaceList/ListingActions.tsx index 8fab4ceee..56ecc08b8 100644 --- a/phone/src/apps/marketplace/components/MarketplaceList/ListingActions.tsx +++ b/phone/src/apps/marketplace/components/MarketplaceList/ListingActions.tsx @@ -36,13 +36,13 @@ export const ListingActions: React.FC = ({ children, ...list }).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MARKETPLACE_DELETE_LISTING_FAILED'), + message: t('MARKETPLACE.FEEDBACK.DELETE_LISTING_FAILED'), type: 'error', }); } addAlert({ - message: t('APPS_MARKETPLACE_DELETE_LISTING_SUCCESS'), + message: t('MARKETPLACE.FEEDBACK.DELETE_LISTING_SUCCESS'), type: 'success', }); }); @@ -54,13 +54,13 @@ export const ListingActions: React.FC = ({ children, ...list }).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MARKETPLACE_REPORT_LISTING_FAILED'), + message: t('MARKETPLACE.FEEDBACK.REPORT_LISTING_FAILED'), type: 'error', }); } addAlert({ - message: t('APPS_MARKETPLACE_REPORT_LISTING_SUCCESS'), + message: t('MARKETPLACE.FEEDBACK.REPORT_LISTING_SUCCESS'), type: 'success', }); }); diff --git a/phone/src/apps/marketplace/components/MarketplaceList/MarketplaceItem.tsx b/phone/src/apps/marketplace/components/MarketplaceList/MarketplaceItem.tsx index b2f419e4a..c9ca0f9a1 100644 --- a/phone/src/apps/marketplace/components/MarketplaceList/MarketplaceItem.tsx +++ b/phone/src/apps/marketplace/components/MarketplaceList/MarketplaceItem.tsx @@ -26,6 +26,7 @@ const useStyles = makeStyles((theme) => ({ display: 'flex', flexFlow: 'column', alignItems: 'flex', + borderWidth: 2, height: 'auto', background: theme.palette.background.paper, marginBottom: 20, diff --git a/phone/src/apps/marketplace/components/form/ListingForm.tsx b/phone/src/apps/marketplace/components/form/ListingForm.tsx index f7612294c..ec3c56265 100644 --- a/phone/src/apps/marketplace/components/form/ListingForm.tsx +++ b/phone/src/apps/marketplace/components/form/ListingForm.tsx @@ -59,7 +59,7 @@ export const ListingForm: React.FC = () => { const addListing = () => { if (!areFieldsFilled) { return addAlert({ - message: t('APPS_MARKETPLACE_REQUIRED_FIELDS'), + message: t('MARKETPLACE.FEEDBACK.REQUIRED_FIELDS'), type: 'error', }); } @@ -78,13 +78,13 @@ export const ListingForm: React.FC = () => { } return addAlert({ - message: t('APPS_MARKETPLACE_CREATE_LISTING_FAILED'), + message: t('MARKETPLACE.FEEDBACK.CREATE_LISTING_FAILED'), type: 'error', }); } addAlert({ - message: t('APPS_MARKETPLACE_CREATE_LISTING_SUCCESS'), + message: t('MARKETPLACE.FEEDBACK.CREATE_LISTING_SUCCESS'), type: 'success', }); history.push('/marketplace'); @@ -131,7 +131,7 @@ export const ListingForm: React.FC = () => { error={title.length >= MarketplaceDatabaseLimits.title} onChange={handleTitleChange} label={t('GENERIC.REQUIRED')} - placeholder={t('APPS_MARKETPLACE_FORM_TITLE')} + placeholder={t('MARKETPLACE.FORM_TITLE')} inputProps={{ className: classes.textFieldInput, maxLength: 25, @@ -153,7 +153,7 @@ export const ListingForm: React.FC = () => { = MarketplaceDatabaseLimits.url} onChange={handleUrlChange} @@ -168,7 +168,7 @@ export const ListingForm: React.FC = () => { onChange={handleDescriptionChange} label={t('GENERIC.REQUIRED')} error={description.length >= MarketplaceDatabaseLimits.description} - placeholder={t('APPS_MARKETPLACE_FORM_DESCRIPTION')} + placeholder={t('MARKETPLACE.FORM_DESCRIPTION')} inputProps={{ className: classes.multilineFieldInput, maxLength: 130, diff --git a/phone/src/apps/marketplace/hooks/useMarketplaceActions.ts b/phone/src/apps/marketplace/hooks/useMarketplaceActions.ts index d4fc4bbf3..1bccfe90a 100644 --- a/phone/src/apps/marketplace/hooks/useMarketplaceActions.ts +++ b/phone/src/apps/marketplace/hooks/useMarketplaceActions.ts @@ -3,7 +3,7 @@ import { MarketplaceListing } from '@typings/marketplace'; import { useRecoilCallback } from 'recoil'; interface MarketplaceActionValues { - deleteListing: (id: number) => void; + deleteListing: (ids: number[]) => void; addListing: (listing: MarketplaceListing) => void; } @@ -12,7 +12,7 @@ export const useMarketplaceActions = (): MarketplaceActionValues => { const deleteListing = useRecoilCallback( ({ snapshot }) => - (id: number) => { + (ids: number[]) => { const { state, contents } = snapshot.getLoadable(listingState); // Make sure our atom is actually loaded before we attempt a dispatch if (state !== 'hasValue') return; @@ -20,7 +20,9 @@ export const useMarketplaceActions = (): MarketplaceActionValues => { // block dispatch if (!contents.length) return; - setListings((curListings) => [...curListings].filter((listing) => listing.id !== id)); + setListings((curListings) => + [...curListings].filter((listing) => !ids.includes(listing.id)), + ); }, [], ); @@ -28,9 +30,9 @@ export const useMarketplaceActions = (): MarketplaceActionValues => { const addListing = useRecoilCallback( ({ snapshot }) => (listing: MarketplaceListing) => { - const { contents } = snapshot.getLoadable(listingState); + const { state } = snapshot.getLoadable(listingState); // Make sure our atom is actually loaded before we attempt a dispatch - if (contents !== 'hasValue') return; + if (state !== 'hasValue') return; setListings((curListings) => [listing, ...curListings]); }, diff --git a/phone/src/apps/marketplace/hooks/useMarketplaceService.ts b/phone/src/apps/marketplace/hooks/useMarketplaceService.ts index d15582d5b..871b289d8 100644 --- a/phone/src/apps/marketplace/hooks/useMarketplaceService.ts +++ b/phone/src/apps/marketplace/hooks/useMarketplaceService.ts @@ -1,9 +1,5 @@ import { useNuiEvent } from 'fivem-nui-react-lib'; -import { - MarketplaceBroadcastAddDTO, - MarketplaceDeleteDTO, - MarketplaceEvents, -} from '@typings/marketplace'; +import { MarketplaceBroadcastAddDTO, MarketplaceEvents } from '@typings/marketplace'; import { useMarketplaceActions } from './useMarketplaceActions'; import { useCallback } from 'react'; @@ -18,8 +14,8 @@ export const useMarketplaceService = () => { ); const deleteListingHandler = useCallback( - (listing: MarketplaceDeleteDTO) => { - deleteListing(listing.id); + (listingIds: number[]) => { + deleteListing(listingIds); }, [deleteListing], ); @@ -30,9 +26,5 @@ export const useMarketplaceService = () => { addListingHandler, ); - useNuiEvent( - 'MARKETPLACE', - MarketplaceEvents.BROADCAST_DELETE, - deleteListingHandler, - ); + useNuiEvent('MARKETPLACE', MarketplaceEvents.BROADCAST_DELETE, deleteListingHandler); }; diff --git a/phone/src/apps/match/components/ActiveProfile.tsx b/phone/src/apps/match/components/ActiveProfile.tsx index edaa7def0..3d5fee196 100644 --- a/phone/src/apps/match/components/ActiveProfile.tsx +++ b/phone/src/apps/match/components/ActiveProfile.tsx @@ -128,13 +128,13 @@ const ActiveProfile = ({ profile, onSwipe }: IProps) => { <> - - + + - + { - + - {t('APPS_MATCH_NO_PROFILES')} + {t('MATCH.FEEDBACK.NO_PROFILES')} ); } diff --git a/phone/src/apps/match/components/matches/Match.tsx b/phone/src/apps/match/components/matches/Match.tsx index 6e7684ebe..3414858ee 100644 --- a/phone/src/apps/match/components/matches/Match.tsx +++ b/phone/src/apps/match/components/matches/Match.tsx @@ -36,7 +36,7 @@ export const Match = ({ match }: IProps) => { setShowProfile((show) => !show); }; - const secondaryText = t('APPS_MATCH_PROFILE_MATCHED_AT', { + const secondaryText = t('MATCH.MESSAGES.PROFILE_MATCHED_AT', { matchedAt: match.matchedAtFormatted, }); diff --git a/phone/src/apps/match/components/profile/Profile.tsx b/phone/src/apps/match/components/profile/Profile.tsx index 28e82d9d0..32a8ccd1f 100644 --- a/phone/src/apps/match/components/profile/Profile.tsx +++ b/phone/src/apps/match/components/profile/Profile.tsx @@ -59,7 +59,7 @@ const Profile = ({ profile }: IProps) => { {profile.name} - {t('APPS_MATCH_PROFILE_LAST_ACTIVE', { lastActive: profile.lastActiveFormatted })} + {t('MATCH.MESSAGES.PROFILE_LAST_ACTIVE', { lastActive: profile.lastActiveFormatted })} {bioSecondary && ( diff --git a/phone/src/apps/match/components/profile/ProfileForm.tsx b/phone/src/apps/match/components/profile/ProfileForm.tsx index 50f4784c7..ed81d55f0 100644 --- a/phone/src/apps/match/components/profile/ProfileForm.tsx +++ b/phone/src/apps/match/components/profile/ProfileForm.tsx @@ -77,7 +77,7 @@ export function ProfileForm({ profile, showPreview }: IProps) { fetchNui>(event, updatedProfile).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MATCH_UPDATE_PROFILE_FAILED'), + message: t('MATCH.FEEDBACK.UPDATE_PROFILE_FAILED'), type: 'error', }); } @@ -85,14 +85,14 @@ export function ProfileForm({ profile, showPreview }: IProps) { setMyProfile(resp.data); addAlert({ - message: t('APPS_MATCH_UPDATE_PROFILE_SUCCEEDED'), + message: t('MATCH.FEEDBACK.UPDATE_PROFILE_SUCCEEDED'), type: 'success', }); }); }; if (!profile && !ResourceConfig.match.allowEditableProfileName) { - return ; + return ; } if (showPreview) { @@ -106,36 +106,36 @@ export function ProfileForm({ profile, showPreview }: IProps) { return (

- +
); diff --git a/phone/src/apps/match/components/views/MatchList.tsx b/phone/src/apps/match/components/views/MatchList.tsx index 6115c41e0..b8d4b94cd 100644 --- a/phone/src/apps/match/components/views/MatchList.tsx +++ b/phone/src/apps/match/components/views/MatchList.tsx @@ -20,9 +20,9 @@ function MatchList() { const [t] = useTranslation(); const { matches, error } = useMatches(); - if (error) return ; + if (error) return ; if (!matches) return ; - if (matches.length === 0) return ; + if (matches.length === 0) return ; return ( diff --git a/phone/src/apps/match/components/views/MatchPage.tsx b/phone/src/apps/match/components/views/MatchPage.tsx index ce637e530..c7e49ab3b 100644 --- a/phone/src/apps/match/components/views/MatchPage.tsx +++ b/phone/src/apps/match/components/views/MatchPage.tsx @@ -41,9 +41,9 @@ const MatchPage = () => { setViewed(id, liked); }; - if (error) return ; + if (error) return ; if (!loaded || !profiles) return ; - if (!activeProfile) return ; + if (!activeProfile) return ; return ( diff --git a/phone/src/apps/match/components/views/ProfileEditor.tsx b/phone/src/apps/match/components/views/ProfileEditor.tsx index 055cfe576..a2dadd3f9 100644 --- a/phone/src/apps/match/components/views/ProfileEditor.tsx +++ b/phone/src/apps/match/components/views/ProfileEditor.tsx @@ -33,7 +33,7 @@ function ProfileEditor() { } - label={t('APPS_MATCH_EDIT_PROFILE_PREVIEW')} + label={t('MATCH.EDIT_PROFILE_PREVIEW')} /> diff --git a/phone/src/apps/match/hooks/useMatchActions.ts b/phone/src/apps/match/hooks/useMatchActions.ts index c43745155..753d6ffe2 100644 --- a/phone/src/apps/match/hooks/useMatchActions.ts +++ b/phone/src/apps/match/hooks/useMatchActions.ts @@ -24,7 +24,7 @@ export const useMatchActions = () => { fetchNui>(MatchEvents.SAVE_LIKES, [{ id, liked }]).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MATCH_SAVE_LIKES_FAILED'), + message: t('MATCH.FEEDBACK.SAVE_LIKES_FAILED'), type: 'error', }); } @@ -35,7 +35,7 @@ export const useMatchActions = () => { if (resp.data) { addAlert({ - message: t('APPS_MATCH_NEW_LIKE_FOUND'), + message: t('MATCH.FEEDBACK.NEW_LIKE_FOUND'), type: 'info', }); fetchNui>(MatchEvents.GET_MATCHES).then((resp) => { diff --git a/phone/src/apps/messages/components/form/MessageInput.tsx b/phone/src/apps/messages/components/form/MessageInput.tsx index 6163aa4fc..174ed3867 100644 --- a/phone/src/apps/messages/components/form/MessageInput.tsx +++ b/phone/src/apps/messages/components/form/MessageInput.tsx @@ -32,7 +32,7 @@ const MessageInput = ({ messageConversationId, onAddImageClick }: IProps) => { setMessage(''); return addAlert({ - message: t('APPS_MESSAGES_NEW_MESSAGE_FAILED'), + message: t('MESSAGES.FEEDBACK.NEW_MESSAGE_FAILED'), type: 'error', }); } @@ -63,7 +63,7 @@ const MessageInput = ({ messageConversationId, onAddImageClick }: IProps) => { inputProps={{ style: { fontSize: '1.3em' } }} value={message} onChange={(e) => setMessage(e.target.value)} - placeholder={t('APPS_MESSAGES_NEW_MESSAGE')} + placeholder={t('MESSAGES.NEW_MESSAGE')} /> diff --git a/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx b/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx index cb41b7742..8d5010bd8 100644 --- a/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx +++ b/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx @@ -36,7 +36,7 @@ export const NewMessageGroupButton: React.FC = ({ on }).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MESSAGES_DELETE_CONVERSATION_FAILED'), + message: t('MESSAGES.DELETE_CONVERSATION_FAILED'), type: 'error', }); } diff --git a/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx b/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx index 9f122b0c4..824ff1607 100644 --- a/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx +++ b/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx @@ -47,7 +47,9 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { ).then((resp) => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_MESSAGES_MESSAGE_GROUP_CREATE_ONE_NUMBER_FAILED'), + message: t('MESSAGES.FEEDBACK.MESSAGE_GROUP_CREATE_ONE_NUMBER_FAILED', { + number: participant.number || participant, + }), type: 'error', }); } @@ -57,7 +59,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { ); if (doesConversationExist) return addAlert({ - message: 'This conversation does already exist', + message: t('MESSAGES.FEEDBACK.MESSAGE_CONVERSATION_DUPLICATE'), type: 'error', }); @@ -95,7 +97,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { setParticipant(e.currentTarget.value)} /> ); @@ -128,7 +130,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { color="primary" type="submit" > - {t('APPS_MESSAGES_NEW_MESSAGE_GROUP_SUBMIT')} + {t('MESSAGES.NEW_MESSAGE_GROUP_SUBMIT')} @@ -206,7 +206,7 @@ export const MessageModal = () => { setGroupActionsOpen(true)}> diff --git a/phone/src/apps/messages/hooks/useMessageNotifications.ts b/phone/src/apps/messages/hooks/useMessageNotifications.ts index 770a0b144..998b6690c 100644 --- a/phone/src/apps/messages/hooks/useMessageNotifications.ts +++ b/phone/src/apps/messages/hooks/useMessageNotifications.ts @@ -52,7 +52,7 @@ export const useMessageNotifications = () => { addNotification({ ...n, title: group.phoneNumber || group.display, - content: t('APPS_MESSAGES_UNREAD_MESSAGES', { + content: t('MESSAGES.MESSAGES.UNREAD_MESSAGES', { count: group.unread, }), }); diff --git a/phone/src/apps/notes/hooks/useNotesAPI.ts b/phone/src/apps/notes/hooks/useNotesAPI.ts index e9d131401..560074332 100644 --- a/phone/src/apps/notes/hooks/useNotesAPI.ts +++ b/phone/src/apps/notes/hooks/useNotesAPI.ts @@ -26,7 +26,7 @@ export const useNotesAPI = (): NotesAPIValue => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_NOTES_ADD_FAILED'), + message: t('NOTES.FEEDBACK.ADD_FAILED'), type: 'error', }); } @@ -34,7 +34,7 @@ export const useNotesAPI = (): NotesAPIValue => { addLocalNote(resp.data); addAlert({ - message: t('APPS_NOTES_ADD_SUCCESS'), + message: t('NOTES.FEEDBACK.ADD_SUCCESS'), type: 'success', }); }, @@ -47,7 +47,7 @@ export const useNotesAPI = (): NotesAPIValue => { if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_NOTES_DELETE_FAILED'), + message: t('NOTES.FEEDBACK.DELETE_FAILED'), type: 'error', }); } @@ -55,7 +55,7 @@ export const useNotesAPI = (): NotesAPIValue => { deleteLocalNote(resp.data.id); addAlert({ - message: t('APPS_NOTES_DELETE_SUCCESS'), + message: t('NOTES.FEEDBACK.DELETE_SUCCESS'), type: 'success', }); }, @@ -71,7 +71,7 @@ export const useNotesAPI = (): NotesAPIValue => { }); if (resp.status !== 'ok') { return addAlert({ - message: t('APPS_NOTES_UPDATE_FAILED'), + message: t('NOTES.FEEDBACK.UPDATE_FAILED'), type: 'error', }); } @@ -79,7 +79,7 @@ export const useNotesAPI = (): NotesAPIValue => { updateLocalNote({ id, title, content }); addAlert({ - message: t('APPS_NOTES_UPDATE_SUCCESS'), + message: t('NOTES.FEEDBACK.UPDATE_SUCCESS'), type: 'success', }); }, diff --git a/phone/src/apps/settings/components/SettingsApp.tsx b/phone/src/apps/settings/components/SettingsApp.tsx index 24fc5a43e..13fcb4337 100644 --- a/phone/src/apps/settings/components/SettingsApp.tsx +++ b/phone/src/apps/settings/components/SettingsApp.tsx @@ -138,7 +138,7 @@ export const SettingsApp = () => { selected: false, onClick: () => setCustomWallpaperState(true), key: 'CUSTOM_WALLPAPER', - label: t('APPS_SETTINGS_OPTIONS_CUSTOM_WALLPAPER'), + label: t('SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_TITLE'), }; const handleCopyPhoneNumber = () => { @@ -180,7 +180,7 @@ export const SettingsApp = () => { > }> { handleAction={handleCopyPhoneNumber} /> } /> } value={settings.ringtoneVol} onCommit={(e, val) => handleSettingChange('ringtoneVol', val)} /> } /> } value={settings.notiSoundVol} onCommit={(e, val) => handleSettingChange('notiSoundVol', val)} /> } value={settings.streamerMode} onClick={(curr) => handleSettingChange('streamerMode', !curr)} @@ -232,7 +232,7 @@ export const SettingsApp = () => { icon={} /> { icon={} /> } /> } /> { }> } /> } /> handleSettingChange('TWITTER_notiSoundVol', val)} icon={} diff --git a/phone/src/apps/settings/components/WallpaperModal.tsx b/phone/src/apps/settings/components/WallpaperModal.tsx index 4798077af..57285194b 100644 --- a/phone/src/apps/settings/components/WallpaperModal.tsx +++ b/phone/src/apps/settings/components/WallpaperModal.tsx @@ -23,7 +23,7 @@ const WallpaperModal: React.FC = () => { const handleNewWallpaper = () => { if (isImageAndUrl(value)) { handleSettingChange('wallpaper', { - label: 'APPS_SETTINGS_OPTIONS_CUSTOM_WALLPAPER', + label: t('SETTINGS.OPTIONS.CUSTOM_WALLPAPER.DIALOG_TITLE'), value, }); setCustomWallpaperModal(false); diff --git a/phone/src/apps/twitter/components/TwitterSearch.tsx b/phone/src/apps/twitter/components/TwitterSearch.tsx index 799bf358c..adbc4aa13 100644 --- a/phone/src/apps/twitter/components/TwitterSearch.tsx +++ b/phone/src/apps/twitter/components/TwitterSearch.tsx @@ -60,8 +60,8 @@ function TwitterSearch() {
- {t('APPS_TWITTER_CLOSE_IMAGE')} + {t('GENERIC.CLOSE')} )}
diff --git a/phone/src/apps/twitter/components/buttons/ReportButton.tsx b/phone/src/apps/twitter/components/buttons/ReportButton.tsx index 3ff4ac8a1..ede126e46 100644 --- a/phone/src/apps/twitter/components/buttons/ReportButton.tsx +++ b/phone/src/apps/twitter/components/buttons/ReportButton.tsx @@ -37,7 +37,7 @@ function ReportButton({ handleClose, tweetId, isReported }) { return ( - {t('APPS_TWITTER_REPORTED')} + {t('TWITTER.REPORTED')} ); } @@ -50,7 +50,7 @@ function ReportButton({ handleClose, tweetId, isReported }) { ); } - return {t('APPS_TWITTER_REPORT')}; + return {t('TWITTER.REPORT')}; } export default ReportButton; diff --git a/phone/src/apps/twitter/components/images/ImagePrompt.tsx b/phone/src/apps/twitter/components/images/ImagePrompt.tsx index 8df1fbc3f..8f55b1eb1 100644 --- a/phone/src/apps/twitter/components/images/ImagePrompt.tsx +++ b/phone/src/apps/twitter/components/images/ImagePrompt.tsx @@ -34,7 +34,7 @@ export const ImagePrompt = ({ visible, value, handleChange }) => { onChange={handleImageChange} multiline size="small" - placeholder={t('APPS_TWITTER_IMAGE_PLACEHOLDER')} + placeholder={t('TWITTER.IMAGE_PLACEHOLDER')} inputRef={textFieldRef} /> ); diff --git a/phone/src/apps/twitter/components/profile/DefaultProfilePrompt.tsx b/phone/src/apps/twitter/components/profile/DefaultProfilePrompt.tsx index e7d8eb467..c5a64fd84 100644 --- a/phone/src/apps/twitter/components/profile/DefaultProfilePrompt.tsx +++ b/phone/src/apps/twitter/components/profile/DefaultProfilePrompt.tsx @@ -44,9 +44,7 @@ export const DefaultProfilePrompt: React.FC = ({ return (
- - {t('APPS_TWITTER_EDIT_DEFAULT_PROFILE_NAME')} - + {t('TWITTER.EDIT_DEFAULT_PROFILE_NAME')}