Skip to content

Commit

Permalink
Merge pull request #3435 from eVoloshchak/eVoloshchak-localizedString…
Browse files Browse the repository at this point in the history
…sFix

Apply localization to all hard coded text in the Expensify.cash app
  • Loading branch information
Jag96 authored Jun 9, 2021
2 parents 7745c8a + 6adbb0f commit a25a01b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/components/AttachmentPicker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AttachmentPicker extends Component {
{
icon: Paperclip,
text: this.props.translate('attachmentPicker.chooseDocument'),
pickAttachment: this.showDocumentPicker,
pickAttachment: () => this.showDocumentPicker(),
},
];

Expand Down Expand Up @@ -145,8 +145,7 @@ class AttachmentPicker extends Component {
this.showGeneralAlert(response.error);
break;
}
const errorDescription = this.props.translate('attachmentPicker.errorDuringAttachmentSelection');
reject(new Error(`${errorDescription}: ${response.error}`));
reject(new Error(`Error during attachment selection: ${response.error}`));
}

resolve(response);
Expand Down
3 changes: 1 addition & 2 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ export default {
contacts: 'Contacts',
recents: 'Recents',
close: 'Close',
settings: 'Settings',
},
attachmentPicker: {
cameraPermissionRequired: 'Camera Permission Required',
expensifyDoesntHaveAccessToCamera: 'Expensify.cash does not have access to your camera, please enable the permission and try again.',
attachmentError: 'Attachment Error',
errorWhileSelectingAttachment: 'An error occurred while selecting an attachment, please try again',
errorWhileSelectingCorruptedImage: 'An error occurred while selecting a corrupted attachment, please try another file',
errorDuringAttachmentSelection: 'Error during attachment selection',
takePhoto: 'Take Photo',
chooseFromGallery: 'Choose from Gallery',
chooseDocument: 'Choose Document',
Expand Down Expand Up @@ -156,7 +156,6 @@ export default {
sendValidation: 'Send Validation',
},
initialSettingsPage: {
settings: 'Settings',
about: 'About',
aboutPage: {
description: 'Expensify.cash is built by a community of open source developers from around the world. Come help us build the next generation of Expensify.',
Expand Down
3 changes: 1 addition & 2 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export default {
delete: 'Eliminar',
contacts: 'Contactos',
recents: 'Recientes',
settings: 'Configuración',
},
attachmentPicker: {
cameraPermissionRequired: 'Se necesita permiso para usar la cámara',
expensifyDoesntHaveAccessToCamera: 'Expensify.cash no tiene acceso a tu cámara, por favor activa el permiso y vuelve a intentarlo.',
attachmentError: 'Error al adjuntar archivo',
errorWhileSelectingAttachment: 'Ha ocurrido un error al seleccionar un adjunto, por favor inténtalo de nuevo',
errorWhileSelectingCorruptedImage: 'Ha ocurrido un error al seleccionar un adjunto corrupto, por favor intentalo con otro archivo',
errorDuringAttachmentSelection: 'Error al seleccionar un archivo adjunto',
takePhoto: 'Hacer una Foto',
chooseFromGallery: 'Elegir de la galería',
chooseDocument: 'Elegir Documento',
Expand Down Expand Up @@ -153,7 +153,6 @@ export default {
sendValidation: 'Enviar validación',
},
initialSettingsPage: {
settings: 'Configuración',
about: 'Acerca de',
aboutPage: {
description: 'Expensify.cash está desarrollado por una comunidad de desarrolladores open source de todo el mundo. Ayúdanos a construir la próxima generación de Expensify.',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/InitialPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const InitialSettingsPage = ({
return (
<ScreenWrapper>
<HeaderWithCloseButton
title={translate('initialSettingsPage.settings')}
title={translate('common.settings')}
onCloseButtonPress={() => Navigation.dismissModal(true)}
/>
<ScrollView style={[styles.settingsPageBackground]} bounces={false}>
Expand Down

0 comments on commit a25a01b

Please sign in to comment.