From db7b07971e98ffca662c2828a2f5402d814372f0 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 18 Mar 2024 21:48:11 +0530 Subject: [PATCH 1/8] Issue #ED-0000 fix: updated splash, local file upload and notification --- android/app/build.gradle | 2 +- .../pages/create-playlist/create-playlist.page.html | 2 +- .../pages/create-playlist/create-playlist.page.ts | 6 ++++-- src/app/pages/home/home.page.ts | 11 ++--------- src/app/pages/splash/splash.page.html | 4 ++-- src/app/pages/splash/splash.page.scss | 8 ++++---- src/app/pages/splash/splash.page.ts | 13 ++++++++++--- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index f93776e..b53a6d7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,7 +7,7 @@ android { applicationId "in.gov.myjp.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 14 + versionCode 15 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/src/app/pages/create-playlist/create-playlist.page.html b/src/app/pages/create-playlist/create-playlist.page.html index 20eb5f9..54af4fb 100644 --- a/src/app/pages/create-playlist/create-playlist.page.html +++ b/src/app/pages/create-playlist/create-playlist.page.html @@ -1,7 +1,7 @@
- +
diff --git a/src/app/pages/create-playlist/create-playlist.page.ts b/src/app/pages/create-playlist/create-playlist.page.ts index 8441309..5fbc98c 100644 --- a/src/app/pages/create-playlist/create-playlist.page.ts +++ b/src/app/pages/create-playlist/create-playlist.page.ts @@ -93,14 +93,16 @@ export class CreatePlaylistPage implements OnInit { } }); this.disableCreateBtn = false; - if(this.reSelectedContent.length == 0) { + if(this.reSelectedContent.length == 0 || this.playlistName.length == 0) { this.disableCreateBtn = true } } playlistNameChange() { - if((this.playlistName.replace(/\s/g, '').length > 0 && this.selectedContents.length > 0) || this.playlistName !== this.playlists?.name) { + if((this.playlistName.replace(/\s/g, '').length > 0 && this.selectedContents.length > 0) || (this.playlistName !== "" && this.playlistName !== this.playlists?.name)) { this.disableCreateBtn = false + } else { + this.disableCreateBtn = true } } diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 1349bca..ae97db5 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { InfiniteScrollCustomEvent, IonRefresher, ModalController, ToastController } from '@ionic/angular'; import { Searchrequest, PlayerType, PageId, Content, ContentMetaData } from '../../../app/appConstants'; -import { AppHeaderService, BotApiService, CachingService, LocalNotificationService, SearchService, StorageService } from '../../../app/services'; +import { AppHeaderService, BotApiService, CachingService, SearchService, StorageService } from '../../../app/services'; import { ContentService } from 'src/app/services/content/content.service'; import { ConfigService } from '../../../app/services/config.service'; import { SunbirdPreprocessorService } from '../../services/sources/sunbird-preprocessor.service'; @@ -18,7 +18,6 @@ import confetti from 'canvas-confetti'; import { NativeAudio } from '@capacitor-community/native-audio'; import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; -import { LocalNotificationSchema } from '@capacitor/local-notifications'; @Component({ selector: 'app-home', @@ -59,8 +58,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { private searchService: SearchService, private translateService: TranslateService, private toastController: ToastController, - private botMessageApiService: BotApiService, - private lcoalNotifService: LocalNotificationService) { + private botMessageApiService: BotApiService) { this.configContents = []; this.contentList = []; this.networkChangeSub = this.networkService.networkConnection$.subscribe(ev => { @@ -218,11 +216,6 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { async getServerMetaConfig() { let meta: any = await this.storage.getData('configMeta'); let config = meta ? JSON.parse(meta) : await this.configService.getConfigMeta(); - let notif: LocalNotificationSchema = config?.notification?.android - if(notif) { - await this.lcoalNotifService.cancelNotification(notif.id); - await this.lcoalNotifService.initializeLocalNotif(notif); - } config.pageConfig.forEach((cfg: any) => { this.filters = (cfg.additionalFilters).sort((a: Filter, b: Filter) => a.index - b.index); }) diff --git a/src/app/pages/splash/splash.page.html b/src/app/pages/splash/splash.page.html index 4dd4245..13d34a4 100644 --- a/src/app/pages/splash/splash.page.html +++ b/src/app/pages/splash/splash.page.html @@ -9,9 +9,9 @@ bhashini
-
+
Pitara box
diff --git a/src/app/pages/splash/splash.page.scss b/src/app/pages/splash/splash.page.scss index c95b6ea..1c257c7 100644 --- a/src/app/pages/splash/splash.page.scss +++ b/src/app/pages/splash/splash.page.scss @@ -49,9 +49,9 @@ ion-content{ display: flex; justify-content: center; align-items: center; - height: 24%; + height: 55%; .pitara-box{ - width: 40%; + width: 80%; } } @@ -61,14 +61,14 @@ ion-content{ background: white; border-radius: 50%; width: 100%; - height: 46%; + height: 50%; display: flex; align-items: flex-start; justify-content: center; left: 50%; transform: translateX(-50%); img { - width: 10rem; + width: 11rem; } } } diff --git a/src/app/pages/splash/splash.page.ts b/src/app/pages/splash/splash.page.ts index f7ed814..6733e3a 100644 --- a/src/app/pages/splash/splash.page.ts +++ b/src/app/pages/splash/splash.page.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { ApiService, AppHeaderService, CachingService, ConfigService, UtilService } from '../../../app/services'; +import { ApiService, AppHeaderService, CachingService, ConfigService, LocalNotificationService, UtilService } from '../../../app/services'; import { AppInitializeService } from '../../../app/services/appInitialize.service'; import { StorageService } from '../../../app/services/storage.service'; import { v4 as uuidv4 } from "uuid"; @@ -8,6 +8,7 @@ import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry. import { TranslateService } from '@ngx-translate/core'; import { ApiModule } from 'src/app/services/api/api.module'; import { Config } from 'src/app/appConstants'; +import { LocalNotificationSchema } from '@capacitor/local-notifications'; @Component({ selector: 'app-splash', @@ -24,7 +25,8 @@ export class SplashPage implements OnInit { private cachingService: CachingService, private configService: ConfigService, private translate: TranslateService, - private apiService: ApiService) { + private apiService: ApiService, + private lcoalNotifService: LocalNotificationService) { this.cachingService.initStorage(); } @@ -35,13 +37,18 @@ export class SplashPage implements OnInit { this.apiService.onInit().subscribe(); let sid = uuidv4(); this.storage.setData("sid", sid); + this.appinitialise.initialize(); setTimeout(async () => { console.log('route'); this.startTelemetry() this.router.navigate(['/tabs/home']); }, 2000); - this.appinitialise.initialize(); let config: Config = await this.configService.getConfigMeta(); + let notif: LocalNotificationSchema = config?.notification?.android + if(notif) { + await this.lcoalNotifService.cancelNotification(notif.id); + await this.lcoalNotifService.initializeLocalNotif(notif); + } this.storage.setData('configMeta', JSON.stringify(config)); let lang = await this.storage.getData('lang') if(lang) { From 996fe612f4dc005d294628e23a80c3fd3656fc89 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Fri, 22 Mar 2024 14:57:35 +0530 Subject: [PATCH 2/8] Issue #ED-0000 fix: handle popup on bot page premission --- .../bot-messages/bot-messages.component.ts | 90 ++++++++++--------- .../bot-permission.component.html | 11 +++ .../bot-permission.component.scss | 42 +++++++++ .../bot-permission.component.spec.ts | 24 +++++ .../bot-permission.component.ts | 31 +++++++ src/app/components/components.module.ts | 7 +- .../pages/parent-sakhi/parent-sakhi.page.html | 2 +- .../pages/parent-sakhi/parent-sakhi.page.ts | 88 ++++++++++++++---- src/app/pages/splash/splash.page.ts | 9 ++ src/app/pages/story/story.page.html | 2 +- src/app/pages/story/story.page.ts | 79 ++++++++++++---- .../teacher-sakhi/teacher-sakhi.page.html | 2 +- .../pages/teacher-sakhi/teacher-sakhi.page.ts | 78 +++++++++++++--- src/app/services/tabs.service.ts | 2 + src/app/tabs/tabs.page.ts | 55 ++++++------ src/assets/i18n/as.json | 4 +- src/assets/i18n/bn.json | 4 +- src/assets/i18n/bo.json | 4 +- src/assets/i18n/do.json | 4 +- src/assets/i18n/en.json | 4 +- src/assets/i18n/gu.json | 4 +- src/assets/i18n/hi.json | 4 +- src/assets/i18n/kn.json | 4 +- src/assets/i18n/ko.json | 4 +- src/assets/i18n/ks.json | 4 +- src/assets/i18n/ma.json | 4 +- src/assets/i18n/ml.json | 4 +- src/assets/i18n/mn.json | 4 +- src/assets/i18n/mr.json | 4 +- src/assets/i18n/ne.json | 4 +- src/assets/i18n/or.json | 4 +- src/assets/i18n/pa.json | 4 +- src/assets/i18n/sa.json | 4 +- src/assets/i18n/si.json | 4 +- src/assets/i18n/st.json | 4 +- src/assets/i18n/ta.json | 4 +- src/assets/i18n/te.json | 4 +- src/assets/i18n/ur.json | 4 +- 38 files changed, 471 insertions(+), 143 deletions(-) create mode 100644 src/app/components/bot-permission/bot-permission.component.html create mode 100644 src/app/components/bot-permission/bot-permission.component.scss create mode 100644 src/app/components/bot-permission/bot-permission.component.spec.ts create mode 100644 src/app/components/bot-permission/bot-permission.component.ts diff --git a/src/app/components/bot-messages/bot-messages.component.ts b/src/app/components/bot-messages/bot-messages.component.ts index d91267a..ad765c2 100644 --- a/src/app/components/bot-messages/bot-messages.component.ts +++ b/src/app/components/bot-messages/bot-messages.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, Input, NgZone, OnInit, Output, ViewChild } from '@angular/core'; -import { IonContent, Platform } from '@ionic/angular'; +import { IonContent, ModalController } from '@ionic/angular'; import { BotMessage } from 'src/app/appConstants'; -import { AppHeaderService, BotApiService, RecordingService, StorageService } from 'src/app/services'; +import { BotApiService, RecordingService, StorageService } from 'src/app/services'; import { Keyboard } from "@capacitor/keyboard"; import { Directory, Filesystem } from '@capacitor/filesystem'; import { TranslateService } from '@ngx-translate/core'; @@ -10,6 +10,8 @@ import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry. import { CorrelationData } from 'src/app/services/telemetry/models/telemetry'; import { ChatMessage } from 'src/app/services/bot/db/models/chat.message'; import { v4 as uuidv4 } from "uuid"; +import { BotPermissionComponent } from '../bot-permission/bot-permission.component'; +import { Router } from '@angular/router'; @Component({ selector: 'app-bot-messages', @@ -21,7 +23,6 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { textMessage: string = '' chat!: BotMessage; defaultLoaderMsg!: BotMessage; - botStartTimeStamp = Date.now(); @Input() config: any = {}; @Output() botMessageEvent = new EventEmitter(); @ViewChild('recordbtn', { read: ElementRef }) recordbtn: ElementRef | any; @@ -32,15 +33,16 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { durationDisplay = ''; disabled = false; audioRef!: HTMLAudioElement; + perModalOpen: boolean = false; constructor( private record: RecordingService, private ngZone: NgZone, - private headerService: AppHeaderService, private messageApi: BotApiService, private translate: TranslateService, private telemetryGeneratorService: TelemetryGeneratorService, private storage: StorageService, - private platform: Platform + private modalCtrl: ModalController, + private router: Router ) { this.defaultLoaderMsg = {identifier: "", message: this.translate.instant('Loading...'), messageType: 'text', displayMsg: this.translate.instant('Loading...'), type: 'received', time: '', timeStamp: '', readMore: false, likeMsg: false, dislikeMsg: false, requestId: ""}; this.botMessages = []; @@ -48,17 +50,6 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { } ngOnInit() { - this.initialiseBot(); - this.platform.backButton.subscribeWithPriority(11, async () => { - this.handleBackNavigation(); - }); - this.headerService.headerEventEmitted$.subscribe((name: any) => { - if (name == "back" && !this.navigated) { - this.navigated = true; - console.log('bot message back event '); - this.handleBackNavigation(); - } - }) Keyboard.addListener('keyboardWillShow', () => { console.log('keyboard will show'); this.content.scrollToBottom(); @@ -84,10 +75,46 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { }); } - ngOnChanges() { + async checkBotPermission() { + if (!this.perModalOpen) { + this.perModalOpen = true + const modal = await this.modalCtrl.create({ + component: BotPermissionComponent, + componentProps: { + type: this.config.type + }, + cssClass: 'add-to-pitara', + breakpoints: [0, 1], + showBackdrop: false, + backdropDismiss: false, + initialBreakpoint: 1, + handle: false, + handleBehavior: "none" + }); + await modal.present(); + await modal.onDidDismiss().then((res) => { + this.perModalOpen = false; + if(res.data.type === "decline") { + this.telemetryGeneratorService.generateInteractTelemetry('CLICK', 'decline-bot', 'bot-message', 'bot-message'); + this.router.navigate(['/tabs/home']); + } + this.telemetryGeneratorService.generateInteractTelemetry('CLICK', 'accept-bot', 'bot-message', 'bot-message'); + }) + } + } + + async ngOnChanges() { console.log('ng onchanges ', this.config); + if(this.config.disable) { + this.disabled = false + } + if(await this.storage.getData(this.config.type) === 'false') { + this.checkBotPermission(); + } + this.initialiseBot(); if (this.config?.notification && this.config?.notif?.body) { this.textMessage = this.config.notif.body; + this.disabled = false; this.handleMessage(); } } @@ -137,6 +164,7 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { }) console.log("botMessages ", this.botMessages); }); + this.botMessageEvent.emit({msg: this.botMessages}) if(this.config.notif) { this.textMessage = this.config.notif.body; this.handleMessage(); @@ -153,6 +181,7 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { this.chat.timeStamp = Date.now() this.botMessages.push(this.chat); this.saveChatMessage(this.chat); + this.botMessageEvent.emit({msg: this.botMessages}) this.content.scrollToBottom(300).then(() => { this.content.scrollToBottom(300) }) @@ -240,6 +269,7 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { this.disabled = false; } }) + this.botMessageEvent.emit({msg: this.botMessages}) }).catch(e => { this.disabled = false; console.log('catch error ', e); @@ -254,6 +284,7 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { } } this.saveChatMessage(this.botMessages[index-1]); + this.botMessageEvent.emit({msg: this.botMessages}) }) } @@ -317,31 +348,6 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { this.audioRef.onended = () => {audio.play = false; this.audioRef.pause();} } - handleBackNavigation() { - let botDuration = Date.now() - this.botStartTimeStamp; - if (this.botMessages.length > 0) { - let result = { audio: 0, text: 0 }; - this.botMessages.forEach(msg => { - if (msg.messageType == 'text') { - result.text++; - } else if (msg.messageType == 'audio') { - result.audio++; - if(this.audioRef) { - if(msg.audio) { - msg.audio.play = false; - } - this.audioRef.pause(); - } - } - }); - console.log('result count ', result); - this.botMessageEvent.emit({ audio: result.audio, text: result.text, duration: botDuration/1000 }) - } else { - this.botMessageEvent.emit({ audio: 0, text: 0, duration: botDuration/1000 }) - } - this.botMessages = []; - } - async cancelRecording() { console.log('cancel recording'); await this.record.stopRecognition('audio').then(res => { diff --git a/src/app/components/bot-permission/bot-permission.component.html b/src/app/components/bot-permission/bot-permission.component.html new file mode 100644 index 0000000..892fc55 --- /dev/null +++ b/src/app/components/bot-permission/bot-permission.component.html @@ -0,0 +1,11 @@ +
+ + + {{'Welcome to bot message, please accept to continue bot' | translate}} + + + + {{"Decline" | translate }} + {{"Accept" | translate }} + +
\ No newline at end of file diff --git a/src/app/components/bot-permission/bot-permission.component.scss b/src/app/components/bot-permission/bot-permission.component.scss new file mode 100644 index 0000000..943bc07 --- /dev/null +++ b/src/app/components/bot-permission/bot-permission.component.scss @@ -0,0 +1,42 @@ +.buttons { + padding: 0 1rem; +} + +ion-button { + text-wrap: wrap; +} + +ion-label { + text-align: center; +} + +.btn-info{ + width: 40%; + color: var(--ion-color-primary-contrast); + --background: var(--ion-color-tertiary); + font-size: 0.75rem; + font-family: Noto Sans; + font-weight: 700; + text-transform: uppercase; + line-height: 19.60px; + word-wrap: break-word; + padding: 5px; + text-wrap: wrap; + text-align: center; +} + +.decline{ + --color: var(--ion-color-tertiary); + --background: white; +} + +ion-modal { + --height: 50%; + --border-radius: 1rem; + --box-shadow: 0 0.625rem 0.938rem -0.188rem rgb(0 0 0 / 0.1), 0 0.25rem 0.375rem -0.25rem rgb(0 0 0 / 0.1); +} + +ion-modal::part(backdrop) { + background: rgba(209, 213, 219); + opacity: 1; +} \ No newline at end of file diff --git a/src/app/components/bot-permission/bot-permission.component.spec.ts b/src/app/components/bot-permission/bot-permission.component.spec.ts new file mode 100644 index 0000000..f888ac8 --- /dev/null +++ b/src/app/components/bot-permission/bot-permission.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { BotPermissionComponent } from './bot-permission.component'; + +describe('BotAcceptComponent', () => { + let component: BotPermissionComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ BotPermissionComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(BotPermissionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/bot-permission/bot-permission.component.ts b/src/app/components/bot-permission/bot-permission.component.ts new file mode 100644 index 0000000..f8cdeef --- /dev/null +++ b/src/app/components/bot-permission/bot-permission.component.ts @@ -0,0 +1,31 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { ModalController, NavParams } from '@ionic/angular'; +import { StorageService } from 'src/app/services'; + +@Component({ + selector: 'app-bot-permission', + templateUrl: './bot-permission.component.html', + styleUrls: ['./bot-permission.component.scss'], +}) +export class BotPermissionComponent implements OnInit { + botType = ''; + botPremission: any = false; + constructor( + private router: Router, + private modal: ModalController, + private storage: StorageService, + private navParams: NavParams + ) { } + + async ngOnInit() { + this.botType = this.navParams.get('type') + } + + async handleClick(type: string) { + if(type == 'accept') { + await this.storage.setData(this.botType, 'true') + } + this.modal.dismiss({type}); + } +} diff --git a/src/app/components/components.module.ts b/src/app/components/components.module.ts index 20624bd..08bfd15 100644 --- a/src/app/components/components.module.ts +++ b/src/app/components/components.module.ts @@ -15,6 +15,7 @@ import { BotMessagesComponent } from './bot-messages/bot-messages.component'; import { AppExitComponent } from './app-exit/app-exit.component'; import { RecordingAlertComponent } from './recording-alert/recording-alert.component'; import { QrcodePopupComponent } from './qrcode-popup/qrcode-popup.component'; +import { BotPermissionComponent } from './bot-permission/bot-permission.component'; @NgModule({ declarations: [ @@ -28,7 +29,8 @@ import { QrcodePopupComponent } from './qrcode-popup/qrcode-popup.component'; BotMessagesComponent, AppExitComponent, RecordingAlertComponent, - QrcodePopupComponent + QrcodePopupComponent, + BotPermissionComponent ], imports: [ CommonModule, @@ -49,7 +51,8 @@ import { QrcodePopupComponent } from './qrcode-popup/qrcode-popup.component'; BotMessagesComponent, AppExitComponent, RecordingAlertComponent, - QrcodePopupComponent + QrcodePopupComponent, + BotPermissionComponent ], providers: [UtilService, TelemetryService, StorageService], schemas: [ diff --git a/src/app/pages/parent-sakhi/parent-sakhi.page.html b/src/app/pages/parent-sakhi/parent-sakhi.page.html index 5f4ea86..6d48ad1 100644 --- a/src/app/pages/parent-sakhi/parent-sakhi.page.html +++ b/src/app/pages/parent-sakhi/parent-sakhi.page.html @@ -1,3 +1,3 @@ - + diff --git a/src/app/pages/parent-sakhi/parent-sakhi.page.ts b/src/app/pages/parent-sakhi/parent-sakhi.page.ts index 04211ed..bbf54c1 100644 --- a/src/app/pages/parent-sakhi/parent-sakhi.page.ts +++ b/src/app/pages/parent-sakhi/parent-sakhi.page.ts @@ -1,23 +1,28 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { AppHeaderService, LocalNotificationService } from 'src/app/services'; +import { AppHeaderService, BotApiService, LocalNotificationService } from 'src/app/services'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; +import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; @Component({ selector: 'app-parent-sakhi', templateUrl: './parent-sakhi.page.html', styleUrls: ['./parent-sakhi.page.scss'], }) -export class ParentSakhiPage implements OnInit, OnDestroy { +export class ParentSakhiPage implements OnInit, OnTabViewWillEnter { config: any; cdata: any; duration: any; notification: any; notifSubscription: any; + botStartTimeStamp: any; + parentBotMsg = []; + parentBot = false; constructor(private headerService: AppHeaderService, private router: Router, private telemetry: TelemetryGeneratorService, - private localNotification: LocalNotificationService) { + private localNotification: LocalNotificationService, + private messageApi: BotApiService) { let extras = this.router.getCurrentNavigation()?.extras if(extras) { this.notification = extras?.state?.['notif']; @@ -25,7 +30,20 @@ export class ParentSakhiPage implements OnInit, OnDestroy { } ngOnInit() { - this.config = this.notification ? {type: 'parent', notif: this.notification} : {type: 'parent'} + this.parentBot = true + this.config = this.notification ? {type: 'parent', notif: this.notification, disable: this.parentBot} : {type: 'parent', disable: true} + this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { + console.log('bot message back event ', ev); + if(ev.name == 'backBtn') { + this.handleBackNavigation(); + } + }) + this.headerService.headerEventEmitted$.subscribe((name: any) => { + console.log('bot message back event '); + if(name == 'back') { + this.handleBackNavigation(); + } + }) } tabViewWillEnter(): void { @@ -33,29 +51,63 @@ export class ParentSakhiPage implements OnInit, OnDestroy { } ionViewWillEnter() { - this.config = this.notification ? {type: 'parent', notif: this.notification} : {type: 'parent'}; + this.parentBot = true + this.config = this.notification ? {type: 'parent', notif: this.notification, disable: true} : {type: 'parent', disable: true}; this.headerService.showHeader("Parent Tara", true, ['bot']); this.headerService.showStatusBar(false, '#FCB915'); + this.botStartTimeStamp = Date.now(); } ngAfterViewInit() { + this.parentBot = true this.notifSubscription = this.localNotification.notificationEventEmitted$.subscribe((notif: any) => { - this.config = {type: 'parent', notif: notif, notification: true} + this.config = {type: 'parent', notif: notif, notification: true, disable: true} }); } handleBotEvent(event?: any) { - if (event) { - this.cdata = { - "audioMessagesCount": event.audio, - "textMessagesCount": event.text - } - this.duration = event.duration; - } - this.router.navigate(['/tabs/home']); + this.parentBotMsg = event.msg } - ngOnDestroy() { - this.telemetry.generateEndTelemetry('bot', 'end', 'parent-sakhi', 'parent-sakhi', undefined, undefined, undefined, this.duration, this.cdata); - } + async handleBackNavigation() { + let botDuration = Date.now() - this.botStartTimeStamp; + if (this.parentBotMsg.length > 0) { + this.parentBotMsg.forEach((msg: any) => { + if (msg.messageType == 'audio') { + if(msg.audioRef) { + if(msg.audio) { + msg.audio.play = false; + } + msg.audioRef.pause(); + } + } + }); + } + await this.messageApi.getAllChatMessages(this.config.type).then((res) => { + let result = { audio: 0, text: 0 }; + if(res.length > 0) { + console.log('Bot response', res); + res.forEach(chat => { + if (chat.messageType == 'text') { + result.text++; + } else if (chat.messageType == 'audio') { + result.audio++; + } + }); + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + this.duration = botDuration/1000; + } else { + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + } + }) + this.parentBot = false; + this.telemetry.generateEndTelemetry('bot', 'end', 'parent-sakhi', 'parent-sakhi', undefined, undefined, undefined, this.duration, this.cdata); + this.router.navigate(['/tabs/home']); + } } diff --git a/src/app/pages/splash/splash.page.ts b/src/app/pages/splash/splash.page.ts index 6733e3a..321e7d7 100644 --- a/src/app/pages/splash/splash.page.ts +++ b/src/app/pages/splash/splash.page.ts @@ -37,6 +37,7 @@ export class SplashPage implements OnInit { this.apiService.onInit().subscribe(); let sid = uuidv4(); this.storage.setData("sid", sid); + this.setDefaultBotPermission(); this.appinitialise.initialize(); setTimeout(async () => { console.log('route'); @@ -73,6 +74,14 @@ export class SplashPage implements OnInit { } } + async setDefaultBotPermission() { + if (await this.storage.getData('story') == undefined || await this.storage.getData('teacher') === undefined || await this.storage.getData('parent') === undefined) { + this.storage.setData('story', 'false') + this.storage.setData('teacher', 'false') + this.storage.setData('parent', 'false') + } + } + async startTelemetry(): Promise { this.telemetryGeneratorService.genererateAppStartTelemetry(await this.utilService.getDeviceSpec()); } diff --git a/src/app/pages/story/story.page.html b/src/app/pages/story/story.page.html index 70d4d97..06baa0d 100644 --- a/src/app/pages/story/story.page.html +++ b/src/app/pages/story/story.page.html @@ -1,3 +1,3 @@ - + diff --git a/src/app/pages/story/story.page.ts b/src/app/pages/story/story.page.ts index 5919baa..5b5a6ab 100644 --- a/src/app/pages/story/story.page.ts +++ b/src/app/pages/story/story.page.ts @@ -1,5 +1,5 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AppHeaderService } from '../../../app/services'; +import { Component, OnInit } from '@angular/core'; +import { AppHeaderService, BotApiService } from '../../../app/services'; import { Router } from '@angular/router'; import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; @@ -9,16 +9,32 @@ import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry. templateUrl: 'story.page.html', styleUrls: ['story.page.scss'] }) -export class StoryPage implements OnInit, OnTabViewWillEnter, OnDestroy{ +export class StoryPage implements OnInit, OnTabViewWillEnter { config: any; cdata: any; duration: any; + botStartTimeStamp: any; + storyBotMsg = []; + storyBot = false; constructor(private headerService: AppHeaderService, private router: Router, - private telemetry: TelemetryGeneratorService) {} + private telemetry: TelemetryGeneratorService, + private messageApi: BotApiService) {} ngOnInit() { this.config = {type: 'story'} + this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { + console.log('bot message back event ', ev); + if(ev.name == 'backBtn') { + this.handleBackNavigation(); + } + }) + this.headerService.headerEventEmitted$.subscribe((name: any) => { + console.log('bot message back event '); + if(name == 'back') { + this.handleBackNavigation(); + } + }) } tabViewWillEnter(): void { @@ -26,23 +42,56 @@ export class StoryPage implements OnInit, OnTabViewWillEnter, OnDestroy{ } ionViewWillEnter() { - this.config = {type: 'story'} + this.storyBot = true + this.config = {type: 'story', disable: this.storyBot} this.headerService.showHeader("Katha Sakhi", true, ['bot']); this.headerService.showStatusBar(false, '#CF4147'); + this.botStartTimeStamp = Date.now(); } handleBotEvent(event?: any) { - if (event) { - this.cdata = { - "audioMessagesCount": event.audio, - "textMessagesCount": event.text - } - this.duration = event.duration; - } - this.router.navigate(['/tabs/home']); + this.storyBotMsg = event.msg } - - ngOnDestroy() { + + async handleBackNavigation() { + let botDuration = Date.now() - this.botStartTimeStamp; + if (this.storyBotMsg.length > 0) { + this.storyBotMsg.forEach((msg: any) => { + if (msg.messageType == 'audio') { + if(msg.audioRef) { + if(msg.audio) { + msg.audio.play = false; + } + msg.audioRef.pause(); + } + } + }); + } + await this.messageApi.getAllChatMessages(this.config.type).then((res) => { + let result = { audio: 0, text: 0 }; + if(res.length > 0) { + console.log('Bot response', res); + res.forEach(chat => { + if (chat.messageType == 'text') { + result.text++; + } else if (chat.messageType == 'audio') { + result.audio++; + } + }); + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + this.duration = botDuration/1000; + } else { + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + } + }) + this.storyBot = false; this.telemetry.generateEndTelemetry('bot', 'end', 'story-sakhi', 'story-sakhi', undefined, undefined, undefined, this.duration, this.cdata); + this.router.navigate(['/tabs/home']); } } diff --git a/src/app/pages/teacher-sakhi/teacher-sakhi.page.html b/src/app/pages/teacher-sakhi/teacher-sakhi.page.html index 5f4ea86..c8d6430 100644 --- a/src/app/pages/teacher-sakhi/teacher-sakhi.page.html +++ b/src/app/pages/teacher-sakhi/teacher-sakhi.page.html @@ -1,3 +1,3 @@ - + diff --git a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts index 8b7cc4b..1170f23 100644 --- a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts +++ b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts @@ -1,23 +1,40 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { AppHeaderService } from 'src/app/services'; +import { AppHeaderService, BotApiService } from 'src/app/services'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; +import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; @Component({ selector: 'app-teacher-sakhi', templateUrl: './teacher-sakhi.page.html', styleUrls: ['./teacher-sakhi.page.scss'], }) -export class TeacherSakhiPage implements OnInit, OnDestroy { +export class TeacherSakhiPage implements OnInit, OnTabViewWillEnter { config: any; cdata: any; duration: any; + botStartTimeStamp: any; + teacherBotMsg = []; + teacherBot = false; constructor(private headerService: AppHeaderService, private router: Router, - private telemetry: TelemetryGeneratorService) {} + private telemetry: TelemetryGeneratorService, + private messageApi: BotApiService) {} ngOnInit() { this.config = {type: 'teacher'}; + this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { + console.log('bot message back event ', ev); + if(ev.name == 'backBtn') { + this.handleBackNavigation(); + } + }) + this.headerService.headerEventEmitted$.subscribe((name: any) => { + console.log('bot message back event '); + if(name == 'back') { + this.handleBackNavigation(); + } + }) } tabViewWillEnter(): void { @@ -25,23 +42,56 @@ export class TeacherSakhiPage implements OnInit, OnDestroy { } ionViewWillEnter() { + this.teacherBot = true this.config = {type: 'teacher'} this.headerService.showHeader("Teacher Tara", true, ['bot']); this.headerService.showStatusBar(false, '#FCB915'); + this.botStartTimeStamp = Date.now(); } handleBotEvent(event?: any) { - if (event) { - this.cdata = { - "audioMessagesCount": event.audio, - "textMessagesCount": event.text - } - this.duration = event.duration; - } - this.router.navigate(['/tabs/home']); + this.teacherBotMsg = event.msg } - - ngOnDestroy() { + + async handleBackNavigation() { + let botDuration = Date.now() - this.botStartTimeStamp; + if (this.teacherBotMsg.length > 0) { + this.teacherBotMsg.forEach((msg: any) => { + if (msg.messageType == 'audio') { + if(msg.audioRef) { + if(msg.audio) { + msg.audio.play = false; + } + msg.audioRef.pause(); + } + } + }); + } + await this.messageApi.getAllChatMessages(this.config.type).then((res) => { + let result = { audio: 0, text: 0 }; + if(res.length > 0) { + console.log('Bot response', res); + res.forEach(chat => { + if (chat.messageType == 'text') { + result.text++; + } else if (chat.messageType == 'audio') { + result.audio++; + } + }); + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + this.duration = botDuration/1000; + } else { + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + } + }) + this.teacherBot = false; this.telemetry.generateEndTelemetry('bot', 'end', 'teacher-sakhi', 'teacher-sakhi', undefined, undefined, undefined, this.duration, this.cdata); + this.router.navigate(['/tabs/home']); } } diff --git a/src/app/services/tabs.service.ts b/src/app/services/tabs.service.ts index 0894f73..a7b4a45 100644 --- a/src/app/services/tabs.service.ts +++ b/src/app/services/tabs.service.ts @@ -12,6 +12,7 @@ export class TabsService { Object.keys(tabs).map((key: any) => { if((tabs[key] as any).style.transform !== 'translateY(5rem)') { (tabs[key]).style.transform = 'translateY(5rem)'; + (tabs[key]).style.display = 'none' } }); Object.keys(tabsHome).map((key: any) => { @@ -40,6 +41,7 @@ export class TabsService { Object.keys(tabs).map((key: any) => { if((tabs[key] as any).style.transform !== 'translateY(0px)') { (tabs[key] as any).style.transform = 'translateY(0px)'; + (tabs[key] as any).style.display = 'flex' } }); } diff --git a/src/app/tabs/tabs.page.ts b/src/app/tabs/tabs.page.ts index 4e2d653..dfdad56 100644 --- a/src/app/tabs/tabs.page.ts +++ b/src/app/tabs/tabs.page.ts @@ -1,11 +1,11 @@ import { Component, ViewChild } from '@angular/core'; import { IonTabs, ModalController, Platform } from '@ionic/angular'; import { OnTabViewWillEnter } from './on-tabs-view-will-enter'; -import { Router } from '@angular/router'; import { TabsService } from '../services/tabs.service'; import { TelemetryGeneratorService } from '../services/telemetry/telemetry.generator.service'; import { AppExitComponent } from '../components/app-exit/app-exit.component'; import { App } from '@capacitor/app'; +import { AppHeaderService } from '../services'; @Component({ selector: 'app-tabs', @@ -17,10 +17,10 @@ export class TabsPage implements OnTabViewWillEnter{ optModalOpen = false; @ViewChild('tabRef', { static: false }) tabRef!: IonTabs; constructor(private platform: Platform, - private router: Router, private tabService: TabsService, private telemetry: TelemetryGeneratorService, - private modalCtrl: ModalController) { + private modalCtrl: ModalController, + private headerService: AppHeaderService) { } tabViewWillEnter(): void { @@ -30,30 +30,34 @@ export class TabsPage implements OnTabViewWillEnter{ // Prevent back naviagtion ionViewDidEnter() { this.tabService.show() - this.subscription = this.platform.backButton.subscribeWithPriority(9999, async () => { + this.subscription = this.platform.backButton.subscribeWithPriority(9999, async (event) => { // do nothing let modal: any; - if (!this.optModalOpen) { - this.optModalOpen = true; - modal = await this.modalCtrl.create({ - component: AppExitComponent, - cssClass: 'sheet-modal', - breakpoints: [0.2], - showBackdrop: false, - backdropDismiss: false, - initialBreakpoint: 0.2, - handle: false, - handleBehavior: "none" + if(document?.location?.pathname === '/tabs/home' || this.tabRef.outlet.activatedView?.url === '/tabs/home') { + if (!this.optModalOpen) { + this.optModalOpen = true; + modal = await this.modalCtrl.create({ + component: AppExitComponent, + cssClass: 'sheet-modal', + breakpoints: [0.2], + showBackdrop: false, + backdropDismiss: false, + initialBreakpoint: 0.2, + handle: false, + handleBehavior: "none" + }); + await modal.present(); + } + + modal.onDidDismiss().then((result: any) => { + this.optModalOpen = false; + if (result.data && result.data) { + App.exitApp(); + } }); - await modal.present(); + } else { + this.headerService.deviceBackBtnEvent({ name: 'backBtn' }) } - - modal.onDidDismiss().then((result: any) => { - this.optModalOpen = false; - if (result.data && result.data) { - App.exitApp(); - } - }); } )} @@ -71,15 +75,14 @@ export class TabsPage implements OnTabViewWillEnter{ if(event.tab == 'story') { this.tabService.hide(); this.telemetry.generateStartTelemetry('bot', 'story-sakhi'); - this.router.navigate(['/story']) } else if(event.tab == 'parent-sakhi') { this.tabService.hide(); this.telemetry.generateStartTelemetry('bot', 'parent-sakhi'); - this.router.navigate(['/parent-sakhi']) } else if(event.tab == 'teacher-sakhi') { this.tabService.hide(); this.telemetry.generateStartTelemetry('bot', 'teacher-sakhi'); - this.router.navigate(['/teacher-sakhi']) + } else if(event.tab == 'home') { + this.tabService.show(); } } } diff --git a/src/assets/i18n/as.json b/src/assets/i18n/as.json index 664da37..bb9ef06 100644 --- a/src/assets/i18n/as.json +++ b/src/assets/i18n/as.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/bn.json b/src/assets/i18n/bn.json index 770b38c..7b23645 100644 --- a/src/assets/i18n/bn.json +++ b/src/assets/i18n/bn.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/bo.json b/src/assets/i18n/bo.json index 931de75..7f9a031 100644 --- a/src/assets/i18n/bo.json +++ b/src/assets/i18n/bo.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/do.json b/src/assets/i18n/do.json index 1bd9c9d..e20df2d 100644 --- a/src/assets/i18n/do.json +++ b/src/assets/i18n/do.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 3a7eb0a..8be022c 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/gu.json b/src/assets/i18n/gu.json index 17f8724..ef50796 100644 --- a/src/assets/i18n/gu.json +++ b/src/assets/i18n/gu.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json index 627caa7..62c1257 100644 --- a/src/assets/i18n/hi.json +++ b/src/assets/i18n/hi.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/kn.json b/src/assets/i18n/kn.json index 508d6ce..8b35b90 100644 --- a/src/assets/i18n/kn.json +++ b/src/assets/i18n/kn.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index c3c0bd6..8d427b9 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ks.json b/src/assets/i18n/ks.json index bfcc1ea..eddc317 100644 --- a/src/assets/i18n/ks.json +++ b/src/assets/i18n/ks.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ma.json b/src/assets/i18n/ma.json index 9d054f1..9fa23c1 100644 --- a/src/assets/i18n/ma.json +++ b/src/assets/i18n/ma.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ml.json b/src/assets/i18n/ml.json index 2b1f04d..aa692db 100644 --- a/src/assets/i18n/ml.json +++ b/src/assets/i18n/ml.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/mn.json b/src/assets/i18n/mn.json index ee2b026..9babe44 100644 --- a/src/assets/i18n/mn.json +++ b/src/assets/i18n/mn.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/mr.json b/src/assets/i18n/mr.json index 31a684a..954bbcf 100644 --- a/src/assets/i18n/mr.json +++ b/src/assets/i18n/mr.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ne.json b/src/assets/i18n/ne.json index 5378a86..ed7a96a 100644 --- a/src/assets/i18n/ne.json +++ b/src/assets/i18n/ne.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/or.json b/src/assets/i18n/or.json index 6424d6e..baf6253 100644 --- a/src/assets/i18n/or.json +++ b/src/assets/i18n/or.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } diff --git a/src/assets/i18n/pa.json b/src/assets/i18n/pa.json index d8b1898..3f07b49 100644 --- a/src/assets/i18n/pa.json +++ b/src/assets/i18n/pa.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/sa.json b/src/assets/i18n/sa.json index c114441..f02c792 100644 --- a/src/assets/i18n/sa.json +++ b/src/assets/i18n/sa.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/si.json b/src/assets/i18n/si.json index f664879..a08a7e3 100644 --- a/src/assets/i18n/si.json +++ b/src/assets/i18n/si.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/st.json b/src/assets/i18n/st.json index bb5617c..7e40e3d 100644 --- a/src/assets/i18n/st.json +++ b/src/assets/i18n/st.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ta.json b/src/assets/i18n/ta.json index 1f7d2de..a660adc 100644 --- a/src/assets/i18n/ta.json +++ b/src/assets/i18n/ta.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/te.json b/src/assets/i18n/te.json index 2811a00..b9465dc 100644 --- a/src/assets/i18n/te.json +++ b/src/assets/i18n/te.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file diff --git a/src/assets/i18n/ur.json b/src/assets/i18n/ur.json index 5f8b152..2b63bec 100644 --- a/src/assets/i18n/ur.json +++ b/src/assets/i18n/ur.json @@ -77,5 +77,7 @@ "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching..." + "Searching...": "Searching...", + "Decline": "Decline", + "Accept": "Accept" } \ No newline at end of file From 5dbdf9ce8176211c01a9123639dd965d4f82e1e3 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Fri, 22 Mar 2024 16:51:47 +0530 Subject: [PATCH 3/8] Issue #ED-0000 fix: handle popup on device back button --- src/app/pages/parent-sakhi/parent-sakhi.page.ts | 7 ++++++- src/app/pages/story/story.page.ts | 7 ++++++- src/app/pages/teacher-sakhi/teacher-sakhi.page.ts | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/app/pages/parent-sakhi/parent-sakhi.page.ts b/src/app/pages/parent-sakhi/parent-sakhi.page.ts index bbf54c1..b8ed2a2 100644 --- a/src/app/pages/parent-sakhi/parent-sakhi.page.ts +++ b/src/app/pages/parent-sakhi/parent-sakhi.page.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; import { AppHeaderService, BotApiService, LocalNotificationService } from 'src/app/services'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; @@ -22,7 +23,8 @@ export class ParentSakhiPage implements OnInit, OnTabViewWillEnter { private router: Router, private telemetry: TelemetryGeneratorService, private localNotification: LocalNotificationService, - private messageApi: BotApiService) { + private messageApi: BotApiService, + private modalCtrl: ModalController) { let extras = this.router.getCurrentNavigation()?.extras if(extras) { this.notification = extras?.state?.['notif']; @@ -35,6 +37,9 @@ export class ParentSakhiPage implements OnInit, OnTabViewWillEnter { this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { console.log('bot message back event ', ev); if(ev.name == 'backBtn') { + if(this.modalCtrl) { + this.modalCtrl.dismiss({type: 'decline'}) + } this.handleBackNavigation(); } }) diff --git a/src/app/pages/story/story.page.ts b/src/app/pages/story/story.page.ts index 5b5a6ab..bd7bf2c 100644 --- a/src/app/pages/story/story.page.ts +++ b/src/app/pages/story/story.page.ts @@ -3,6 +3,7 @@ import { AppHeaderService, BotApiService } from '../../../app/services'; import { Router } from '@angular/router'; import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; +import { ModalController } from '@ionic/angular'; @Component({ selector: 'app-story', @@ -19,13 +20,17 @@ export class StoryPage implements OnInit, OnTabViewWillEnter { constructor(private headerService: AppHeaderService, private router: Router, private telemetry: TelemetryGeneratorService, - private messageApi: BotApiService) {} + private messageApi: BotApiService, + private modalCtrl: ModalController) {} ngOnInit() { this.config = {type: 'story'} this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { console.log('bot message back event ', ev); if(ev.name == 'backBtn') { + if(this.modalCtrl) { + this.modalCtrl.dismiss({type: 'decline'}) + } this.handleBackNavigation(); } }) diff --git a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts index 1170f23..e2310a0 100644 --- a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts +++ b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; import { AppHeaderService, BotApiService } from 'src/app/services'; import { TelemetryGeneratorService } from 'src/app/services/telemetry/telemetry.generator.service'; import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter'; @@ -19,13 +20,17 @@ export class TeacherSakhiPage implements OnInit, OnTabViewWillEnter { constructor(private headerService: AppHeaderService, private router: Router, private telemetry: TelemetryGeneratorService, - private messageApi: BotApiService) {} + private messageApi: BotApiService, + private modalCtrl: ModalController) {} ngOnInit() { this.config = {type: 'teacher'}; this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { console.log('bot message back event ', ev); if(ev.name == 'backBtn') { + if(this.modalCtrl) { + this.modalCtrl.dismiss({type: 'decline'}) + } this.handleBackNavigation(); } }) From cb8906c30c5aedf1629071fe126d07248969cd3d Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 25 Mar 2024 10:44:30 +0530 Subject: [PATCH 4/8] Issue #ED-0000 fix: updated translation strings --- .../bot-permission.component.html | 2 +- src/assets/i18n/as.json | 9 +++-- src/assets/i18n/bn.json | 39 ++++++++++--------- src/assets/i18n/bo.json | 9 +++-- src/assets/i18n/do.json | 9 +++-- src/assets/i18n/en.json | 9 +++-- src/assets/i18n/gu.json | 9 +++-- src/assets/i18n/hi.json | 9 +++-- src/assets/i18n/kn.json | 9 +++-- src/assets/i18n/ko.json | 9 +++-- src/assets/i18n/ks.json | 9 +++-- src/assets/i18n/ma.json | 9 +++-- src/assets/i18n/ml.json | 9 +++-- src/assets/i18n/mn.json | 9 +++-- src/assets/i18n/mr.json | 9 +++-- src/assets/i18n/ne.json | 9 +++-- src/assets/i18n/or.json | 9 +++-- src/assets/i18n/pa.json | 9 +++-- src/assets/i18n/sa.json | 9 +++-- src/assets/i18n/si.json | 9 +++-- src/assets/i18n/st.json | 9 +++-- src/assets/i18n/ta.json | 9 +++-- src/assets/i18n/te.json | 9 +++-- src/assets/i18n/ur.json | 9 +++-- 24 files changed, 154 insertions(+), 85 deletions(-) diff --git a/src/app/components/bot-permission/bot-permission.component.html b/src/app/components/bot-permission/bot-permission.component.html index 892fc55..b73b066 100644 --- a/src/app/components/bot-permission/bot-permission.component.html +++ b/src/app/components/bot-permission/bot-permission.component.html @@ -1,7 +1,7 @@
- {{'Welcome to bot message, please accept to continue bot' | translate}} + {{'DISCLAIMER_BOT_MSG' | translate}} diff --git a/src/assets/i18n/as.json b/src/assets/i18n/as.json index bb9ef06..b998a5d 100644 --- a/src/assets/i18n/as.json +++ b/src/assets/i18n/as.json @@ -73,11 +73,14 @@ "My Pitara": "মোৰ পিটাৰা", "Jaadui Pitara Box": "জাদুই পিটাৰা বাকচ", "Download and Add": "ডাউনলোড আৰু যোগ কৰক", + "DISCLAIMER_BOT_MSG": "অস্বীকাৰ: \n বটবোৰে Generative AI প্ৰযুক্তি ব্যৱহাৰ কৰে যিটো ১০০% সঠিক নহ’বও পাৰে। সেয়েহে বটসমূহে দিয়া সঁহাৰিসমূহৰ বিষয়বস্তু আৰু ভাষাত ভুল থাকিব পাৰে। সঁহাৰিসমূহ কেৱল ইংগিতদায়ক আৰু আপোনাৰ আৰু আপোনাৰ প্ৰসংগৰ বাবে ইয়াৰ উপযুক্ততা আৰু প্ৰাসংগিকতা নিৰ্ণয় কৰি সাৱধানে ব্যৱহাৰ কৰিব লাগিব। আগবাঢ়ি গৈ আপুনি এইটো সম্পূৰ্ণৰূপে বুজি পাইছে আৰু মানি লৈছে", + "Accept": "গ্ৰহণ কৰা", + "Decline": "অস্বীকাৰ কৰা", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/bn.json b/src/assets/i18n/bn.json index 7b23645..3782b68 100644 --- a/src/assets/i18n/bn.json +++ b/src/assets/i18n/bn.json @@ -1,21 +1,21 @@ { - "e-Jaadui Pitara": "ইংরেজি পাঠ্য", - "All": "e-জাদুই পিটারা", - "Rhymes": "সব", - "Stories": "ছড়া", - "For Teachers": "গল্পসমূহ", - "Activities": "শিক্ষকদের জন্য", - "Cards": "কার্যক্রম", - "Puzzles": "তাস", - "Posters": "ধাঁধা", - "Search": "পোস্টার", - "Home": "অনুসন্ধান করুন", + "e-Jaadui Pitara": "ই-জাদুই পিটারা", + "All": "সব", + "Rhymes": "ছড়া", + "Stories": "গল্পসমূহ", + "For Teachers": "শিক্ষকদের জন্য", + "Activities": "কার্যক্রম", + "Cards": "তাস", + "Puzzles": "ধাঁধা", + "Posters": "পোস্টার", + "Search": "অনুসন্ধান করুন", + "Home": "হোম", "Katha Sakhi": "কথা সখি", "Teacher Tara": "শিক্ষক তারা", "Parent Tara": "অভিভাৱক তারা", "Like": "লাইক", "Share": "শেয়ার করুন", - "Add to My Pitara": "আমার Pitara যোগ করুন", + "Add to My Pitara": "আমার পিটারা যোগ করুন", "New playlist": "নতুন তালিকা", "Done": "সম্পন্ন", "My Jaadui Pitara": "আমার জাদুই পিটারা", @@ -34,16 +34,16 @@ "No contents viewed": "কোন বিষয়বস্তু দেখা", "Click on New Playlist button to create your first playlist": "আপনার প্রথম প্লেলিস্ট তৈরি করতে নতুন প্লেলিস্ট বোতামে ক্লিক করুন", "My Playlist": "আমার প্লেলিস্ট", - "Select from Recently Viewed": "Recently Viewed থেকে নির্বাচন করুন", + "Select from Recently Viewed": "সম্প্রতি দেখা থেকে নির্বাচন করুন", "SEARCH_HINT": "অনুসন্ধান করুন", "No Result": "কোন ফলাফল নেই", "QR Scan Result": "QR স্ক্যান ফলাফল", "edit": "সম্পাদনা করুন", "delete": "মুছে ফেলা", "create New Playlist": "নতুন প্লেলিস্ট তৈরি", - "WELCOME_TO_STORY_SAKHI": "কথা সখিতে স্বাগতম! \n আপনি যা চাইছেন তা নিয়ে আমি আপনার জন্য একটি গল্প তৈরি করতে পারি। \n \n উদাহরণ স্বরূপ: \n - আমি একটি মেয়ের গল্প বলতে পারি যে প্রথমবার সমুদ্র দেখেছিল। \n \n - আমি একটি বানর এবং একটি ব্যাঙ সম্পর্কে একটি গল্প বলতে পারি \n \n আপনি চান যে কিছু সম্পর্কে আমাকে জিজ্ঞাসা করুন. আপনি টাইপ বা কথা বলতে পারেন।", + "WELCOME_TO_STORY_SAKHI": "কথা সখিতে স্বাগতম!\n আপনি যা চাইছেন তা নিয়ে আমি আপনার জন্য একটি গল্প তৈরি করতে পারি। \nউদাহরণ স্বরূপ:\n- আমি একটি মেয়ের গল্প বলতে পারি যে প্রথমবার সমুদ্র দেখেছিল। \n- আমি একটি বানর এবং একটি ব্যাঙ সম্পর্কে একটি গল্প বলতে পারি \n আপনি চান যে কিছু সম্পর্কে আমাকে জিজ্ঞাসা করুন. আপনি টাইপ বা কথা বলতে পারেন।", "WELCOME_TO_TEACHER_SAKHI": "শিক্ষক তারাকে স্বাগতম! \n আমি আপনাকে এমন ক্রিয়াকলাপের পরামর্শ দিতে পারি যা আপনি স্কুলে আপনার ছাত্রদের (3 থেকে 8 বছর বয়সী) সাথে করতে পারেন। \n ফাউন্ডেশনাল স্টেজের জন্য নতুন NCF-এ প্রস্তাবিত নাটক ভিত্তিক শিক্ষার বিষয়েও আমি আপনার প্রশ্নের উত্তর দিতে পারি। \n আপনি যা জিজ্ঞাসা করতে পারেন তার কয়েকটি উদাহরণ এখানে রয়েছে। \n উদাহরণ: \n বাছাই করা বা সংখ্যা গণনা শেখানোর জন্য আমি শিক্ষার্থীদের সাথে কী কার্যকলাপ করতে পারি \n আমি কিভাবে বিশেষ চাহিদা সম্পন্ন শিশুদের সাথে আমার ক্লাস পরিচালনা করতে পারি \n আমি কি করতে পারি এমন একটি শিশুকে নিযুক্ত করতে যা সবসময় বিভ্রান্ত হয়। \n আমি নতুন NCF সম্পর্কে আপনার প্রশ্নের উত্তর দিতে পারি \n আপনি চান যে কিছু সম্পর্কে আমাকে জিজ্ঞাসা করুন. আপনি টাইপ বা কথা বলতে পারেন।", - "WELCOME_TO_PARENT_SAKHI": "পিতা মাতা তারার কাছে স্বাগতম! \n আমি আপনাকে এমন কার্যকলাপের পরামর্শ দিতে পারি যা আপনি বাড়িতে আপনার বাচ্চাদের সাথে করতে পারেন। আপনি যা জিজ্ঞাসা করতে পারেন তার কয়েকটি উদাহরণ এখানে রয়েছে: \n \n উদাহরণ: \n \n - আপনার রান্নাঘরে শাকসবজি ব্যবহার করে আমি আমার সন্তানের সাথে কী কাজ করতে পারি \n - আমি কীভাবে আমার সন্তানকে গৃহস্থালীর কাজে আগ্রহী করে তুলতে পারি তার পরামর্শ দিন \n - আমার সন্তান পুষ্টিকর খাবার খায় না, কী করব \n \n আপনি চান যে কিছু সম্পর্কে আমাকে জিজ্ঞাসা করুন. আপনি টাইপ বা কথা বলতে পারেন।", + "WELCOME_TO_PARENT_SAKHI": "পিতা মাতা তারার কাছে স্বাগতম! \n আমি আপনাকে এমন কার্যকলাপের পরামর্শ দিতে পারি যা আপনি বাড়িতে আপনার বাচ্চাদের সাথে করতে পারেন। আপনি যা জিজ্ঞাসা করতে পারেন তার কয়েকটি উদাহরণ এখানে রয়েছে: \n উদাহরণ: \n - আপনার রান্নাঘরে শাকসবজি ব্যবহার করে আমি আমার সন্তানের সাথে কী কাজ করতে পারি \n - আমি কীভাবে আমার সন্তানকে গৃহস্থালীর কাজে আগ্রহী করে তুলতে পারি তার পরামর্শ দিন \n - আমার সন্তান পুষ্টিকর খাবার খায় না, কী করব \n আপনি চান যে কিছু সম্পর্কে আমাকে জিজ্ঞাসা করুন. আপনি টাইপ বা কথা বলতে পারেন।", "Create": "সৃষ্টি", @@ -73,11 +73,14 @@ "My Pitara": "আমার পিটারা", "Jaadui Pitara Box": "জাদুই পিতর বক্স", "Download and Add": "ডাউনলোড করুন এবং যোগ করুন", + "DISCLAIMER_BOT_MSG": "দাবিত্যাগ: \n বটগুলি জেনারেটিভ এআই প্রযুক্তি ব্যবহার করে যা 100% সঠিক নাও হতে পারে। তাই বট দ্বারা প্রদত্ত প্রতিক্রিয়াগুলি তাদের বিষয়বস্তু এবং ভাষায় ভুল থাকতে পারে। প্রতিক্রিয়াগুলি নিছক ইঙ্গিতপূর্ণ এবং সতর্কতার সাথে ব্যবহার করা আবশ্যক এবং আপনার এবং আপনার প্রসঙ্গের উপযুক্ততা এবং প্রাসঙ্গিকতা নির্ধারণ করে। এগিয়ে যাওয়ার মাধ্যমে, আপনি এটি সম্পূর্ণরূপে বোঝেন এবং স্বীকার করেন", + "Accept": "গ্রহণ করুন", + "Decline": "প্রত্যাখ্যান", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/bo.json b/src/assets/i18n/bo.json index 7f9a031..20986ba 100644 --- a/src/assets/i18n/bo.json +++ b/src/assets/i18n/bo.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/do.json b/src/assets/i18n/do.json index e20df2d..7aa5f1c 100644 --- a/src/assets/i18n/do.json +++ b/src/assets/i18n/do.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "अस्वीकरण दी: \n बॉट जेनरेटिव ऐई तकनीक दा इस्तेमाल करदे न जेह् ड़ी 100% सटीक नेईं होई सकदी ऐ। इस करी बॉटें आसेआ दित्ते गेदे प्रतिक्रियाएं च उंदी सामग्री ते भाशा च गलती होई सकदी ऐ। प्रतिक्रियाएं सिर्फ सुझाऽ देने आह्ले न ते तुंदे ते तुंदे संदर्भ कन्नै इसदी उपयुक्तता ते प्रासंगिकता गी निर्धारत करने च सावधानी कन्नै इस्तेमाल कीता जाना लोड़चदा ऐ। अग्गें बधदे होई तुस इसगी पूरी चाल्ली समझदे ओ ते स्वीकार करदे ओ", + "Accept": "मंजूर करो", + "Decline": "पतन", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 8be022c..596b882 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/gu.json b/src/assets/i18n/gu.json index ef50796..62cc6db 100644 --- a/src/assets/i18n/gu.json +++ b/src/assets/i18n/gu.json @@ -73,11 +73,14 @@ "My Pitara": "મારો પિટારા", "Jaadui Pitara Box": "જાદુઈ પિટારા બોક્સ", "Download and Add": "ડાઉનલોડ કરો અને ઉમેરો", + "DISCLAIMER_BOT_MSG": "અસ્વીકરણ: \n બૉટો જનરેટિવ AI ટેક્નોલોજીનો ઉપયોગ કરે છે જે કદાચ 100% સચોટ ન હોય. આથી બૉટો દ્વારા આપવામાં આવેલા પ્રતિસાદોમાં તેમની સામગ્રી અને ભાષામાં ભૂલો હોઈ શકે છે. પ્રતિભાવો માત્ર સૂચક છે અને તેનો ઉપયોગ તમારા અને તમારા સંદર્ભ માટે તેની યોગ્યતા અને સુસંગતતા નક્કી કરતી સાવધાની સાથે થવો જોઈએ. આગળ વધવાથી, તમે આને સંપૂર્ણપણે સમજો છો અને સ્વીકારો છો", + "Accept": "સ્વીકારો", + "Decline": "નકાર", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json index 62c1257..d380756 100644 --- a/src/assets/i18n/hi.json +++ b/src/assets/i18n/hi.json @@ -73,11 +73,14 @@ "My Pitara": "मेरा पिटारा", "Jaadui Pitara Box": "जादुई पिटारा बॉक्स", "Download and Add": "डाउनलोड करें और जोड़ें", + "DISCLAIMER_BOT_MSG": "अस्वीकरण: \n बॉट जेनरेटिव एआई तकनीक का उपयोग करते हैं जो 100% सटीक नहीं हो सकता है। इसलिए बॉट्स द्वारा दी गई प्रतिक्रियाओं में उनकी सामग्री और भाषा में गलतियाँ हो सकती हैं। प्रतिक्रियाएँ केवल विचारोत्तेजक हैं और इनका उपयोग आपके और आपके संदर्भ के लिए इसकी उपयुक्तता और प्रासंगिकता का निर्धारण करते हुए सावधानी के साथ किया जाना चाहिए। आगे बढ़ते हुए, आप इसे पूरी तरह से समझते हैं और स्वीकार करते हैं", + "Accept": "स्वीकार करना", + "Decline": "गिरावट", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/kn.json b/src/assets/i18n/kn.json index 8b35b90..efd68ed 100644 --- a/src/assets/i18n/kn.json +++ b/src/assets/i18n/kn.json @@ -73,11 +73,14 @@ "My Pitara": "ನನ್ನ ಪೆಟ್ಟಿಗೆ", "Jaadui Pitara Box": "ಜಾದುಯಿ ಪಿಟಾರಾ ಬಾಕ್ಸ್", "Download and Add": "ಡೌನ್‌ಲೋಡ್ ಮಾಡಿ ಮತ್ತು ಸೇರಿಸಿ", + "DISCLAIMER_BOT_MSG": "ಹಕ್ಕು ನಿರಾಕರಣೆ: \n ಬಾಟ್‌ಗಳು ಜನರೇಟಿವ್ ಎಐ ತಂತ್ರಜ್ಞಾನವನ್ನು ಬಳಸುತ್ತವೆ ಅದು 100% ನಿಖರವಾಗಿರುವುದಿಲ್ಲ. ಆದ್ದರಿಂದ ಬಾಟ್‌ಗಳು ನೀಡಿದ ಪ್ರತಿಕ್ರಿಯೆಗಳು ಅವುಗಳ ವಿಷಯ ಮತ್ತು ಭಾಷೆಯಲ್ಲಿ ತಪ್ಪುಗಳನ್ನು ಹೊಂದಿರಬಹುದು. ಪ್ರತಿಕ್ರಿಯೆಗಳು ಕೇವಲ ಸೂಚಿಸುವಂತಿವೆ ಮತ್ತು ನಿಮಗೆ ಮತ್ತು ನಿಮ್ಮ ಸಂದರ್ಭಕ್ಕೆ ಅದರ ಸೂಕ್ತತೆ ಮತ್ತು ಪ್ರಸ್ತುತತೆಯನ್ನು ನಿರ್ಧರಿಸಲು ಎಚ್ಚರಿಕೆಯಿಂದ ಬಳಸಬೇಕು. ಮುಂದುವರಿಯುವ ಮೂಲಕ, ನೀವು ಇದನ್ನು ಸಂಪೂರ್ಣವಾಗಿ ಅರ್ಥಮಾಡಿಕೊಳ್ಳುತ್ತೀರಿ ಮತ್ತು ಸ್ವೀಕರಿಸುತ್ತೀರಿ", + "Accept": "ಒಪ್ಪಿಕೊಳ್ಳಿ", + "Decline": "ನಿರಾಕರಿಸು", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 8d427b9..8428c69 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ks.json b/src/assets/i18n/ks.json index eddc317..ae3de30 100644 --- a/src/assets/i18n/ks.json +++ b/src/assets/i18n/ks.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ma.json b/src/assets/i18n/ma.json index 9fa23c1..b2eef24 100644 --- a/src/assets/i18n/ma.json +++ b/src/assets/i18n/ma.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "अस्वीकरण: \n बॉट मे जेनरेटिव एआई तकनीक क उपयोग कैल गेल अछि जे शायद 100% सटीक नहि भ सकैत अछि । अतः बॉट द्वारा देल गेल प्रतिक्रिया मे ओकर सामग्री आ भाषा मे गलती भ सकैत अछि । प्रतिक्रिया सब मात्र सुझावात्मक अछि आ एकर उपयोग सावधानीपूर्वक करबाक चाही जे एकर उपयुक्तता आ अहाँक आ अहाँक संदर्भक लेल प्रासंगिकता निर्धारित कयल जाय । आगू बढ़ि क' अहाँ एकरा पूर्ण रूपेण बुझैत छी आ स्वीकार करैत छी", + "Accept": "स्वीकार", + "Decline": "अवनति", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ml.json b/src/assets/i18n/ml.json index aa692db..85f5b98 100644 --- a/src/assets/i18n/ml.json +++ b/src/assets/i18n/ml.json @@ -73,11 +73,14 @@ "My Pitara": "എന്റെ പിടാര", "Jaadui Pitara Box": "ജാദുയി പിതാര ബോക്സ്", "Download and Add": "ഡൗൺലോഡ് ചെയ്ത് ചേർക്കുക", + "DISCLAIMER_BOT_MSG": "നിരാകരണം: \n ബോട്ടുകൾ ജനറേറ്റീവ് AI സാങ്കേതികവിദ്യ ഉപയോഗിക്കുന്നു, അത് 100% കൃത്യമല്ല. അതിനാൽ ബോട്ടുകൾ നൽകുന്ന പ്രതികരണങ്ങളിൽ അവയുടെ ഉള്ളടക്കത്തിലും ഭാഷയിലും തെറ്റുകൾ ഉണ്ടായേക്കാം. പ്രതികരണങ്ങൾ കേവലം നിർദേശിക്കുന്നവയാണ്, നിങ്ങൾക്കും നിങ്ങളുടെ സന്ദർഭത്തിനും അതിൻ്റെ അനുയോജ്യതയും പ്രസക്തിയും നിർണ്ണയിക്കാൻ ജാഗ്രതയോടെ ഉപയോഗിക്കണം. തുടരുന്നതിലൂടെ, നിങ്ങൾ ഇത് പൂർണ്ണമായും മനസ്സിലാക്കുകയും അംഗീകരിക്കുകയും ചെയ്യുന്നു", + "Accept": "സ്വീകരിക്കുക", + "Decline": "നിരസിക്കുക", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/mn.json b/src/assets/i18n/mn.json index 9babe44..f1a898e 100644 --- a/src/assets/i18n/mn.json +++ b/src/assets/i18n/mn.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/mr.json b/src/assets/i18n/mr.json index 954bbcf..550297f 100644 --- a/src/assets/i18n/mr.json +++ b/src/assets/i18n/mr.json @@ -73,11 +73,14 @@ "My Pitara": "माझा पिटारा", "Jaadui Pitara Box": "जादुई पिटारा पेटी", "Download and Add": "डाउनलोड करा आणि जोडा", + "DISCLAIMER_BOT_MSG": "अस्वीकरण: \n बॉट्स जनरेटिव्ह एआय तंत्रज्ञान वापरतात जे 100% अचूक असू शकत नाहीत. त्यामुळे बॉट्सने दिलेल्या प्रतिसादात त्यांच्या मजकुरात आणि भाषेत चुका असू शकतात. प्रतिसाद फक्त सूचक आहेत आणि ते तुमच्यासाठी आणि तुमच्या संदर्भाशी सुसंगतता आणि सुसंगतता ठरवून सावधगिरीने वापरले पाहिजेत. पुढे जाऊन, तुम्ही हे पूर्णपणे समजून घेता आणि स्वीकारता", + "Accept": "स्वीकारा", + "Decline": "नकार", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ne.json b/src/assets/i18n/ne.json index ed7a96a..f786fc9 100644 --- a/src/assets/i18n/ne.json +++ b/src/assets/i18n/ne.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "अस्वीकरण: \n बटहरूले जेनेरेटिभ एआई टेक्नोलोजी प्रयोग गर्दछ जुन 100% सही नहुन सक्छ। तसर्थ बट्स द्वारा दिइएका प्रतिक्रियाहरूमा तिनीहरूको सामग्री र भाषामा त्रुटिहरू हुन सक्छन्। प्रतिक्रियाहरू केवल सुझावात्मक छन् र सावधानीका साथ यसको उपयुक्तता र तपाईं र तपाईंको सन्दर्भमा प्रासंगिकता निर्धारण गर्न प्रयोग गर्नुपर्छ। अगाडि बढेर, तपाइँ यसलाई पूर्ण रूपमा बुझ्नुहुन्छ र स्वीकार गर्नुहुन्छ", + "Accept": "स्वीकार गर्नुहोस्", + "Decline": "अस्वीकार गर्नुहोस्", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/or.json b/src/assets/i18n/or.json index baf6253..204f4c3 100644 --- a/src/assets/i18n/or.json +++ b/src/assets/i18n/or.json @@ -73,11 +73,14 @@ "My Pitara": "ମୋର ପିଟାରା |", "Jaadui Pitara Box": "ଜାଡୁଇ ପିଟାରା ବାକ୍ସ |", "Download and Add": "ଡାଉନଲୋଡ୍ ଏବଂ ଯୋଡନ୍ତୁ |", + "DISCLAIMER_BOT_MSG": "ପ୍ରତ୍ୟାଖ୍ୟାନ | \n ବଟ୍ଗୁଡ଼ିକ ଜେନେରେଟିଭ୍ AI ଟେକ୍ନୋଲୋଜି ବ୍ୟବହାର କରେ ଯାହା 100% ସଠିକ୍ ହୋଇନପାରେ | ତେଣୁ ବଟ୍ ଦ୍ୱାରା ଦିଆଯାଇଥିବା ପ୍ରତିକ୍ରିୟାଗୁଡ଼ିକରେ ସେମାନଙ୍କର ବିଷୟବସ୍ତୁ ଏବଂ ଭାଷାରେ ତ୍ରୁଟି ରହିପାରେ | ପ୍ରତିକ୍ରିୟାଗୁଡ଼ିକ କେବଳ ପରାମର୍ଶଦାୟକ ଏବଂ ତୁମ ଏବଂ ତୁମର ପ୍ରସଙ୍ଗ ପାଇଁ ଏହାର ଉପଯୁକ୍ତତା ଏବଂ ପ୍ରାସଙ୍ଗିକତା ନିର୍ଣ୍ଣୟ କରି ସତର୍କତାର ସହିତ ବ୍ୟବହାର କରାଯିବା ଆବଶ୍ୟକ | ଅଗ୍ରଗତି କରି, ଆପଣ ଏହାକୁ ସମ୍ପୂର୍ଣ୍ଣ ଭାବରେ ବୁ ନ୍ତି ଏବଂ ଗ୍ରହଣ କରନ୍ତି |", + "Accept": "ଗ୍ରହଣ କରନ୍ତୁ |", + "Decline": "ଅଗ୍ରାହ୍ୟ କରନ୍ତୁ |", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } diff --git a/src/assets/i18n/pa.json b/src/assets/i18n/pa.json index 3f07b49..6ccb22d 100644 --- a/src/assets/i18n/pa.json +++ b/src/assets/i18n/pa.json @@ -73,11 +73,14 @@ "My Pitara": "ਮੇਰਾ ਪੀਤਾਰਾ", "Jaadui Pitara Box": "ਜਾਦੁਈ ਪਿਟਾਰਾ ਡੱਬਾ", "Download and Add": "ਡਾਊਨਲੋਡ ਕਰੋ ਅਤੇ ਸ਼ਾਮਲ ਕਰੋ", + "DISCLAIMER_BOT_MSG": "ਬੇਦਾਅਵਾ: \n ਬੋਟ ਜਨਰੇਟਿਵ AI ਤਕਨਾਲੋਜੀ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹਨ ਜੋ 100% ਸਹੀ ਨਹੀਂ ਹੋ ਸਕਦੀ। ਇਸ ਲਈ ਬੋਟਾਂ ਦੁਆਰਾ ਦਿੱਤੇ ਗਏ ਜਵਾਬਾਂ ਵਿੱਚ ਉਹਨਾਂ ਦੀ ਸਮੱਗਰੀ ਅਤੇ ਭਾਸ਼ਾ ਵਿੱਚ ਗਲਤੀਆਂ ਹੋ ਸਕਦੀਆਂ ਹਨ। ਜਵਾਬ ਸਿਰਫ਼ ਸੁਝਾਅ ਦੇਣ ਵਾਲੇ ਹਨ ਅਤੇ ਤੁਹਾਡੇ ਅਤੇ ਤੁਹਾਡੇ ਸੰਦਰਭ ਲਈ ਇਸਦੀ ਅਨੁਕੂਲਤਾ ਅਤੇ ਪ੍ਰਸੰਗਿਕਤਾ ਨੂੰ ਨਿਰਧਾਰਤ ਕਰਦੇ ਹੋਏ ਸਾਵਧਾਨੀ ਨਾਲ ਵਰਤੇ ਜਾਣੇ ਚਾਹੀਦੇ ਹਨ। ਅੱਗੇ ਵਧਣ ਨਾਲ, ਤੁਸੀਂ ਇਸ ਨੂੰ ਪੂਰੀ ਤਰ੍ਹਾਂ ਸਮਝਦੇ ਹੋ ਅਤੇ ਸਵੀਕਾਰ ਕਰਦੇ ਹੋ", + "Accept": "ਸਵੀਕਾਰ ਕਰੋ", + "Decline": "ਅਸਵੀਕਾਰ ਕਰੋ", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/sa.json b/src/assets/i18n/sa.json index f02c792..cb85468 100644 --- a/src/assets/i18n/sa.json +++ b/src/assets/i18n/sa.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "अस्वीकरणम्: \n बॉट्स् Generative AI प्रौद्योगिकीम् उपयुञ्जते यत् शतप्रतिशतम् सटीकं न भवेत्। अतः बोट्-द्वारा दत्तानां प्रतिक्रियाणां विषयवस्तुभाषायां च त्रुटिः भवितुम् अर्हति । प्रतिक्रियाः केवलं सूचकाः सन्ति, तेषां भवतः सन्दर्भे च तस्य उपयुक्ततां प्रासंगिकतां च निर्धारयन् सावधानीपूर्वकं उपयोगः करणीयः । अग्रे गत्वा भवन्तः एतत् सम्पूर्णतया अवगच्छन्ति, स्वीकुर्वन्ति च", + "Accept": "स्वीकरोतु", + "Decline": "अस्वीकरोतु", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/si.json b/src/assets/i18n/si.json index a08a7e3..198468f 100644 --- a/src/assets/i18n/si.json +++ b/src/assets/i18n/si.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/st.json b/src/assets/i18n/st.json index 7e40e3d..710ff9c 100644 --- a/src/assets/i18n/st.json +++ b/src/assets/i18n/st.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ta.json b/src/assets/i18n/ta.json index a660adc..b81d10b 100644 --- a/src/assets/i18n/ta.json +++ b/src/assets/i18n/ta.json @@ -73,11 +73,14 @@ "My Pitara": "என் பிடாரா", "Jaadui Pitara Box": "ஜாதுயி பிட்டாரா பெட்டி", "Download and Add": "பதிவிறக்கம் செய்து சேர்க்கவும்", + "DISCLAIMER_BOT_MSG": "மறுப்பு: \n போட்கள் ஜெனரேட்டிவ் AI தொழில்நுட்பத்தைப் பயன்படுத்துகின்றன, இது 100% துல்லியமாக இருக்காது. எனவே போட்கள் அளித்த பதில்கள் அவற்றின் உள்ளடக்கம் மற்றும் மொழியில் தவறுகளைக் கொண்டிருக்கலாம். பதில்கள் பரிந்துரைக்கக்கூடியவை மற்றும் உங்களுக்கும் உங்கள் சூழலுக்கும் அதன் பொருத்தம் மற்றும் பொருத்தத்தை தீர்மானிக்க எச்சரிக்கையுடன் பயன்படுத்தப்பட வேண்டும். தொடர்வதன் மூலம், நீங்கள் இதை முழுமையாக புரிந்துகொண்டு ஏற்றுக்கொள்கிறீர்கள்", + "Accept": "ஏற்றுக்கொள்", + "Decline": "நிராகரி", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/te.json b/src/assets/i18n/te.json index b9465dc..6d54d58 100644 --- a/src/assets/i18n/te.json +++ b/src/assets/i18n/te.json @@ -73,11 +73,14 @@ "My Pitara": "నా పిటారా", "Jaadui Pitara Box": "జాదూయీ పిటారా బాక్స్", "Download and Add": "డౌన్‌లోడ్ చేసి జోడించండి", + "DISCLAIMER_BOT_MSG": "నిరాకరణ: \n బాట్‌లు జనరేటివ్ AI సాంకేతికతను ఉపయోగిస్తాయి, ఇది 100% ఖచ్చితమైనది కాకపోవచ్చు. అందువల్ల బాట్‌లు ఇచ్చిన ప్రతిస్పందనలలో వాటి కంటెంట్ మరియు భాషలో తప్పులు ఉండవచ్చు. ప్రతిస్పందనలు కేవలం సూచనాత్మకమైనవి మరియు మీకు మరియు మీ సందర్భానికి దాని అనుకూలత మరియు ఔచిత్యాన్ని నిర్ణయించడానికి జాగ్రత్తగా ఉపయోగించాలి. కొనసాగడం ద్వారా, మీరు దీన్ని పూర్తిగా అర్థం చేసుకుంటారు మరియు అంగీకరిస్తారు", + "Accept": "అంగీకరించు", + "Decline": "తిరస్కరించు", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file diff --git a/src/assets/i18n/ur.json b/src/assets/i18n/ur.json index 2b63bec..223aafb 100644 --- a/src/assets/i18n/ur.json +++ b/src/assets/i18n/ur.json @@ -73,11 +73,14 @@ "My Pitara": "My Pitara", "Jaadui Pitara Box": "Jaadui Pitara Box", "Download and Add": "Download and Add", + "DISCLAIMER_BOT_MSG": "DISCLAIMER: \n The bots use Generative AI technology which may not be 100% accurate. Hence the responses given by the bots may have mistakes in their content and language. The responses are merely suggestive and must be used with caution determining its suitability and relevance to you and your context. By proceeding, you completely understand and accept to this", + "Accept": "Accept", + "Decline": "Decline", + + "Downloading ....": "Downloading ....", "Downloaded successfully": "Downloaded successfully", "Failed to download": "Failed to download", "Sorry, this language is not currently supported.": "Sorry, this language is not currently supported.", - "Searching...": "Searching...", - "Decline": "Decline", - "Accept": "Accept" + "Searching...": "Searching..." } \ No newline at end of file From 8e46bd11c65dc00c31f37a0ec3ef89878c7a0215 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 25 Mar 2024 10:49:24 +0530 Subject: [PATCH 5/8] Issue #ED-0000 fix: handle null and undefined --- src/app/components/bot-messages/bot-messages.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/bot-messages/bot-messages.component.ts b/src/app/components/bot-messages/bot-messages.component.ts index ad765c2..99e4f97 100644 --- a/src/app/components/bot-messages/bot-messages.component.ts +++ b/src/app/components/bot-messages/bot-messages.component.ts @@ -386,7 +386,7 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { console.log('long press end'); await this.record.stopRecognition('audio').then(async result => { console.log('result on recorded data ', result); - if(result.value && result.value.recordDataBase64) { + if(result?.value?.recordDataBase64) { this.chat = {identifier: "", message: '', messageType: '', displayMsg: "", audio: { file: '', duration: '', play: false }, type: 'sent', time: new Date().toLocaleTimeString('en', { hour: '2-digit', minute: '2-digit' }), timeStamp: '', readMore: false, likeMsg: false, dislikeMsg: false, requestId: "" } const recordData = result.value.recordDataBase64; console.log('..................', result, this.durationDisplay); From 7cca713a1c152868867e90e1b28ec2094adf6a45 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 25 Mar 2024 10:51:59 +0530 Subject: [PATCH 6/8] Issue #ED-0000 fix: updated version code --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index b53a6d7..a10dbef 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,7 +7,7 @@ android { applicationId "in.gov.myjp.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 15 + versionCode 16 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { From b961c082e70cb611743f15c364ecd1674ee0ec65 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 25 Mar 2024 11:57:45 +0530 Subject: [PATCH 7/8] Issue #ED-0000 fix: audio fix on back button --- .../bot-messages/bot-messages.component.ts | 34 +++++++++- .../pages/parent-sakhi/parent-sakhi.page.ts | 62 ++++++++----------- src/app/pages/story/story.page.ts | 12 ---- .../pages/teacher-sakhi/teacher-sakhi.page.ts | 12 ---- 4 files changed, 57 insertions(+), 63 deletions(-) diff --git a/src/app/components/bot-messages/bot-messages.component.ts b/src/app/components/bot-messages/bot-messages.component.ts index 99e4f97..76cef67 100644 --- a/src/app/components/bot-messages/bot-messages.component.ts +++ b/src/app/components/bot-messages/bot-messages.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, Input, NgZone, OnInit, Output, ViewChild } from '@angular/core'; import { IonContent, ModalController } from '@ionic/angular'; import { BotMessage } from 'src/app/appConstants'; -import { BotApiService, RecordingService, StorageService } from 'src/app/services'; +import { AppHeaderService, BotApiService, RecordingService, StorageService } from 'src/app/services'; import { Keyboard } from "@capacitor/keyboard"; import { Directory, Filesystem } from '@capacitor/filesystem'; import { TranslateService } from '@ngx-translate/core'; @@ -42,7 +42,8 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { private telemetryGeneratorService: TelemetryGeneratorService, private storage: StorageService, private modalCtrl: ModalController, - private router: Router + private router: Router, + private headerService: AppHeaderService ) { this.defaultLoaderMsg = {identifier: "", message: this.translate.instant('Loading...'), messageType: 'text', displayMsg: this.translate.instant('Loading...'), type: 'received', time: '', timeStamp: '', readMore: false, likeMsg: false, dislikeMsg: false, requestId: ""}; this.botMessages = []; @@ -108,6 +109,20 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { if(this.config.disable) { this.disabled = false } + this.headerService.deviceBackbtnEmitted$.subscribe((ev: any) => { + if(ev.name == 'backBtn') { + if(this.modalCtrl) { + this.modalCtrl.dismiss({type: 'decline'}) + } + this.handleBackNavigation() + } + }) + + this.headerService.headerEventEmitted$.subscribe((name: any) => { + if(name == 'back') { + this.handleBackNavigation() + } + }) if(await this.storage.getData(this.config.type) === 'false') { this.checkBotPermission(); } @@ -128,6 +143,21 @@ export class BotMessagesComponent implements OnInit, AfterViewInit { this.record.gestureControl(this.recordbtn); } + handleBackNavigation() { + if (this.botMessages.length > 0) { + this.botMessages.forEach(msg => { + if (msg.messageType == 'audio') { + if(this.audioRef) { + if(msg.audio) { + msg.audio.play = false; + } + this.audioRef.pause(); + } + } + }); + } + } + async initialiseBot() { this.botMessages = []; let textMsg = `WELCOME_TO_${this.config.type.toUpperCase()}_SAKHI`; diff --git a/src/app/pages/parent-sakhi/parent-sakhi.page.ts b/src/app/pages/parent-sakhi/parent-sakhi.page.ts index b8ed2a2..a804edb 100644 --- a/src/app/pages/parent-sakhi/parent-sakhi.page.ts +++ b/src/app/pages/parent-sakhi/parent-sakhi.page.ts @@ -75,44 +75,32 @@ export class ParentSakhiPage implements OnInit, OnTabViewWillEnter { } async handleBackNavigation() { - let botDuration = Date.now() - this.botStartTimeStamp; - if (this.parentBotMsg.length > 0) { - this.parentBotMsg.forEach((msg: any) => { - if (msg.messageType == 'audio') { - if(msg.audioRef) { - if(msg.audio) { - msg.audio.play = false; - } - msg.audioRef.pause(); - } + let botDuration = Date.now() - this.botStartTimeStamp; + await this.messageApi.getAllChatMessages(this.config.type).then((res) => { + let result = { audio: 0, text: 0 }; + if(res.length > 0) { + console.log('Bot response', res); + res.forEach(chat => { + if (chat.messageType == 'text') { + result.text++; + } else if (chat.messageType == 'audio') { + result.audio++; } }); - } - await this.messageApi.getAllChatMessages(this.config.type).then((res) => { - let result = { audio: 0, text: 0 }; - if(res.length > 0) { - console.log('Bot response', res); - res.forEach(chat => { - if (chat.messageType == 'text') { - result.text++; - } else if (chat.messageType == 'audio') { - result.audio++; - } - }); - this.cdata = { - "audioMessagesCount": result.audio, - "textMessagesCount": result.text - } - this.duration = botDuration/1000; - } else { - this.cdata = { - "audioMessagesCount": result.audio, - "textMessagesCount": result.text - } + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text } - }) - this.parentBot = false; - this.telemetry.generateEndTelemetry('bot', 'end', 'parent-sakhi', 'parent-sakhi', undefined, undefined, undefined, this.duration, this.cdata); - this.router.navigate(['/tabs/home']); - } + this.duration = botDuration/1000; + } else { + this.cdata = { + "audioMessagesCount": result.audio, + "textMessagesCount": result.text + } + } + }) + this.parentBot = false; + this.telemetry.generateEndTelemetry('bot', 'end', 'parent-sakhi', 'parent-sakhi', undefined, undefined, undefined, this.duration, this.cdata); + this.router.navigate(['/tabs/home']); + } } diff --git a/src/app/pages/story/story.page.ts b/src/app/pages/story/story.page.ts index bd7bf2c..28e7265 100644 --- a/src/app/pages/story/story.page.ts +++ b/src/app/pages/story/story.page.ts @@ -60,18 +60,6 @@ export class StoryPage implements OnInit, OnTabViewWillEnter { async handleBackNavigation() { let botDuration = Date.now() - this.botStartTimeStamp; - if (this.storyBotMsg.length > 0) { - this.storyBotMsg.forEach((msg: any) => { - if (msg.messageType == 'audio') { - if(msg.audioRef) { - if(msg.audio) { - msg.audio.play = false; - } - msg.audioRef.pause(); - } - } - }); - } await this.messageApi.getAllChatMessages(this.config.type).then((res) => { let result = { audio: 0, text: 0 }; if(res.length > 0) { diff --git a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts index e2310a0..d56885f 100644 --- a/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts +++ b/src/app/pages/teacher-sakhi/teacher-sakhi.page.ts @@ -60,18 +60,6 @@ export class TeacherSakhiPage implements OnInit, OnTabViewWillEnter { async handleBackNavigation() { let botDuration = Date.now() - this.botStartTimeStamp; - if (this.teacherBotMsg.length > 0) { - this.teacherBotMsg.forEach((msg: any) => { - if (msg.messageType == 'audio') { - if(msg.audioRef) { - if(msg.audio) { - msg.audio.play = false; - } - msg.audioRef.pause(); - } - } - }); - } await this.messageApi.getAllChatMessages(this.config.type).then((res) => { let result = { audio: 0, text: 0 }; if(res.length > 0) { From 899f8ef42b7d28ee5e10b6046989567d697bdd4c Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 22 Apr 2024 17:23:00 +0530 Subject: [PATCH 8/8] updated misdk version and app version code --- android/app/build.gradle | 2 +- android/variables.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a10dbef..878ae9f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,7 +7,7 @@ android { applicationId "in.gov.myjp.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 16 + versionCode 17 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/android/variables.gradle b/android/variables.gradle index 4c5c5ed..7c43d1d 100644 --- a/android/variables.gradle +++ b/android/variables.gradle @@ -1,5 +1,5 @@ ext { - minSdkVersion = 23 + minSdkVersion = 26 compileSdkVersion = 33 targetSdkVersion = 33 androidxActivityVersion = '1.7.0'