File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -516,6 +516,12 @@ enum L10n {
516516 static let communityCreateExerciseApply = tr ( " community.create.apply " )
517517 static let communityCreateExercisePending = tr ( " community.create.pending " )
518518 static let communityCreateLoginRequired = tr ( " community.create.login_required " )
519+ static let communityCreateImageSection = tr ( " community.create.image_section " )
520+ static let communityCreateSelectImage = tr ( " community.create.select_image " )
521+ static let communityCreateImageSelected = tr ( " community.create.image_selected " )
522+ static func communityCreateUploadError( _ error: String ) -> String {
523+ fmt ( " community.create.upload_error " , error)
524+ }
519525 static let communityExploreDescription = tr ( " community.explore.description " )
520526 static let communityExploreNoExercisesDesc = tr ( " community.explore.no_exercises_desc " )
521527 static let communityExploreRatingMock = tr ( " community.explore.rating_mock " )
Original file line number Diff line number Diff line change @@ -72,16 +72,16 @@ struct CreateExerciseView: View {
7272 . frame ( minHeight: 100 )
7373 }
7474
75- Section ( " Imagen del ejercicio " ) {
75+ Section ( L10n . communityCreateImageSection ) {
7676 PhotosPicker (
7777 selection: $selectedPhoto,
7878 matching: . images
7979 ) {
80- Label ( " Seleccionar imagen " , systemImage: " photo " )
80+ Label ( L10n . communityCreateSelectImage , systemImage: " photo " )
8181 }
8282
8383 if selectedImageData != nil {
84- Text ( " Imagen seleccionada " )
84+ Text ( L10n . communityCreateImageSelected )
8585 . foregroundStyle ( . green)
8686 }
8787 }
@@ -175,7 +175,7 @@ struct CreateExerciseView: View {
175175 } catch {
176176 await MainActor . run {
177177 isSubmitting = false
178- errorMessage = " No se pudo subir la imagen: \ ( error. localizedDescription) "
178+ errorMessage = L10n . communityCreateUploadError ( error. localizedDescription)
179179 }
180180 }
181181 }
You can’t perform that action at this time.
0 commit comments