diff --git a/CastIt.Android/lib/l10n/intl_en.arb b/CastIt.Android/lib/l10n/intl_en.arb new file mode 100644 index 00000000..c252acc7 --- /dev/null +++ b/CastIt.Android/lib/l10n/intl_en.arb @@ -0,0 +1,81 @@ +{ + "appName": "CastIt", + "dark": "Dark", + "light": "Light", + "english": "English", + "spanish": "Spanish", + "settings": "Settings", + "theme": "Theme", + "appVersion": "Version: {version}", + "chooseBaseAppColor": "Choose base app color", + "accentColor": "Accent Color", + "chooseAccentColor": "Choose an accent color", + "language": "Language", + "chooseLanguage": "Choose a language", + "about": "About", + "aboutSummary": "A remote control for the desktop app", + "donations": "Donations", + "support": "Support", + "appInfo": "App information", + "donationsMsg": "I hope you are enjoying using this app, if you would like to buy me a coffee/beer, just send me an email.", + "donationSupport": "I made this app in my free time and it is also open source. If you would like to help me, report an issue, have an idea, want a feature to be implemented, etc please open an issue here:", + "playerSettings": "Player Settings", + "changeAppBehaviour": "Change app behaviour", + "playlists": "PlayLists", + "playlist": "Playlist", + "playFromTheStart": "Play files from the start", + "playNextFileAutomatically": "Play next file automatically", + "forceVideoTranscode": "Force video transcode", + "forceAudioTranscode": "Force audio transcode", + "enableHwAccel": "Enable hardware acceleration", + "videoScale": "Video scale", + "playing": "Playing", + "fullHd": "Full HD (1080p)", + "hd": "HD (720p)", + "original": "Original", + "somethingWentWrong": "Something went wrong!", + "pleaseTryAgainLater": "Please try again later", + "makeSureYouAreConnected": "Make sure you are connected to the same wifi network of the desktop app and that the desktop app is opened", + "url": "Url", + "invalidUrl": "Invalid Url", + "cancel": "Cancel", + "ok": "Ok", + "noConnectionToDesktopApp": "No connection to the desktop app", + "verifyCastItUrl": "Verify that the url matches the one in the desktop app", + "playFile": "Play file", + "playFileFromTheBeginning": "Play file from the beginning", + "deleteFile": "Delete file", + "rename": "Rename", + "delete": "Delete", + "fileOptions": "File options", + "audio": "Audio", + "subtitles": "Subtitles", + "quality": "Quality", + "volume": "Volume", + "na": "N/A", + "webServerUrl": "Web server url", + "search": "Search", + "shufflePlayList": "Shuffle playlist", + "loopFile": "Loop file", + "playlistOptions": "PlayList Options", + "deletePlayListConfirm": "Delete playlist {playlist}?", + "deleteFileConfirm": "Delete file {file} ?", + "clear": "Clear", + "invalidName": "Name is not valid", + "name": "Name", + "welcome": "Welcome to {appName}", + "welcomeSummary": "In the next section you will be asked for the desktop app url app, so please install it and keep it at hand", + "youCanSkip": "You can skip this and configure the app later...", + "enjoyTheApp": "Enjoy the app !!!", + "skip": "Skip", + "next": "Next", + "start": "Start", + "confirm": "Confirm", + "skipIntroConfirm": "Are you sure you want to skip the intro ?", + "playlistNotFound": "Playlist not found", + "closeDesktopApp": "Close desktop app", + "closeDesktopAppConfirmation": "Are you sure you want to close the desktop app ?", + "stopPlayback": "Stop playback", + "desktopApp": "Desktop app", + "issues": "Issues" +} \ No newline at end of file diff --git a/CastIt.Android/lib/l10n/intl_es.arb b/CastIt.Android/lib/l10n/intl_es.arb new file mode 100644 index 00000000..02df89ef --- /dev/null +++ b/CastIt.Android/lib/l10n/intl_es.arb @@ -0,0 +1,81 @@ +{ + "appName": "CastIt", + "dark": "Oscuro", + "light": "Ligero", + "english": "Inglés", + "spanish": "Español", + "settings": "Ajustes", + "theme": "Tema", + "appVersion": "Versión: {version}", + "chooseBaseAppColor": "Escoge un color base para la app", + "accentColor": "Color de acento", + "chooseAccentColor": "Escoge un color de acento", + "language": "Idioma", + "chooseLanguage": "Escoge un idioma", + "about": "Acerca de", + "aboutSummary": "Control remoto para la aplicación de escritorio.", + "donations": "Donaciones", + "support": "Soporte", + "appInfo": "Información de la aplicación", + "donationsMsg": "Espero que disfrutes al usar esta aplicación, si te gustaría comprarme un cafe o una cerveza, envíame un email.", + "donationSupport": "Hice esta aplicación en mi tiempo libre y también es de código abierto. Si desea ayudarme, informar un problema, tienes una idea, deseas que se implemente una función, etc., crea un issue aquí:", + "playerSettings": "Player Settings", + "changeAppBehaviour": "Cambiar el comportamiento de la aplicación", + "playlists": "Listas de reproducción", + "playlist": "Lista de reproducción", + "playFromTheStart": "Reproducir archivos desde el inicio", + "playNextFileAutomatically": "Reproducir el siguiente archivo automáticamente", + "forceVideoTranscode": "Forzar la transcodificación del video", + "forceAudioTranscode": "Forzar la transcodificación del audio", + "enableHwAccel": "Habilitar la aceleración por hardware", + "videoScale": "Escala de video", + "playing": "Reproduciendo", + "fullHd": "Full HD (1080p)", + "hd": "HD (720p)", + "original": "Original", + "somethingWentWrong": "Algo salió mal!", + "pleaseTryAgainLater": "Porfavor intente mas tarde", + "makeSureYouAreConnected": "Asegurate de que estás conectado a la misma red wifi que la aplicación de escritorio y de que la misma esta abierta", + "url": "Url", + "invalidUrl": "Url no válida", + "cancel": "Cancelar", + "ok": "Ok", + "noConnectionToDesktopApp": "No hay conexión con la aplicación de escritorio", + "verifyCastItUrl": "Verifica que la url concuerde con la de la aplicación de escritorio", + "playFile": "Reproducir archivo", + "playFileFromTheBeginning": "Reproducir archivo desde el inicio", + "deleteFile": "Borrar archivo", + "rename": "Renombrar", + "delete": "Borrar", + "fileOptions": "Opciones del archivo", + "audio": "Audio", + "subtitles": "Subtítulos", + "quality": "Calidad", + "volume": "Volumen", + "na": "N/A", + "webServerUrl": "Ruta del servidor web", + "search": "Buscar", + "shufflePlayList": "Lista de reproducción aleatoria", + "loopFile": "Repetir archivo", + "playlistOptions": "Opciones de la lista de reproducción", + "deletePlayListConfirm": "¿ Borrar la lista de reproducción {playlist}?", + "deleteFileConfirm": "¿ Borrar el archivo {file} ?", + "clear": "Limpiar", + "invalidName": "Nombre inválido", + "name": "Nombre", + "welcome": "Bienvenido a {appName}", + "welcomeSummary": "En la siguiente sección, se te pedirá la url del servidor de la aplicación de escritorio, por lo que por favor instalala y tenla a mano", + "youCanSkip": "Puedes saltarte esta parte y configurar la aplicación luego...", + "enjoyTheApp": "Disfruta la aplicación !!!", + "skip": "Saltar", + "next": "Siguiente", + "start": "Empezar", + "confirm": "Confirmar", + "skipIntroConfirm": "¿ Estás seguro de que deseas saltarte la intro ?", + "playlistNotFound": "Lista de reproducción no encontrada", + "closeDesktopApp": "Cerrar la app. de escritorio", + "closeDesktopAppConfirmation": "¿ Estás seguro que deseas cerrar la aplicación de escritorio ?", + "stopPlayback": "Detener reproducción", + "desktopApp": "Aplicación de escritorio", + "issues": "Inconvenientes" +} \ No newline at end of file diff --git a/CastIt.Android/lib/models/dtos/app_list_response_dto.dart b/CastIt.Android/lib/models/dtos/app_list_response_dto.dart deleted file mode 100644 index 30955036..00000000 --- a/CastIt.Android/lib/models/dtos/app_list_response_dto.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../../common/utils/json_generic_converter.dart'; -import 'app_response_dto.dart'; - -part 'app_list_response_dto.g.dart'; - -@JsonSerializable() -class AppListResponseDto extends AppResponseDto> { - AppListResponseDto() { - result = []; - } - - factory AppListResponseDto.fromJson(Map json) => _$AppListResponseDtoFromJson(json) as AppListResponseDto; -} diff --git a/CastIt.Android/lib/models/dtos/app_response_dto.dart b/CastIt.Android/lib/models/dtos/app_response_dto.dart deleted file mode 100644 index 6efd2105..00000000 --- a/CastIt.Android/lib/models/dtos/app_response_dto.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../../common/utils/json_generic_converter.dart'; -import 'empty_response_dto.dart'; - -part 'app_response_dto.g.dart'; - -@JsonSerializable() -class AppResponseDto extends EmptyResponseDto { - @JsonGenericConverter() - @JsonKey(name: 'Result') - T? result; - - AppResponseDto({ - this.result, - }); - - factory AppResponseDto.fromJson(Map json) => _$AppResponseDtoFromJson(json); -} diff --git a/CastIt.Android/lib/models/dtos/base_socket_request_dto.dart b/CastIt.Android/lib/models/dtos/base_socket_request_dto.dart deleted file mode 100644 index ab12559e..00000000 --- a/CastIt.Android/lib/models/dtos/base_socket_request_dto.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'base_socket_request_dto.g.dart'; - -abstract class BaseSocketRequest { - late String messageType; -} - -@JsonSerializable() -class BaseSocketRequestDto implements BaseSocketRequest { - @override - @JsonKey(name: 'MessageType') - String messageType; - - BaseSocketRequestDto({ - required this.messageType, - }); - - factory BaseSocketRequestDto.fromJson(Map json) => _$BaseSocketRequestDtoFromJson(json); - - Map toJson() => _$BaseSocketRequestDtoToJson(this); -} - -abstract class AbstractBaseSocketRequestDto implements BaseSocketRequest { - @override - @JsonKey(name: 'MessageType') - late String messageType; - - AbstractBaseSocketRequestDto(); -} diff --git a/CastIt.Android/lib/models/dtos/empty_response_dto.dart b/CastIt.Android/lib/models/dtos/empty_response_dto.dart deleted file mode 100644 index a2d1a77d..00000000 --- a/CastIt.Android/lib/models/dtos/empty_response_dto.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'empty_response_dto.g.dart'; - -@JsonSerializable() -class EmptyResponseDto { - @JsonKey(name: 'Succeed') - bool? succeed = false; - - @JsonKey(name: 'Message') - String? message; - - EmptyResponseDto({ - this.succeed, - this.message, - }) { - succeed ??= false; - } - - factory EmptyResponseDto.fromJson(Map json) => _$EmptyResponseDtoFromJson(json); -} diff --git a/CastIt.Android/lib/models/dtos/empty_socket_response_dto.dart b/CastIt.Android/lib/models/dtos/empty_socket_response_dto.dart deleted file mode 100644 index 5d631006..00000000 --- a/CastIt.Android/lib/models/dtos/empty_socket_response_dto.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import 'empty_response_dto.dart'; - -part 'empty_socket_response_dto.g.dart'; - -@JsonSerializable() -class EmptySocketResponseDto extends EmptyResponseDto { - @JsonKey(name: 'MessageType') - final String? messageType; - - EmptySocketResponseDto({ - this.messageType, - }); - - factory EmptySocketResponseDto.fromJson(Map json) => _$EmptySocketResponseDtoFromJson(json); -} diff --git a/CastIt.Android/lib/models/dtos/requests/app_settings_request_dto.dart b/CastIt.Android/lib/models/dtos/requests/app_settings_request_dto.dart deleted file mode 100644 index c9ae9f7d..00000000 --- a/CastIt.Android/lib/models/dtos/requests/app_settings_request_dto.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../base_socket_request_dto.dart'; - -part 'app_settings_request_dto.g.dart'; - -@JsonSerializable() -class AppSettingsRequestDto extends AbstractBaseSocketRequestDto { - @JsonKey(name: 'StartFilesFromTheStart') - final bool playFromTheStart; - - @JsonKey(name: 'PlayNextFileAutomatically') - final bool playNextFileAutomatically; - - @JsonKey(name: 'ForceVideoTranscode') - final bool forceVideoTranscode; - - @JsonKey(name: 'ForceAudioTranscode') - final bool forceAudioTranscode; - - @JsonKey(name: 'VideoScale') - final int videoScale; - - @JsonKey(name: 'EnableHardwareAcceleration') - final bool enableHwAccel; - - AppSettingsRequestDto({ - required this.playFromTheStart, - required this.playNextFileAutomatically, - required this.forceAudioTranscode, - required this.forceVideoTranscode, - required this.videoScale, - required this.enableHwAccel, - }) : super(); - - factory AppSettingsRequestDto.fromJson(Map json) => _$AppSettingsRequestDtoFromJson(json); - - Map toJson() => _$AppSettingsRequestDtoToJson(this); -} diff --git a/CastIt.Android/lib/models/dtos/requests/base_item_request_dto.dart b/CastIt.Android/lib/models/dtos/requests/base_item_request_dto.dart deleted file mode 100644 index c2d6af63..00000000 --- a/CastIt.Android/lib/models/dtos/requests/base_item_request_dto.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../base_socket_request_dto.dart'; - -part 'base_item_request_dto.g.dart'; - -@JsonSerializable() -class BaseItemRequestDto extends AbstractBaseSocketRequestDto { - @JsonKey(name: 'Id') - final int id; - - BaseItemRequestDto({ - required this.id, - }) : super(); - - factory BaseItemRequestDto.fromJson(Map json) => _$BaseItemRequestDtoFromJson(json); - - Map toJson() => _$BaseItemRequestDtoToJson(this); -} - -abstract class AbstractBaseItemRequestDto extends AbstractBaseSocketRequestDto { - @JsonKey(name: 'Id') - late int id; - - AbstractBaseItemRequestDto() : super(); -} diff --git a/CastIt.Android/lib/models/dtos/requests/delete_playlist_request_dto.dart b/CastIt.Android/lib/models/dtos/requests/delete_playlist_request_dto.dart deleted file mode 100644 index f347dce9..00000000 --- a/CastIt.Android/lib/models/dtos/requests/delete_playlist_request_dto.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../base_socket_request_dto.dart'; - -part 'delete_playlist_request_dto.g.dart'; - -@JsonSerializable() -class DeletePlayListRequestDto extends AbstractBaseSocketRequestDto { - final int id; - - DeletePlayListRequestDto({ - required this.id, - }) : super(); - - factory DeletePlayListRequestDto.fromJson(Map json) => _$DeletePlayListRequestDtoFromJson(json); - - Map toJson() => _$DeletePlayListRequestDtoToJson(this); -} diff --git a/CastIt.Android/lib/models/dtos/requests/go_to_seconds_request_dto.dart b/CastIt.Android/lib/models/dtos/requests/go_to_seconds_request_dto.dart deleted file mode 100644 index 94cef620..00000000 --- a/CastIt.Android/lib/models/dtos/requests/go_to_seconds_request_dto.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../base_socket_request_dto.dart'; - -part 'go_to_seconds_request_dto.g.dart'; - -@JsonSerializable() -class GoToSecondsRequestDto extends AbstractBaseSocketRequestDto { - @JsonKey(name: 'Seconds') - final double seconds; - - GoToSecondsRequestDto({ - required this.seconds, - }) : super(); - - factory GoToSecondsRequestDto.fromJson(Map json) => _$GoToSecondsRequestDtoFromJson(json); - - Map toJson() => _$GoToSecondsRequestDtoToJson(this); -} diff --git a/CastIt.Android/lib/models/dtos/responses/app_settings_response_dto.dart b/CastIt.Android/lib/models/dtos/responses/app_settings_response_dto.dart deleted file mode 100644 index 4617eccb..00000000 --- a/CastIt.Android/lib/models/dtos/responses/app_settings_response_dto.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; - -import '../../../common/enums/video_scale_type.dart'; - -part 'app_settings_response_dto.freezed.dart'; -part 'app_settings_response_dto.g.dart'; - -//TODO: RENAME TO SERVER SETTINGS -@freezed -class AppSettingsResponseDto with _$AppSettingsResponseDto { - VideoScaleType get videoScaleType => getVideoScaleType(videoScale); - - factory AppSettingsResponseDto({ - @JsonKey(name: 'startFilesFromTheStart') required bool playFromTheStart, - @JsonKey(name: 'playNextFileAutomatically') required bool playNextFileAutomatically, - @JsonKey(name: 'forceVideoTranscode') required bool forceVideoTranscode, - @JsonKey(name: 'forceAudioTranscode') required bool forceAudioTranscode, - @JsonKey(name: 'videoScale') required int videoScale, - @JsonKey(name: 'enableHardwareAcceleration') required bool enableHwAccel, - @JsonKey(name: 'loadFirstSubtitleFoundAutomatically') required bool loadFirstSubtitleFoundAutomatically, - }) = _AppSettingsResponseDto; - - factory AppSettingsResponseDto.fromJson(Map json) => _$AppSettingsResponseDtoFromJson(json); - - AppSettingsResponseDto._(); - - static List get jsonKeys => [ - 'startFilesFromTheStart', - 'playNextFileAutomatically', - 'forceVideoTranscode', - 'forceAudioTranscode', - 'videoScale', - 'enableHardwareAcceleration', - 'loadFirstSubtitleFoundAutomatically', - ]; -} diff --git a/CastIt.Android/lib/models/dtos/socket_response_dto.dart b/CastIt.Android/lib/models/dtos/socket_response_dto.dart deleted file mode 100644 index 81db615c..00000000 --- a/CastIt.Android/lib/models/dtos/socket_response_dto.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../../common/utils/json_generic_converter.dart'; -import 'empty_response_dto.dart'; - -part 'socket_response_dto.g.dart'; - -@JsonSerializable() -class SocketResponseDto extends EmptyResponseDto { - @JsonKey(name: 'MessageType') - final String? messageType; - - @JsonGenericConverter() - @JsonKey(name: 'Result') - T? result; - - SocketResponseDto({ - this.messageType, - this.result, - }); - - factory SocketResponseDto.fromJson(Map json) => _$SocketResponseDtoFromJson(json); -}