add 'key' to localizeMany

This commit is contained in:
Jacob Overgaard
2023-07-25 16:09:42 +02:00
parent 823a6fb4e7
commit ed8c585d74

View File

@@ -47,8 +47,8 @@ export class UmbLocalizationContext {
* @param keys
* @see localize
*/
localizeMany(keys: string[]): Observable<string> {
return of(...keys).pipe(switchMap((key) => this.localize(key)));
localizeMany(keys: string[]): Observable<Record<string, string>> {
return of(...keys).pipe(switchMap((key) => this.localize(key).pipe(map((value) => ({ [key]: value })))));
}
}