- const videosJson = result.data
- const totalVideos = result.total
- const videos = []
-
- for (const videoJson of videosJson) {
- videos.push(new Video(videoJson))
- }
-
- return { videos, totalVideos }
+ return this.serverService.localeObservable
+ .pipe(
+ map(translations => {
+ const videosJson = result.data
+ const totalVideos = result.total
+ const videos: Video[] = []
+
+ for (const videoJson of videosJson) {
+ videos.push(new Video(videoJson, translations))
+ }
+
+ return { videos, totalVideos }
+ })
+ )