Skip to content

Commit

Permalink
feat(neon_spreed): Init
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <[email protected]>
  • Loading branch information
provokateurin committed Dec 27, 2023
1 parent 3f15428 commit 0fad528
Show file tree
Hide file tree
Showing 41 changed files with 3,162 additions and 4 deletions.
1 change: 1 addition & 0 deletions .cspell/dart_flutter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ sublist
todos
unawaited
unfocus
videocam
writeln
1 change: 1 addition & 0 deletions .cspell/nextcloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ trashbin
turnservers
undelete
unifiedpush
unmute
unsharing
unstar
updatenotification
Expand Down
1 change: 1 addition & 0 deletions .cspell/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ strfreev
subprojects
sysroot
tsvg
webrtc
werror
workdir
xxxh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ See [here](packages/app/README.md) for screenshots.
| [News](packages/neon/neon_news) | :heavy_check_mark: |
| [Notes](packages/neon/neon_notes) | :heavy_check_mark: |
| [Notifications](packages/neon/neon_notifications) | :heavy_check_mark: |
| [Talk](packages/neon/neon_spreed) | :heavy_check_mark: |
| Activity | :rocket: |
| Calendar | :rocket: |
| Contacts | :rocket: |
| Cookbook | :rocket: |
| Photos | :rocket: |
| Talk | :rocket: |
| Tasks | :rocket: |

## Platform support
Expand Down
1 change: 1 addition & 0 deletions commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rules:
- neon_news
- neon_notes
- neon_notifications
- neon_spreed
- nextcloud
- nextcloud_test
- release
Expand Down
3 changes: 3 additions & 0 deletions docs/architecture.puml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package "Clients" {
component neon_news
component neon_notes
component neon_notifications
component neon_spreed
}

package "OpenAPI" {
Expand All @@ -27,12 +28,14 @@ app ..> neon_files
app ..> neon_news
app ..> neon_notes
app ..> neon_notifications
app ..> neon_spreed

neon_dashboard --> neon_framework
neon_files --> neon_framework
neon_news --> neon_framework
neon_notes --> neon_framework
neon_notifications --> neon_framework
neon_spreed --> neon_framework


neon_framework --> nextcloud
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/neon/neon_spreed/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "ead455963c12b453cdb2358cad34969c76daf180"
channel: "stable"

project_type: package
674 changes: 674 additions & 0 deletions packages/neon/neon_spreed/LICENSE

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions packages/neon/neon_spreed/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include: package:neon_lints/flutter.yaml

linter:
rules:
# TODO
public_member_api_docs: false

analyzer:
exclude:
- lib/l10n/**
Binary file added packages/neon/neon_spreed/assets/app.svg.vec
Binary file not shown.
Empty file.
7 changes: 7 additions & 0 deletions packages/neon/neon_spreed/l10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
arb-dir: lib/l10n
template-arb-file: en.arb
output-localization-file: localizations.dart
synthetic-package: false
output-class: SpreedLocalizations
output-dir: lib/l10n
nullable-getter: false
17 changes: 17 additions & 0 deletions packages/neon/neon_spreed/lib/l10n/en.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"@@locale": "en",
"roomCreate": "Create room",
"roomCreateUserName": "User name",
"roomCreateGroupName": "Group name",
"roomCreateRoomName": "Room name",
"roomTypeOneToOne": "Private",
"roomTypeGroup": "Group",
"roomTypePublic": "Public",
"messageYou": "You",
"callStart": "Start call",
"callJoin": "Join call",
"callLeave": "Leave call",
"screenSharingSelectScreen": "Select screen",
"screenSharingSelectScreenScreens": "Screens",
"screenSharingSelectScreenWindows": "Windows"
}
203 changes: 203 additions & 0 deletions packages/neon/neon_spreed/lib/l10n/localizations.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;

import 'localizations_en.dart';

/// Callers can lookup localized strings with an instance of SpreedLocalizations
/// returned by `SpreedLocalizations.of(context)`.
///
/// Applications need to include `SpreedLocalizations.delegate()` in their app's
/// `localizationDelegates` list, and the locales they support in the app's
/// `supportedLocales` list. For example:
///
/// ```dart
/// import 'l10n/localizations.dart';
///
/// return MaterialApp(
/// localizationsDelegates: SpreedLocalizations.localizationsDelegates,
/// supportedLocales: SpreedLocalizations.supportedLocales,
/// home: MyApplicationHome(),
/// );
/// ```
///
/// ## Update pubspec.yaml
///
/// Please make sure to update your pubspec.yaml to include the following
/// packages:
///
/// ```yaml
/// dependencies:
/// # Internationalization support.
/// flutter_localizations:
/// sdk: flutter
/// intl: any # Use the pinned version from flutter_localizations
///
/// # Rest of dependencies
/// ```
///
/// ## iOS Applications
///
/// iOS applications define key application metadata, including supported
/// locales, in an Info.plist file that is built into the application bundle.
/// To configure the locales supported by your app, you’ll need to edit this
/// file.
///
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
/// Then, in the Project Navigator, open the Info.plist file under the Runner
/// project’s Runner folder.
///
/// Next, select the Information Property List item, select Add Item from the
/// Editor menu, then select Localizations from the pop-up menu.
///
/// Select and expand the newly-created Localizations item then, for each
/// locale your application supports, add a new item and select the locale
/// you wish to add from the pop-up menu in the Value field. This list should
/// be consistent with the languages listed in the SpreedLocalizations.supportedLocales
/// property.
abstract class SpreedLocalizations {
SpreedLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());

final String localeName;

static SpreedLocalizations of(BuildContext context) {
return Localizations.of<SpreedLocalizations>(context, SpreedLocalizations)!;
}

static const LocalizationsDelegate<SpreedLocalizations> delegate = _SpreedLocalizationsDelegate();

/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// 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>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];

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

/// No description provided for @roomCreate.
///
/// In en, this message translates to:
/// **'Create room'**
String get roomCreate;

/// No description provided for @roomCreateUserName.
///
/// In en, this message translates to:
/// **'User name'**
String get roomCreateUserName;

/// No description provided for @roomCreateGroupName.
///
/// In en, this message translates to:
/// **'Group name'**
String get roomCreateGroupName;

/// No description provided for @roomCreateRoomName.
///
/// In en, this message translates to:
/// **'Room name'**
String get roomCreateRoomName;

/// No description provided for @roomTypeOneToOne.
///
/// In en, this message translates to:
/// **'Private'**
String get roomTypeOneToOne;

/// No description provided for @roomTypeGroup.
///
/// In en, this message translates to:
/// **'Group'**
String get roomTypeGroup;

/// No description provided for @roomTypePublic.
///
/// In en, this message translates to:
/// **'Public'**
String get roomTypePublic;

/// No description provided for @messageYou.
///
/// In en, this message translates to:
/// **'You'**
String get messageYou;

/// No description provided for @callStart.
///
/// In en, this message translates to:
/// **'Start call'**
String get callStart;

/// No description provided for @callJoin.
///
/// In en, this message translates to:
/// **'Join call'**
String get callJoin;

/// No description provided for @callLeave.
///
/// In en, this message translates to:
/// **'Leave call'**
String get callLeave;

/// No description provided for @screenSharingSelectScreen.
///
/// In en, this message translates to:
/// **'Select screen'**
String get screenSharingSelectScreen;

/// No description provided for @screenSharingSelectScreenScreens.
///
/// In en, this message translates to:
/// **'Screens'**
String get screenSharingSelectScreenScreens;

/// No description provided for @screenSharingSelectScreenWindows.
///
/// In en, this message translates to:
/// **'Windows'**
String get screenSharingSelectScreenWindows;
}

class _SpreedLocalizationsDelegate extends LocalizationsDelegate<SpreedLocalizations> {
const _SpreedLocalizationsDelegate();

@override
Future<SpreedLocalizations> load(Locale locale) {
return SynchronousFuture<SpreedLocalizations>(lookupSpreedLocalizations(locale));
}

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

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

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

throw FlutterError('SpreedLocalizations.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.');
}
48 changes: 48 additions & 0 deletions packages/neon/neon_spreed/lib/l10n/localizations_en.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import 'localizations.dart';

/// The translations for English (`en`).
class SpreedLocalizationsEn extends SpreedLocalizations {
SpreedLocalizationsEn([String locale = 'en']) : super(locale);

@override
String get roomCreate => 'Create room';

@override
String get roomCreateUserName => 'User name';

@override
String get roomCreateGroupName => 'Group name';

@override
String get roomCreateRoomName => 'Room name';

@override
String get roomTypeOneToOne => 'Private';

@override
String get roomTypeGroup => 'Group';

@override
String get roomTypePublic => 'Public';

@override
String get messageYou => 'You';

@override
String get callStart => 'Start call';

@override
String get callJoin => 'Join call';

@override
String get callLeave => 'Leave call';

@override
String get screenSharingSelectScreen => 'Select screen';

@override
String get screenSharingSelectScreenScreens => 'Screens';

@override
String get screenSharingSelectScreenWindows => 'Windows';
}
1 change: 1 addition & 0 deletions packages/neon/neon_spreed/lib/neon_spreed.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'src/app.dart';
Loading

0 comments on commit 0fad528

Please sign in to comment.