Skip to content

Commit

Permalink
fix(inji-522): update literals in the location service enabling popup
Browse files Browse the repository at this point in the history
Signed-off-by: Vijay <[email protected]>
  • Loading branch information
vijay151096 committed Nov 15, 2023
1 parent fb0a941 commit c0e872a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"sharingVc": "مشاركة بطاقة ",
"errors": {
"locationDisabled": {
"message": "يجب تمكين خدمات الموقع لمشاركة البطاقة",
"message": "للمتابعة، اسمح لجهازك بتشغيل الموقع",
"button": "تمكين خدمات الموقع"
},
"locationDenied": {
Expand Down Expand Up @@ -589,6 +589,7 @@
"cancel": "إلغاء",
"accept": "يقبل",
"save": "حفظ",
"ok": "نعم",
"dismiss": "رفض",
"editLabel": "يحرر {{label}}",
"tryAgain": "حاول مجددا",
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
"scanningGuide": "Hold the phone steady and scan the QR code",
"errors": {
"locationDisabled": {
"message": "Location services must be enabled to share card",
"message": "To continue, let your device turn on location",
"button": "Enable location services"
},
"locationDenied": {
Expand Down
3 changes: 2 additions & 1 deletion locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
"scanningGuide": "Panatilihin ang telepono at i-scan ang QR code",
"errors": {
"locationDisabled": {
"message": "Dapat na nakabukas ang Location services ng iyong mobile para maaaring makapag-scan",
"message": "Para magpatuloy, hayaang i-on ng iyong device ang lokasyon",
"button": "Buksan ang location services"
},
"locationDenied": {
Expand Down Expand Up @@ -592,6 +592,7 @@
"cancel": "Kanselahin",
"accept": "Tanggapin",
"save": "I-save",
"ok": "Ok",
"dismiss": "Dismissed",
"editLabel": "Palitan ang {{label}}",
"tryAgain": "Subukan muli",
Expand Down
3 changes: 2 additions & 1 deletion locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"scanningGuide": "फ़ोन को स्थिर रखें और QR कोड को स्कैन करें",
"errors": {
"locationDisabled": {
"message": "स्थान सेवाओं को स्कैनिंग कार्यक्षमता के लिए सक्षम किया जाना चाहिए",
"message": "जारी रखने के लिए, अपने डिवाइस को स्थान चालू करने दें",
"button": "स्थान सेवाएं सक्षम करें"
},
"locationDenied": {
Expand Down Expand Up @@ -588,6 +588,7 @@
"common": {
"cancel": "रद्द करें",
"save": "सहेजें",
"ok": "ठीक है",
"dismiss": "नकार देना",
"editLabel": "संपादित करें {{label}}",
"tryAgain": "पुनः प्रयास करें",
Expand Down
3 changes: 2 additions & 1 deletion locales/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
"scanningGuide": "ಫೋನ್ ಅನ್ನು ಸ್ಥಿರವಾಗಿ ಹಿಡಿದುಕೊಳ್ಳಿ ಮತ್ತು QR ಕೋಡ್ ಅನ್ನು ಸ್ಕ್ಯಾನ್ ಮಾಡಿ",
"errors": {
"locationDisabled": {
"message": "ಸ್ಕ್ಯಾನಿಂಗ್ ಕಾರ್ಯಕ್ಕಾಗಿ ಸ್ಥಳ ಸೇವೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಬೇಕು",
"message": "ಮುಂದುವರಿಸಲು, ನಿಮ್ಮ ಸಾಧನವು ಸ್ಥಳವನ್ನು ಆನ್ ಮಾಡಲು ಅನುಮತಿಸಿ",
"button": "ಸ್ಥಳ ಸೇವೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"
},
"locationDenied": {
Expand Down Expand Up @@ -587,6 +587,7 @@
"cancel": "ರದ್ದು",
"accept": "ಒಪ್ಪಿಕೊಳ್ಳಿ",
"save": "ಉಳಿಸು",
"ok": "ಸರಿ",
"dismiss": "ವಜಾಗೊಳಿಸಿ",
"editLabel": "ಸಂಪಾದಿಸು {{label}}",
"tryAgain": "ಮತ್ತೆ ಪ್ರಯತ್ನಿಸು",
Expand Down
3 changes: 2 additions & 1 deletion locales/spa.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
"enableBluetoothButtonText": "Permitir permisos de Bluetooth",
"errors": {
"locationDisabled": {
"message": "Los servicios de ubicación deben estar habilitados para compartir la tarjeta",
"message": "Para continuar, deja que tu dispositivo active la ubicación.",
"button": "Habilitar servicios de ubicación"
},
"locationDenied": {
Expand Down Expand Up @@ -497,6 +497,7 @@
"common": {
"cancel": "Cancelar",
"save": "Guardar",
"ok": "Ok",
"dismiss": "Cerrar",
"editLabel": "Editar {{label}}",
"tryAgain": "Intentar de nuevo",
Expand Down
3 changes: 2 additions & 1 deletion locales/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
"scanningGuide": "ஃபோனை நிலையாகப் பிடித்து, QR குறியீட்டை ஸ்கேன் செய்யவும்s",
"errors": {
"locationDisabled": {
"message": "ஸ்கேனிங் செயல்பாட்டிற்கு இருப்பிடச் சேவைகள் இயக்கப்பட வேண்டும்",
"message": "தொடர, இருப்பிடத்தை இயக்க உங்கள் சாதனத்தை அனுமதிக்கவும்",
"button": "இருப்பிட சேவைகளை இயக்கு"
},
"locationDenied": {
Expand Down Expand Up @@ -587,6 +587,7 @@
"cancel": "ரத்துசெய்",
"accept": "ஏற்றுக்கொள்",
"save": "சேமி",
"ok": "சரி",
"dismiss": "நிராகரி",
"editLabel": "திருத்து {{label}}",
"tryAgain": "மீண்டும் முயற்சி செய்",
Expand Down
13 changes: 7 additions & 6 deletions shared/location.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import RNLocation from 'react-native-location';
import LocationServicesDialogBox from 'react-native-android-location-services-dialog-box';
import i18n from '../i18n';
// Initialize RNLocation
RNLocation.configure({
distanceFilter: 5.0, // Example configuration, adjust as needed
Expand Down Expand Up @@ -49,18 +50,18 @@ export async function checkLocationService(
onDisabled: () => void,
) {
try {
await LocationServicesDialogBox.checkLocationServicesIsEnabled({
message:
"<h2 style='color: #0af13e'>Use Location ?</h2>This app wants to change your device settings:<br/><br/>Use GPS, Wi-Fi, and cell network for location<br/><br/><a href='#'>Learn more</a>",
ok: 'YES',
cancel: 'NO',
const config = {
message: i18n.t('ScanScreen:errors:locationDisabled:message'),
ok: i18n.t('common:ok'),
cancel: i18n.t('common:dismiss'),
enableHighAccuracy: true, // true => GPS AND NETWORK PROVIDER, false => GPS OR NETWORK PROVIDER
showDialog: true, // false => Opens the Location access page directly
openLocationServices: true, // false => Directly catch method is called if location services are turned off
preventOutSideTouch: false, //true => To prevent the location services popup from closing when it is clicked outside
preventBackClick: false, //true => To prevent the location services popup from closing when it is clicked back button
providerListener: true, // true ==> Trigger "locationProviderStatusChange" listener when the location state changes
});
};
await LocationServicesDialogBox.checkLocationServicesIsEnabled(config);
onEnabled();
} catch (e) {
onDisabled();
Expand Down

0 comments on commit c0e872a

Please sign in to comment.