Skip to content

Commit

Permalink
refactor(app,neon): reformatted the code
Browse files Browse the repository at this point in the history
Signed-off-by: Nish Patel <[email protected]>
  • Loading branch information
jj10133 committed Sep 11, 2023
1 parent 8fd53ce commit 6e2ee47
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
19 changes: 7 additions & 12 deletions packages/neon/neon/lib/l10n/localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ abstract class AppLocalizations {
];

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

/// No description provided for @nextcloud.
///
Expand Down Expand Up @@ -720,17 +718,14 @@ class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations>
}

AppLocalizations lookupAppLocalizations(Locale locale) {


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

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.'
);
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.');
}
15 changes: 10 additions & 5 deletions packages/neon/neon/lib/l10n/localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get errorCredentialsForAccountNoLongerMatch => 'The credentials for this account no longer match';

@override
String get errorServerHadAProblemProcessingYourRequest => 'The server had a problem while processing your request. You might want to try again';
String get errorServerHadAProblemProcessingYourRequest =>
'The server had a problem while processing your request. You might want to try again';

@override
String get errorSomethingWentWrongTryAgainLater => 'Something went wrong. Please try again later';
Expand All @@ -93,10 +94,12 @@ class AppLocalizationsEn extends AppLocalizations {
String get errorConnectionTimedOut => 'Connection has timed out';

@override
String get errorNoCompatibleNextcloudAppsFound => 'No compatible Nextcloud apps could be found.\nWe are working hard to implement more and more apps!';
String get errorNoCompatibleNextcloudAppsFound =>
'No compatible Nextcloud apps could be found.\nWe are working hard to implement more and more apps!';

@override
String get errorServerInMaintenanceMode => 'The server is in maintenance mode. Please try again later or contact the server admin.';
String get errorServerInMaintenanceMode =>
'The server is in maintenance mode. Please try again later or contact the server admin.';

@override
String errorMissingPermission(String name) {
Expand Down Expand Up @@ -153,7 +156,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get nextPushSupported => 'NextPush is supported!';

@override
String get nextPushSupportedText => 'NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.';
String get nextPushSupportedText =>
'NextPush is a FOSS way of receiving push notifications using the UnifiedPush protocol via a Nextcloud instance.\nYou can install NextPush from the F-Droid app store.';

@override
String get nextPushSupportedInstall => 'Install NextPush';
Expand Down Expand Up @@ -256,7 +260,8 @@ class AppLocalizationsEn extends AppLocalizations {
String get globalOptionsPushNotificationsEnabled => 'Enabled';

@override
String get globalOptionsPushNotificationsEnabledDisabledNotice => 'No UnifiedPush distributor could be found or you denied the permission for showing notifications. Please go to the app settings and allow notifications and go to https://unifiedpush.org/users/distributors and setup any of the listed distributors. Then re-open this app and you should be able to enable notifications';
String get globalOptionsPushNotificationsEnabledDisabledNotice =>
'No UnifiedPush distributor could be found or you denied the permission for showing notifications. Please go to the app settings and allow notifications and go to https://unifiedpush.org/users/distributors and setup any of the listed distributors. Then re-open this app and you should be able to enable notifications';

@override
String get globalOptionsPushNotificationsDistributor => 'UnifiedPush Distributor';
Expand Down
2 changes: 1 addition & 1 deletion tool/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd "$(dirname "$0")/.."

./tool/build-dev-container.sh

echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2 and on IOS emulator use http://localhost"
echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2"
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway nextcloud-neon-dev

0 comments on commit 6e2ee47

Please sign in to comment.