From a6780a8f7aad8f43a4e69665593c169e276d6327 Mon Sep 17 00:00:00 2001 From: Jordan Good Date: Thu, 4 Jun 2020 10:27:28 -0400 Subject: [PATCH 1/3] git ignore translations file and run on commans instead --- .gitignore | 3 +++ package.json | 10 +++++----- translations.js => scripts/translations.js | 0 src/locale/translations/index.js | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) rename translations.js => scripts/translations.js (100%) delete mode 100644 src/locale/translations/index.js diff --git a/.gitignore b/.gitignore index fb51ad9f..206dca63 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,6 @@ ios/GoogleService-Info.plist ios/Generated.xcconfig android/app/google-services.json .env.local + +# Translations +src/locale/translations/index.js diff --git a/package.json b/package.json index e2d39e82..f41f3b0b 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,14 @@ "version": "0.0.1", "private": true, "scripts": { - "bundle-android": "react-native bundle --dev false --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", - "bundle-ios": "react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios", + "bundle-android": "yarn generate-translations && react-native bundle --dev false --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", + "bundle-ios": "yarn generate-translations && react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios", "codegen-protobuf": "pbjs -t static-module -o src/services/BackendService/covidshield/covidshield.js src/services/BackendService/covidshield/covidshield.proto && pbts -o src/services/BackendService/covidshield/covidshield.d.ts src/services/BackendService/covidshield/covidshield.js", - "generate-translations": "node translations.js", + "generate-translations": "node scripts/translations.js", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "pod-install": "pushd ios; bundle exec pod install; popd", - "run-android": "react-native run-android --variant debug --appIdSuffix debug", - "run-ios": "react-native run-ios", + "run-android": "yarn generate-translations && react-native run-android --variant debug --appIdSuffix debug", + "run-ios": "yarn generate-translations && react-native run-ios", "start": "react-native start --reset-cache", "test": "jest", "tsc": "tsc" diff --git a/translations.js b/scripts/translations.js similarity index 100% rename from translations.js rename to scripts/translations.js diff --git a/src/locale/translations/index.js b/src/locale/translations/index.js deleted file mode 100644 index da064074..00000000 --- a/src/locale/translations/index.js +++ /dev/null @@ -1 +0,0 @@ -export default JSON.parse("{\"en\":{\"Home\":{\"NoExposureDetected\":\"No exposure detected\",\"NoExposureDetectedDetailed\":\"Based on your random IDs, you have not been near someone in the past 14 days who has tested positive for COVID-19.\",\"ExposureDetected\":\"You have possibly been exposed to COVID-19\",\"ExposureDetectedDetailed\":\"Based on your random IDs, you have been near someone in the past 14 days who tested positive for COVID-19.\",\"SeeGuidance\":\"Read Canada COVID-19 guidance\",\"GuidanceUrl\":\"https://www.canada.ca/en/public-health/services/publications/diseases-conditions/covid-19-how-to-isolate-at-home.html\",\"SignalDataShared\":\"Thank you for helping to slow the spread\",\"SignalDataSharedDetailed\":{\"One\":\"You will receive a notification asking you to share your random IDs each day for the next {number} day.\",\"Other\":\"You will receive a notification asking you to share your random IDs each day for the next {number} days.\"},\"SignalDataSharedCTA\":\"Track your symptoms\",\"SymptomTrackerUrl\":\"https://ca.thrive.health/covid19app/action/88a5e9a7-db9e-487b-bc87-ce35035f8e5c?from=/home&navigateTo=/tracker/complete\",\"DailyShare\":\"Share your new random IDs\",\"DailyShareDetailed\":\"Sharing your data helps others to know if they have possibly been exposed to COVID-19.\",\"ShareRandomIDsCTA\":\"Share your random IDs\",\"BluetoothDisabled\":\"Bluetooth is off\",\"EnableBluetoothCTA\":\"Bluetooth is used to collect and share random IDs needed for COVID Shield to work.\",\"TurnOnBluetooth\":\"Turn on Bluetooth\",\"ExposureNotificationsDisabled\":\"Exposure notifications are off\",\"ExposureNotificationsDisabledDetailed\":\"Exposure notifications are needed for COVID Shield to work.\",\"EnableExposureNotificationsCTA\":\"Turn on exposure notifications\",\"NoConnectivity\":\"No internet connection\",\"NoConnectivityDetailed\":\"COVID Shield needs internet access to continue checking for potential exposure.\",\"AppName\":\"COVID Shield\",\"ExternalLinkHint\":\"Opens in a new window\",\"LastCheckedMinutes\":{\"One\":\"Last checked {number} minute ago\",\"Other\":\"Last checked {number} minutes ago\"},\"LastCheckedHours\":{\"One\":\"Last checked {number} hour ago\",\"Other\":\"Last checked {number} hours ago\"},\"LastCheckedDays\":{\"One\":\"Last checked {number} day ago\",\"Other\":\"Last checked {number} days ago\"}},\"OverlayClosed\":{\"SystemStatus\":\"COVID Shield is \",\"SystemStatusOn\":\"ON\",\"SystemStatusOff\":\"OFF\",\"NotificationStatus\":\"Push notifications are \",\"NotificationStatusOff\":\"OFF\",\"TapPrompt\":\"Tap for more information\"},\"OverlayOpen\":{\"BluetoothCardStatus\":\"Bluetooth is \",\"BluetoothCardStatusOff\":\"OFF\",\"BluetoothCardBody\":\"Bluetooth is used to collect and share random IDs needed for COVID Shield to work.\",\"BluetoothCardAction\":\"Turn on Bluetooth\",\"EnterCodeCardTitle\":\"COVID Shield code\",\"EnterCodeCardBody\":\"Has a health care professional asked you to enter a COVID Shield code?\",\"EnterCodeCardAction\":\"Enter code\",\"NotificationCardStatus\":\"Push notifications are \",\"NotificationCardStatusOff\":\"OFF\",\"NotificationCardBody\":\"You will not receive push notifications if you have possibly been exposed to COVID-19. Timely notification of potential exposure is important in helping to slow the spread of COVID-19.\",\"NotificationCardAction\":\"Turn on push notifications\",\"ExposureNotificationCardStatus\":\"Exposure notifications are \",\"ExposureNotificationCardStatusOff\":\"OFF\",\"ExposureNotificationCardBody\":\"Exposure notifications are needed for COVID Shield to work.\",\"ExposureNotificationCardAction\":\"Turn on exposure notifications\"},\"Info\":{\"CheckSymptoms\":\"Check symptoms\",\"SymptomsUrl\":\"https://ca.thrive.health/covid19/en\",\"TellAFriend\":\"Share app\",\"LearnMore\":\"How COVID Shield works\",\"ChangeLanguage\":\"Change language\",\"Privacy\":\"Read privacy policy\"},\"LanguageSelect\":{\"Title\":\"Language\",\"En\":\"English (Canada)\",\"Fr\":\"Français (Canada)\",\"PtBR\":\"Portuguese (Brazil)\",\"EnShort\":\"English\",\"FrShort\":\"Français\",\"PtBRShort\":\"Portuguese (Brazil)\",\"Close\":\"Back\"},\"Tutorial\":{\"step-1Title\":\"How COVID Shield works\",\"step-1\":\"Your phone uses Bluetooth to collect and share random IDs with phones near you with COVID Shield installed. These IDs are stored securely on each phone.\",\"step-2Title\":\"If you have potentially been exposed to COVID-19\",\"step-2\":\"You will receive a notification if you have been near someone in the past 14 days who has tested positive for COVID-19.\",\"step-3Title\":\"If you test positive for COVID-19\",\"step-3\":\"Anonymously notify others who have been near you in the past 14 days that they have possibly been exposed.\",\"ActionBack\":\"Back\",\"ActionNext\":\"Next\",\"ActionEnd\":\"Done\",\"Close\":\"Close\"},\"Sharing\":{\"Title\":\"Share app\",\"SubTitle\":\"Every person using COVID Shield helps to slow the spread of COVID-19. Sharing this app will not share any personal data.\",\"Platform-messages\":\"Share to Messages\",\"Platform-instagram\":\"Share to Instagram\",\"More\":\"More apps\",\"Message\":\"Join me in helping to slow the spread of COVID-19. Download the COVID Shield app: https://covidshield.app\",\"Close\":\"Close\"},\"Onboarding\":{\"ActionNext\":\"Next\",\"ActionEnd\":\"Done\",\"ActionBack\":\"Back\"},\"OnboardingPermissions\":{\"Title\":\"Your data is private\",\"Body\":\"COVID Shield takes a privacy-first approach to exposure notification.\",\"Body2\":\"Your random IDs are stored exclusively on your phone unless you choose to share them.\",\"Body3\":\"Use of COVID Shield is voluntary. You can delete your random IDs at any time.\"},\"OnboardingStart\":{\"Title\":\"Keep yourself and others safe\",\"Body1\":\"Get notified if you have potentially been exposed to COVID-19.\",\"Body2\":\"If you test positive for COVID-19, you can choose to anonymously share your data so others can be notified of possible exposure.\",\"TutorialAction\":\"Learn how COVID Shield works\"},\"Privacy\":{\"Title\":\"Privacy policy\",\"Close\":\"Close\"},\"ThankYou\":{\"Title\":\"Thank you for helping\",\"Body\":\"Exposure notifications are on. You will receive a notification if COVID Shield detects that you have possibly been exposed to COVID-19.\",\"Dismiss\":\"Dismiss\"},\"DataUpload\":{\"Cancel\":\"Cancel\",\"FormIntro\":\"Please enter your 8 digit COVID Shield code.\",\"Action\":\"Submit code\",\"InfoSmall\":\"Your random IDs will not be shared unless you give permission in the next step.\",\"ConsentTitle\":\"Share your random IDs\",\"ConsentBody\":\"You have been granted access by a health care professional to share the random IDs stored on your phone.\",\"ConsentBody2\":\"If you share your random IDs, others with COVID Shield who have been near you in the past 14 days will receive a notification that they have possibly been exposed. This notification will not include any information about you.\",\"ConsentBody3\":\"You will be notified once per day when new random IDs are available to be shared. You must grant permission each time for the random IDs to be shared. Sharing is voluntary.\",\"PrivacyPolicyLink\":\"View privacy policy\",\"ConsentAction\":\"I agree\",\"ShareToast\":\"Random IDs shared successfully\",\"ErrorTitle\":\"Code not recognized\",\"ErrorBody\":\"Your COVID Shield code could not be recognized. Please try again.\",\"ErrorAction\":\"OK\"},\"Notification\":{\"ExposedMessageTitle\":\"You have possibly been exposed to COVID-19\",\"ExposedMessageBody\":\"Based on your random IDs, you have been near someone in the past 14 days who tested positive for COVID-19.\",\"OffMessageTitle\":\"COVID Shield is off\",\"OffMessageBody\":\"Turn on COVID Shield to get notified if you have potentially been exposed to COVID-19.\",\"DailyUploadNotificationTitle\":\"Share your new random IDs\",\"DailyUploadNotificationBody\":\"Sharing your data helps others to know if they have possibly been exposed to COVID-19.\"},\"Partners\":{\"Label\":\"Developed in partnership with\"},\"BottomSheet\":{\"Collapse\":\"Close\"},\"RegionPicker\":{\"Title\":\"Select your province or territory\",\"Body\":\"This helps give you more relevant guidance.\\nThis information is only stored on your device and will never be shared with anyone else.\",\"Skip\":\"Skip\",\"GetStarted\":\"Get started\",\"AB\":\"Alberta\",\"BC\":\"British Columbia\",\"MB\":\"Manitoba\",\"NB\":\"New Brunswick\",\"NL\":\"Newfoundland and Labrador\",\"NT\":\"Northwest Territories\",\"NS\":\"Nova Scotia\",\"NU\":\"Nunavut\",\"ON\":\"Ontario\",\"PE\":\"Prince Edward Island\",\"QC\":\"Quebec\",\"SK\":\"Saskatchewan\",\"YT\":\"Yukon\"}},\"fr\":{\"Home\":{\"NoExposureDetected\":\"Aucune exposition à la COVID-19 détectée\",\"NoExposureDetectedDetailed\":\"Selon vos identifiants aléatoires, au cours des 14 derniers jours, vous n'avez pas été à proximité d'une personne ayant reçu un résultat de test positif à la COVID-19.\",\"ExposureDetected\":\"Vous avez possiblement été exposé(e) à la COVID-19\",\"ExposureDetectedDetailed\":\"Selon vos identifiants aléatoires, au cours des 14 derniers jours, vous avez été à proximité d'une personne ayant reçu un résultat de test positif à la COVID-19.\",\"SeeGuidance\":\"Lire les directives du Canada sur la COVID-19\",\"GuidanceUrl\":\"https://www.canada.ca/fr/sante-publique/services/publications/maladies-et-affections/covid-19-comment-isoler-chez-soi.html\",\"SignalDataShared\":\"Merci d'aider à ralentir la transmission\",\"SignalDataSharedDetailed\":{\"One\":\"Vous recevrez chaque jour, au cours des {number} prochains jours, une notification vous demandant de partager vos identifiants aléatoires.\",\"Other\":\"Vous recevrez chaque jour, au cours des {number} prochains jours, une notification vous demandant de partager vos identifiants aléatoires.\"},\"SignalDataSharedCTA\":\"Suivez vos symptômes\",\"SymptomTrackerUrl\":\"https://ca.thrive.health/covid19app/action/88a5e9a7-db9e-487b-bc87-ce35035f8e5c?from=/home&navigateTo=/tracker/complete\",\"DailyShare\":\"Partagez vos nouveaux identifiants aléatoires\",\"DailyShareDetailed\":\"Partager vos données aide les autres à savoir s'ils ont possiblement été exposés à la COVID-19.\",\"ShareRandomIDsCTA\":\"Partagez vos identifiants aléatoires\",\"BluetoothDisabled\":\"Le Bluetooth est désactivé\",\"EnableBluetoothCTA\":\"Le Bluetooth est utilisé pour collecter et partager des identifiants aléatoires nécessaires au fonctionnement de COVID Shield.\",\"TurnOnBluetooth\":\"Activez le Bluetooth\",\"ExposureNotificationsDisabled\":\"Les notifications d'exposition à la COVID-19 sont désactivées\",\"ExposureNotificationsDisabledDetailed\":\"Les notifications d'exposition à la COVID-19 sont nécessaires au fonctionnement de COVID Shield.\",\"EnableExposureNotificationsCTA\":\"Activez les notifications d'exposition à la COVID-19\",\"NoConnectivity\":\"Aucune connexion Internet\",\"NoConnectivityDetailed\":\"COVID Shield a besoin d'un accès Internet pour continuer de vérifier les expositions potentielles à la COVID-19.\",\"AppName\":\"COVID Shield\",\"ExternalLinkHint\":\"Ouvre dans une nouvelle fenêtre\",\"LastCheckedMinutes\":{\"One\":\"Dernière vérification il y a {number} minute\",\"Other\":\"Dernière vérification il y a {number} minutes\"},\"LastCheckedHours\":{\"One\":\"Dernière vérification il y a {number} heure\",\"Other\":\"Dernière vérification il y a {number} heures\"},\"LastCheckedDays\":{\"One\":\"Dernière vérification il y a {number} jour\",\"Other\":\"Dernière vérification il y a {number} jours\"}},\"OverlayClosed\":{\"SystemStatus\":\"COVID Shield est \",\"SystemStatusOn\":\"ACTIVÉ\",\"SystemStatusOff\":\"DÉSACTIVÉ\",\"NotificationStatus\":\"Les notifications poussées sont \",\"NotificationStatusOff\":\"DÉSACTIVÉES\",\"TapPrompt\":\"Appuyez pour plus d'information\"},\"OverlayOpen\":{\"BluetoothCardStatus\":\"Le Bluetooth est \",\"BluetoothCardStatusOff\":\"DÉSACTIVÉ\",\"BluetoothCardBody\":\"Le Bluetooth est utilisé pour collecter et partager des identifiants aléatoires nécessaires au fonctionnement de COVID Shield.\",\"BluetoothCardAction\":\"Activez le Bluetooth\",\"EnterCodeCardTitle\":\"Code COVID Shield\",\"EnterCodeCardBody\":\"Un professionel de la santé vous a-t-il demandé d'entrer un code COVID Shield?\",\"EnterCodeCardAction\":\"Entrez le code\",\"NotificationCardStatus\":\"Les notifications poussées sont \",\"NotificationCardStatusOff\":\"DÉSACTIVÉES\",\"NotificationCardBody\":\"Vous ne recevrez pas de notifications poussées si vous avez possiblement été exposé(e) à la COVID-19. Les notifications spontanées sont importantes pour aider à ralentir la transmission de la COVID-19.\",\"NotificationCardAction\":\"Activez les notifications poussées\",\"ExposureNotificationCardStatus\":\"Les notifications d'exposition à la COVID-19 sont \",\"ExposureNotificationCardStatusOff\":\"DÉSACTIVÉES\",\"ExposureNotificationCardBody\":\"Les notifications d'exposition à la COVID-19 sont nécessaires au fonctionnement de COVID Shield.\",\"ExposureNotificationCardAction\":\"Activez les notifications d'exposition\"},\"Info\":{\"CheckSymptoms\":\"Vérifier vos symptômes\",\"SymptomsUrl\":\"https://ca.thrive.health/covid19/fr\",\"TellAFriend\":\"Partager l'application\",\"LearnMore\":\"Comment fonctionne COVID Shield\",\"ChangeLanguage\":\"Changer de langue\",\"Privacy\":\"Lire la politique de confidentialité\"},\"LanguageSelect\":{\"Title\":\"Langue\",\"En\":\"English (Canada)\",\"Fr\":\"Français (Canada)\",\"PtBR\":\"Portugais (Brésil)\",\"EnShort\":\"English\",\"FrShort\":\"Français\",\"PtBRShort\":\"Portugais (Brésil)\",\"Close\":\"Retour\"},\"Tutorial\":{\"step-1Title\":\"Comment fonctionne COVID Shield\",\"step-1\":\"Votre téléphone utilise la fonction Bluetooth pour collecter et partager des identifiants aléatoires avec d'autres téléphones à proximité qui ont l'application COVID Shield. Ces identifiants sont conservés en toute sécurité sur chaque téléphone.\",\"step-2Title\":\"Si vous avez potentiellement été exposé(e) à la COVID-19\",\"step-2\":\"Vous recevrez une notification si, au cours des 14 derniers jours, vous avez été à proximité d'une personne ayant reçu un résultat de test positif à la COVID-19.\",\"step-3Title\":\"Si vous recevez un résultat de test positif à la COVID-19\",\"step-3\":\"Avisez anonymement ceux qui ont été à proximité de vous au cours des 14 derniers jours qu'ils ont possiblement été exposés à la COVID-19.\",\"ActionBack\":\"Précédent\",\"ActionNext\":\"Suivant\",\"ActionEnd\":\"Terminé\",\"Close\":\"Fermer\"},\"Sharing\":{\"Title\":\"Partager l'application\",\"SubTitle\":\"Chaque personne utilisant COVID Shield aide à ralentir la transmission de la COVID-19. Partager cette application ne partage aucune donnée privée.\",\"Platform-messages\":\"Partager avec Messages\",\"Platform-instagram\":\"Partager avec Instagram\",\"More\":\"Plus d'applications\",\"Message\":\"Joignez-vous à moi pour aider à ralentir la transmission de la COVID-19. Téléchargez l'application COVID Shield : https://covidshield.app\",\"Close\":\"Fermer\"},\"Onboarding\":{\"ActionNext\":\"Suivant\",\"ActionEnd\":\"Terminé\",\"ActionBack\":\"Précédent\"},\"OnboardingPermissions\":{\"Title\":\"Vos données sont privées\",\"Body\":\"COVID Shield priorise la confidentialité lors d'envois de notifications d'exposition à la COVID-19.\",\"Body2\":\"Vos identifiants aléatoires sont conservés sur votre téléphone exclusivement, à moins que vous décidiez de les partager.\",\"Body3\":\"L'utilisation de COVID Shield se fait sur une base volontaire. Vous pouvez supprimer vos identifiants aléatoires à tout moment.\"},\"OnboardingStart\":{\"Title\":\"Protégez-vous, protégez les autres\",\"Body1\":\"Recevez une notification si vous avez potentiellement été exposé(e) à la COVID-19.\",\"Body2\":\"Si vous recevez un résultat de test positif à la COVID-19, vous pouvez choisir de partager vos données de façon anonyme pour aviser ceux qui ont possiblement été exposés.\",\"TutorialAction\":\"Découvrez comment COVID Shield fonctionne\"},\"Privacy\":{\"Title\":\"Politique de confidentialité\",\"Close\":\"Fermer\"},\"ThankYou\":{\"Title\":\"Merci d'aider\",\"Body\":\"Les notifications d’exposition sont activées. Si COVID Shield détecte que vous avez possiblement été exposé(e) à la COVID-19, vous recevrez une notification.\",\"Dismiss\":\"OK\"},\"DataUpload\":{\"Cancel\":\"Annuler\",\"FormIntro\":\"Entrez votre code COVID Shield à 8 chiffres.\",\"Action\":\"Soumettre le code\",\"InfoSmall\":\"Vos identifiants aléatoires ne seront pas partagés, à moins que vous donniez votre permission à l'étape suivante.\",\"ConsentTitle\":\"Partagez vos identifiants aléatoires\",\"ConsentBody\":\"Un professionnel de la santé vous a autorisé à partager les identifiants aléatoires conservés sur votre téléphone.\",\"ConsentBody2\":\"Si vous partagez vos identifiants aléatoires, ceux qui ont été à proximité de vous au cours des 14 derniers jours avec l'application COVID Shield recevront une notification les avisant qu'ils ont possiblement été exposés à la COVID-19. Cette notification ne contiendra aucune information vous concernant.\",\"ConsentBody3\":\"Vous recevrez une notification par jour lorsque de nouveaux identifiants aléatoires pourront être partagés. Vous devrez chaque fois donner votre autorisation pour que les identifiants aléatoires soient partagés. Le partage est volontaire.\",\"PrivacyPolicyLink\":\"Voir la politique de confidentialité\",\"ConsentAction\":\"J'accepte\",\"ShareToast\":\"Identifiants aléatoires partagés avec succès\",\"ErrorTitle\":\"Code non reconnu\",\"ErrorBody\":\"Votre code COVID Shield n'a pas pu être reconnu. Essayez de nouveau.\",\"ErrorAction\":\"OK\"},\"Notification\":{\"ExposedMessageTitle\":\"Vous avez possiblement été exposé(e)\",\"ExposedMessageBody\":\"Selon vos identifiants aléatoires, au cours des 14 derniers jours, vous avez été à proximité d'une personne ayant reçu un résultat de test positif à la COVID-19.\",\"OffMessageTitle\":\"COVID Shield est désactivé\",\"OffMessageBody\":\"Activez COVID Shield pour recevoir une notification si vous avez potentiellement été exposé(e) à la COVID-19.\",\"DailyUploadNotificationTitle\":\"Partagez vos nouveaux identifiants aléatoires\",\"DailyUploadNotificationBody\":\"Partager vos données aide les autres à savoir s'ils ont possiblement été exposés à la COVID-19.\"},\"Partners\":{\"Label\":\"Conçu en partenariat avec\"},\"BottomSheet\":{\"Collapse\":\"Fermer\"},\"RegionPicker\":{\"Title\":\"Select your province or territory\",\"Body\":\"This helps give you more relevant guidance.\\nThis information is only stored on your device and will never be shared with anyone else.\",\"Skip\":\"Skip\",\"GetStarted\":\"Get started\",\"AB\":\"Alberta\",\"BC\":\"British Columbia\",\"MB\":\"Manitoba\",\"NB\":\"New Brunswick\",\"NL\":\"Newfoundland and Labrador\",\"NT\":\"Northwest Territories\",\"NS\":\"Nova Scotia\",\"NU\":\"Nunavut\",\"ON\":\"Ontario\",\"PE\":\"Prince Edward Island\",\"QC\":\"Quebec\",\"SK\":\"Saskatchewan\",\"YT\":\"Yukon\"}},\"pt-BR\":{\"Home\":{\"NoExposureDetected\":\"Nenhuma exposição detectada\",\"NoExposureDetectedDetailed\":\"Com base em seus IDs aleatórios, você não esteve perto de alguém nos últimos 14 dias que testou positivo para COVID-19.\",\"ExposureDetected\":\"Você possivelmente foi exposto ao COVID-19\",\"ExposureDetectedDetailed\":\"Com base nos seus IDs aleatórios, você esteve perto de alguém nos últimos 14 dias que testou positivo para COVID-19.\",\"SeeGuidance\":\"Leia a orientação do Canadá sobre COVID-19\",\"GuidanceUrl\":\"https://www.canada.ca/en/public-health/services/publications/diseases-conditions/covid-19-how-to-isolate-at-home.html\",\"SignalDataShared\":\"Obrigado por ajudar a diminuir a propagação\",\"SignalDataSharedDetailed\":{\"One\":\"Você receberá uma notificação solicitando que compartilhe seus IDs aleatórios todos os dias pelo próximo {number} dia.\",\"Other\":\"Você receberá uma notificação solicitando que compartilhe seus IDs aleatórios todos os dias pelos próximos {number} dias.\"},\"SignalDataSharedCTA\":\"Acompanhe seus sintomas\",\"SymptomTrackerUrl\":\"https://ca.thrive.health/covid19app/action/88a5e9a7-db9e-487b-bc87-ce35035f8e5c?from=/home&navigateTo=/tracker/complete\",\"DailyShare\":\"Compartilhe seus novos IDs aleatórios\",\"DailyShareDetailed\":\"Compartilhar seus dados ajuda outras pessoas a saber se elas foram expostas ao COVID-19.\",\"ShareRandomIDsCTA\":\"Compartilhe seus IDs aleatórios\",\"BluetoothDisabled\":\"Bluetooth desligado\",\"EnableBluetoothCTA\":\"O Bluetooth é usado para coletar e compartilhar IDs aleatórios necessários para o COVID Shield funcionar.\",\"TurnOnBluetooth\":\"Ligar o Bluetooth\",\"ExposureNotificationsDisabled\":\"As notificações de exposição estão desligadas\",\"ExposureNotificationsDisabledDetailed\":\"São necessárias notificações de exposição para que o COVID Shield funcione.\",\"EnableExposureNotificationsCTA\":\"Ligar notificações de exposição\",\"NoConnectivity\":\"Sem conexão à internet\",\"NoConnectivityDetailed\":\"O COVID Shield precisa de acesso à Internet para continuar verificando à potenciais exposições.\",\"AppName\":\"COVID Shield\",\"ExternalLinkHint\":\"Opens in a new window\",\"LastCheckedMinutes\":{\"One\":\"Última verificação há {number} minuto\",\"Other\":\"Última verificação há {number} minutos\"},\"LastCheckedHours\":{\"One\":\"Última verificação há {number} hora\",\"Other\":\"Última verificação há {number} horas\"},\"LastCheckedDays\":{\"One\":\"Última verificação há {number} dia\",\"Other\":\"Última verificação há {number} dias\"}},\"OverlayClosed\":{\"SystemStatus\":\"COVID Shield está \",\"SystemStatusOn\":\"LIGADO\",\"SystemStatusOff\":\"DESLIGADO\",\"NotificationStatus\":\"As notificações estão \",\"NotificationStatusOff\":\"DESLIGADAS\",\"TapPrompt\":\"Toque para mais informações\"},\"OverlayOpen\":{\"BluetoothCardStatus\":\"Bluetooth está \",\"BluetoothCardStatusOff\":\"DESLIGADO\",\"BluetoothCardBody\":\"O Bluetooth é usado para coletar e compartilhar IDs aleatórios necessários para o COVID Shield funcionar.\",\"BluetoothCardAction\":\"Ligar o Bluetooth\",\"EnterCodeCardTitle\":\"Código do COVID Shield\",\"EnterCodeCardBody\":\"Um profissional de saúde pediu para você inserir um código COVID Shield?\",\"EnterCodeCardAction\":\"Insira o código\",\"NotificationCardStatus\":\"As notificações estão \",\"NotificationCardStatusOff\":\"DESLIGADAS\",\"NotificationCardBody\":\"Você não receberá notificações se tiver sido exposto ao COVID-19. A notificação de potencial exposição é importante para ajudar a diminuir a propagação do COVID-19.\",\"NotificationCardAction\":\"Ligar notificações\",\"ExposureNotificationCardStatus\":\"As notificações de exposição estão \",\"ExposureNotificationCardStatusOff\":\"DESLIGADAS\",\"ExposureNotificationCardBody\":\"São necessárias notificações de exposição para que o COVID Shield funcione.\",\"ExposureNotificationCardAction\":\"Ligar notificações de exposição\"},\"Info\":{\"CheckSymptoms\":\"Verifique os sintomas\",\"SymptomsUrl\":\"https://ca.thrive.health/covid19/en\",\"TellAFriend\":\"Compartilhe o aplicativo\",\"LearnMore\":\"Como o COVID Shield funciona\",\"ChangeLanguage\":\"Mudar idioma\",\"Privacy\":\"Leia a política de privacidade\"},\"LanguageSelect\":{\"Title\":\"Idioma\",\"En\":\"Inglês (Canadá)\",\"Fr\":\"Francês (Canadá)\",\"PtBR\":\"Português (Brasil)\",\"EnShort\":\"Inglês\",\"FrShort\":\"Francês\",\"PtBRShort\":\"Português (Brasil)\",\"Close\":\"Voltar\"},\"Tutorial\":{\"step-1Title\":\"Como o COVID Shield funciona\",\"step-1\":\"Seu telefone usa o Bluetooth para coletar e compartilhar IDs aleatórios com telefones próximos a você com o COVID Shield instalado. Esses IDs são armazenados com segurança em cada telefone.\",\"step-2Title\":\"Se você foi potencialmente exposto ao COVID-19\",\"step-2\":\"Você receberá uma notificação se esteve próximo de alguém nos últimos 14 dias que testou positivo para COVID-19.\",\"step-3Title\":\"Se você testar positivo para COVID-19\",\"step-3\":\"Notifique anonimamente as pessoas que estiveram perto de você nos últimos 14 dias de que elas possivelmente foram expostas.\",\"ActionBack\":\"Voltar\",\"ActionNext\":\"Próximo\",\"ActionEnd\":\"Concluir\",\"Close\":\"Fechar\"},\"Sharing\":{\"Title\":\"Compartilhe o aplicativo\",\"SubTitle\":\"Todas as pessoas que usam o COVID Shield ajudam a diminuir a propagação do COVID-19. Compartilhando este aplicativo não compartilhará dados pessoais.\",\"Platform-messages\":\"Compartilhar em Mensagens\",\"Platform-instagram\":\"Compartilhar no Instagram\",\"More\":\"Mais aplicativos\",\"Message\":\"Junte-se a mim e ajude a diminuir a propagação do COVID-19. Baixe o aplicativo COVID Shield: https://covidshield.app\",\"Close\":\"Fechar\"},\"Onboarding\":{\"ActionNext\":\"Próximo\",\"ActionEnd\":\"Concluir\",\"ActionBack\":\"Voltar\"},\"OnboardingPermissions\":{\"Title\":\"Seus dados são privados\",\"Body\":\"O COVID Shield adota uma abordagem de privacidade em primeiro lugar na notificação de exposição.\",\"Body2\":\"Seus IDs aleatórios são armazenados exclusivamente em seu telefone, a menos que você os compartilhe.\",\"Body3\":\"O uso do COVID Shield é voluntário. Você pode excluir seus IDs aleatórios a qualquer momento.\"},\"OnboardingStart\":{\"Title\":\"Mantenha você e os outros seguros\",\"Body1\":\"Seja notificado se você foi potencialmente exposto ao COVID-19.\",\"Body2\":\"Se você testar positivo para COVID-19, poderá compartilhar seus dados anonimamente para que outras pessoas possam ser notificadas sobre uma possível exposição.\",\"TutorialAction\":\"Saiba como o COVID Shield funciona\"},\"Privacy\":{\"Title\":\"Política de privacidade\",\"Close\":\"Fechar\"},\"ThankYou\":{\"Title\":\"Obrigado por ajudar\",\"Body\":\"As notificações de exposição estão ativadas. Você receberá uma notificação se o COVID Shield detectar que você foi exposto ao COVID-19.\",\"Dismiss\":\"Dispensar\"},\"DataUpload\":{\"Cancel\":\"Cancelar\",\"FormIntro\":\"Digite seu código COVID Shield de 8 dígitos.\",\"Action\":\"Enviar código\",\"InfoSmall\":\"Seus IDs aleatórios não serão compartilhados, a menos que você permita na próxima etapa.\",\"ConsentTitle\":\"Compartilhe seus IDs aleatórios\",\"ConsentBody\":\"Você recebeu acesso de um profissional de saúde para compartilhar os IDs aleatórios armazenados no seu telefone.\",\"ConsentBody2\":\"Se você compartilhar seus IDs aleatórios, outras pessoas com a COVID Shield que estiveram perto de você nos últimos 14 dias receberão uma notificação de que elas possivelmente foram expostas. Esta notificação não incluirá nenhuma informação sobre você.\",\"ConsentBody3\":\"Você será notificado uma vez por dia quando novos IDs aleatórios estiverem disponíveis para serem compartilhados. Você deve conceder permissão cada vez para que os IDs aleatórios sejam compartilhados. Compartilhar é voluntário.\",\"PrivacyPolicyLink\":\"Ver política de privacidade\",\"ConsentAction\":\"Concordo\",\"ShareToast\":\"IDs aleatórios compartilhados com sucesso\",\"ErrorTitle\":\"Código não reconhecido\",\"ErrorBody\":\"Não foi possível reconhecer seu código COVID Shield. Por favor, tente novamente.\",\"ErrorAction\":\"OK\"},\"Notification\":{\"ExposedMessageTitle\":\"Você possivelmente foi exposto ao COVID-19\",\"ExposedMessageBody\":\"Com base nos seus IDs aleatórios, você esteve perto de alguém nos últimos 14 dias que testou positivo para COVID-19.\",\"OffMessageTitle\":\"O COVID Shield está desligado\",\"OffMessageBody\":\"Ligue o COVID Shield para ser notificado se você tiver sido potencialmente exposto ao COVID-19.\",\"DailyUploadNotificationTitle\":\"Compartilhe seus novos IDs aleatórios\",\"DailyUploadNotificationBody\":\"Compartilhar seus dados ajuda outras pessoas a saber se elas foram expostas ao COVID-19.\"},\"Partners\":{\"Label\":\"Desenvolvido em parceria com\"},\"BottomSheet\":{\"Collapse\":\"Ocultar\"},\"RegionPicker\":{\"Title\":\"Select your province or territory\",\"Body\":\"This helps give you more relevant guidance.\\nThis information is only stored on your device and will never be shared with anyone else.\",\"Skip\":\"Skip\",\"GetStarted\":\"Get started\",\"AB\":\"Alberta\",\"BC\":\"British Columbia\",\"MB\":\"Manitoba\",\"NB\":\"New Brunswick\",\"NL\":\"Newfoundland and Labrador\",\"NT\":\"Northwest Territories\",\"NS\":\"Nova Scotia\",\"NU\":\"Nunavut\",\"ON\":\"Ontario\",\"PE\":\"Prince Edward Island\",\"QC\":\"Quebec\",\"SK\":\"Saskatchewan\",\"YT\":\"Yukon\"}}}") \ No newline at end of file From d55032f2be22a36fadd524ed2114da4d7f06b7f4 Mon Sep 17 00:00:00 2001 From: Jordan Good Date: Thu, 4 Jun 2020 10:27:28 -0400 Subject: [PATCH 2/3] git ignore translations file and run on commans instead --- .gitignore | 3 +++ package.json | 10 +++++----- translations.js => scripts/translations.js | 0 3 files changed, 8 insertions(+), 5 deletions(-) rename translations.js => scripts/translations.js (100%) diff --git a/.gitignore b/.gitignore index fb51ad9f..206dca63 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,6 @@ ios/GoogleService-Info.plist ios/Generated.xcconfig android/app/google-services.json .env.local + +# Translations +src/locale/translations/index.js diff --git a/package.json b/package.json index b875686c..8fb51b01 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,14 @@ "version": "0.0.1", "private": true, "scripts": { - "bundle-android": "react-native bundle --dev false --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", - "bundle-ios": "react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios", + "bundle-android": "yarn generate-translations && react-native bundle --dev false --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", + "bundle-ios": "yarn generate-translations && react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios", "codegen-protobuf": "pbjs -t static-module -o src/services/BackendService/covidshield/covidshield.js src/services/BackendService/covidshield/covidshield.proto && pbts -o src/services/BackendService/covidshield/covidshield.d.ts src/services/BackendService/covidshield/covidshield.js", - "generate-translations": "node translations.js", + "generate-translations": "node scripts/translations.js", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "pod-install": "pushd ios; bundle exec pod install; popd", - "run-android": "react-native run-android --variant debug", - "run-ios": "react-native run-ios", + "run-android": "yarn generate-translations && react-native run-android --variant debug", + "run-ios": "yarn generate-translations && react-native run-ios", "start": "react-native start --reset-cache", "test": "jest", "tsc": "tsc" diff --git a/translations.js b/scripts/translations.js similarity index 100% rename from translations.js rename to scripts/translations.js From 4b02a627aefbf1dd9067cf24efcec090e6f848e1 Mon Sep 17 00:00:00 2001 From: Jordan Good Date: Wed, 24 Jun 2020 08:58:42 -0400 Subject: [PATCH 3/3] add to start command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8fb51b01..2f7d4adf 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "pod-install": "pushd ios; bundle exec pod install; popd", "run-android": "yarn generate-translations && react-native run-android --variant debug", "run-ios": "yarn generate-translations && react-native run-ios", - "start": "react-native start --reset-cache", + "start": "yarn generate-translations && react-native start --reset-cache", "test": "jest", "tsc": "tsc" },