Skip to content

Commit 75520ed

Browse files
committed
feat(neon_spreed): Init
Signed-off-by: jld3103 <jld3103yt@gmail.com>
1 parent f488cc8 commit 75520ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3213
-4
lines changed

.cspell/dart_flutter.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ sublist
1010
todos
1111
unawaited
1212
unfocus
13+
videocam
1314
writeln

.cspell/nextcloud.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ trashbin
5151
turnservers
5252
undelete
5353
unifiedpush
54+
unmute
5455
unstar
5556
updatenotification
5657
uppush

.cspell/tools.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ strfreev
6262
subprojects
6363
sysroot
6464
tsvg
65+
webrtc
6566
werror
6667
xxxh
6768
xxxhdpi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ See [here](packages/app/README.md) for screenshots.
5454
| [News](packages/neon/neon_news) | :heavy_check_mark: |
5555
| [Notes](packages/neon/neon_notes) | :heavy_check_mark: |
5656
| [Notifications](packages/neon/neon_notifications) | :heavy_check_mark: |
57+
| [Talk](packages/neon/neon_spreed) | :heavy_check_mark: |
5758
| Activity | :rocket: |
5859
| Calendar | :rocket: |
5960
| Contacts | :rocket: |
@@ -62,7 +63,6 @@ See [here](packages/app/README.md) for screenshots.
6263
| Deck | :rocket: |
6364
| Photos | :rocket: |
6465
| Photos | :rocket: |
65-
| Talk | :construction: |
6666
| Tasks | :rocket: |
6767

6868
## Platform support

commitlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222
- neon_news
2323
- neon_notes
2424
- neon_notifications
25+
- neon_spreed
2526
- nextcloud
2627
- nextcloud_test
2728
- release

docs/architecture.puml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ package "Clients" {
1313
component neon_news
1414
component neon_notes
1515
component neon_notifications
16+
component neon_spreed
1617
}
1718

1819
package "OpenAPI" {
@@ -27,12 +28,14 @@ app ..> neon_files
2728
app ..> neon_news
2829
app ..> neon_notes
2930
app ..> neon_notifications
31+
app ..> neon_spreed
3032

3133
neon_dashboard --> neon_framework
3234
neon_files --> neon_framework
3335
neon_news --> neon_framework
3436
neon_notes --> neon_framework
3537
neon_notifications --> neon_framework
38+
neon_spreed --> neon_framework
3639

3740

3841
neon_framework --> nextcloud

docs/architecture.svg

Lines changed: 1 addition & 1 deletion
Loading

packages/neon/neon_spreed/.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "ead455963c12b453cdb2358cad34969c76daf180"
8+
channel: "stable"
9+
10+
project_type: package

packages/neon/neon_spreed/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include: package:neon_lints/flutter.yaml
2+
3+
linter:
4+
rules:
5+
# TODO
6+
public_member_api_docs: false
7+
8+
analyzer:
9+
exclude:
10+
- lib/l10n/**
340 Bytes
Binary file not shown.

packages/neon/neon_spreed/build.yaml

Whitespace-only changes.

packages/neon/neon_spreed/l10n.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
arb-dir: lib/l10n
2+
template-arb-file: en.arb
3+
output-localization-file: localizations.dart
4+
synthetic-package: false
5+
output-class: SpreedLocalizations
6+
output-dir: lib/l10n
7+
nullable-getter: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"@@locale": "en",
3+
"roomCreate": "Create room",
4+
"roomCreateUserName": "User name",
5+
"roomCreateGroupName": "Group name",
6+
"roomCreateRoomName": "Room name",
7+
"roomTypeOneToOne": "Private",
8+
"roomTypeGroup": "Group",
9+
"roomTypePublic": "Public",
10+
"messageYou": "You",
11+
"callStart": "Start call",
12+
"callJoin": "Join call",
13+
"callLeave": "Leave call",
14+
"screenSharingSelectScreen": "Select screen",
15+
"screenSharingSelectScreenScreens": "Screens",
16+
"screenSharingSelectScreenWindows": "Windows"
17+
}
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
import 'dart:async';
2+
3+
import 'package:flutter/foundation.dart';
4+
import 'package:flutter/widgets.dart';
5+
import 'package:flutter_localizations/flutter_localizations.dart';
6+
import 'package:intl/intl.dart' as intl;
7+
8+
import 'localizations_en.dart';
9+
10+
/// Callers can lookup localized strings with an instance of SpreedLocalizations
11+
/// returned by `SpreedLocalizations.of(context)`.
12+
///
13+
/// Applications need to include `SpreedLocalizations.delegate()` in their app's
14+
/// `localizationDelegates` list, and the locales they support in the app's
15+
/// `supportedLocales` list. For example:
16+
///
17+
/// ```dart
18+
/// import 'l10n/localizations.dart';
19+
///
20+
/// return MaterialApp(
21+
/// localizationsDelegates: SpreedLocalizations.localizationsDelegates,
22+
/// supportedLocales: SpreedLocalizations.supportedLocales,
23+
/// home: MyApplicationHome(),
24+
/// );
25+
/// ```
26+
///
27+
/// ## Update pubspec.yaml
28+
///
29+
/// Please make sure to update your pubspec.yaml to include the following
30+
/// packages:
31+
///
32+
/// ```yaml
33+
/// dependencies:
34+
/// # Internationalization support.
35+
/// flutter_localizations:
36+
/// sdk: flutter
37+
/// intl: any # Use the pinned version from flutter_localizations
38+
///
39+
/// # Rest of dependencies
40+
/// ```
41+
///
42+
/// ## iOS Applications
43+
///
44+
/// iOS applications define key application metadata, including supported
45+
/// locales, in an Info.plist file that is built into the application bundle.
46+
/// To configure the locales supported by your app, you’ll need to edit this
47+
/// file.
48+
///
49+
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
50+
/// Then, in the Project Navigator, open the Info.plist file under the Runner
51+
/// project’s Runner folder.
52+
///
53+
/// Next, select the Information Property List item, select Add Item from the
54+
/// Editor menu, then select Localizations from the pop-up menu.
55+
///
56+
/// Select and expand the newly-created Localizations item then, for each
57+
/// locale your application supports, add a new item and select the locale
58+
/// you wish to add from the pop-up menu in the Value field. This list should
59+
/// be consistent with the languages listed in the SpreedLocalizations.supportedLocales
60+
/// property.
61+
abstract class SpreedLocalizations {
62+
SpreedLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
63+
64+
final String localeName;
65+
66+
static SpreedLocalizations of(BuildContext context) {
67+
return Localizations.of<SpreedLocalizations>(context, SpreedLocalizations)!;
68+
}
69+
70+
static const LocalizationsDelegate<SpreedLocalizations> delegate = _SpreedLocalizationsDelegate();
71+
72+
/// A list of this localizations delegate along with the default localizations
73+
/// delegates.
74+
///
75+
/// Returns a list of localizations delegates containing this delegate along with
76+
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
77+
/// and GlobalWidgetsLocalizations.delegate.
78+
///
79+
/// Additional delegates can be added by appending to this list in
80+
/// MaterialApp. This list does not have to be used at all if a custom list
81+
/// of delegates is preferred or required.
82+
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
83+
delegate,
84+
GlobalMaterialLocalizations.delegate,
85+
GlobalCupertinoLocalizations.delegate,
86+
GlobalWidgetsLocalizations.delegate,
87+
];
88+
89+
/// A list of this localizations delegate's supported locales.
90+
static const List<Locale> supportedLocales = <Locale>[Locale('en')];
91+
92+
/// No description provided for @roomCreate.
93+
///
94+
/// In en, this message translates to:
95+
/// **'Create room'**
96+
String get roomCreate;
97+
98+
/// No description provided for @roomCreateUserName.
99+
///
100+
/// In en, this message translates to:
101+
/// **'User name'**
102+
String get roomCreateUserName;
103+
104+
/// No description provided for @roomCreateGroupName.
105+
///
106+
/// In en, this message translates to:
107+
/// **'Group name'**
108+
String get roomCreateGroupName;
109+
110+
/// No description provided for @roomCreateRoomName.
111+
///
112+
/// In en, this message translates to:
113+
/// **'Room name'**
114+
String get roomCreateRoomName;
115+
116+
/// No description provided for @roomTypeOneToOne.
117+
///
118+
/// In en, this message translates to:
119+
/// **'Private'**
120+
String get roomTypeOneToOne;
121+
122+
/// No description provided for @roomTypeGroup.
123+
///
124+
/// In en, this message translates to:
125+
/// **'Group'**
126+
String get roomTypeGroup;
127+
128+
/// No description provided for @roomTypePublic.
129+
///
130+
/// In en, this message translates to:
131+
/// **'Public'**
132+
String get roomTypePublic;
133+
134+
/// No description provided for @messageYou.
135+
///
136+
/// In en, this message translates to:
137+
/// **'You'**
138+
String get messageYou;
139+
140+
/// No description provided for @callStart.
141+
///
142+
/// In en, this message translates to:
143+
/// **'Start call'**
144+
String get callStart;
145+
146+
/// No description provided for @callJoin.
147+
///
148+
/// In en, this message translates to:
149+
/// **'Join call'**
150+
String get callJoin;
151+
152+
/// No description provided for @callLeave.
153+
///
154+
/// In en, this message translates to:
155+
/// **'Leave call'**
156+
String get callLeave;
157+
158+
/// No description provided for @screenSharingSelectScreen.
159+
///
160+
/// In en, this message translates to:
161+
/// **'Select screen'**
162+
String get screenSharingSelectScreen;
163+
164+
/// No description provided for @screenSharingSelectScreenScreens.
165+
///
166+
/// In en, this message translates to:
167+
/// **'Screens'**
168+
String get screenSharingSelectScreenScreens;
169+
170+
/// No description provided for @screenSharingSelectScreenWindows.
171+
///
172+
/// In en, this message translates to:
173+
/// **'Windows'**
174+
String get screenSharingSelectScreenWindows;
175+
}
176+
177+
class _SpreedLocalizationsDelegate extends LocalizationsDelegate<SpreedLocalizations> {
178+
const _SpreedLocalizationsDelegate();
179+
180+
@override
181+
Future<SpreedLocalizations> load(Locale locale) {
182+
return SynchronousFuture<SpreedLocalizations>(lookupSpreedLocalizations(locale));
183+
}
184+
185+
@override
186+
bool isSupported(Locale locale) => <String>['en'].contains(locale.languageCode);
187+
188+
@override
189+
bool shouldReload(_SpreedLocalizationsDelegate old) => false;
190+
}
191+
192+
SpreedLocalizations lookupSpreedLocalizations(Locale locale) {
193+
// Lookup logic when only language code is specified.
194+
switch (locale.languageCode) {
195+
case 'en':
196+
return SpreedLocalizationsEn();
197+
}
198+
199+
throw FlutterError('SpreedLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
200+
'an issue with the localizations generation tool. Please file an issue '
201+
'on GitHub with a reproducible sample app and the gen-l10n configuration '
202+
'that was used.');
203+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import 'localizations.dart';
2+
3+
/// The translations for English (`en`).
4+
class SpreedLocalizationsEn extends SpreedLocalizations {
5+
SpreedLocalizationsEn([String locale = 'en']) : super(locale);
6+
7+
@override
8+
String get roomCreate => 'Create room';
9+
10+
@override
11+
String get roomCreateUserName => 'User name';
12+
13+
@override
14+
String get roomCreateGroupName => 'Group name';
15+
16+
@override
17+
String get roomCreateRoomName => 'Room name';
18+
19+
@override
20+
String get roomTypeOneToOne => 'Private';
21+
22+
@override
23+
String get roomTypeGroup => 'Group';
24+
25+
@override
26+
String get roomTypePublic => 'Public';
27+
28+
@override
29+
String get messageYou => 'You';
30+
31+
@override
32+
String get callStart => 'Start call';
33+
34+
@override
35+
String get callJoin => 'Join call';
36+
37+
@override
38+
String get callLeave => 'Leave call';
39+
40+
@override
41+
String get screenSharingSelectScreen => 'Select screen';
42+
43+
@override
44+
String get screenSharingSelectScreenScreens => 'Screens';
45+
46+
@override
47+
String get screenSharingSelectScreenWindows => 'Windows';
48+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export 'src/app.dart';

0 commit comments

Comments
 (0)