Skip to content
12 changes: 12 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Abmelden',
restoreStashed: 'Gespeicherten Login wiederherstellen',
signOutConfirmationText: 'Alle Offline-Änderungen gehen verloren, wenn du dich abmeldest.',
saveReceiptsConfirmation: {
title: 'Belege speichern?',
prompt: ({count}: {count: number}) =>
`Es ${count === 1 ? 'wird noch 1 Beleg' : `werden noch ${count} Belege`} hochgeladen. Wenn du dich jetzt abmeldest, ${count === 1 ? 'speichern wir ihn' : 'speichern wir sie'} in deinen Fotos, damit du ${count === 1 ? 'ihn' : 'sie'} später zu einer neuen Ausgabe hinzufügen kannst.`,
confirm: 'Speichern und abmelden',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Belege speichern?',
prompt: ({count}: {count: number}) =>
`Es ${count === 1 ? 'wird noch 1 Beleg' : `werden noch ${count} Belege`} hochgeladen. Wenn du dich jetzt abmeldest, ${count === 1 ? 'speichern wir ihn' : 'speichern wir sie'} in deinen Fotos, damit du ${count === 1 ? 'ihn' : 'sie'} später zu einer neuen Ausgabe hinzufügen kannst. Alle Offline-Änderungen gehen verloren, wenn du dich abmeldest.`,
confirm: 'Speichern und abmelden',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Lesen Sie die <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Nutzungsbedingungen</a> und die <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Datenschutzerklärung</a>.`,
help: 'Hilfe',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Αποσύνδεση',
restoreStashed: 'Επαναφορά αποθηκευμένης σύνδεσης',
signOutConfirmationText: 'Θα χάσετε τυχόν αλλαγές εκτός σύνδεσης αν αποσυνδεθείτε.',
saveReceiptsConfirmation: {
title: 'Αποθήκευση των αποδείξεών σας;',
prompt: ({count}: {count: number}) =>
`Έχετε ${count} ${count === 1 ? 'απόδειξη' : 'αποδείξεις'} που εξακολουθούν να μεταφορτώνονται. Αν αποσυνδεθείτε τώρα, θα ${count === 1 ? 'την' : 'τις'} αποθηκεύσουμε στις φωτογραφίες σας, ώστε να ${count === 1 ? 'μπορέσετε να την προσθέσετε' : 'μπορέσετε να τις προσθέσετε'} σε μια νέα δαπάνη αργότερα.`,
confirm: 'Αποθήκευση και αποσύνδεση',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Αποθήκευση των αποδείξεών σας;',
prompt: ({count}: {count: number}) =>
`Έχετε ${count} ${count === 1 ? 'απόδειξη' : 'αποδείξεις'} που εξακολουθούν να μεταφορτώνονται. Αν αποσυνδεθείτε τώρα, θα ${count === 1 ? 'την' : 'τις'} αποθηκεύσουμε στις φωτογραφίες σας, ώστε να ${count === 1 ? 'μπορέσετε να την προσθέσετε' : 'μπορέσετε να τις προσθέσετε'} σε μια νέα δαπάνη αργότερα. Θα χάσετε επίσης τυχόν άλλες αλλαγές εκτός σύνδεσης.`,
confirm: 'Αποθήκευση και αποσύνδεση',
},
versionLetter: 'ν',
readTheTermsAndPrivacy: `Διαβάστε τους <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">όρους παροχής υπηρεσιών</a> και την <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">πολιτική απορρήτου</a>.`,
help: 'Βοήθεια',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2294,6 +2294,18 @@ const translations = {
signOut: 'Sign out',
restoreStashed: 'Restore stashed login',
signOutConfirmationText: "You'll lose any offline changes if you sign out.",
saveReceiptsConfirmation: {
title: 'Save your receipts?',
prompt: ({count}: {count: number}) =>
`You have ${count} ${count === 1 ? 'receipt' : 'receipts'} still uploading. Sign out now and we'll save ${count === 1 ? 'it' : 'them'} to your photos so you can add ${count === 1 ? 'it' : 'them'} to a new expense later.`,
confirm: 'Save and sign out',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Save your receipts?',
prompt: ({count}: {count: number}) =>
`You have ${count} ${count === 1 ? 'receipt' : 'receipts'} still uploading. Sign out now and we'll save ${count === 1 ? 'it' : 'them'} to your photos so you can add ${count === 1 ? 'it' : 'them'} to a new expense later. You'll lose any other offline changes.`,
confirm: 'Save and sign out',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Read the <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Terms of Service</a> and <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacy</a>.`,
help: 'Help',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,18 @@ const translations: TranslationDeepObject<typeof en> = {
restoreStashed: 'Restablecer login guardado',
signOut: 'Desconectar',
signOutConfirmationText: 'Si cierras sesión perderás los cambios hechos mientras estabas desconectado',
saveReceiptsConfirmation: {
title: '¿Guardar tus recibos?',
prompt: ({count}: {count: number}) =>
`Tienes ${count} ${count === 1 ? 'recibo' : 'recibos'} subiéndose todavía. Si cierras sesión ahora, ${count === 1 ? 'lo guardaremos' : 'los guardaremos'} en tus fotos para que ${count === 1 ? 'puedas añadirlo' : 'puedas añadirlos'} a un nuevo gasto más tarde.`,
confirm: 'Guardar y cerrar sesión',
},
saveReceiptsAndSignOutConfirmation: {
title: '¿Guardar tus recibos?',
prompt: ({count}: {count: number}) =>
`Tienes ${count} ${count === 1 ? 'recibo' : 'recibos'} subiéndose todavía. Si cierras sesión ahora, ${count === 1 ? 'lo guardaremos' : 'los guardaremos'} en tus fotos para que ${count === 1 ? 'puedas añadirlo' : 'puedas añadirlos'} a un nuevo gasto más tarde. Perderás los demás cambios hechos mientras estabas desconectado.`,
confirm: 'Guardar y cerrar sesión',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Leer los <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Términos de Servicio</a> y <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacidad</a>.`,
help: 'Ayuda',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Se déconnecter',
restoreStashed: 'Restaurer la connexion mise de côté',
signOutConfirmationText: 'Vous perdrez toutes les modifications hors ligne si vous vous déconnectez.',
saveReceiptsConfirmation: {
title: 'Enregistrer vos reçus ?',
prompt: ({count}: {count: number}) =>
`${count} ${count === 1 ? 'reçu est' : 'reçus sont'} encore en cours de téléchargement. Si vous vous déconnectez maintenant, nous ${count === 1 ? "l'enregistrerons" : 'les enregistrerons'} dans vos photos pour que vous puissiez ${count === 1 ? "l'ajouter" : 'les ajouter'} à une nouvelle dépense plus tard.`,
confirm: 'Enregistrer et se déconnecter',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Enregistrer vos reçus ?',
prompt: ({count}: {count: number}) =>
`${count} ${count === 1 ? 'reçu est' : 'reçus sont'} encore en cours de téléchargement. Si vous vous déconnectez maintenant, nous ${count === 1 ? "l'enregistrerons" : 'les enregistrerons'} dans vos photos pour que vous puissiez ${count === 1 ? "l'ajouter" : 'les ajouter'} à une nouvelle dépense plus tard. Vous perdrez toutes les autres modifications hors ligne.`,
confirm: 'Enregistrer et se déconnecter',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Lisez les <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Conditions d'utilisation</a> et la <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Politique de confidentialité</a>.`,
help: 'Aide',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Esci',
restoreStashed: 'Ripristina accesso nascosto',
signOutConfirmationText: 'Perderai tutte le modifiche offline se esci.',
saveReceiptsConfirmation: {
title: 'Salvare le tue ricevute?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? "C'è ancora 1 ricevuta" : `Ci sono ancora ${count} ricevute`} in fase di caricamento. Se esci ora, ${count === 1 ? 'la salveremo' : 'le salveremo'} nelle tue foto così potrai ${count === 1 ? 'aggiungerla' : 'aggiungerle'} a una nuova spesa più tardi.`,
confirm: 'Salva ed esci',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Salvare le tue ricevute?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? "C'è ancora 1 ricevuta" : `Ci sono ancora ${count} ricevute`} in fase di caricamento. Se esci ora, ${count === 1 ? 'la salveremo' : 'le salveremo'} nelle tue foto così potrai ${count === 1 ? 'aggiungerla' : 'aggiungerle'} a una nuova spesa più tardi. Perderai tutte le altre modifiche offline.`,
confirm: 'Salva ed esci',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Leggi i <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Termini di servizio</a> e l’<a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Informativa sulla privacy</a>.`,
help: 'Aiuto',
Expand Down
11 changes: 11 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,17 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'サインアウト',
restoreStashed: '保存済みログインを復元',
signOutConfirmationText: 'サインアウトすると、オフライン中の変更内容はすべて失われます。',
saveReceiptsConfirmation: {
title: 'レシートを保存しますか?',
prompt: ({count}: {count: number}) => `${count}件のレシートがまだアップロード中です。今サインアウトすると、写真に保存され、後で新しい経費に追加できます。`,
confirm: '保存してサインアウト',
},
saveReceiptsAndSignOutConfirmation: {
title: 'レシートを保存しますか?',
prompt: ({count}: {count: number}) =>
`${count}件のレシートがまだアップロード中です。今サインアウトすると、写真に保存され、後で新しい経費に追加できます。その他のオフライン中の変更内容はすべて失われます。`,
confirm: '保存してサインアウト',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `<a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">利用規約</a>と<a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">プライバシーポリシー</a>をお読みください。`,
help: 'ヘルプ',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Afmelden',
restoreStashed: 'Opgeslagen login herstellen',
signOutConfirmationText: 'Je verliest alle offline wijzigingen als je je afmeldt.',
saveReceiptsConfirmation: {
title: 'Bonnen opslaan?',
prompt: ({count}: {count: number}) =>
`Er ${count === 1 ? 'wordt nog 1 bon' : `worden nog ${count} bonnen`} geüpload. Als je je nu afmeldt, slaan we ${count === 1 ? 'deze' : 'ze'} op in je foto's zodat je ${count === 1 ? 'deze' : 'ze'} later aan een nieuwe uitgave kunt toevoegen.`,
confirm: 'Opslaan en afmelden',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Bonnen opslaan?',
prompt: ({count}: {count: number}) =>
`Er ${count === 1 ? 'wordt nog 1 bon' : `worden nog ${count} bonnen`} geüpload. Als je je nu afmeldt, slaan we ${count === 1 ? 'deze' : 'ze'} op in je foto's zodat je ${count === 1 ? 'deze' : 'ze'} later aan een nieuwe uitgave kunt toevoegen. Je verliest alle andere offline wijzigingen.`,
confirm: 'Opslaan en afmelden',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Lees de <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Servicevoorwaarden</a> en het <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Privacybeleid</a>.`,
help: 'Help',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Wyloguj się',
restoreStashed: 'Przywróć zapisane logowanie',
signOutConfirmationText: 'Utracisz wszystkie zmiany w trybie offline, jeśli się wylogujesz.',
saveReceiptsConfirmation: {
title: 'Zapisać paragony?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? 'Nadal przesyłany jest 1 paragon' : `Nadal przesyłane są paragony (${count})`}. Jeśli wylogujesz się teraz, zapiszemy ${count === 1 ? 'go' : 'je'} w Twoich zdjęciach, abyś ${count === 1 ? 'mógł go dodać' : 'mógł je dodać'} później do nowego wydatku.`,
confirm: 'Zapisz i wyloguj',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Zapisać paragony?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? 'Nadal przesyłany jest 1 paragon' : `Nadal przesyłane są paragony (${count})`}. Jeśli wylogujesz się teraz, zapiszemy ${count === 1 ? 'go' : 'je'} w Twoich zdjęciach, abyś ${count === 1 ? 'mógł go dodać' : 'mógł je dodać'} później do nowego wydatku. Utracisz wszystkie pozostałe zmiany w trybie offline.`,
confirm: 'Zapisz i wyloguj',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Przeczytaj <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Warunki korzystania z usługi</a> i <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Politykę prywatności</a>.`,
help: 'Pomoc',
Expand Down
12 changes: 12 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,18 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: 'Sair',
restoreStashed: 'Restaurar login armazenado',
signOutConfirmationText: 'Você perderá quaisquer alterações offline se sair.',
saveReceiptsConfirmation: {
title: 'Salvar seus recibos?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? 'Ainda há 1 recibo' : `Ainda há ${count} recibos`} sendo enviado. Se você sair agora, ${count === 1 ? 'nós o salvaremos' : 'nós os salvaremos'} nas suas fotos para que você possa ${count === 1 ? 'adicioná-lo' : 'adicioná-los'} a uma nova despesa mais tarde.`,
confirm: 'Salvar e sair',
},
saveReceiptsAndSignOutConfirmation: {
title: 'Salvar seus recibos?',
prompt: ({count}: {count: number}) =>
`${count === 1 ? 'Ainda há 1 recibo' : `Ainda há ${count} recibos`} sendo enviado. Se você sair agora, ${count === 1 ? 'nós o salvaremos' : 'nós os salvaremos'} nas suas fotos para que você possa ${count === 1 ? 'adicioná-lo' : 'adicioná-los'} a uma nova despesa mais tarde. Você perderá quaisquer outras alterações offline.`,
confirm: 'Salvar e sair',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `Leia os <a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">Termos de Serviço</a> e a <a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">Política de Privacidade</a>.`,
help: 'Ajuda',
Expand Down
11 changes: 11 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,17 @@ const translations: TranslationDeepObject<typeof en> = {
signOut: '退出登录',
restoreStashed: '恢复暂存的登录',
signOutConfirmationText: '如果你退出登录,所有离线更改都会丢失。',
saveReceiptsConfirmation: {
title: '保存你的收据?',
prompt: ({count}: {count: number}) => `还有 ${count} 张收据正在上传。如果你现在退出登录,我们会将其保存到你的照片中,以便你稍后将其添加到新的支出中。`,
confirm: '保存并退出登录',
},
saveReceiptsAndSignOutConfirmation: {
title: '保存你的收据?',
prompt: ({count}: {count: number}) =>
`还有 ${count} 张收据正在上传。如果你现在退出登录,我们会将其保存到你的照片中,以便你稍后将其添加到新的支出中。你的所有其他离线更改都会丢失。`,
confirm: '保存并退出登录',
},
versionLetter: 'v',
readTheTermsAndPrivacy: `阅读<a href="${CONST.OLD_DOT_PUBLIC_URLS.TERMS_URL}">服务条款</a>和<a href="${CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}">隐私政策</a>。`,
help: '帮助',
Expand Down
26 changes: 26 additions & 0 deletions src/libs/fileDownload/hasGalleryWritePermission.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {PermissionsAndroid, Platform} from 'react-native';

function hasGalleryWritePermission(): Promise<boolean> {
// On Android API Level 33 and above, these permissions do nothing and always return 'never_ask_again'
// More info here: https://stackoverflow.com/a/74296799
if (Number(Platform.Version) >= 33) {
return Promise.resolve(true);
}

const writePromise = PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE);
const readPromise = PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE);

return Promise.all([writePromise, readPromise]).then(([hasWritePermission, hasReadPermission]) => {
if (hasWritePermission && hasReadPermission) {
return true;
}

return PermissionsAndroid.requestMultiple([PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE, PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE]).then(
(status) =>
status[PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE] === PermissionsAndroid.RESULTS.GRANTED &&
status[PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE] === PermissionsAndroid.RESULTS.GRANTED,
);
});
}

export default hasGalleryWritePermission;
6 changes: 6 additions & 0 deletions src/libs/fileDownload/hasGalleryWritePermission.ios.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** iOS prompts for photo permission itself on the first write, so there is no upfront gate. */
function hasGalleryWritePermission(): Promise<boolean> {
return Promise.resolve(true);
}

export default hasGalleryWritePermission;
6 changes: 6 additions & 0 deletions src/libs/fileDownload/hasGalleryWritePermission.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Type-resolution base; never called on web (no device gallery). */
function hasGalleryWritePermission(): Promise<boolean> {
return Promise.resolve(false);
}

export default hasGalleryWritePermission;
Loading
Loading