Skip to content

Commit

Permalink
chore(): generic changes and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Jan 1, 2025
1 parent b58dc31 commit 93f7d28
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"@types/jest": "29.5.14",
"@types/node-fetch": "2.6.12",
"@types/request-ip": "0.0.41",
"@typescript-eslint/eslint-plugin": "8.18.2",
"@typescript-eslint/parser": "8.18.2",
"@typescript-eslint/eslint-plugin": "8.19.0",
"@typescript-eslint/parser": "8.19.0",
"eslint": "8.57.0",
"firebase-functions-test": "3.4.0",
"firebase-tools": "13.29.1",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"rxjs": "7.8.1",
"stats.js": "0.17.0",
"swiper": "11.1.15",
"three": "0.171.0",
"three": "0.172.0",
"tslib": "2.8.1",
"web-vitals": "4.2.4",
"webm-muxer": "5.0.3",
Expand Down Expand Up @@ -132,8 +132,8 @@
"@types/web-app-manifest": "1.0.8",
"@types/webgl2": "0.0.11",
"@types/wicg-file-system-access": "2023.10.5",
"@typescript-eslint/eslint-plugin": "8.18.2",
"@typescript-eslint/parser": "8.18.2",
"@typescript-eslint/eslint-plugin": "8.19.0",
"@typescript-eslint/parser": "8.19.0",
"browser-sync": "3.0.3",
"deepmerge": "4.3.1",
"dotenv": "16.4.7",
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/map/map.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, inject, NgModule, OnInit} from '@angular/core';
import {geoJSON, latLng, Map} from 'leaflet';
import {HttpClient, provideHttpClient} from '@angular/common/http';
import {HttpClient, provideHttpClient, withFetch} from '@angular/common/http';
import {firstValueFrom} from 'rxjs';
import {LeafletModule} from '@asymmetrik/ngx-leaflet';
import {BaseComponent} from '../base/base.component';
Expand Down Expand Up @@ -104,6 +104,6 @@ export class MapComponent extends BaseComponent implements OnInit {

@NgModule({
imports: [LeafletModule, MapComponent],
providers: [provideHttpClient()],
providers: [provideHttpClient(withFetch())],
})
export class MapModule {}
2 changes: 1 addition & 1 deletion src/app/core/helpers/iana/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const IANASignedLanguages = [
{signed: 'szs', spoken: 'en', country: 'sb', abbreviation: ''}, // Solomon Islands Sign Language
{signed: 'sfb', spoken: 'fr', country: 'be', abbreviation: ''}, // French Belgian Sign Language
{signed: 'sfs', spoken: 'af', country: 'za', abbreviation: ''}, // South African Sign Language
{signed: 'ssp', spoken: 'es', country: 'es', abbreviation: ''}, // Spanish Sign Language
{signed: 'ssp', spoken: 'es', country: 'es', abbreviation: 'LSE'}, // Spanish Sign Language
{signed: 'sqs', spoken: 'si', country: 'lk', abbreviation: ''}, // Sri Lankan Sign Language
{signed: 'swl', spoken: 'sv', country: 'se', abbreviation: 'STS'}, // Swedish Sign Language
{signed: 'ssr', spoken: 'fr', country: 'ch', abbreviation: 'LSF-CH'}, // Swiss-French Sign Language
Expand Down
9 changes: 7 additions & 2 deletions src/app/core/modules/transloco/transloco.loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ import {HttpClient} from '@angular/common/http';
import {Translation, TRANSLOCO_SCOPE, TranslocoLoader} from '@jsverse/transloco';
import {inject, Injectable} from '@angular/core';

import {Observable} from 'rxjs';
import {catchError, Observable} from 'rxjs';

@Injectable({providedIn: 'root'})
export class HttpLoader implements TranslocoLoader {
private http = inject(HttpClient);

getTranslation(langPath: string): Observable<Translation> {
const assetPath = `assets/i18n/${langPath}.json`;
return this.http.get<Translation>(assetPath);
return this.http.get<Translation>(assetPath).pipe(
catchError(err => {
console.error(`Couldn't load translation file '${assetPath}'`, err);
throw err;
})
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class SpokenLanguageInputComponent extends BaseComponent implements OnIni

text = new FormControl();
maxTextLength = 500;
detectedLanguage: string;
spokenLanguage: string;
detectedLanguage!: string;
spokenLanguage!: string;

@Input() isMobile = false;

Expand Down
1 change: 0 additions & 1 deletion src/app/pages/translate/translate.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class TranslateComponent extends BaseComponent implements OnInit {
private title = inject(Title);

spokenToSigned$: Observable<boolean>;
spokenToSigned: boolean;

isMobile: MediaQueryList;

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"importHelpers": true,
"target": "ES2022",
Expand Down

0 comments on commit 93f7d28

Please sign in to comment.