Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 315: adding translations for some files #402

Merged
merged 3 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,14 @@
"No_need_here": "No need here",
"Do_not_need": "Do not need",
"Finish": "Finish",
"Select_Purposes_Of_The_Area": "Select Purposes Of The Area"
"Select_Purposes_Of_The_Area": "Select Purposes Of The Area",
"Pulling_Up_all_blinds": "Pulling Up all blinds",
"Stopping_all_blinds": "Stopping all blinds",
"Pulling_down_all_blinds": "Pulling down all blinds",
"Turning_On_boiler": "Turning On boiler",
"Turning_Off_boiler": "Turning Off boiler",
"Waiting_for_user_to_get_connected_to_WiFi": "Waiting for user to get connected to WiFi",
"allInSameRoom": "allInSameRoom",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed any more as we removed the translation

"Can't_add_unsupported_device": "Can't add unsupported device",
"home": "home",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep that one

}
7 changes: 4 additions & 3 deletions lib/application/blinds/blinds_actor/blinds_actor_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/devices/device/devices_failures.dart';
import 'package:cybear_jinni/domain/devices/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/devices/generic_light_device/generic_light_entity.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:injectable/injectable.dart';
Expand Down Expand Up @@ -41,7 +42,7 @@ class BlindsActorBloc extends Bloc<BlindsActorEvent, BlindsActorState> {
Emitter<BlindsActorState> emit,
) async {
FlushbarHelper.createLoading(
message: 'Pulling Up all blinds',
message: 'Pulling_Up_all_blinds'.tr(),
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

Expand All @@ -53,7 +54,7 @@ class BlindsActorBloc extends Bloc<BlindsActorEvent, BlindsActorState> {
Emitter<BlindsActorState> emit,
) async {
FlushbarHelper.createLoading(
message: 'Stopping all blinds',
message: 'Stopping_all_blinds'.tr(),
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

Expand All @@ -65,7 +66,7 @@ class BlindsActorBloc extends Bloc<BlindsActorEvent, BlindsActorState> {
Emitter<BlindsActorState> emit,
) async {
FlushbarHelper.createLoading(
message: 'Pulling down all blinds',
message: 'Pulling_down_all_blinds'.tr(),
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

Expand Down
5 changes: 3 additions & 2 deletions lib/application/boilers/boilers_actor/boilers_actor_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/devices/device/devices_failures.dart';
import 'package:cybear_jinni/domain/devices/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/devices/generic_boiler_device/generic_boiler_entity.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:injectable/injectable.dart';
Expand Down Expand Up @@ -40,7 +41,7 @@ class BoilersActorBloc extends Bloc<BoilersActorEvent, BoilersActorState> {
Emitter<BoilersActorState> emit,
) async {
FlushbarHelper.createLoading(
message: 'Turning On boiler',
message: 'Turning_On_boiler'.tr(),
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

Expand All @@ -52,7 +53,7 @@ class BoilersActorBloc extends Bloc<BoilersActorEvent, BoilersActorState> {
Emitter<BoilersActorState> emit,
) async {
FlushbarHelper.createLoading(
message: 'Turning Off boiler',
message: 'Turning_Off_boiler'.tr(),
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import 'package:cybear_jinni/domain/security_bear/security_bear_failures.dart';
import 'package:cybear_jinni/presentation/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart';
import 'package:cybear_jinni/utils.dart';
import 'package:dartz/dartz.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/widgets.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:injectable/injectable.dart';
Expand Down Expand Up @@ -245,7 +246,7 @@ class ConfigureNewCbjCompBloc
// await WiFiScan.instance

bool isConnectedToWifi = false;
logger.i('Waiting for user to get connected to WiFi');
logger.i('Waiting_for_user_to_get_connected_to_WiFi'.tr());

while (true) {
isConnectedToWifi = await WiFiForIoTPlugin.isConnected();
Expand Down Expand Up @@ -294,7 +295,7 @@ class ConfigureNewCbjCompBloc
final List<GenericLightDE> deviceEntityList = [];

final String roomUuid = const Uuid().v1();
final String roomName = _textEditingController['allInSameRoom']!.text;
final String roomName = _textEditingController['allInSameRoom'.tr()]!.text;
guyluz11 marked this conversation as resolved.
Show resolved Hide resolved

final ManageNetworkEntity manageWiFiEntity =
IManageNetworkRepository.manageWiFiEntity!;
Expand All @@ -309,7 +310,7 @@ class ConfigureNewCbjCompBloc
deviceE..defaultName = DeviceDefaultName(deviceName),
);
} catch (e) {
logger.w("Can't add unsupported device");
logger.w("Can't_add_unsupported_device".tr());
}
});
final CBJCompEntity compUpdatedData = cbjCompEntity.copyWith(
Expand Down
3 changes: 2 additions & 1 deletion lib/application/join_home_by_id/join_home_by_id_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:cybear_jinni/domain/user/all_homes_of_user/all_homes_of_user_ent
import 'package:cybear_jinni/domain/user/all_homes_of_user/all_homes_of_user_value_objects.dart';
import 'package:cybear_jinni/domain/user/i_user_repository.dart';
import 'package:dartz/dartz.dart';
import 'package:easy_localization/easy_localization.dart';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed any more as we removed the translation

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:injectable/injectable.dart';

Expand Down Expand Up @@ -46,7 +47,7 @@ class JoinHomeByIdBloc extends Bloc<JoinHomeByIdEvent, JoinHomeByIdState> {
} else {
final AllHomesOfUserEntity allHomesOfUserEntity = AllHomesOfUserEntity(
id: AllHomesOfUserUniqueId.fromUniqueString(event.id),
name: AllHomesOfUserName('home'),
name: AllHomesOfUserName('home'.tr()),
guyluz11 marked this conversation as resolved.
Show resolved Hide resolved
);
final initialization = await _iUserRepository.addHome(
getCurrentUser,
Expand Down