Reduce noise
This commit is contained in:
committed by
AmanRajSinghMourya
parent
8a9f73ada5
commit
f9299e7950
@@ -1,21 +0,0 @@
|
||||
# Configuration
|
||||
|
||||
A Flutter package for shared configuration across ente apps.
|
||||
|
||||
## Usage
|
||||
|
||||
Import the package and call the init method from your app's main.dart:
|
||||
|
||||
```dart
|
||||
import 'package:configuration/configuration.dart';
|
||||
|
||||
void main() async {
|
||||
await Configuration.init();
|
||||
// ... rest of your app initialization
|
||||
}
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Shared configuration initialization
|
||||
- Common setup logic for ente apps
|
||||
@@ -1,37 +0,0 @@
|
||||
# Ente Network
|
||||
|
||||
A Flutter package for network management and HTTP client configuration used across Ente applications.
|
||||
|
||||
## Features
|
||||
|
||||
- Configurable HTTP client using Dio
|
||||
- Request interceptors for authentication and request tracking
|
||||
- Platform-aware user agent handling
|
||||
- Connection timeout management
|
||||
- Base URL configuration
|
||||
- Request ID generation
|
||||
|
||||
## Usage
|
||||
|
||||
```dart
|
||||
import 'package:ente_network/network.dart';
|
||||
import 'package:ente_configuration/base_configuration.dart';
|
||||
|
||||
// Initialize the network service
|
||||
await Network.instance.init(configuration);
|
||||
|
||||
// Use the configured Dio instances
|
||||
final dio = Network.instance.getDio();
|
||||
final enteDio = Network.instance.enteDio;
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This package depends on:
|
||||
- `dio` for HTTP client functionality
|
||||
- `ente_configuration` for configuration management
|
||||
- `ente_events` for event handling
|
||||
- `native_dio_adapter` for native networking
|
||||
- `package_info_plus` for package information
|
||||
- `ua_client_hints` for user agent generation
|
||||
- `uuid` for request ID generation
|
||||
@@ -1,95 +0,0 @@
|
||||
# Ente Strings
|
||||
|
||||
A Flutter package containing shared localization strings for Ente apps.
|
||||
|
||||
## Purpose
|
||||
|
||||
This package provides common localization strings that are shared across multiple Ente applications (Auth, Photos, etc.). It centralizes the translations for common UI elements, error messages, and other shared text to ensure consistency across the apps.
|
||||
|
||||
## Usage
|
||||
|
||||
### 1. Add to pubspec.yaml
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
ente_strings:
|
||||
path: ../packages/strings
|
||||
```
|
||||
|
||||
### 2. Configure in your app
|
||||
|
||||
Add the strings localizations delegate to your app:
|
||||
|
||||
```dart
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
|
||||
MaterialApp(
|
||||
localizationsDelegates: [
|
||||
...StringsLocalizations.localizationsDelegates,
|
||||
// Your other delegates...
|
||||
],
|
||||
supportedLocales: StringsLocalizations.supportedLocales,
|
||||
// ...
|
||||
)
|
||||
```
|
||||
|
||||
### 3. Use in your widgets
|
||||
|
||||
Use the convenient extension to access strings:
|
||||
|
||||
```dart
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Text(context.strings.networkHostLookUpErr);
|
||||
}
|
||||
```
|
||||
|
||||
Or use the traditional approach:
|
||||
|
||||
```dart
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Text(StringsLocalizations.of(context).networkHostLookUpErr);
|
||||
}
|
||||
```
|
||||
|
||||
## Available Strings
|
||||
|
||||
Currently available strings:
|
||||
|
||||
- `networkHostLookUpErr`: Error message for network host lookup failures
|
||||
|
||||
## Adding New Strings
|
||||
|
||||
1. Add the string to `lib/l10n/arb/strings_en.arb` (template file)
|
||||
2. Add translations to all other `strings_*.arb` files
|
||||
3. Run `flutter gen-l10n` to regenerate the localization files
|
||||
4. Move generated files from `lib/l10n/arb/` to `lib/l10n/` if needed
|
||||
|
||||
## Supported Languages
|
||||
|
||||
Currently supported languages include:
|
||||
- Arabic (ar)
|
||||
- Bulgarian (bg)
|
||||
- Czech (cs)
|
||||
- Danish (da)
|
||||
- Greek (el)
|
||||
- English (en)
|
||||
- French (fr)
|
||||
- Indonesian (id)
|
||||
- Japanese (ja)
|
||||
- Korean (ko)
|
||||
- Lithuanian (lt)
|
||||
- Dutch (nl)
|
||||
- Polish (pl)
|
||||
- Portuguese (pt)
|
||||
- Russian (ru)
|
||||
- Slovak (sk)
|
||||
- Serbian (sr)
|
||||
- Swedish (sv)
|
||||
- Turkish (tr)
|
||||
- Vietnamese (vi)
|
||||
- Chinese Simplified (zh)
|
||||
- Chinese Traditional (zh_TW)
|
||||
Reference in New Issue
Block a user