Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion android/app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# android 15
compileSdkVersion=35
compileSdkVersion=36
# android 10
targetSdkVersion=29
# android 10
Expand Down
23 changes: 23 additions & 0 deletions android/app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<resources>
<string name="app_name">Roc Droid</string>

<string name="ok">OK</string>
<string name="cancel">Anuluj</string>

<string name="allow_notifications_title">Uprawnienie powiadomień</string>
<string name="allow_notifications_message">Aby wyświetlać kontrolki audio, wymagane jest uprawnienie do powiadomień.</string>

<string name="allow_mic_title">Uprawnienie mikrofonu</string>
<string name="allow_mic_message">Uprawnienie do mikrofonu jest wymagane, aby przesyłać dźwięk do zdalnych urządzeń.</string>

<string name="notification_channel_name">Usługa pierwszoplanowa streamingu</string>
<string name="notification_receiver_running">Odbiornik uruchomiony</string>
<string name="notification_sender_running">Nadawca uruchomiony</string>
<string name="notification_sender_and_receiver_running">Nadawca i odbiornik uruchomione</string>
<string name="notification_sender_and_receiver_not_running">Ani nadawca, ani odbiornik nie są uruchomione</string>
<string name="notification_title_active">Streaming aktywny</string>
<string name="notification_title_inactive">Streaming nieaktywny</string>
<string name="notification_stop_action">Zatrzymaj streaming</string>

<string name="tile_label">Roc Droid</string>
</resources>
1 change: 1 addition & 0 deletions lib/src/ui/app_root.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class AppRoot extends StatelessWidget {
];
static const List<Locale> _supportedLocales = [
Locale('en', ''), // Supported english language
Locale('pl', ''), // Supported polish language
];

AppRoot(ModelRoot modelRoot) : _modelRoot = modelRoot;
Expand Down
32 changes: 0 additions & 32 deletions lib/src/ui/localization/app_en.arb
Original file line number Diff line number Diff line change
@@ -1,67 +1,35 @@
{
"appTitle": "Roc Droid",

"receiver": "RECEIVER",

"sender": "SENDER",

"receiverStartSenderStep": "1. Start sender on the remote device",

"receiverUseIPStep": "2. Use one of IP addresses of this device as the remote on the sender",

"receiverSourceStreamStep": "3. Use this port for source stream",

"receiverRepairStreamStep": "4. Use this port for repair stream",

"receiverStartStep": "5. Start receiver on this device",

"startReceiverButton": "START RECEIVER",

"stopReceiverButton": "STOP RECEIVER",

"senderStartReceiverStep": "1. Start receiver on the remote device",

"senderSourceStreamStep": "2. Use this port for source stream",

"senderRepairStreamStep": "3. Use this port for repair stream",

"senderPutIPStep": "4. Put IP address of the remote receiver device below",

"senderChooseSourceStep": "5. Choose source to capture audio from",

"senderStartStep": "6. Start sender on this device",

"startSenderButton": "START SENDER",

"stopSenderButton": "STOP SENDER",

"noData": "No data",

"currentlyPlayingApplications": "Currently playing applications",

"microphone": "Microphone",

"about": "About",

"sourceCode": "SOURCE CODE",

"bugTracker": "BUG TRACKER",

"contributors": "CONTRIBUTORS",

"licenseData": "MOZILLA PUBLIC LICENSE 2.0",

"enterIp": "Enter IP address",

"permissionError": "Permission not granted",

"deviceError": "Audio device error",

"networkError": "Network error",

"dbError": "Database error",

"notFoundError": "Object not found",

"internalError": "Unexpected internal error"
}
35 changes: 21 additions & 14 deletions lib/src/ui/localization/app_localizations.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;

import 'app_localizations_en.g.dart';
import 'app_localizations_pl.g.dart';

// ignore_for_file: type=lint

Expand Down Expand Up @@ -61,15 +62,17 @@ import 'app_localizations_en.g.dart';
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());

final String localeName;

static AppLocalizations? of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations);
}

static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();
static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();

/// A list of this localizations delegate along with the default localizations
/// delegates.
Expand All @@ -81,7 +84,8 @@ abstract class AppLocalizations {
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
Expand All @@ -90,7 +94,8 @@ abstract class AppLocalizations {

/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('en')
Locale('en'),
Locale('pl')
];

/// No description provided for @appTitle.
Expand Down Expand Up @@ -292,7 +297,8 @@ abstract class AppLocalizations {
String get internalError;
}

class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();

@override
Expand All @@ -301,24 +307,25 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations>
}

@override
bool isSupported(Locale locale) => <String>['en'].contains(locale.languageCode);
bool isSupported(Locale locale) =>
<String>['en', 'pl'].contains(locale.languageCode);

@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
}

AppLocalizations lookupAppLocalizations(Locale locale) {


// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en': return AppLocalizationsEn();
case 'en':
return AppLocalizationsEn();
case 'pl':
return AppLocalizationsPl();
}

throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.'
);
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.');
}
9 changes: 6 additions & 3 deletions lib/src/ui/localization/app_localizations_en.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get receiverStartSenderStep => '1. Start sender on the remote device';

@override
String get receiverUseIPStep => '2. Use one of IP addresses of this device as the remote on the sender';
String get receiverUseIPStep =>
'2. Use one of IP addresses of this device as the remote on the sender';

@override
String get receiverSourceStreamStep => '3. Use this port for source stream';
Expand All @@ -39,7 +40,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get stopReceiverButton => 'STOP RECEIVER';

@override
String get senderStartReceiverStep => '1. Start receiver on the remote device';
String get senderStartReceiverStep =>
'1. Start receiver on the remote device';

@override
String get senderSourceStreamStep => '2. Use this port for source stream';
Expand All @@ -48,7 +50,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get senderRepairStreamStep => '3. Use this port for repair stream';

@override
String get senderPutIPStep => '4. Put IP address of the remote receiver device below';
String get senderPutIPStep =>
'4. Put IP address of the remote receiver device below';

@override
String get senderChooseSourceStep => '5. Choose source to capture audio from';
Expand Down
117 changes: 117 additions & 0 deletions lib/src/ui/localization/app_localizations_pl.g.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.g.dart';

// ignore_for_file: type=lint

/// The translations for Polish (`pl`).
class AppLocalizationsPl extends AppLocalizations {
AppLocalizationsPl([String locale = 'pl']) : super(locale);

@override
String get appTitle => 'Roc Droid';

@override
String get receiver => 'ODBIORNIK';

@override
String get sender => 'NADAJNIK';

@override
String get receiverStartSenderStep =>
'1. Uruchom nadajnik na zdalnym urządzeniu';

@override
String get receiverUseIPStep =>
'2. Użyj jednego z adresów IP tego urządzenia jako adresu remote';

@override
String get receiverSourceStreamStep =>
'3. Użyj tego portu dla strumienia źródłowego';

@override
String get receiverRepairStreamStep =>
'4. Użyj tego portu dla strumienia naprawczego';

@override
String get receiverStartStep => '5. Uruchom odbiornik na tym urządzeniu';

@override
String get startReceiverButton => 'START ODBIORNIKA';

@override
String get stopReceiverButton => 'STOP ODBIORNIKA';

@override
String get senderStartReceiverStep =>
'1. Uruchom odbiornik na zdalnym urządzeniu';

@override
String get senderSourceStreamStep =>
'2. Użyj tego portu dla strumienia źródłowego';

@override
String get senderRepairStreamStep =>
'3. Użyj tego portu dla strumienia naprawczego';

@override
String get senderPutIPStep =>
'4. Wpisz adres IP zdalnego urządzenia z odbiornikiem poniżej';

@override
String get senderChooseSourceStep => '5. Wybierz źródło audio';

@override
String get senderStartStep => '6. Uruchom nadajnik na tym urządzeniu';

@override
String get startSenderButton => 'START NADAJNIKA';

@override
String get stopSenderButton => 'STOP NADAJNIKA';

@override
String get noData => 'Brak danych';

@override
String get currentlyPlayingApplications => 'Aplikacje odtwarzające dźwięk';

@override
String get microphone => 'Mikrofon';

@override
String get about => 'O aplikacji';

@override
String get sourceCode => 'KOD ŹRÓDŁOWY';

@override
String get bugTracker => 'ZGLASZANIE BŁĘDÓW';

@override
String get contributors => 'WSPÓŁTWÓRCY';

@override
String get licenseData => 'LICENCJA MOZILLA PUBLIC LICENSE 2.0';

@override
String get enterIp => 'Wpisz adres IP';

@override
String get permissionError => 'Brak uprawnień';

@override
String get deviceError => 'Błąd urządzenia audio';

@override
String get networkError => 'Błąd sieci';

@override
String get dbError => 'Błąd bazy danych';

@override
String get notFoundError => 'Nie znaleziono obiektu';

@override
String get internalError => 'Nieoczekiwany błąd';
}
35 changes: 35 additions & 0 deletions lib/src/ui/localization/app_pl.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"appTitle": "Roc Droid",
"receiver": "ODBIORNIK",
"sender": "NADAJNIK",
"receiverStartSenderStep": "1. Uruchom nadajnik na zdalnym urządzeniu",
"receiverUseIPStep": "2. Użyj jednego z adresów IP tego urządzenia jako adresu remote",
"receiverSourceStreamStep": "3. Użyj tego portu dla strumienia źródłowego",
"receiverRepairStreamStep": "4. Użyj tego portu dla strumienia naprawczego",
"receiverStartStep": "5. Uruchom odbiornik na tym urządzeniu",
"startReceiverButton": "START ODBIORNIKA",
"stopReceiverButton": "STOP ODBIORNIKA",
"senderStartReceiverStep": "1. Uruchom odbiornik na zdalnym urządzeniu",
"senderSourceStreamStep": "2. Użyj tego portu dla strumienia źródłowego",
"senderRepairStreamStep": "3. Użyj tego portu dla strumienia naprawczego",
"senderPutIPStep": "4. Wpisz adres IP zdalnego urządzenia z odbiornikiem poniżej",
"senderChooseSourceStep": "5. Wybierz źródło audio",
"senderStartStep": "6. Uruchom nadajnik na tym urządzeniu",
"startSenderButton": "START NADAJNIKA",
"stopSenderButton": "STOP NADAJNIKA",
"noData": "Brak danych",
"currentlyPlayingApplications": "Aplikacje odtwarzające dźwięk",
"microphone": "Mikrofon",
"about": "O aplikacji",
"sourceCode": "KOD ŹRÓDŁOWY",
"bugTracker": "ZGLASZANIE BŁĘDÓW",
"contributors": "WSPÓŁTWÓRCY",
"licenseData": "LICENCJA MOZILLA PUBLIC LICENSE 2.0",
"enterIp": "Wpisz adres IP",
"permissionError": "Brak uprawnień",
"deviceError": "Błąd urządzenia audio",
"networkError": "Błąd sieci",
"dbError": "Błąd bazy danych",
"notFoundError": "Nie znaleziono obiektu",
"internalError": "Nieoczekiwany błąd"
}
2 changes: 1 addition & 1 deletion lib/src/ui/styles/roc_standard_theme_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class RocStandardThemeBuilder {
scaffoldBackgroundColor: RocColors.white,
// Standard application AppBar theme
appBarTheme: AppBarTheme(
color: RocColors.mainBlue,
backgroundColor: RocColors.mainBlue,
),
// Standard application bottom navigation bar theme
bottomNavigationBarTheme: BottomNavigationBarThemeData(
Expand Down