Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Oct 17, 2023
2 parents 647bad5 + daa62d6 commit e079f67
Show file tree
Hide file tree
Showing 188 changed files with 6,786 additions and 2,451 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:

winget-publish:
needs: create-build
runs-on: ubuntu-latest
runs-on: windows-latest # action can only be run on windows
steps:
- name: Update WINGET manifest
uses: vedantmgoyal2009/winget-releaser@v2
Expand All @@ -185,12 +185,12 @@ jobs:

homebrew-cask-publish:
needs: create-build
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- name: Update Homebrew cask
uses: macauley/action-homebrew-bump-cask@v1
with:
token: ${{secrets.WINGET}}
tap: homebrew/homebrew-cask
cask: tachidesk-sorayomi
livecheck: true
livecheck: true
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Future<void> main() async {
final packageInfo = await PackageInfo.fromPlatform();
final sharedPreferences = await SharedPreferences.getInstance();

Directory? appDirectory;
final Directory? appDirectory;
if (!kIsWeb) {
final appDocDirectory = await getApplicationDocumentsDirectory();
appDirectory = Directory(path.join(appDocDirectory.path, 'Sorayomi'));
Expand Down
1 change: 1 addition & 0 deletions lib/src/constants/db_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enum DBKeys {
libraryDisplayMode(DisplayMode.grid),
sourceDisplayMode(DisplayMode.grid),
gridMangaCoverWidth(192.0),
readerOverlay(true),
;

const DBKeys(this.initial);
Expand Down
15 changes: 14 additions & 1 deletion lib/src/constants/language_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ String getLanguageNameFormLocale(Locale locale) {
return displayName ?? locale.toLanguageTag();
}

String getLanguageNameInEnFormLocale(Locale locale) {
String? name;
final localeCode = locale.toLanguageTag().toLowerCase();
if (languageMap[localeCode] != null) {
name = languageMap[localeCode]!.name;
} else if (languageMap[locale.languageCode.toLowerCase()] != null) {
name = languageMap[locale.languageCode.toLowerCase()]!.name;
}
return name ?? locale.toLanguageTag();
}

final languageMap = {
for (final e in customLanguageList) e['code'] ?? "other": Language.fromJson(e)
};
Expand All @@ -43,6 +54,7 @@ const customLanguageList = [

const languageList = [
{"code": 'en', "name": 'English', "nativeName": 'English'},
{"code": 'en-us', "name": 'English (US)', "nativeName": 'English (US)'},
{"code": 'ca', "name": 'Catalan; Valencian', "nativeName": 'Català'},
{"code": 'de', "name": 'German', "nativeName": 'Deutsch'},
{"code": 'es', "name": 'Spanish; Castilian', "nativeName": 'Español'},
Expand All @@ -67,8 +79,9 @@ const languageList = [
{"code": 'ar', "name": 'Arabic', "nativeName": 'العربية'},
{"code": 'hi', "name": 'Hindi', "nativeName": 'हिन्दी'},
{"code": 'th', "name": 'Thai', "nativeName": 'ไทย'},
{"code": 'zh', "name": 'Chinese', "nativeName": '中文'},
{"code": 'zh-hans', "name": 'Simplified Chinese', "nativeName": '简体中文'},
{"code": 'zh-hant', "name": 'Traditional Chinese', "nativeName": '繁体中文'},
{"code": 'zh-hant', "name": 'Traditional Chinese', "nativeName": '繁體中文'},
{
"code": 'zh-rhk',
"name": 'Traditional Chinese (HK)',
Expand Down
8 changes: 4 additions & 4 deletions lib/src/constants/quick_open_help_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import '../utils/extensions/custom_extensions.dart';

List<QuickSearchResult> getQuickShowHintTextList(BuildContext context) {
return [
QuickSearchResult.helpText(
prefill: 'X',
hintText: context.l10n!.quickSearchContext,
),
QuickSearchResult.helpText(
prefill: '@S',
pattern: '@',
Expand All @@ -40,5 +36,9 @@ List<QuickSearchResult> getQuickShowHintTextList(BuildContext context) {
pattern: '#/:',
hintText: context.l10n!.quickSearchCategoryMangaChapter,
),
QuickSearchResult.helpText(
prefill: 'X',
hintText: context.l10n!.quickSearchContext,
),
];
}
2 changes: 1 addition & 1 deletion lib/src/features/about/data/about_repository.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 21 additions & 18 deletions lib/src/features/about/domain/about/about_model.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ class _$AboutCopyWithImpl<$Res, $Val extends About>
}

/// @nodoc
abstract class _$$_AboutCopyWith<$Res> implements $AboutCopyWith<$Res> {
factory _$$_AboutCopyWith(_$_About value, $Res Function(_$_About) then) =
__$$_AboutCopyWithImpl<$Res>;
abstract class _$$AboutImplCopyWith<$Res> implements $AboutCopyWith<$Res> {
factory _$$AboutImplCopyWith(
_$AboutImpl value, $Res Function(_$AboutImpl) then) =
__$$AboutImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
Expand All @@ -119,9 +120,11 @@ abstract class _$$_AboutCopyWith<$Res> implements $AboutCopyWith<$Res> {
}

/// @nodoc
class __$$_AboutCopyWithImpl<$Res> extends _$AboutCopyWithImpl<$Res, _$_About>
implements _$$_AboutCopyWith<$Res> {
__$$_AboutCopyWithImpl(_$_About _value, $Res Function(_$_About) _then)
class __$$AboutImplCopyWithImpl<$Res>
extends _$AboutCopyWithImpl<$Res, _$AboutImpl>
implements _$$AboutImplCopyWith<$Res> {
__$$AboutImplCopyWithImpl(
_$AboutImpl _value, $Res Function(_$AboutImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -135,7 +138,7 @@ class __$$_AboutCopyWithImpl<$Res> extends _$AboutCopyWithImpl<$Res, _$_About>
Object? github = freezed,
Object? discord = freezed,
}) {
return _then(_$_About(
return _then(_$AboutImpl(
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -170,8 +173,8 @@ class __$$_AboutCopyWithImpl<$Res> extends _$AboutCopyWithImpl<$Res, _$_About>

/// @nodoc
@JsonSerializable()
class _$_About implements _About {
const _$_About(
class _$AboutImpl implements _About {
const _$AboutImpl(
{this.name,
this.version,
this.revision,
Expand All @@ -180,8 +183,8 @@ class _$_About implements _About {
this.github,
this.discord});

factory _$_About.fromJson(Map<String, dynamic> json) =>
_$$_AboutFromJson(json);
factory _$AboutImpl.fromJson(Map<String, dynamic> json) =>
_$$AboutImplFromJson(json);

@override
final String? name;
Expand All @@ -207,7 +210,7 @@ class _$_About implements _About {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_About &&
other is _$AboutImpl &&
(identical(other.name, name) || other.name == name) &&
(identical(other.version, version) || other.version == version) &&
(identical(other.revision, revision) ||
Expand All @@ -228,12 +231,12 @@ class _$_About implements _About {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_AboutCopyWith<_$_About> get copyWith =>
__$$_AboutCopyWithImpl<_$_About>(this, _$identity);
_$$AboutImplCopyWith<_$AboutImpl> get copyWith =>
__$$AboutImplCopyWithImpl<_$AboutImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_AboutToJson(
return _$$AboutImplToJson(
this,
);
}
Expand All @@ -247,9 +250,9 @@ abstract class _About implements About {
final String? buildType,
final int? buildTime,
final String? github,
final String? discord}) = _$_About;
final String? discord}) = _$AboutImpl;

factory _About.fromJson(Map<String, dynamic> json) = _$_About.fromJson;
factory _About.fromJson(Map<String, dynamic> json) = _$AboutImpl.fromJson;

@override
String? get name;
Expand All @@ -267,6 +270,6 @@ abstract class _About implements About {
String? get discord;
@override
@JsonKey(ignore: true)
_$$_AboutCopyWith<_$_About> get copyWith =>
_$$AboutImplCopyWith<_$AboutImpl> get copyWith =>
throw _privateConstructorUsedError;
}
5 changes: 3 additions & 2 deletions lib/src/features/about/domain/about/about_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ class _$ServerUpdateCopyWithImpl<$Res, $Val extends ServerUpdate>
}

/// @nodoc
abstract class _$$_ServerUpdateCopyWith<$Res>
abstract class _$$ServerUpdateImplCopyWith<$Res>
implements $ServerUpdateCopyWith<$Res> {
factory _$$_ServerUpdateCopyWith(
_$_ServerUpdate value, $Res Function(_$_ServerUpdate) then) =
__$$_ServerUpdateCopyWithImpl<$Res>;
factory _$$ServerUpdateImplCopyWith(
_$ServerUpdateImpl value, $Res Function(_$ServerUpdateImpl) then) =
__$$ServerUpdateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String? channel, String? tag, String? url});
}

/// @nodoc
class __$$_ServerUpdateCopyWithImpl<$Res>
extends _$ServerUpdateCopyWithImpl<$Res, _$_ServerUpdate>
implements _$$_ServerUpdateCopyWith<$Res> {
__$$_ServerUpdateCopyWithImpl(
_$_ServerUpdate _value, $Res Function(_$_ServerUpdate) _then)
class __$$ServerUpdateImplCopyWithImpl<$Res>
extends _$ServerUpdateCopyWithImpl<$Res, _$ServerUpdateImpl>
implements _$$ServerUpdateImplCopyWith<$Res> {
__$$ServerUpdateImplCopyWithImpl(
_$ServerUpdateImpl _value, $Res Function(_$ServerUpdateImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -99,7 +99,7 @@ class __$$_ServerUpdateCopyWithImpl<$Res>
Object? tag = freezed,
Object? url = freezed,
}) {
return _then(_$_ServerUpdate(
return _then(_$ServerUpdateImpl(
channel: freezed == channel
? _value.channel
: channel // ignore: cast_nullable_to_non_nullable
Expand All @@ -118,11 +118,11 @@ class __$$_ServerUpdateCopyWithImpl<$Res>

/// @nodoc
@JsonSerializable()
class _$_ServerUpdate implements _ServerUpdate {
_$_ServerUpdate({this.channel, this.tag, this.url});
class _$ServerUpdateImpl implements _ServerUpdate {
_$ServerUpdateImpl({this.channel, this.tag, this.url});

factory _$_ServerUpdate.fromJson(Map<String, dynamic> json) =>
_$$_ServerUpdateFromJson(json);
factory _$ServerUpdateImpl.fromJson(Map<String, dynamic> json) =>
_$$ServerUpdateImplFromJson(json);

@override
final String? channel;
Expand All @@ -140,7 +140,7 @@ class _$_ServerUpdate implements _ServerUpdate {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_ServerUpdate &&
other is _$ServerUpdateImpl &&
(identical(other.channel, channel) || other.channel == channel) &&
(identical(other.tag, tag) || other.tag == tag) &&
(identical(other.url, url) || other.url == url));
Expand All @@ -153,12 +153,12 @@ class _$_ServerUpdate implements _ServerUpdate {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_ServerUpdateCopyWith<_$_ServerUpdate> get copyWith =>
__$$_ServerUpdateCopyWithImpl<_$_ServerUpdate>(this, _$identity);
_$$ServerUpdateImplCopyWith<_$ServerUpdateImpl> get copyWith =>
__$$ServerUpdateImplCopyWithImpl<_$ServerUpdateImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_ServerUpdateToJson(
return _$$ServerUpdateImplToJson(
this,
);
}
Expand All @@ -168,10 +168,10 @@ abstract class _ServerUpdate implements ServerUpdate {
factory _ServerUpdate(
{final String? channel,
final String? tag,
final String? url}) = _$_ServerUpdate;
final String? url}) = _$ServerUpdateImpl;

factory _ServerUpdate.fromJson(Map<String, dynamic> json) =
_$_ServerUpdate.fromJson;
_$ServerUpdateImpl.fromJson;

@override
String? get channel;
Expand All @@ -181,6 +181,6 @@ abstract class _ServerUpdate implements ServerUpdate {
String? get url;
@override
@JsonKey(ignore: true)
_$$_ServerUpdateCopyWith<_$_ServerUpdate> get copyWith =>
_$$ServerUpdateImplCopyWith<_$ServerUpdateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e079f67

Please sign in to comment.