From c05b6f3b0554a35d88a03705583cdf36fa230bc3 Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 11 Feb 2025 12:08:00 +0100 Subject: [PATCH 1/5] feat: use server side option for hiding authors --- lib/actions.dart | 4 -- lib/api/models/_models.freezed.dart | 60 ++++++++++++++++++++++++++++- lib/api/models/_models.g.dart | 4 ++ lib/api/models/help_center.dart | 6 +++ lib/ui/help_center/help_center.dart | 10 ++--- 5 files changed, 72 insertions(+), 12 deletions(-) diff --git a/lib/actions.dart b/lib/actions.dart index 072bbcd..da00cf6 100644 --- a/lib/actions.dart +++ b/lib/actions.dart @@ -20,9 +20,6 @@ void openHelpCenter({ /// Search fill color Color? searchFillColor, - /// Hide Authors - bool hideAuthors = false, - /// Show Search Bar bool showSearchBar = true, @@ -44,7 +41,6 @@ void openHelpCenter({ primaryColor: primaryColor, textColor: textColor, backgroundColor: backgroundColor, - hideAuthors: hideAuthors, searchFillColor: searchFillColor, defaultLocale: defaultLocale, showSearchBar: showSearchBar, diff --git a/lib/api/models/_models.freezed.dart b/lib/api/models/_models.freezed.dart index c3a4d74..5ecbd69 100644 --- a/lib/api/models/_models.freezed.dart +++ b/lib/api/models/_models.freezed.dart @@ -3012,6 +3012,12 @@ mixin _$HelpCenter { /// The date when the help center was last updated. DateTime get updatedAt => throw _privateConstructorUsedError; + /// Whether to hide the date info on articles. + bool get hideDateInfo => throw _privateConstructorUsedError; + + /// Whether to hide the author info on articles. + bool get hideAuthorInfo => throw _privateConstructorUsedError; + /// List of collections (only returned when using the withStructure option) List? get structure => throw _privateConstructorUsedError; @@ -3045,6 +3051,8 @@ abstract class $HelpCenterCopyWith<$Res> { List availableLocales, DateTime createdAt, DateTime updatedAt, + bool hideDateInfo, + bool hideAuthorInfo, List? structure}); } @@ -3076,6 +3084,8 @@ class _$HelpCenterCopyWithImpl<$Res, $Val extends HelpCenter> Object? availableLocales = null, Object? createdAt = null, Object? updatedAt = null, + Object? hideDateInfo = null, + Object? hideAuthorInfo = null, Object? structure = freezed, }) { return _then(_value.copyWith( @@ -3131,6 +3141,14 @@ class _$HelpCenterCopyWithImpl<$Res, $Val extends HelpCenter> ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, + hideDateInfo: null == hideDateInfo + ? _value.hideDateInfo + : hideDateInfo // ignore: cast_nullable_to_non_nullable + as bool, + hideAuthorInfo: null == hideAuthorInfo + ? _value.hideAuthorInfo + : hideAuthorInfo // ignore: cast_nullable_to_non_nullable + as bool, structure: freezed == structure ? _value.structure : structure // ignore: cast_nullable_to_non_nullable @@ -3161,6 +3179,8 @@ abstract class _$$HelpCenterImplCopyWith<$Res> List availableLocales, DateTime createdAt, DateTime updatedAt, + bool hideDateInfo, + bool hideAuthorInfo, List? structure}); } @@ -3190,6 +3210,8 @@ class __$$HelpCenterImplCopyWithImpl<$Res> Object? availableLocales = null, Object? createdAt = null, Object? updatedAt = null, + Object? hideDateInfo = null, + Object? hideAuthorInfo = null, Object? structure = freezed, }) { return _then(_$HelpCenterImpl( @@ -3245,6 +3267,14 @@ class __$$HelpCenterImplCopyWithImpl<$Res> ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, + hideDateInfo: null == hideDateInfo + ? _value.hideDateInfo + : hideDateInfo // ignore: cast_nullable_to_non_nullable + as bool, + hideAuthorInfo: null == hideAuthorInfo + ? _value.hideAuthorInfo + : hideAuthorInfo // ignore: cast_nullable_to_non_nullable + as bool, structure: freezed == structure ? _value._structure : structure // ignore: cast_nullable_to_non_nullable @@ -3270,6 +3300,8 @@ class _$HelpCenterImpl implements _HelpCenter { required final List availableLocales, required this.createdAt, required this.updatedAt, + this.hideDateInfo = false, + this.hideAuthorInfo = false, final List? structure}) : _navItems = navItems, _availableLocales = availableLocales, @@ -3345,6 +3377,16 @@ class _$HelpCenterImpl implements _HelpCenter { @override final DateTime updatedAt; + /// Whether to hide the date info on articles. + @override + @JsonKey() + final bool hideDateInfo; + + /// Whether to hide the author info on articles. + @override + @JsonKey() + final bool hideAuthorInfo; + /// List of collections (only returned when using the withStructure option) final List? _structure; @@ -3360,7 +3402,7 @@ class _$HelpCenterImpl implements _HelpCenter { @override String toString() { - return 'HelpCenter(helpCenterId: $helpCenterId, displayName: $displayName, title: $title, description: $description, searchPlaceholder: $searchPlaceholder, navItems: $navItems, isPublic: $isPublic, organizationId: $organizationId, defaultLocale: $defaultLocale, locale: $locale, availableLocales: $availableLocales, createdAt: $createdAt, updatedAt: $updatedAt, structure: $structure)'; + return 'HelpCenter(helpCenterId: $helpCenterId, displayName: $displayName, title: $title, description: $description, searchPlaceholder: $searchPlaceholder, navItems: $navItems, isPublic: $isPublic, organizationId: $organizationId, defaultLocale: $defaultLocale, locale: $locale, availableLocales: $availableLocales, createdAt: $createdAt, updatedAt: $updatedAt, hideDateInfo: $hideDateInfo, hideAuthorInfo: $hideAuthorInfo, structure: $structure)'; } @override @@ -3391,6 +3433,10 @@ class _$HelpCenterImpl implements _HelpCenter { other.createdAt == createdAt) && (identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && + (identical(other.hideDateInfo, hideDateInfo) || + other.hideDateInfo == hideDateInfo) && + (identical(other.hideAuthorInfo, hideAuthorInfo) || + other.hideAuthorInfo == hideAuthorInfo) && const DeepCollectionEquality() .equals(other._structure, _structure)); } @@ -3412,6 +3458,8 @@ class _$HelpCenterImpl implements _HelpCenter { const DeepCollectionEquality().hash(_availableLocales), createdAt, updatedAt, + hideDateInfo, + hideAuthorInfo, const DeepCollectionEquality().hash(_structure)); /// Create a copy of HelpCenter @@ -3445,6 +3493,8 @@ abstract class _HelpCenter implements HelpCenter { required final List availableLocales, required final DateTime createdAt, required final DateTime updatedAt, + final bool hideDateInfo, + final bool hideAuthorInfo, final List? structure}) = _$HelpCenterImpl; factory _HelpCenter.fromJson(Map json) = @@ -3502,6 +3552,14 @@ abstract class _HelpCenter implements HelpCenter { @override DateTime get updatedAt; + /// Whether to hide the date info on articles. + @override + bool get hideDateInfo; + + /// Whether to hide the author info on articles. + @override + bool get hideAuthorInfo; + /// List of collections (only returned when using the withStructure option) @override List? get structure; diff --git a/lib/api/models/_models.g.dart b/lib/api/models/_models.g.dart index 5310f4f..bed9553 100644 --- a/lib/api/models/_models.g.dart +++ b/lib/api/models/_models.g.dart @@ -259,6 +259,8 @@ _$HelpCenterImpl _$$HelpCenterImplFromJson(Map json) => .toList(), createdAt: DateTime.parse(json['createdAt'] as String), updatedAt: DateTime.parse(json['updatedAt'] as String), + hideDateInfo: json['hideDateInfo'] as bool? ?? false, + hideAuthorInfo: json['hideAuthorInfo'] as bool? ?? false, structure: (json['structure'] as List?) ?.map((e) => Collection.fromJson(e as Map)) .toList(), @@ -279,6 +281,8 @@ Map _$$HelpCenterImplToJson(_$HelpCenterImpl instance) => 'availableLocales': instance.availableLocales, 'createdAt': instance.createdAt.toIso8601String(), 'updatedAt': instance.updatedAt.toIso8601String(), + 'hideDateInfo': instance.hideDateInfo, + 'hideAuthorInfo': instance.hideAuthorInfo, 'structure': instance.structure, }; diff --git a/lib/api/models/help_center.dart b/lib/api/models/help_center.dart index 3c26ecb..0d48da7 100644 --- a/lib/api/models/help_center.dart +++ b/lib/api/models/help_center.dart @@ -42,6 +42,12 @@ class HelpCenter with _$HelpCenter { /// The date when the help center was last updated. required DateTime updatedAt, + /// Whether to hide the date info on articles. + @Default(false) bool hideDateInfo, + + /// Whether to hide the author info on articles. + @Default(false) bool hideAuthorInfo, + /// List of collections (only returned when using the withStructure option) List? structure, }) = _HelpCenter; diff --git a/lib/ui/help_center/help_center.dart b/lib/ui/help_center/help_center.dart index 5eb1964..47ef40f 100644 --- a/lib/ui/help_center/help_center.dart +++ b/lib/ui/help_center/help_center.dart @@ -19,9 +19,6 @@ class HelpCenterView extends ConsumerStatefulWidget { /// Search fill color final Color? searchFillColor; - /// Hide Authors - final bool hideAuthors; - /// Show Search Bar final bool showSearchBar; @@ -38,7 +35,6 @@ class HelpCenterView extends ConsumerStatefulWidget { required this.primaryColor, this.textColor = Colors.black, this.backgroundColor, - this.hideAuthors = false, this.defaultLocale = const Locale('en'), this.showSearchBar = true, this.searchFillColor, @@ -186,7 +182,7 @@ class _HelpCenterViewState extends ConsumerState { helpCenter: data, textColor: widget.textColor, primaryColor: widget.primaryColor, - hideAuthors: widget.hideAuthors, + hideAuthors: data.hideAuthorInfo, locale: currentLocale, helpCenterContext: _helpCenterNavigatorKey.currentContext!, @@ -331,7 +327,7 @@ class _HelpCenterViewState extends ConsumerState { builder: (context) => _ArticleView( article: p0.item!, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, + hideAuthors: data.hideAuthorInfo, locale: widget.defaultLocale, ), ), @@ -388,7 +384,7 @@ class _HelpCenterViewState extends ConsumerState { child: _CollectionCard( collection: collection, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, + hideAuthors: data.hideAuthorInfo, locale: widget.defaultLocale, ), ); From 59c54d9708433e7dd7fc516332bd6068c0cda41e Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 11 Feb 2025 12:13:22 +0100 Subject: [PATCH 2/5] fix: author can be now null --- lib/api/models/_models.freezed.dart | 59 ++++++++++++++----------- lib/api/models/_models.g.dart | 5 ++- lib/api/models/article.dart | 6 +-- lib/ui/help_center/article/article.dart | 9 ++-- 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/lib/api/models/_models.freezed.dart b/lib/api/models/_models.freezed.dart index 5ecbd69..96d649f 100644 --- a/lib/api/models/_models.freezed.dart +++ b/lib/api/models/_models.freezed.dart @@ -68,8 +68,8 @@ mixin _$Article { DateTime get createdAt => throw _privateConstructorUsedError; /// The date when the article was last updated. - DateTime get updatedAt => - throw _privateConstructorUsedError; //TODO: add author + DateTime get updatedAt => throw _privateConstructorUsedError; + /// The URL-friendly slug of the article. @JsonKey(name: 'slug', required: true) String get slug => throw _privateConstructorUsedError; @@ -89,9 +89,9 @@ mixin _$Article { @JsonKey(name: 'isPublished', defaultValue: true) bool get isPublished => throw _privateConstructorUsedError; - /// Author of the article - @JsonKey(name: 'author', required: true) - Author get author => throw _privateConstructorUsedError; + /// Author of the article (will be null if hideAuthorInfo is true) + @JsonKey(name: 'author') + Author? get author => throw _privateConstructorUsedError; /// An array of available locales for the article. @JsonKey(name: 'availableLocales', required: true) @@ -134,14 +134,14 @@ abstract class $ArticleCopyWith<$Res> { @JsonKey(name: 'isDraftDiffersFromLive', defaultValue: false) bool isDraftDiffersFromLive, @JsonKey(name: 'isPublished', defaultValue: true) bool isPublished, - @JsonKey(name: 'author', required: true) Author author, + @JsonKey(name: 'author') Author? author, @JsonKey(name: 'availableLocales', required: true) List availableLocales, @JsonKey(name: 'publishedLocales', required: true) List publishedLocales}); $FBIconCopyWith<$Res>? get icon; - $AuthorCopyWith<$Res> get author; + $AuthorCopyWith<$Res>? get author; } /// @nodoc @@ -176,7 +176,7 @@ class _$ArticleCopyWithImpl<$Res, $Val extends Article> Object? externalUrl = freezed, Object? isDraftDiffersFromLive = null, Object? isPublished = null, - Object? author = null, + Object? author = freezed, Object? availableLocales = null, Object? publishedLocales = null, }) { @@ -249,10 +249,10 @@ class _$ArticleCopyWithImpl<$Res, $Val extends Article> ? _value.isPublished : isPublished // ignore: cast_nullable_to_non_nullable as bool, - author: null == author + author: freezed == author ? _value.author : author // ignore: cast_nullable_to_non_nullable - as Author, + as Author?, availableLocales: null == availableLocales ? _value.availableLocales : availableLocales // ignore: cast_nullable_to_non_nullable @@ -282,8 +282,12 @@ class _$ArticleCopyWithImpl<$Res, $Val extends Article> /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') - $AuthorCopyWith<$Res> get author { - return $AuthorCopyWith<$Res>(_value.author, (value) { + $AuthorCopyWith<$Res>? get author { + if (_value.author == null) { + return null; + } + + return $AuthorCopyWith<$Res>(_value.author!, (value) { return _then(_value.copyWith(author: value) as $Val); }); } @@ -315,7 +319,7 @@ abstract class _$$ArticleImplCopyWith<$Res> implements $ArticleCopyWith<$Res> { @JsonKey(name: 'isDraftDiffersFromLive', defaultValue: false) bool isDraftDiffersFromLive, @JsonKey(name: 'isPublished', defaultValue: true) bool isPublished, - @JsonKey(name: 'author', required: true) Author author, + @JsonKey(name: 'author') Author? author, @JsonKey(name: 'availableLocales', required: true) List availableLocales, @JsonKey(name: 'publishedLocales', required: true) @@ -324,7 +328,7 @@ abstract class _$$ArticleImplCopyWith<$Res> implements $ArticleCopyWith<$Res> { @override $FBIconCopyWith<$Res>? get icon; @override - $AuthorCopyWith<$Res> get author; + $AuthorCopyWith<$Res>? get author; } /// @nodoc @@ -357,7 +361,7 @@ class __$$ArticleImplCopyWithImpl<$Res> Object? externalUrl = freezed, Object? isDraftDiffersFromLive = null, Object? isPublished = null, - Object? author = null, + Object? author = freezed, Object? availableLocales = null, Object? publishedLocales = null, }) { @@ -430,10 +434,10 @@ class __$$ArticleImplCopyWithImpl<$Res> ? _value.isPublished : isPublished // ignore: cast_nullable_to_non_nullable as bool, - author: null == author + author: freezed == author ? _value.author : author // ignore: cast_nullable_to_non_nullable - as Author, + as Author?, availableLocales: null == availableLocales ? _value._availableLocales : availableLocales // ignore: cast_nullable_to_non_nullable @@ -471,7 +475,7 @@ class _$ArticleImpl implements _Article { required this.isDraftDiffersFromLive, @JsonKey(name: 'isPublished', defaultValue: true) required this.isPublished, - @JsonKey(name: 'author', required: true) required this.author, + @JsonKey(name: 'author') this.author, @JsonKey(name: 'availableLocales', required: true) required final List availableLocales, @JsonKey(name: 'publishedLocales', required: true) @@ -543,7 +547,7 @@ class _$ArticleImpl implements _Article { /// The date when the article was last updated. @override final DateTime updatedAt; -//TODO: add author + /// The URL-friendly slug of the article. @override @JsonKey(name: 'slug', required: true) @@ -568,10 +572,10 @@ class _$ArticleImpl implements _Article { @JsonKey(name: 'isPublished', defaultValue: true) final bool isPublished; - /// Author of the article + /// Author of the article (will be null if hideAuthorInfo is true) @override - @JsonKey(name: 'author', required: true) - final Author author; + @JsonKey(name: 'author') + final Author? author; /// An array of available locales for the article. final List _availableLocales; @@ -712,7 +716,7 @@ abstract class _Article implements Article { required final bool isDraftDiffersFromLive, @JsonKey(name: 'isPublished', defaultValue: true) required final bool isPublished, - @JsonKey(name: 'author', required: true) required final Author author, + @JsonKey(name: 'author') final Author? author, @JsonKey(name: 'availableLocales', required: true) required final List availableLocales, @JsonKey(name: 'publishedLocales', required: true) @@ -779,7 +783,8 @@ abstract class _Article implements Article { /// The date when the article was last updated. @override - DateTime get updatedAt; //TODO: add author + DateTime get updatedAt; + /// The URL-friendly slug of the article. @override @JsonKey(name: 'slug', required: true) @@ -804,10 +809,10 @@ abstract class _Article implements Article { @JsonKey(name: 'isPublished', defaultValue: true) bool get isPublished; - /// Author of the article + /// Author of the article (will be null if hideAuthorInfo is true) @override - @JsonKey(name: 'author', required: true) - Author get author; + @JsonKey(name: 'author') + Author? get author; /// An array of available locales for the article. @override diff --git a/lib/api/models/_models.g.dart b/lib/api/models/_models.g.dart index bed9553..87afd5d 100644 --- a/lib/api/models/_models.g.dart +++ b/lib/api/models/_models.g.dart @@ -16,7 +16,6 @@ _$ArticleImpl _$$ArticleImplFromJson(Map json) { 'locale', 'slug', 'featurebaseUrl', - 'author', 'availableLocales', 'publishedLocales' ], @@ -41,7 +40,9 @@ _$ArticleImpl _$$ArticleImplFromJson(Map json) { externalUrl: json['externalUrl'] as String?, isDraftDiffersFromLive: json['isDraftDiffersFromLive'] as bool? ?? false, isPublished: json['isPublished'] as bool? ?? true, - author: Author.fromJson(json['author'] as Map), + author: json['author'] == null + ? null + : Author.fromJson(json['author'] as Map), availableLocales: (json['availableLocales'] as List) .map((e) => e as String) .toList(), diff --git a/lib/api/models/article.dart b/lib/api/models/article.dart index c4c852f..3747842 100644 --- a/lib/api/models/article.dart +++ b/lib/api/models/article.dart @@ -48,8 +48,6 @@ class Article with _$Article { /// The date when the article was last updated. required DateTime updatedAt, - //TODO: add author - /// The URL-friendly slug of the article. @JsonKey(name: 'slug', required: true) required String slug, @@ -67,8 +65,8 @@ class Article with _$Article { /// Indicates whether the article is published. @JsonKey(name: 'isPublished', defaultValue: true) required bool isPublished, - /// Author of the article - @JsonKey(name: 'author', required: true) required Author author, + /// Author of the article (will be null if hideAuthorInfo is true) + @JsonKey(name: 'author') Author? author, /// An array of available locales for the article. @JsonKey(name: 'availableLocales', required: true) diff --git a/lib/ui/help_center/article/article.dart b/lib/ui/help_center/article/article.dart index bb712e5..5dfb7b5 100644 --- a/lib/ui/help_center/article/article.dart +++ b/lib/ui/help_center/article/article.dart @@ -58,14 +58,15 @@ class _ArticleViewState extends ConsumerState<_ArticleView> { ), textAlign: TextAlign.start, ), - if (!widget.hideAuthors) const SizedBox(height: 15), - if (!widget.hideAuthors) + if (!widget.hideAuthors && widget.article.author != null) + const SizedBox(height: 15), + if (!widget.hideAuthors && widget.article.author != null) Row( children: [ ClipRRect( borderRadius: BorderRadius.circular(40), child: _SafeCachedNetworkImage( - imageUrl: widget.article.author.avatarUrl, + imageUrl: widget.article.author!.avatarUrl, height: 40, width: 40, ), @@ -74,7 +75,7 @@ class _ArticleViewState extends ConsumerState<_ArticleView> { Expanded( child: Text( FeaturebaseLocalizations.of(context) - .writtenBy(widget.article.author.name), + .writtenBy(widget.article.author!.name), style: TextStyle( fontSize: 14, fontFamily: 'Inter', From 172674c3f2eed023241dcd2aabd8df93d0d3eb30 Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 11 Feb 2025 12:39:37 +0100 Subject: [PATCH 3/5] feat(article): last updated date --- lib/api/models/_models.freezed.dart | 112 +++++----- lib/api/models/_models.g.dart | 17 +- lib/api/models/article.dart | 8 +- lib/api/models/collection.dart | 4 +- lib/featurebase.dart | 1 + .../generated/featurebase_localizations.dart | 6 + .../featurebase_localizations_af.dart | 5 + .../featurebase_localizations_ar.dart | 5 + .../featurebase_localizations_az.dart | 5 + .../featurebase_localizations_be.dart | 5 + .../featurebase_localizations_bg.dart | 5 + .../featurebase_localizations_bo.dart | 5 + .../featurebase_localizations_ca.dart | 5 + .../featurebase_localizations_cs.dart | 5 + .../featurebase_localizations_da.dart | 5 + .../featurebase_localizations_de.dart | 5 + .../featurebase_localizations_el.dart | 5 + .../featurebase_localizations_en.dart | 5 + .../featurebase_localizations_es.dart | 5 + .../featurebase_localizations_fa.dart | 5 + .../featurebase_localizations_fi.dart | 5 + .../featurebase_localizations_fr.dart | 5 + .../featurebase_localizations_gl.dart | 5 + .../featurebase_localizations_hi.dart | 5 + .../featurebase_localizations_hr.dart | 5 + .../featurebase_localizations_hu.dart | 5 + .../featurebase_localizations_id.dart | 5 + .../featurebase_localizations_is.dart | 5 + .../featurebase_localizations_it.dart | 5 + .../featurebase_localizations_ja.dart | 5 + .../featurebase_localizations_ko.dart | 5 + .../featurebase_localizations_lt.dart | 5 + .../featurebase_localizations_lv.dart | 5 + .../featurebase_localizations_ms.dart | 5 + .../featurebase_localizations_nb.dart | 5 + .../featurebase_localizations_nl.dart | 5 + .../featurebase_localizations_pl.dart | 5 + .../featurebase_localizations_pt.dart | 5 + .../featurebase_localizations_ro.dart | 5 + .../featurebase_localizations_ru.dart | 5 + .../featurebase_localizations_sk.dart | 5 + .../featurebase_localizations_sl.dart | 5 + .../featurebase_localizations_sr.dart | 5 + .../featurebase_localizations_sv.dart | 5 + .../featurebase_localizations_sw.dart | 5 + .../featurebase_localizations_th.dart | 5 + .../featurebase_localizations_tr.dart | 5 + .../featurebase_localizations_uk.dart | 5 + .../featurebase_localizations_vi.dart | 5 + .../featurebase_localizations_zh.dart | 5 + lib/l10n/package_en.arb | 9 + lib/l10n/untranslated.json | 198 +++++++++++++++++- lib/ui/changelog/changelog.dart | 1 + lib/ui/help_center/article/article.dart | 67 ++++-- lib/ui/help_center/collection/collection.dart | 4 - lib/ui/help_center/help_center.dart | 3 +- .../help_center/widgets/collection_card.dart | 8 +- .../widgets/navbar_expanding_collection.dart | 4 +- lib/ui/help_center/widgets/navbar_popup.dart | 3 + lib/ui/widgets/render_html_widget.dart | 3 - lib/utils.dart | 31 +++ pubspec.yaml | 1 + 62 files changed, 594 insertions(+), 106 deletions(-) diff --git a/lib/api/models/_models.freezed.dart b/lib/api/models/_models.freezed.dart index 96d649f..cccab4e 100644 --- a/lib/api/models/_models.freezed.dart +++ b/lib/api/models/_models.freezed.dart @@ -64,11 +64,11 @@ mixin _$Article { @JsonKey(name: 'locale', required: true) String get locale => throw _privateConstructorUsedError; //TODO: add translations - /// The date when the article was created. - DateTime get createdAt => throw _privateConstructorUsedError; + /// The date when the article was created (will be null if hideDateInfo is true) + DateTime? get createdAt => throw _privateConstructorUsedError; - /// The date when the article was last updated. - DateTime get updatedAt => throw _privateConstructorUsedError; + /// The date when the article was last updated (will be null if hideDateInfo is true) + DateTime? get updatedAt => throw _privateConstructorUsedError; /// The URL-friendly slug of the article. @JsonKey(name: 'slug', required: true) @@ -126,8 +126,8 @@ abstract class $ArticleCopyWith<$Res> { @JsonKey(name: 'organizationId', required: true) String organizationId, @JsonKey(name: 'state', defaultValue: 'live') String state, @JsonKey(name: 'locale', required: true) String locale, - DateTime createdAt, - DateTime updatedAt, + DateTime? createdAt, + DateTime? updatedAt, @JsonKey(name: 'slug', required: true) String slug, @JsonKey(name: 'featurebaseUrl', required: true) String featurebaseUrl, String? externalUrl, @@ -169,8 +169,8 @@ class _$ArticleCopyWithImpl<$Res, $Val extends Article> Object? organizationId = null, Object? state = null, Object? locale = null, - Object? createdAt = null, - Object? updatedAt = null, + Object? createdAt = freezed, + Object? updatedAt = freezed, Object? slug = null, Object? featurebaseUrl = null, Object? externalUrl = freezed, @@ -221,14 +221,14 @@ class _$ArticleCopyWithImpl<$Res, $Val extends Article> ? _value.locale : locale // ignore: cast_nullable_to_non_nullable as String, - createdAt: null == createdAt + createdAt: freezed == createdAt ? _value.createdAt : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt + as DateTime?, + updatedAt: freezed == updatedAt ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, + as DateTime?, slug: null == slug ? _value.slug : slug // ignore: cast_nullable_to_non_nullable @@ -311,8 +311,8 @@ abstract class _$$ArticleImplCopyWith<$Res> implements $ArticleCopyWith<$Res> { @JsonKey(name: 'organizationId', required: true) String organizationId, @JsonKey(name: 'state', defaultValue: 'live') String state, @JsonKey(name: 'locale', required: true) String locale, - DateTime createdAt, - DateTime updatedAt, + DateTime? createdAt, + DateTime? updatedAt, @JsonKey(name: 'slug', required: true) String slug, @JsonKey(name: 'featurebaseUrl', required: true) String featurebaseUrl, String? externalUrl, @@ -354,8 +354,8 @@ class __$$ArticleImplCopyWithImpl<$Res> Object? organizationId = null, Object? state = null, Object? locale = null, - Object? createdAt = null, - Object? updatedAt = null, + Object? createdAt = freezed, + Object? updatedAt = freezed, Object? slug = null, Object? featurebaseUrl = null, Object? externalUrl = freezed, @@ -406,14 +406,14 @@ class __$$ArticleImplCopyWithImpl<$Res> ? _value.locale : locale // ignore: cast_nullable_to_non_nullable as String, - createdAt: null == createdAt + createdAt: freezed == createdAt ? _value.createdAt : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt + as DateTime?, + updatedAt: freezed == updatedAt ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, + as DateTime?, slug: null == slug ? _value.slug : slug // ignore: cast_nullable_to_non_nullable @@ -465,8 +465,8 @@ class _$ArticleImpl implements _Article { required this.organizationId, @JsonKey(name: 'state', defaultValue: 'live') required this.state, @JsonKey(name: 'locale', required: true) required this.locale, - required this.createdAt, - required this.updatedAt, + this.createdAt, + this.updatedAt, @JsonKey(name: 'slug', required: true) required this.slug, @JsonKey(name: 'featurebaseUrl', required: true) required this.featurebaseUrl, @@ -540,13 +540,13 @@ class _$ArticleImpl implements _Article { @JsonKey(name: 'locale', required: true) final String locale; //TODO: add translations - /// The date when the article was created. + /// The date when the article was created (will be null if hideDateInfo is true) @override - final DateTime createdAt; + final DateTime? createdAt; - /// The date when the article was last updated. + /// The date when the article was last updated (will be null if hideDateInfo is true) @override - final DateTime updatedAt; + final DateTime? updatedAt; /// The URL-friendly slug of the article. @override @@ -706,8 +706,8 @@ abstract class _Article implements Article { required final String organizationId, @JsonKey(name: 'state', defaultValue: 'live') required final String state, @JsonKey(name: 'locale', required: true) required final String locale, - required final DateTime createdAt, - required final DateTime updatedAt, + final DateTime? createdAt, + final DateTime? updatedAt, @JsonKey(name: 'slug', required: true) required final String slug, @JsonKey(name: 'featurebaseUrl', required: true) required final String featurebaseUrl, @@ -777,13 +777,13 @@ abstract class _Article implements Article { @override @JsonKey(name: 'locale', required: true) String get locale; //TODO: add translations - /// The date when the article was created. + /// The date when the article was created (will be null if hideDateInfo is true) @override - DateTime get createdAt; + DateTime? get createdAt; - /// The date when the article was last updated. + /// The date when the article was last updated (will be null if hideDateInfo is true) @override - DateTime get updatedAt; + DateTime? get updatedAt; /// The URL-friendly slug of the article. @override @@ -1908,9 +1908,9 @@ mixin _$Collection { @JsonKey(name: 'locale', required: true) String get locale => throw _privateConstructorUsedError; - /// Authors of the article - @JsonKey(name: 'authors', required: true) - List get authors => throw _privateConstructorUsedError; + /// Authors of the article (will be null if hideAuthorInfo is true) + @JsonKey(name: 'authors') + List? get authors => throw _privateConstructorUsedError; /// An array of available locales for the collection. @JsonKey(name: 'availableLocales', required: true) @@ -1951,7 +1951,7 @@ abstract class $CollectionCopyWith<$Res> { @JsonKey(name: 'featurebaseUrl', required: true) String featurebaseUrl, String? externalUrl, @JsonKey(name: 'locale', required: true) String locale, - @JsonKey(name: 'authors', required: true) List authors, + @JsonKey(name: 'authors') List? authors, @JsonKey(name: 'availableLocales', required: true) List availableLocales, List? structure}); @@ -1989,7 +1989,7 @@ class _$CollectionCopyWithImpl<$Res, $Val extends Collection> Object? featurebaseUrl = null, Object? externalUrl = freezed, Object? locale = null, - Object? authors = null, + Object? authors = freezed, Object? availableLocales = null, Object? structure = freezed, }) { @@ -2054,10 +2054,10 @@ class _$CollectionCopyWithImpl<$Res, $Val extends Collection> ? _value.locale : locale // ignore: cast_nullable_to_non_nullable as String, - authors: null == authors + authors: freezed == authors ? _value.authors : authors // ignore: cast_nullable_to_non_nullable - as List, + as List?, availableLocales: null == availableLocales ? _value.availableLocales : availableLocales // ignore: cast_nullable_to_non_nullable @@ -2108,7 +2108,7 @@ abstract class _$$CollectionImplCopyWith<$Res> @JsonKey(name: 'featurebaseUrl', required: true) String featurebaseUrl, String? externalUrl, @JsonKey(name: 'locale', required: true) String locale, - @JsonKey(name: 'authors', required: true) List authors, + @JsonKey(name: 'authors') List? authors, @JsonKey(name: 'availableLocales', required: true) List availableLocales, List? structure}); @@ -2145,7 +2145,7 @@ class __$$CollectionImplCopyWithImpl<$Res> Object? featurebaseUrl = null, Object? externalUrl = freezed, Object? locale = null, - Object? authors = null, + Object? authors = freezed, Object? availableLocales = null, Object? structure = freezed, }) { @@ -2210,10 +2210,10 @@ class __$$CollectionImplCopyWithImpl<$Res> ? _value.locale : locale // ignore: cast_nullable_to_non_nullable as String, - authors: null == authors + authors: freezed == authors ? _value._authors : authors // ignore: cast_nullable_to_non_nullable - as List, + as List?, availableLocales: null == availableLocales ? _value._availableLocales : availableLocales // ignore: cast_nullable_to_non_nullable @@ -2249,8 +2249,7 @@ class _$CollectionImpl implements _Collection { required this.featurebaseUrl, required this.externalUrl, @JsonKey(name: 'locale', required: true) required this.locale, - @JsonKey(name: 'authors', required: true) - required final List authors, + @JsonKey(name: 'authors') final List? authors, @JsonKey(name: 'availableLocales', required: true) required final List availableLocales, final List? structure}) @@ -2333,16 +2332,18 @@ class _$CollectionImpl implements _Collection { @JsonKey(name: 'locale', required: true) final String locale; - /// Authors of the article - final List _authors; + /// Authors of the article (will be null if hideAuthorInfo is true) + final List? _authors; - /// Authors of the article + /// Authors of the article (will be null if hideAuthorInfo is true) @override - @JsonKey(name: 'authors', required: true) - List get authors { + @JsonKey(name: 'authors') + List? get authors { + final value = _authors; + if (value == null) return null; if (_authors is EqualUnmodifiableListView) return _authors; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_authors); + return EqualUnmodifiableListView(value); } /// An array of available locales for the collection. @@ -2474,8 +2475,7 @@ abstract class _Collection implements Collection { required final String featurebaseUrl, required final String? externalUrl, @JsonKey(name: 'locale', required: true) required final String locale, - @JsonKey(name: 'authors', required: true) - required final List authors, + @JsonKey(name: 'authors') final List? authors, @JsonKey(name: 'availableLocales', required: true) required final List availableLocales, final List? structure}) = _$CollectionImpl; @@ -2555,10 +2555,10 @@ abstract class _Collection implements Collection { @JsonKey(name: 'locale', required: true) String get locale; - /// Authors of the article + /// Authors of the article (will be null if hideAuthorInfo is true) @override - @JsonKey(name: 'authors', required: true) - List get authors; + @JsonKey(name: 'authors') + List? get authors; /// An array of available locales for the collection. @override diff --git a/lib/api/models/_models.g.dart b/lib/api/models/_models.g.dart index 87afd5d..82271ad 100644 --- a/lib/api/models/_models.g.dart +++ b/lib/api/models/_models.g.dart @@ -33,8 +33,12 @@ _$ArticleImpl _$$ArticleImplFromJson(Map json) { organizationId: json['organizationId'] as String, state: json['state'] as String? ?? 'live', locale: json['locale'] as String, - createdAt: DateTime.parse(json['createdAt'] as String), - updatedAt: DateTime.parse(json['updatedAt'] as String), + createdAt: json['createdAt'] == null + ? null + : DateTime.parse(json['createdAt'] as String), + updatedAt: json['updatedAt'] == null + ? null + : DateTime.parse(json['updatedAt'] as String), slug: json['slug'] as String, featurebaseUrl: json['featurebaseUrl'] as String, externalUrl: json['externalUrl'] as String?, @@ -64,8 +68,8 @@ Map _$$ArticleImplToJson(_$ArticleImpl instance) => 'organizationId': instance.organizationId, 'state': instance.state, 'locale': instance.locale, - 'createdAt': instance.createdAt.toIso8601String(), - 'updatedAt': instance.updatedAt.toIso8601String(), + 'createdAt': instance.createdAt?.toIso8601String(), + 'updatedAt': instance.updatedAt?.toIso8601String(), 'slug': instance.slug, 'featurebaseUrl': instance.featurebaseUrl, 'externalUrl': instance.externalUrl, @@ -185,7 +189,6 @@ _$CollectionImpl _$$CollectionImplFromJson(Map json) { 'slug', 'featurebaseUrl', 'locale', - 'authors', 'availableLocales' ], ); @@ -207,8 +210,8 @@ _$CollectionImpl _$$CollectionImplFromJson(Map json) { featurebaseUrl: json['featurebaseUrl'] as String, externalUrl: json['externalUrl'] as String?, locale: json['locale'] as String, - authors: (json['authors'] as List) - .map((e) => Author.fromJson(e as Map)) + authors: (json['authors'] as List?) + ?.map((e) => Author.fromJson(e as Map)) .toList(), availableLocales: (json['availableLocales'] as List) .map((e) => e as String) diff --git a/lib/api/models/article.dart b/lib/api/models/article.dart index 3747842..5ef7cc6 100644 --- a/lib/api/models/article.dart +++ b/lib/api/models/article.dart @@ -42,11 +42,11 @@ class Article with _$Article { //TODO: add translations - /// The date when the article was created. - required DateTime createdAt, + /// The date when the article was created (will be null if hideDateInfo is true) + DateTime? createdAt, - /// The date when the article was last updated. - required DateTime updatedAt, + /// The date when the article was last updated (will be null if hideDateInfo is true) + DateTime? updatedAt, /// The URL-friendly slug of the article. @JsonKey(name: 'slug', required: true) required String slug, diff --git a/lib/api/models/collection.dart b/lib/api/models/collection.dart index 6e6f4ca..bcf4f99 100644 --- a/lib/api/models/collection.dart +++ b/lib/api/models/collection.dart @@ -51,8 +51,8 @@ class Collection with _$Collection { /// The locale of the collection. @JsonKey(name: 'locale', required: true) required String locale, - /// Authors of the article - @JsonKey(name: 'authors', required: true) required List authors, + /// Authors of the article (will be null if hideAuthorInfo is true) + @JsonKey(name: 'authors') List? authors, /// An array of available locales for the collection. @JsonKey(name: 'availableLocales', required: true) diff --git a/lib/featurebase.dart b/lib/featurebase.dart index bd34891..83a5880 100644 --- a/lib/featurebase.dart +++ b/lib/featurebase.dart @@ -21,6 +21,7 @@ import 'package:searchfield/searchfield.dart'; import 'package:styled_text/styled_text.dart'; import 'package:universal_io/io.dart'; import 'package:url_launcher/url_launcher_string.dart'; +import 'package:timeago/timeago.dart' as timeago; import 'api/models/_models.dart' as fb; //API diff --git a/lib/l10n/generated/featurebase_localizations.dart b/lib/l10n/generated/featurebase_localizations.dart index 9368fd4..70811e5 100644 --- a/lib/l10n/generated/featurebase_localizations.dart +++ b/lib/l10n/generated/featurebase_localizations.dart @@ -201,6 +201,12 @@ abstract class FeaturebaseLocalizations { /// **'Written by {author}'** String writtenBy(String author); + /// No description provided for @lastUpdated. + /// + /// In en, this message translates to: + /// **'Last updated {daysAgo}'** + String lastUpdated(String daysAgo); + /// This is the error message that is displayed when the data fails to load. /// /// In en, this message translates to: diff --git a/lib/l10n/generated/featurebase_localizations_af.dart b/lib/l10n/generated/featurebase_localizations_af.dart index d7d17b1..7e87fac 100644 --- a/lib/l10n/generated/featurebase_localizations_af.dart +++ b/lib/l10n/generated/featurebase_localizations_af.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsAf extends FeaturebaseLocalizations { return 'Geskryf deur $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Kon nie laai nie'; diff --git a/lib/l10n/generated/featurebase_localizations_ar.dart b/lib/l10n/generated/featurebase_localizations_ar.dart index 225db95..9c81038 100644 --- a/lib/l10n/generated/featurebase_localizations_ar.dart +++ b/lib/l10n/generated/featurebase_localizations_ar.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsAr extends FeaturebaseLocalizations { return 'مكتوب بواسطة $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'فشل التحميل'; diff --git a/lib/l10n/generated/featurebase_localizations_az.dart b/lib/l10n/generated/featurebase_localizations_az.dart index 630cb3c..bc942f1 100644 --- a/lib/l10n/generated/featurebase_localizations_az.dart +++ b/lib/l10n/generated/featurebase_localizations_az.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsAz extends FeaturebaseLocalizations { return '$author tərəfindən yazılmışdır'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Yükləmək alınmadı'; diff --git a/lib/l10n/generated/featurebase_localizations_be.dart b/lib/l10n/generated/featurebase_localizations_be.dart index df253b3..4d08d3f 100644 --- a/lib/l10n/generated/featurebase_localizations_be.dart +++ b/lib/l10n/generated/featurebase_localizations_be.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsBe extends FeaturebaseLocalizations { return '$author напісаў'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Не атрымалася загрузіць'; diff --git a/lib/l10n/generated/featurebase_localizations_bg.dart b/lib/l10n/generated/featurebase_localizations_bg.dart index 6cb0d8a..d215101 100644 --- a/lib/l10n/generated/featurebase_localizations_bg.dart +++ b/lib/l10n/generated/featurebase_localizations_bg.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsBg extends FeaturebaseLocalizations { return 'Написано от $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Грешка при зареждането'; diff --git a/lib/l10n/generated/featurebase_localizations_bo.dart b/lib/l10n/generated/featurebase_localizations_bo.dart index bbeecdd..b57f8a8 100644 --- a/lib/l10n/generated/featurebase_localizations_bo.dart +++ b/lib/l10n/generated/featurebase_localizations_bo.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsBo extends FeaturebaseLocalizations { return 'བྲིས། $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'འཇུག་འདྲེན་བྱེད་མ་ཐུབ།'; diff --git a/lib/l10n/generated/featurebase_localizations_ca.dart b/lib/l10n/generated/featurebase_localizations_ca.dart index ebab27a..25c78fe 100644 --- a/lib/l10n/generated/featurebase_localizations_ca.dart +++ b/lib/l10n/generated/featurebase_localizations_ca.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsCa extends FeaturebaseLocalizations { return 'Escrit per $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'No s\'ha pogut carregar'; diff --git a/lib/l10n/generated/featurebase_localizations_cs.dart b/lib/l10n/generated/featurebase_localizations_cs.dart index 6436205..85e0d95 100644 --- a/lib/l10n/generated/featurebase_localizations_cs.dart +++ b/lib/l10n/generated/featurebase_localizations_cs.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsCs extends FeaturebaseLocalizations { return 'Napsal $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Načítání selhalo'; diff --git a/lib/l10n/generated/featurebase_localizations_da.dart b/lib/l10n/generated/featurebase_localizations_da.dart index 9fb122c..d6ba84e 100644 --- a/lib/l10n/generated/featurebase_localizations_da.dart +++ b/lib/l10n/generated/featurebase_localizations_da.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsDa extends FeaturebaseLocalizations { return 'Skrevet af $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Kunne ikke indlæse'; diff --git a/lib/l10n/generated/featurebase_localizations_de.dart b/lib/l10n/generated/featurebase_localizations_de.dart index 1b9c30e..550b706 100644 --- a/lib/l10n/generated/featurebase_localizations_de.dart +++ b/lib/l10n/generated/featurebase_localizations_de.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsDe extends FeaturebaseLocalizations { return 'Geschrieben von $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Laden fehlgeschlagen'; diff --git a/lib/l10n/generated/featurebase_localizations_el.dart b/lib/l10n/generated/featurebase_localizations_el.dart index 3916fad..d12a3b7 100644 --- a/lib/l10n/generated/featurebase_localizations_el.dart +++ b/lib/l10n/generated/featurebase_localizations_el.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsEl extends FeaturebaseLocalizations { return 'Γραφτένο από $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Αποτυχία φόρτωσης'; diff --git a/lib/l10n/generated/featurebase_localizations_en.dart b/lib/l10n/generated/featurebase_localizations_en.dart index 9896cd5..a0ff5cc 100644 --- a/lib/l10n/generated/featurebase_localizations_en.dart +++ b/lib/l10n/generated/featurebase_localizations_en.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsEn extends FeaturebaseLocalizations { return 'Written by $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Failed to load'; diff --git a/lib/l10n/generated/featurebase_localizations_es.dart b/lib/l10n/generated/featurebase_localizations_es.dart index 59b6b90..80147ab 100644 --- a/lib/l10n/generated/featurebase_localizations_es.dart +++ b/lib/l10n/generated/featurebase_localizations_es.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsEs extends FeaturebaseLocalizations { return 'Escrito por $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Error al cargar'; diff --git a/lib/l10n/generated/featurebase_localizations_fa.dart b/lib/l10n/generated/featurebase_localizations_fa.dart index 41ebf41..4371ad4 100644 --- a/lib/l10n/generated/featurebase_localizations_fa.dart +++ b/lib/l10n/generated/featurebase_localizations_fa.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsFa extends FeaturebaseLocalizations { return 'نوشته شده توسط $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'خطا در بارگذاری'; diff --git a/lib/l10n/generated/featurebase_localizations_fi.dart b/lib/l10n/generated/featurebase_localizations_fi.dart index 65df3e5..a0aa61a 100644 --- a/lib/l10n/generated/featurebase_localizations_fi.dart +++ b/lib/l10n/generated/featurebase_localizations_fi.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsFi extends FeaturebaseLocalizations { return 'Kirjoitettu $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Lataus epäonnistui'; diff --git a/lib/l10n/generated/featurebase_localizations_fr.dart b/lib/l10n/generated/featurebase_localizations_fr.dart index 65d628c..970e874 100644 --- a/lib/l10n/generated/featurebase_localizations_fr.dart +++ b/lib/l10n/generated/featurebase_localizations_fr.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsFr extends FeaturebaseLocalizations { return 'Rédigé par $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Échec du chargement'; diff --git a/lib/l10n/generated/featurebase_localizations_gl.dart b/lib/l10n/generated/featurebase_localizations_gl.dart index 49ed65d..d0f39d9 100644 --- a/lib/l10n/generated/featurebase_localizations_gl.dart +++ b/lib/l10n/generated/featurebase_localizations_gl.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsGl extends FeaturebaseLocalizations { return 'Escrito por $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Erro ao cargar'; diff --git a/lib/l10n/generated/featurebase_localizations_hi.dart b/lib/l10n/generated/featurebase_localizations_hi.dart index 22766f8..2cf7402 100644 --- a/lib/l10n/generated/featurebase_localizations_hi.dart +++ b/lib/l10n/generated/featurebase_localizations_hi.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsHi extends FeaturebaseLocalizations { return '$author द्वारा लिखित'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'लोड करने में विफल'; diff --git a/lib/l10n/generated/featurebase_localizations_hr.dart b/lib/l10n/generated/featurebase_localizations_hr.dart index fce2705..5590298 100644 --- a/lib/l10n/generated/featurebase_localizations_hr.dart +++ b/lib/l10n/generated/featurebase_localizations_hr.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsHr extends FeaturebaseLocalizations { return 'Napisao/la $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Neuspjelo učitavanje'; diff --git a/lib/l10n/generated/featurebase_localizations_hu.dart b/lib/l10n/generated/featurebase_localizations_hu.dart index 47fe632..f232627 100644 --- a/lib/l10n/generated/featurebase_localizations_hu.dart +++ b/lib/l10n/generated/featurebase_localizations_hu.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsHu extends FeaturebaseLocalizations { return 'Írta: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Betöltés sikertelen'; diff --git a/lib/l10n/generated/featurebase_localizations_id.dart b/lib/l10n/generated/featurebase_localizations_id.dart index be70ce4..8eab263 100644 --- a/lib/l10n/generated/featurebase_localizations_id.dart +++ b/lib/l10n/generated/featurebase_localizations_id.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsId extends FeaturebaseLocalizations { return 'Ditulis oleh $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Gagal memuat'; diff --git a/lib/l10n/generated/featurebase_localizations_is.dart b/lib/l10n/generated/featurebase_localizations_is.dart index f932e22..ce5935c 100644 --- a/lib/l10n/generated/featurebase_localizations_is.dart +++ b/lib/l10n/generated/featurebase_localizations_is.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsIs extends FeaturebaseLocalizations { return 'Höfundur: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Ekki tókst að hlaða'; diff --git a/lib/l10n/generated/featurebase_localizations_it.dart b/lib/l10n/generated/featurebase_localizations_it.dart index d78ee8e..8b73028 100644 --- a/lib/l10n/generated/featurebase_localizations_it.dart +++ b/lib/l10n/generated/featurebase_localizations_it.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsIt extends FeaturebaseLocalizations { return 'Scritto da $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Caricamento non riuscito'; diff --git a/lib/l10n/generated/featurebase_localizations_ja.dart b/lib/l10n/generated/featurebase_localizations_ja.dart index 0a5aea0..1d26c3b 100644 --- a/lib/l10n/generated/featurebase_localizations_ja.dart +++ b/lib/l10n/generated/featurebase_localizations_ja.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsJa extends FeaturebaseLocalizations { return '著者: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => '読み込みに失敗しました'; diff --git a/lib/l10n/generated/featurebase_localizations_ko.dart b/lib/l10n/generated/featurebase_localizations_ko.dart index 58e47bf..f58629e 100644 --- a/lib/l10n/generated/featurebase_localizations_ko.dart +++ b/lib/l10n/generated/featurebase_localizations_ko.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsKo extends FeaturebaseLocalizations { return '$author 작성'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => '로드 실패'; diff --git a/lib/l10n/generated/featurebase_localizations_lt.dart b/lib/l10n/generated/featurebase_localizations_lt.dart index 1301f5a..e014bcb 100644 --- a/lib/l10n/generated/featurebase_localizations_lt.dart +++ b/lib/l10n/generated/featurebase_localizations_lt.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsLt extends FeaturebaseLocalizations { return 'Autorius: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Nepavyko įkelti'; diff --git a/lib/l10n/generated/featurebase_localizations_lv.dart b/lib/l10n/generated/featurebase_localizations_lv.dart index 29d8997..6e53c90 100644 --- a/lib/l10n/generated/featurebase_localizations_lv.dart +++ b/lib/l10n/generated/featurebase_localizations_lv.dart @@ -25,6 +25,11 @@ class FeaturebaseLocalizationsLv extends FeaturebaseLocalizations { return 'Autors: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Neizdevās ielādēt'; diff --git a/lib/l10n/generated/featurebase_localizations_ms.dart b/lib/l10n/generated/featurebase_localizations_ms.dart index 244816e..6fa1c8f 100644 --- a/lib/l10n/generated/featurebase_localizations_ms.dart +++ b/lib/l10n/generated/featurebase_localizations_ms.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsMs extends FeaturebaseLocalizations { return 'Ditulis oleh $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Gagal dimuat'; diff --git a/lib/l10n/generated/featurebase_localizations_nb.dart b/lib/l10n/generated/featurebase_localizations_nb.dart index e705b58..3eb40b7 100644 --- a/lib/l10n/generated/featurebase_localizations_nb.dart +++ b/lib/l10n/generated/featurebase_localizations_nb.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsNb extends FeaturebaseLocalizations { return 'Skrevet av $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Kunne ikke laste inn'; diff --git a/lib/l10n/generated/featurebase_localizations_nl.dart b/lib/l10n/generated/featurebase_localizations_nl.dart index 2f89770..090cc3c 100644 --- a/lib/l10n/generated/featurebase_localizations_nl.dart +++ b/lib/l10n/generated/featurebase_localizations_nl.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsNl extends FeaturebaseLocalizations { return 'Geschreven door $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Laden mislukt'; diff --git a/lib/l10n/generated/featurebase_localizations_pl.dart b/lib/l10n/generated/featurebase_localizations_pl.dart index 4c65e2f..8d07e15 100644 --- a/lib/l10n/generated/featurebase_localizations_pl.dart +++ b/lib/l10n/generated/featurebase_localizations_pl.dart @@ -26,6 +26,11 @@ class FeaturebaseLocalizationsPl extends FeaturebaseLocalizations { return 'Napisane przez $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Nie udało się załadować'; diff --git a/lib/l10n/generated/featurebase_localizations_pt.dart b/lib/l10n/generated/featurebase_localizations_pt.dart index 7028925..6657c00 100644 --- a/lib/l10n/generated/featurebase_localizations_pt.dart +++ b/lib/l10n/generated/featurebase_localizations_pt.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsPt extends FeaturebaseLocalizations { return 'Escrito por $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Falha ao carregar'; diff --git a/lib/l10n/generated/featurebase_localizations_ro.dart b/lib/l10n/generated/featurebase_localizations_ro.dart index a6deeb4..51eb81f 100644 --- a/lib/l10n/generated/featurebase_localizations_ro.dart +++ b/lib/l10n/generated/featurebase_localizations_ro.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsRo extends FeaturebaseLocalizations { return 'Scris de $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Încărcare eșuată'; diff --git a/lib/l10n/generated/featurebase_localizations_ru.dart b/lib/l10n/generated/featurebase_localizations_ru.dart index cd57a2f..049a2c3 100644 --- a/lib/l10n/generated/featurebase_localizations_ru.dart +++ b/lib/l10n/generated/featurebase_localizations_ru.dart @@ -26,6 +26,11 @@ class FeaturebaseLocalizationsRu extends FeaturebaseLocalizations { return 'Автор: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Не удалось загрузить'; diff --git a/lib/l10n/generated/featurebase_localizations_sk.dart b/lib/l10n/generated/featurebase_localizations_sk.dart index f6da206..dcbffb1 100644 --- a/lib/l10n/generated/featurebase_localizations_sk.dart +++ b/lib/l10n/generated/featurebase_localizations_sk.dart @@ -25,6 +25,11 @@ class FeaturebaseLocalizationsSk extends FeaturebaseLocalizations { return 'Napísal $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Nepodarilo sa načítať'; diff --git a/lib/l10n/generated/featurebase_localizations_sl.dart b/lib/l10n/generated/featurebase_localizations_sl.dart index 887660f..69d191e 100644 --- a/lib/l10n/generated/featurebase_localizations_sl.dart +++ b/lib/l10n/generated/featurebase_localizations_sl.dart @@ -25,6 +25,11 @@ class FeaturebaseLocalizationsSl extends FeaturebaseLocalizations { return 'Avtor: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Napaka pri nalaganju'; diff --git a/lib/l10n/generated/featurebase_localizations_sr.dart b/lib/l10n/generated/featurebase_localizations_sr.dart index b3eaf44..7f4d577 100644 --- a/lib/l10n/generated/featurebase_localizations_sr.dart +++ b/lib/l10n/generated/featurebase_localizations_sr.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsSr extends FeaturebaseLocalizations { return 'Autor: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Učitavanje nije uspelo'; diff --git a/lib/l10n/generated/featurebase_localizations_sv.dart b/lib/l10n/generated/featurebase_localizations_sv.dart index 824b986..6f0c681 100644 --- a/lib/l10n/generated/featurebase_localizations_sv.dart +++ b/lib/l10n/generated/featurebase_localizations_sv.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsSv extends FeaturebaseLocalizations { return 'Skriven av $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Det gick inte att ladda'; diff --git a/lib/l10n/generated/featurebase_localizations_sw.dart b/lib/l10n/generated/featurebase_localizations_sw.dart index b34cf30..88de6c6 100644 --- a/lib/l10n/generated/featurebase_localizations_sw.dart +++ b/lib/l10n/generated/featurebase_localizations_sw.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsSw extends FeaturebaseLocalizations { return 'Imeandikwa na $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Imeshindwa kupakia'; diff --git a/lib/l10n/generated/featurebase_localizations_th.dart b/lib/l10n/generated/featurebase_localizations_th.dart index 3c5f7d2..19d7423 100644 --- a/lib/l10n/generated/featurebase_localizations_th.dart +++ b/lib/l10n/generated/featurebase_localizations_th.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsTh extends FeaturebaseLocalizations { return 'เขียนโดย $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'โหลดไม่สำเร็จ'; diff --git a/lib/l10n/generated/featurebase_localizations_tr.dart b/lib/l10n/generated/featurebase_localizations_tr.dart index cfc4920..66a7bcc 100644 --- a/lib/l10n/generated/featurebase_localizations_tr.dart +++ b/lib/l10n/generated/featurebase_localizations_tr.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsTr extends FeaturebaseLocalizations { return '$author tarafından yazıldı'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Yüklenemedi'; diff --git a/lib/l10n/generated/featurebase_localizations_uk.dart b/lib/l10n/generated/featurebase_localizations_uk.dart index 04ba921..1c6cae3 100644 --- a/lib/l10n/generated/featurebase_localizations_uk.dart +++ b/lib/l10n/generated/featurebase_localizations_uk.dart @@ -26,6 +26,11 @@ class FeaturebaseLocalizationsUk extends FeaturebaseLocalizations { return 'Автор: $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Не вдалося завантажити'; diff --git a/lib/l10n/generated/featurebase_localizations_vi.dart b/lib/l10n/generated/featurebase_localizations_vi.dart index 3f91938..41c998f 100644 --- a/lib/l10n/generated/featurebase_localizations_vi.dart +++ b/lib/l10n/generated/featurebase_localizations_vi.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsVi extends FeaturebaseLocalizations { return 'Viết bởi $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => 'Không thể tải'; diff --git a/lib/l10n/generated/featurebase_localizations_zh.dart b/lib/l10n/generated/featurebase_localizations_zh.dart index 0a38ec1..576166b 100644 --- a/lib/l10n/generated/featurebase_localizations_zh.dart +++ b/lib/l10n/generated/featurebase_localizations_zh.dart @@ -24,6 +24,11 @@ class FeaturebaseLocalizationsZh extends FeaturebaseLocalizations { return '作者:$author'; } + @override + String lastUpdated(String daysAgo) { + return 'Last updated $daysAgo'; + } + @override String get failedToLoad => '載入失敗'; diff --git a/lib/l10n/package_en.arb b/lib/l10n/package_en.arb index d638805..cdb1b0b 100644 --- a/lib/l10n/package_en.arb +++ b/lib/l10n/package_en.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Last updated {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 days ago" + } + } + }, "failedToLoad": "Failed to load", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/untranslated.json b/lib/l10n/untranslated.json index 9e26dfe..930d104 100644 --- a/lib/l10n/untranslated.json +++ b/lib/l10n/untranslated.json @@ -1 +1,197 @@ -{} \ No newline at end of file +{ + "af": [ + "lastUpdated" + ], + + "ar": [ + "lastUpdated" + ], + + "az": [ + "lastUpdated" + ], + + "be": [ + "lastUpdated" + ], + + "bg": [ + "lastUpdated" + ], + + "bo": [ + "lastUpdated" + ], + + "ca": [ + "lastUpdated" + ], + + "cs": [ + "lastUpdated" + ], + + "da": [ + "lastUpdated" + ], + + "de": [ + "lastUpdated" + ], + + "de_CH": [ + "lastUpdated" + ], + + "el": [ + "lastUpdated" + ], + + "es": [ + "lastUpdated" + ], + + "es_419": [ + "lastUpdated" + ], + + "fa": [ + "lastUpdated" + ], + + "fi": [ + "lastUpdated" + ], + + "fr": [ + "lastUpdated" + ], + + "gl": [ + "lastUpdated" + ], + + "hi": [ + "lastUpdated" + ], + + "hr": [ + "lastUpdated" + ], + + "hu": [ + "lastUpdated" + ], + + "id": [ + "lastUpdated" + ], + + "is": [ + "lastUpdated" + ], + + "it": [ + "lastUpdated" + ], + + "ja": [ + "lastUpdated" + ], + + "ko": [ + "lastUpdated" + ], + + "lt": [ + "lastUpdated" + ], + + "lv": [ + "lastUpdated" + ], + + "ms": [ + "lastUpdated" + ], + + "nb": [ + "lastUpdated" + ], + + "nl": [ + "lastUpdated" + ], + + "pl": [ + "lastUpdated" + ], + + "pt": [ + "lastUpdated" + ], + + "pt_BR": [ + "lastUpdated" + ], + + "ro": [ + "lastUpdated" + ], + + "ru": [ + "lastUpdated" + ], + + "sk": [ + "lastUpdated" + ], + + "sl": [ + "lastUpdated" + ], + + "sr": [ + "lastUpdated" + ], + + "sv": [ + "lastUpdated" + ], + + "sw": [ + "lastUpdated" + ], + + "th": [ + "lastUpdated" + ], + + "tr": [ + "lastUpdated" + ], + + "uk": [ + "lastUpdated" + ], + + "vi": [ + "lastUpdated" + ], + + "zh": [ + "lastUpdated" + ], + + "zh_Hans": [ + "lastUpdated" + ], + + "zh_Hant": [ + "lastUpdated" + ], + + "zh_TW": [ + "lastUpdated" + ] +} diff --git a/lib/ui/changelog/changelog.dart b/lib/ui/changelog/changelog.dart index 53587fa..a7a4a44 100644 --- a/lib/ui/changelog/changelog.dart +++ b/lib/ui/changelog/changelog.dart @@ -54,6 +54,7 @@ class _ChangelogViewState extends ConsumerState { currentLocale = widget.defaultLocale; initializeDateFormatting(currentLocale.languageCode); _fbService.setup(widget.organizationName, widget.enableHapticFeedback); + _setupTimeAgo(); } @override diff --git a/lib/ui/help_center/article/article.dart b/lib/ui/help_center/article/article.dart index 5dfb7b5..b4d9a7a 100644 --- a/lib/ui/help_center/article/article.dart +++ b/lib/ui/help_center/article/article.dart @@ -3,14 +3,12 @@ part of featurebase; class _ArticleView extends ConsumerStatefulWidget { final fb.Article article; final Color textColor; - final bool hideAuthors; final Locale locale; const _ArticleView({ // ignore: unused_element super.key, required this.article, required this.textColor, - required this.hideAuthors, required this.locale, }); @@ -58,30 +56,56 @@ class _ArticleViewState extends ConsumerState<_ArticleView> { ), textAlign: TextAlign.start, ), - if (!widget.hideAuthors && widget.article.author != null) + if (widget.article.author != null && + widget.article.createdAt != null) const SizedBox(height: 15), - if (!widget.hideAuthors && widget.article.author != null) + if (widget.article.author != null && + widget.article.createdAt != null) Row( children: [ - ClipRRect( - borderRadius: BorderRadius.circular(40), - child: _SafeCachedNetworkImage( - imageUrl: widget.article.author!.avatarUrl, - height: 40, - width: 40, + if (widget.article.author != null) + ClipRRect( + borderRadius: BorderRadius.circular(40), + child: _SafeCachedNetworkImage( + imageUrl: widget.article.author!.avatarUrl, + height: 40, + width: 40, + ), ), - ), - const SizedBox(width: 10), + if (widget.article.author != null) + const SizedBox(width: 10), Expanded( - child: Text( - FeaturebaseLocalizations.of(context) - .writtenBy(widget.article.author!.name), - style: TextStyle( - fontSize: 14, - fontFamily: 'Inter', - fontWeight: FontWeight.w600, - color: widget.textColor.withOpacity(0.7), - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (widget.article.author != null) + Text( + FeaturebaseLocalizations.of(context) + .writtenBy(widget.article.author!.name), + style: TextStyle( + fontSize: 14, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + color: widget.textColor.withOpacity(0.7), + ), + ), + if (widget.article.updatedAt != null) + Text( + FeaturebaseLocalizations.of(context) + .lastUpdated(timeago.format( + widget.article.updatedAt!, + locale: + FeaturebaseLocalizations.of(context) + .localeName, + )), + style: TextStyle( + fontSize: 14, + fontFamily: 'Inter', + fontWeight: FontWeight.w600, + color: widget.textColor.withOpacity(0.7), + ), + ), + ], ), ), ], @@ -99,7 +123,6 @@ class _ArticleViewState extends ConsumerState<_ArticleView> { locale: widget.locale, textColor: widget.textColor, renderMode: RenderMode.sliverList, - hideAuthors: widget.hideAuthors, ), ), error: (error, stackTrace) => SliverToBoxAdapter( diff --git a/lib/ui/help_center/collection/collection.dart b/lib/ui/help_center/collection/collection.dart index 5c06f2d..16eac45 100644 --- a/lib/ui/help_center/collection/collection.dart +++ b/lib/ui/help_center/collection/collection.dart @@ -3,14 +3,12 @@ part of featurebase; class _CollectionView extends StatefulWidget { final fb.Collection collection; final Color textColor; - final bool hideAuthors; final Locale locale; const _CollectionView({ // ignore: unused_element super.key, required this.collection, required this.textColor, - required this.hideAuthors, required this.locale, }); @@ -143,7 +141,6 @@ class _CollectionViewState extends State<_CollectionView> { builder: (context) => _ArticleView( article: article, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, locale: widget.locale, ), ), @@ -269,7 +266,6 @@ class _CollectionViewState extends State<_CollectionView> { builder: (context) => _ArticleView( article: article, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, locale: widget.locale, ), ), diff --git a/lib/ui/help_center/help_center.dart b/lib/ui/help_center/help_center.dart index 47ef40f..f1a9b39 100644 --- a/lib/ui/help_center/help_center.dart +++ b/lib/ui/help_center/help_center.dart @@ -64,6 +64,7 @@ class _HelpCenterViewState extends ConsumerState { void initState() { currentLocale = widget.defaultLocale; _fbService.setup(widget.organizationName, widget.enableHapticFeedback); + _setupTimeAgo(); super.initState(); } @@ -183,6 +184,7 @@ class _HelpCenterViewState extends ConsumerState { textColor: widget.textColor, primaryColor: widget.primaryColor, hideAuthors: data.hideAuthorInfo, + hideDate: data.hideDateInfo, locale: currentLocale, helpCenterContext: _helpCenterNavigatorKey.currentContext!, @@ -327,7 +329,6 @@ class _HelpCenterViewState extends ConsumerState { builder: (context) => _ArticleView( article: p0.item!, textColor: widget.textColor, - hideAuthors: data.hideAuthorInfo, locale: widget.defaultLocale, ), ), diff --git a/lib/ui/help_center/widgets/collection_card.dart b/lib/ui/help_center/widgets/collection_card.dart index 1e5df2a..43f3a25 100644 --- a/lib/ui/help_center/widgets/collection_card.dart +++ b/lib/ui/help_center/widgets/collection_card.dart @@ -25,7 +25,6 @@ class _CollectionCard extends StatelessWidget { builder: (context) => _CollectionView( collection: collection, textColor: textColor, - hideAuthors: hideAuthors, locale: locale, ), ), @@ -83,11 +82,12 @@ class _CollectionCard extends StatelessWidget { const SizedBox(height: 6), Row( children: [ - if (!hideAuthors) + if (!hideAuthors && collection.authors != null) _AuthorsImageStack( - authors: collection.authors, + authors: collection.authors!, ), - if (!hideAuthors) const SizedBox(width: 2), + if (!hideAuthors && collection.authors != null) + const SizedBox(width: 2), StyledText( text: FeaturebaseLocalizations.of(context).countArticles( collection.structure?.length ?? 0, diff --git a/lib/ui/help_center/widgets/navbar_expanding_collection.dart b/lib/ui/help_center/widgets/navbar_expanding_collection.dart index d847318..51e52e0 100644 --- a/lib/ui/help_center/widgets/navbar_expanding_collection.dart +++ b/lib/ui/help_center/widgets/navbar_expanding_collection.dart @@ -4,12 +4,14 @@ class _NavbarExpandingCollection extends StatefulWidget { final fb.Collection collection; final Color textColor; final bool hideAuthors; + final bool hideDate; final Locale locale; final BuildContext helpCenterContext; const _NavbarExpandingCollection({ required this.collection, required this.textColor, required this.hideAuthors, + required this.hideDate, required this.locale, required this.helpCenterContext, }); @@ -91,7 +93,6 @@ class _NavbarExpandingCollectionState builder: (context) => _ArticleView( article: article, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, locale: widget.locale, ), ), @@ -150,7 +151,6 @@ class _NavbarExpandingCollectionState builder: (context) => _CollectionView( collection: collection, textColor: widget.textColor, - hideAuthors: widget.hideAuthors, locale: widget.locale, ), ), diff --git a/lib/ui/help_center/widgets/navbar_popup.dart b/lib/ui/help_center/widgets/navbar_popup.dart index 3a03f87..b2fd2bd 100644 --- a/lib/ui/help_center/widgets/navbar_popup.dart +++ b/lib/ui/help_center/widgets/navbar_popup.dart @@ -5,6 +5,7 @@ class _NavbarPopupWidget extends ConsumerWidget { final Color textColor; final Color primaryColor; final bool hideAuthors; + final bool hideDate; final Locale locale; final BuildContext helpCenterContext; final Function(Locale) onLocaleChange; @@ -13,6 +14,7 @@ class _NavbarPopupWidget extends ConsumerWidget { required this.textColor, required this.primaryColor, required this.hideAuthors, + required this.hideDate, required this.locale, required this.helpCenterContext, required this.onLocaleChange, @@ -60,6 +62,7 @@ class _NavbarPopupWidget extends ConsumerWidget { collection: collection, textColor: textColor, hideAuthors: hideAuthors, + hideDate: hideDate, locale: locale, helpCenterContext: helpCenterContext, ); diff --git a/lib/ui/widgets/render_html_widget.dart b/lib/ui/widgets/render_html_widget.dart index c920b92..3e18cca 100644 --- a/lib/ui/widgets/render_html_widget.dart +++ b/lib/ui/widgets/render_html_widget.dart @@ -5,14 +5,12 @@ class _RenderHtmlWidget extends ConsumerWidget { final RenderMode renderMode; final Locale locale; final Color textColor; - final bool hideAuthors; const _RenderHtmlWidget({ required this.html, this.renderMode = RenderMode.sliverList, required this.locale, required this.textColor, - this.hideAuthors = false, }); @override @@ -38,7 +36,6 @@ class _RenderHtmlWidget extends ConsumerWidget { builder: (context) => _ArticleView( article: temp, textColor: textColor, - hideAuthors: hideAuthors, locale: locale, ), ), diff --git a/lib/utils.dart b/lib/utils.dart index 314bb45..2bdc75c 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -178,3 +178,34 @@ _callHaptic() { } } } + +_setupTimeAgo() { + timeago.setLocaleMessages('en', timeago.EnMessages()); + timeago.setLocaleMessages('nl', timeago.NlMessages()); + timeago.setLocaleMessages('bn', timeago.BnMessages()); + timeago.setLocaleMessages('bs', timeago.BsMessages()); + timeago.setLocaleMessages('pt_BR', timeago.PtBrMessages()); + timeago.setLocaleMessages('ca', timeago.CaMessages()); + timeago.setLocaleMessages('cs', timeago.CsMessages()); + timeago.setLocaleMessages('da', timeago.DaMessages()); + timeago.setLocaleMessages('de', timeago.DeMessages()); + timeago.setLocaleMessages('hi', timeago.HiMessages()); + timeago.setLocaleMessages('hu', timeago.HuMessages()); + timeago.setLocaleMessages('id', timeago.IdMessages()); + timeago.setLocaleMessages('it', timeago.ItMessages()); + timeago.setLocaleMessages('ja', timeago.JaMessages()); + timeago.setLocaleMessages('ko', timeago.KoMessages()); + timeago.setLocaleMessages('lv', timeago.LvMessages()); + timeago.setLocaleMessages('mn', timeago.MnMessages()); + timeago.setLocaleMessages('pl', timeago.PlMessages()); + timeago.setLocaleMessages('ro', timeago.RoMessages()); + timeago.setLocaleMessages('ru', timeago.RuMessages()); + timeago.setLocaleMessages('sr', timeago.SrMessages()); + timeago.setLocaleMessages('es', timeago.EsMessages()); + timeago.setLocaleMessages('sv', timeago.SvMessages()); + timeago.setLocaleMessages('th', timeago.ThMessages()); + timeago.setLocaleMessages('tr', timeago.TrMessages()); + timeago.setLocaleMessages('uk', timeago.UkMessages()); + timeago.setLocaleMessages('vi', timeago.ViMessages()); + timeago.setLocaleMessages('zh_CN', timeago.ZhCnMessages()); +} diff --git a/pubspec.yaml b/pubspec.yaml index 646e6db..395029f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,7 @@ dependencies: searchfield: ^1.2.2 easy_infinite_pagination: ^0.0.6 universal_io: ^2.2.2 + timeago: ^3.7.0 dev_dependencies: flutter_test: From acfd30d182cb50b1ffa2a466382a10e538c9b51e Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 11 Feb 2025 12:49:52 +0100 Subject: [PATCH 4/5] chore: translate strings --- .../featurebase_localizations_af.dart | 2 +- .../featurebase_localizations_ar.dart | 2 +- .../featurebase_localizations_az.dart | 2 +- .../featurebase_localizations_be.dart | 2 +- .../featurebase_localizations_bg.dart | 2 +- .../featurebase_localizations_bo.dart | 2 +- .../featurebase_localizations_ca.dart | 2 +- .../featurebase_localizations_cs.dart | 2 +- .../featurebase_localizations_da.dart | 2 +- .../featurebase_localizations_de.dart | 7 +- .../featurebase_localizations_el.dart | 2 +- .../featurebase_localizations_es.dart | 7 +- .../featurebase_localizations_fa.dart | 2 +- .../featurebase_localizations_fi.dart | 2 +- .../featurebase_localizations_fr.dart | 2 +- .../featurebase_localizations_gl.dart | 2 +- .../featurebase_localizations_hi.dart | 2 +- .../featurebase_localizations_hr.dart | 2 +- .../featurebase_localizations_hu.dart | 2 +- .../featurebase_localizations_id.dart | 2 +- .../featurebase_localizations_is.dart | 2 +- .../featurebase_localizations_it.dart | 2 +- .../featurebase_localizations_ja.dart | 2 +- .../featurebase_localizations_ko.dart | 2 +- .../featurebase_localizations_lt.dart | 2 +- .../featurebase_localizations_lv.dart | 2 +- .../featurebase_localizations_ms.dart | 2 +- .../featurebase_localizations_nb.dart | 2 +- .../featurebase_localizations_nl.dart | 2 +- .../featurebase_localizations_pl.dart | 2 +- .../featurebase_localizations_pt.dart | 7 +- .../featurebase_localizations_ro.dart | 2 +- .../featurebase_localizations_ru.dart | 2 +- .../featurebase_localizations_sk.dart | 2 +- .../featurebase_localizations_sl.dart | 2 +- .../featurebase_localizations_sr.dart | 2 +- .../featurebase_localizations_sv.dart | 2 +- .../featurebase_localizations_sw.dart | 2 +- .../featurebase_localizations_th.dart | 2 +- .../featurebase_localizations_tr.dart | 2 +- .../featurebase_localizations_uk.dart | 2 +- .../featurebase_localizations_vi.dart | 2 +- .../featurebase_localizations_zh.dart | 17 +- lib/l10n/package_af.arb | 12 +- lib/l10n/package_ar.arb | 12 +- lib/l10n/package_az.arb | 9 + lib/l10n/package_be.arb | 9 + lib/l10n/package_bg.arb | 9 + lib/l10n/package_bo.arb | 9 + lib/l10n/package_ca.arb | 9 + lib/l10n/package_cs.arb | 9 + lib/l10n/package_da.arb | 9 + lib/l10n/package_de.arb | 9 + lib/l10n/package_de_CH.arb | 9 + lib/l10n/package_el.arb | 9 + lib/l10n/package_es.arb | 9 + lib/l10n/package_es_419.arb | 9 + lib/l10n/package_fa.arb | 9 + lib/l10n/package_fi.arb | 9 + lib/l10n/package_fr.arb | 9 + lib/l10n/package_gl.arb | 9 + lib/l10n/package_hi.arb | 9 + lib/l10n/package_hr.arb | 9 + lib/l10n/package_hu.arb | 9 + lib/l10n/package_id.arb | 9 + lib/l10n/package_is.arb | 9 + lib/l10n/package_it.arb | 9 + lib/l10n/package_ja.arb | 9 + lib/l10n/package_ko.arb | 9 + lib/l10n/package_lt.arb | 9 + lib/l10n/package_lv.arb | 9 + lib/l10n/package_ms.arb | 9 + lib/l10n/package_nb.arb | 9 + lib/l10n/package_nl.arb | 9 + lib/l10n/package_pl.arb | 9 + lib/l10n/package_pt.arb | 9 + lib/l10n/package_pt_BR.arb | 9 + lib/l10n/package_ro.arb | 9 + lib/l10n/package_ru.arb | 9 + lib/l10n/package_sk.arb | 9 + lib/l10n/package_sl.arb | 9 + lib/l10n/package_sr.arb | 9 + lib/l10n/package_sv.arb | 9 + lib/l10n/package_sw.arb | 9 + lib/l10n/package_th.arb | 9 + lib/l10n/package_tr.arb | 9 + lib/l10n/package_uk.arb | 9 + lib/l10n/package_vi.arb | 9 + lib/l10n/package_zh.arb | 9 + lib/l10n/package_zh_Hans.arb | 9 + lib/l10n/package_zh_Hant.arb | 9 + lib/l10n/package_zh_TW.arb | 9 + lib/l10n/untranslated.json | 198 +----------------- 93 files changed, 515 insertions(+), 246 deletions(-) diff --git a/lib/l10n/generated/featurebase_localizations_af.dart b/lib/l10n/generated/featurebase_localizations_af.dart index 7e87fac..7a5042d 100644 --- a/lib/l10n/generated/featurebase_localizations_af.dart +++ b/lib/l10n/generated/featurebase_localizations_af.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsAf extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Gewysig deur $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ar.dart b/lib/l10n/generated/featurebase_localizations_ar.dart index 9c81038..5e3fca3 100644 --- a/lib/l10n/generated/featurebase_localizations_ar.dart +++ b/lib/l10n/generated/featurebase_localizations_ar.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsAr extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'تم التحديث بواسطة $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_az.dart b/lib/l10n/generated/featurebase_localizations_az.dart index bc942f1..b86c843 100644 --- a/lib/l10n/generated/featurebase_localizations_az.dart +++ b/lib/l10n/generated/featurebase_localizations_az.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsAz extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '$daysAgo tarixində yeniləndi'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_be.dart b/lib/l10n/generated/featurebase_localizations_be.dart index 4d08d3f..ee7be4b 100644 --- a/lib/l10n/generated/featurebase_localizations_be.dart +++ b/lib/l10n/generated/featurebase_localizations_be.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsBe extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '$daysAgo абнаўлена'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_bg.dart b/lib/l10n/generated/featurebase_localizations_bg.dart index d215101..f6cf113 100644 --- a/lib/l10n/generated/featurebase_localizations_bg.dart +++ b/lib/l10n/generated/featurebase_localizations_bg.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsBg extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '$daysAgo дневно'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_bo.dart b/lib/l10n/generated/featurebase_localizations_bo.dart index b57f8a8..8ce8a41 100644 --- a/lib/l10n/generated/featurebase_localizations_bo.dart +++ b/lib/l10n/generated/featurebase_localizations_bo.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsBo extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'སྤྱི་འགྲེལ་བྱེད་མ་ཐུབ། $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ca.dart b/lib/l10n/generated/featurebase_localizations_ca.dart index 25c78fe..2396c1f 100644 --- a/lib/l10n/generated/featurebase_localizations_ca.dart +++ b/lib/l10n/generated/featurebase_localizations_ca.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsCa extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Actualitzat fa $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_cs.dart b/lib/l10n/generated/featurebase_localizations_cs.dart index 85e0d95..ac0da1b 100644 --- a/lib/l10n/generated/featurebase_localizations_cs.dart +++ b/lib/l10n/generated/featurebase_localizations_cs.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsCs extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Aktualizováno $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_da.dart b/lib/l10n/generated/featurebase_localizations_da.dart index d6ba84e..61c9fb5 100644 --- a/lib/l10n/generated/featurebase_localizations_da.dart +++ b/lib/l10n/generated/featurebase_localizations_da.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsDa extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Sidst opdateret $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_de.dart b/lib/l10n/generated/featurebase_localizations_de.dart index 550b706..b82ee21 100644 --- a/lib/l10n/generated/featurebase_localizations_de.dart +++ b/lib/l10n/generated/featurebase_localizations_de.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsDe extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Letzte Aktualisierung $daysAgo'; } @override @@ -73,6 +73,11 @@ class FeaturebaseLocalizationsDeCh extends FeaturebaseLocalizationsDe { return 'Geschrieben von $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Zuletzt aktualisiert $daysAgo'; + } + @override String get failedToLoad => 'Laden fehlgeschlagen'; diff --git a/lib/l10n/generated/featurebase_localizations_el.dart b/lib/l10n/generated/featurebase_localizations_el.dart index d12a3b7..ea4e562 100644 --- a/lib/l10n/generated/featurebase_localizations_el.dart +++ b/lib/l10n/generated/featurebase_localizations_el.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsEl extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Τελευταία ενημέρωση $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_es.dart b/lib/l10n/generated/featurebase_localizations_es.dart index 80147ab..8027e88 100644 --- a/lib/l10n/generated/featurebase_localizations_es.dart +++ b/lib/l10n/generated/featurebase_localizations_es.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsEs extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Última actualización $daysAgo'; } @override @@ -73,6 +73,11 @@ class FeaturebaseLocalizationsEs419 extends FeaturebaseLocalizationsEs { return 'Escrito por $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Última actualización $daysAgo'; + } + @override String get failedToLoad => 'Error al cargar'; diff --git a/lib/l10n/generated/featurebase_localizations_fa.dart b/lib/l10n/generated/featurebase_localizations_fa.dart index 4371ad4..3d76487 100644 --- a/lib/l10n/generated/featurebase_localizations_fa.dart +++ b/lib/l10n/generated/featurebase_localizations_fa.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsFa extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'آخرین به‌روزرسانی $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_fi.dart b/lib/l10n/generated/featurebase_localizations_fi.dart index a0aa61a..ac8c9d5 100644 --- a/lib/l10n/generated/featurebase_localizations_fi.dart +++ b/lib/l10n/generated/featurebase_localizations_fi.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsFi extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Päivitetty $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_fr.dart b/lib/l10n/generated/featurebase_localizations_fr.dart index 970e874..d1b37a9 100644 --- a/lib/l10n/generated/featurebase_localizations_fr.dart +++ b/lib/l10n/generated/featurebase_localizations_fr.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsFr extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Dernière mise à jour $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_gl.dart b/lib/l10n/generated/featurebase_localizations_gl.dart index d0f39d9..f373d94 100644 --- a/lib/l10n/generated/featurebase_localizations_gl.dart +++ b/lib/l10n/generated/featurebase_localizations_gl.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsGl extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Última actualización $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_hi.dart b/lib/l10n/generated/featurebase_localizations_hi.dart index 2cf7402..141e9bf 100644 --- a/lib/l10n/generated/featurebase_localizations_hi.dart +++ b/lib/l10n/generated/featurebase_localizations_hi.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsHi extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'अंतिम अपडेट $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_hr.dart b/lib/l10n/generated/featurebase_localizations_hr.dart index 5590298..da2fb75 100644 --- a/lib/l10n/generated/featurebase_localizations_hr.dart +++ b/lib/l10n/generated/featurebase_localizations_hr.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsHr extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Zadnje ažurirano $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_hu.dart b/lib/l10n/generated/featurebase_localizations_hu.dart index f232627..2a2ef9c 100644 --- a/lib/l10n/generated/featurebase_localizations_hu.dart +++ b/lib/l10n/generated/featurebase_localizations_hu.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsHu extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Utoljára frissítve $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_id.dart b/lib/l10n/generated/featurebase_localizations_id.dart index 8eab263..b0522d3 100644 --- a/lib/l10n/generated/featurebase_localizations_id.dart +++ b/lib/l10n/generated/featurebase_localizations_id.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsId extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Terakhir diperbarui $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_is.dart b/lib/l10n/generated/featurebase_localizations_is.dart index ce5935c..9556d31 100644 --- a/lib/l10n/generated/featurebase_localizations_is.dart +++ b/lib/l10n/generated/featurebase_localizations_is.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsIs extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Síðasta uppfærsla $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_it.dart b/lib/l10n/generated/featurebase_localizations_it.dart index 8b73028..313432e 100644 --- a/lib/l10n/generated/featurebase_localizations_it.dart +++ b/lib/l10n/generated/featurebase_localizations_it.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsIt extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Ultimo aggiornamento $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ja.dart b/lib/l10n/generated/featurebase_localizations_ja.dart index 1d26c3b..e8b9781 100644 --- a/lib/l10n/generated/featurebase_localizations_ja.dart +++ b/lib/l10n/generated/featurebase_localizations_ja.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsJa extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '最終更新 $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ko.dart b/lib/l10n/generated/featurebase_localizations_ko.dart index f58629e..8807171 100644 --- a/lib/l10n/generated/featurebase_localizations_ko.dart +++ b/lib/l10n/generated/featurebase_localizations_ko.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsKo extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '마지막 업데이트 $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_lt.dart b/lib/l10n/generated/featurebase_localizations_lt.dart index e014bcb..7431c35 100644 --- a/lib/l10n/generated/featurebase_localizations_lt.dart +++ b/lib/l10n/generated/featurebase_localizations_lt.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsLt extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Paskutinį kartą atnaujinta $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_lv.dart b/lib/l10n/generated/featurebase_localizations_lv.dart index 6e53c90..6882c22 100644 --- a/lib/l10n/generated/featurebase_localizations_lv.dart +++ b/lib/l10n/generated/featurebase_localizations_lv.dart @@ -27,7 +27,7 @@ class FeaturebaseLocalizationsLv extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Pēdējā atjaunināšana $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ms.dart b/lib/l10n/generated/featurebase_localizations_ms.dart index 6fa1c8f..89f61ad 100644 --- a/lib/l10n/generated/featurebase_localizations_ms.dart +++ b/lib/l10n/generated/featurebase_localizations_ms.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsMs extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Diperbaharui $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_nb.dart b/lib/l10n/generated/featurebase_localizations_nb.dart index 3eb40b7..e187c5a 100644 --- a/lib/l10n/generated/featurebase_localizations_nb.dart +++ b/lib/l10n/generated/featurebase_localizations_nb.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsNb extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Sist oppdatert $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_nl.dart b/lib/l10n/generated/featurebase_localizations_nl.dart index 090cc3c..1ea0dc4 100644 --- a/lib/l10n/generated/featurebase_localizations_nl.dart +++ b/lib/l10n/generated/featurebase_localizations_nl.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsNl extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Laatst bijgewerkt $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_pl.dart b/lib/l10n/generated/featurebase_localizations_pl.dart index 8d07e15..16eb70a 100644 --- a/lib/l10n/generated/featurebase_localizations_pl.dart +++ b/lib/l10n/generated/featurebase_localizations_pl.dart @@ -28,7 +28,7 @@ class FeaturebaseLocalizationsPl extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Ostatnia aktualizacja $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_pt.dart b/lib/l10n/generated/featurebase_localizations_pt.dart index 6657c00..291b27a 100644 --- a/lib/l10n/generated/featurebase_localizations_pt.dart +++ b/lib/l10n/generated/featurebase_localizations_pt.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsPt extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Última atualização $daysAgo'; } @override @@ -73,6 +73,11 @@ class FeaturebaseLocalizationsPtBr extends FeaturebaseLocalizationsPt { return 'Escrito por $author'; } + @override + String lastUpdated(String daysAgo) { + return 'Última atualização $daysAgo'; + } + @override String get failedToLoad => 'Falha ao carregar'; diff --git a/lib/l10n/generated/featurebase_localizations_ro.dart b/lib/l10n/generated/featurebase_localizations_ro.dart index 51eb81f..ea281a5 100644 --- a/lib/l10n/generated/featurebase_localizations_ro.dart +++ b/lib/l10n/generated/featurebase_localizations_ro.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsRo extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Ultima actualizare $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_ru.dart b/lib/l10n/generated/featurebase_localizations_ru.dart index 049a2c3..46d0795 100644 --- a/lib/l10n/generated/featurebase_localizations_ru.dart +++ b/lib/l10n/generated/featurebase_localizations_ru.dart @@ -28,7 +28,7 @@ class FeaturebaseLocalizationsRu extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Последнее обновление $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_sk.dart b/lib/l10n/generated/featurebase_localizations_sk.dart index dcbffb1..58b6c43 100644 --- a/lib/l10n/generated/featurebase_localizations_sk.dart +++ b/lib/l10n/generated/featurebase_localizations_sk.dart @@ -27,7 +27,7 @@ class FeaturebaseLocalizationsSk extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Naposledy aktualizované $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_sl.dart b/lib/l10n/generated/featurebase_localizations_sl.dart index 69d191e..7ca5e13 100644 --- a/lib/l10n/generated/featurebase_localizations_sl.dart +++ b/lib/l10n/generated/featurebase_localizations_sl.dart @@ -27,7 +27,7 @@ class FeaturebaseLocalizationsSl extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Naposledy posodobljeno $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_sr.dart b/lib/l10n/generated/featurebase_localizations_sr.dart index 7f4d577..42c46e4 100644 --- a/lib/l10n/generated/featurebase_localizations_sr.dart +++ b/lib/l10n/generated/featurebase_localizations_sr.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsSr extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Poslednja ažuriranja $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_sv.dart b/lib/l10n/generated/featurebase_localizations_sv.dart index 6f0c681..64fab19 100644 --- a/lib/l10n/generated/featurebase_localizations_sv.dart +++ b/lib/l10n/generated/featurebase_localizations_sv.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsSv extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Senast uppdaterad $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_sw.dart b/lib/l10n/generated/featurebase_localizations_sw.dart index 88de6c6..d5d9367 100644 --- a/lib/l10n/generated/featurebase_localizations_sw.dart +++ b/lib/l10n/generated/featurebase_localizations_sw.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsSw extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Mwisho wa kusafiri $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_th.dart b/lib/l10n/generated/featurebase_localizations_th.dart index 19d7423..a6e197b 100644 --- a/lib/l10n/generated/featurebase_localizations_th.dart +++ b/lib/l10n/generated/featurebase_localizations_th.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsTh extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'อัพเดตล่าสุด $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_tr.dart b/lib/l10n/generated/featurebase_localizations_tr.dart index 66a7bcc..b593c35 100644 --- a/lib/l10n/generated/featurebase_localizations_tr.dart +++ b/lib/l10n/generated/featurebase_localizations_tr.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsTr extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Son güncelleme $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_uk.dart b/lib/l10n/generated/featurebase_localizations_uk.dart index 1c6cae3..ad26a9e 100644 --- a/lib/l10n/generated/featurebase_localizations_uk.dart +++ b/lib/l10n/generated/featurebase_localizations_uk.dart @@ -28,7 +28,7 @@ class FeaturebaseLocalizationsUk extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Останнє оновлення $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_vi.dart b/lib/l10n/generated/featurebase_localizations_vi.dart index 41c998f..2debdf9 100644 --- a/lib/l10n/generated/featurebase_localizations_vi.dart +++ b/lib/l10n/generated/featurebase_localizations_vi.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsVi extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return 'Cập nhật lần cuối $daysAgo'; } @override diff --git a/lib/l10n/generated/featurebase_localizations_zh.dart b/lib/l10n/generated/featurebase_localizations_zh.dart index 576166b..3109426 100644 --- a/lib/l10n/generated/featurebase_localizations_zh.dart +++ b/lib/l10n/generated/featurebase_localizations_zh.dart @@ -26,7 +26,7 @@ class FeaturebaseLocalizationsZh extends FeaturebaseLocalizations { @override String lastUpdated(String daysAgo) { - return 'Last updated $daysAgo'; + return '最後更新 $daysAgo'; } @override @@ -73,6 +73,11 @@ class FeaturebaseLocalizationsZhHans extends FeaturebaseLocalizationsZh { return '作者:$author'; } + @override + String lastUpdated(String daysAgo) { + return '最后更新 $daysAgo'; + } + @override String get failedToLoad => '加载失败'; @@ -117,6 +122,11 @@ class FeaturebaseLocalizationsZhHant extends FeaturebaseLocalizationsZh { return '作者:$author'; } + @override + String lastUpdated(String daysAgo) { + return '最後更新 $daysAgo'; + } + @override String get failedToLoad => '載入失敗'; @@ -161,6 +171,11 @@ class FeaturebaseLocalizationsZhTw extends FeaturebaseLocalizationsZh { return '作者:$author'; } + @override + String lastUpdated(String daysAgo) { + return '最後更新 $daysAgo'; + } + @override String get failedToLoad => '載入失敗'; diff --git a/lib/l10n/package_af.arb b/lib/l10n/package_af.arb index 5ba5600..8d17658 100644 --- a/lib/l10n/package_af.arb +++ b/lib/l10n/package_af.arb @@ -18,10 +18,16 @@ } } }, - "failedToLoad": "Kon nie laai nie", - "@failedToLoad": { - "description": "This is the error message that is displayed when the data fails to load." + "lastUpdated": "Gewysig deur {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dae gelede" + } + } }, + "failedToLoad": "Kon nie laai nie", "tryAgainLater": "Probeer later weer", "@tryAgainLater": { "description": "This is the message that is displayed when the user should try again later." diff --git a/lib/l10n/package_ar.arb b/lib/l10n/package_ar.arb index ff01b2e..f61b75e 100644 --- a/lib/l10n/package_ar.arb +++ b/lib/l10n/package_ar.arb @@ -18,10 +18,16 @@ } } }, - "failedToLoad": "فشل التحميل", - "@failedToLoad": { - "description": "This is the error message that is displayed when the data fails to load." + "lastUpdated": "تم التحديث بواسطة {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 يوماً مضت" + } + } }, + "failedToLoad": "فشل التحميل", "tryAgainLater": "حاول مرة أخرى لاحقاً", "@tryAgainLater": { "description": "This is the message that is displayed when the user should try again later." diff --git a/lib/l10n/package_az.arb b/lib/l10n/package_az.arb index 93c7c10..c99e48a 100644 --- a/lib/l10n/package_az.arb +++ b/lib/l10n/package_az.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "{daysAgo} tarixində yeniləndi", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 gün ərzində" + } + } + }, "failedToLoad": "Yükləmək alınmadı", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_be.arb b/lib/l10n/package_be.arb index 5f69309..6d7518f 100644 --- a/lib/l10n/package_be.arb +++ b/lib/l10n/package_be.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "{daysAgo} абнаўлена", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 дзён таму" + } + } + }, "failedToLoad": "Не атрымалася загрузіць", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_bg.arb b/lib/l10n/package_bg.arb index 94b9bed..1b285f2 100644 --- a/lib/l10n/package_bg.arb +++ b/lib/l10n/package_bg.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "{daysAgo} дневно", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Грешка при зареждането", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_bo.arb b/lib/l10n/package_bo.arb index 180f1b0..0b8ff31 100644 --- a/lib/l10n/package_bo.arb +++ b/lib/l10n/package_bo.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "སྤྱི་འགྲེལ་བྱེད་མ་ཐུབ། {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 སྤྱི་འགྲེལ་བྱེད་མ་ཐུབ།" + } + } + }, "failedToLoad": "འཇུག་འདྲེན་བྱེད་མ་ཐུབ།", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ca.arb b/lib/l10n/package_ca.arb index 878022a..16854ce 100644 --- a/lib/l10n/package_ca.arb +++ b/lib/l10n/package_ca.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Actualitzat fa {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "No s'ha pogut carregar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_cs.arb b/lib/l10n/package_cs.arb index f0c298b..cf30a42 100644 --- a/lib/l10n/package_cs.arb +++ b/lib/l10n/package_cs.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Aktualizováno {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Načítání selhalo", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_da.arb b/lib/l10n/package_da.arb index 695ec8a..4f19617 100644 --- a/lib/l10n/package_da.arb +++ b/lib/l10n/package_da.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Sidst opdateret {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Kunne ikke indlæse", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_de.arb b/lib/l10n/package_de.arb index 4cbce07..84982fb 100644 --- a/lib/l10n/package_de.arb +++ b/lib/l10n/package_de.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Letzte Aktualisierung {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 Tage" + } + } + }, "failedToLoad": "Laden fehlgeschlagen", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_de_CH.arb b/lib/l10n/package_de_CH.arb index 97176b5..542e05e 100644 --- a/lib/l10n/package_de_CH.arb +++ b/lib/l10n/package_de_CH.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Zuletzt aktualisiert {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Laden fehlgeschlagen", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_el.arb b/lib/l10n/package_el.arb index 0fbed4f..6acb7cd 100644 --- a/lib/l10n/package_el.arb +++ b/lib/l10n/package_el.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Τελευταία ενημέρωση {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Αποτυχία φόρτωσης", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_es.arb b/lib/l10n/package_es.arb index b187fca..b066f61 100644 --- a/lib/l10n/package_es.arb +++ b/lib/l10n/package_es.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Última actualización {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 días" + } + } + }, "failedToLoad": "Error al cargar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_es_419.arb b/lib/l10n/package_es_419.arb index fb70835..4aebb17 100644 --- a/lib/l10n/package_es_419.arb +++ b/lib/l10n/package_es_419.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Última actualización {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "Error al cargar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_fa.arb b/lib/l10n/package_fa.arb index e576cd7..0c8a988 100644 --- a/lib/l10n/package_fa.arb +++ b/lib/l10n/package_fa.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "آخرین به‌روزرسانی {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28" + } + } + }, "failedToLoad": "خطا در بارگذاری", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_fi.arb b/lib/l10n/package_fi.arb index a08e6cf..9e766fe 100644 --- a/lib/l10n/package_fi.arb +++ b/lib/l10n/package_fi.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Päivitetty {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 päivää" + } + } + }, "failedToLoad": "Lataus epäonnistui", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_fr.arb b/lib/l10n/package_fr.arb index b380eaa..1f1bea1 100644 --- a/lib/l10n/package_fr.arb +++ b/lib/l10n/package_fr.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Dernière mise à jour {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 jours" + } + } + }, "failedToLoad": "Échec du chargement", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_gl.arb b/lib/l10n/package_gl.arb index 0b1df10..553bc76 100644 --- a/lib/l10n/package_gl.arb +++ b/lib/l10n/package_gl.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Última actualización {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 días" + } + } + }, "failedToLoad": "Erro ao cargar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_hi.arb b/lib/l10n/package_hi.arb index 0d17da6..451b275 100644 --- a/lib/l10n/package_hi.arb +++ b/lib/l10n/package_hi.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "अंतिम अपडेट {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 दिन पहले" + } + } + }, "failedToLoad": "लोड करने में विफल", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_hr.arb b/lib/l10n/package_hr.arb index 004aad8..7000cea 100644 --- a/lib/l10n/package_hr.arb +++ b/lib/l10n/package_hr.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Zadnje ažurirano {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 days ago" + } + } + }, "failedToLoad": "Neuspjelo učitavanje", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_hu.arb b/lib/l10n/package_hu.arb index 0b47ad9..ef86460 100644 --- a/lib/l10n/package_hu.arb +++ b/lib/l10n/package_hu.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Utoljára frissítve {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 napja" + } + } + }, "failedToLoad": "Betöltés sikertelen", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_id.arb b/lib/l10n/package_id.arb index b999b6a..8bf0275 100644 --- a/lib/l10n/package_id.arb +++ b/lib/l10n/package_id.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Terakhir diperbarui {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 hari" + } + } + }, "failedToLoad": "Gagal memuat", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_is.arb b/lib/l10n/package_is.arb index dfdc789..f45f2e5 100644 --- a/lib/l10n/package_is.arb +++ b/lib/l10n/package_is.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Síðasta uppfærsla {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dagar" + } + } + }, "failedToLoad": "Ekki tókst að hlaða", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_it.arb b/lib/l10n/package_it.arb index 857ce7a..257aadf 100644 --- a/lib/l10n/package_it.arb +++ b/lib/l10n/package_it.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Ultimo aggiornamento {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 giorni" + } + } + }, "failedToLoad": "Caricamento non riuscito", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ja.arb b/lib/l10n/package_ja.arb index 381c472..dbe62a6 100644 --- a/lib/l10n/package_ja.arb +++ b/lib/l10n/package_ja.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "最終更新 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 日" + } + } + }, "failedToLoad": "読み込みに失敗しました", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ko.arb b/lib/l10n/package_ko.arb index 4aa5ec3..d01d849 100644 --- a/lib/l10n/package_ko.arb +++ b/lib/l10n/package_ko.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "마지막 업데이트 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 일" + } + } + }, "failedToLoad": "로드 실패", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_lt.arb b/lib/l10n/package_lt.arb index 2ba2089..10b0941 100644 --- a/lib/l10n/package_lt.arb +++ b/lib/l10n/package_lt.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Paskutinį kartą atnaujinta {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dienų" + } + } + }, "failedToLoad": "Nepavyko įkelti", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_lv.arb b/lib/l10n/package_lv.arb index f2f9699..e3dbdbf 100644 --- a/lib/l10n/package_lv.arb +++ b/lib/l10n/package_lv.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Pēdējā atjaunināšana {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dienām" + } + } + }, "failedToLoad": "Neizdevās ielādēt", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ms.arb b/lib/l10n/package_ms.arb index 8e9e9dc..c92078d 100644 --- a/lib/l10n/package_ms.arb +++ b/lib/l10n/package_ms.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Diperbaharui {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 hari" + } + } + }, "failedToLoad": "Gagal dimuat", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_nb.arb b/lib/l10n/package_nb.arb index e0b8a14..d94ff03 100644 --- a/lib/l10n/package_nb.arb +++ b/lib/l10n/package_nb.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Sist oppdatert {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dager" + } + } + }, "failedToLoad": "Kunne ikke laste inn", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_nl.arb b/lib/l10n/package_nl.arb index e46d3c3..5528038 100644 --- a/lib/l10n/package_nl.arb +++ b/lib/l10n/package_nl.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Laatst bijgewerkt {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dagen" + } + } + }, "failedToLoad": "Laden mislukt", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_pl.arb b/lib/l10n/package_pl.arb index 49ca235..a462ce8 100644 --- a/lib/l10n/package_pl.arb +++ b/lib/l10n/package_pl.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Ostatnia aktualizacja {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dni temu" + } + } + }, "failedToLoad": "Nie udało się załadować", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_pt.arb b/lib/l10n/package_pt.arb index bc7823f..1da95e6 100644 --- a/lib/l10n/package_pt.arb +++ b/lib/l10n/package_pt.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Última atualização {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dias" + } + } + }, "failedToLoad": "Falha ao carregar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_pt_BR.arb b/lib/l10n/package_pt_BR.arb index 0cfc673..ed4780d 100644 --- a/lib/l10n/package_pt_BR.arb +++ b/lib/l10n/package_pt_BR.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Última atualização {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dias" + } + } + }, "failedToLoad": "Falha ao carregar", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ro.arb b/lib/l10n/package_ro.arb index 257d350..798e154 100644 --- a/lib/l10n/package_ro.arb +++ b/lib/l10n/package_ro.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Ultima actualizare {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 zile" + } + } + }, "failedToLoad": "Încărcare eșuată", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_ru.arb b/lib/l10n/package_ru.arb index 5ab4379..d2b3208 100644 --- a/lib/l10n/package_ru.arb +++ b/lib/l10n/package_ru.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Последнее обновление {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 дней" + } + } + }, "failedToLoad": "Не удалось загрузить", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_sk.arb b/lib/l10n/package_sk.arb index 7dbfa2f..9f6249c 100644 --- a/lib/l10n/package_sk.arb +++ b/lib/l10n/package_sk.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Naposledy aktualizované {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dní" + } + } + }, "failedToLoad": "Nepodarilo sa načítať", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_sl.arb b/lib/l10n/package_sl.arb index 49c1821..65466b5 100644 --- a/lib/l10n/package_sl.arb +++ b/lib/l10n/package_sl.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Naposledy posodobljeno {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dni" + } + } + }, "failedToLoad": "Napaka pri nalaganju", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_sr.arb b/lib/l10n/package_sr.arb index 27afddc..4cd5bb4 100644 --- a/lib/l10n/package_sr.arb +++ b/lib/l10n/package_sr.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Poslednja ažuriranja {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dana" + } + } + }, "failedToLoad": "Učitavanje nije uspelo", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_sv.arb b/lib/l10n/package_sv.arb index 381ac99..e7b9c95 100644 --- a/lib/l10n/package_sv.arb +++ b/lib/l10n/package_sv.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Senast uppdaterad {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 dagar" + } + } + }, "failedToLoad": "Det gick inte att ladda", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_sw.arb b/lib/l10n/package_sw.arb index dea909f..ebe77c0 100644 --- a/lib/l10n/package_sw.arb +++ b/lib/l10n/package_sw.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Mwisho wa kusafiri {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 miaka" + } + } + }, "failedToLoad": "Imeshindwa kupakia", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_th.arb b/lib/l10n/package_th.arb index 563f3d6..6835be8 100644 --- a/lib/l10n/package_th.arb +++ b/lib/l10n/package_th.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "อัพเดตล่าสุด {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 วันที่ผ่านมา" + } + } + }, "failedToLoad": "โหลดไม่สำเร็จ", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_tr.arb b/lib/l10n/package_tr.arb index 67371b0..47626f1 100644 --- a/lib/l10n/package_tr.arb +++ b/lib/l10n/package_tr.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Son güncelleme {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 gün" + } + } + }, "failedToLoad": "Yüklenemedi", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_uk.arb b/lib/l10n/package_uk.arb index 913d907..648a78b 100644 --- a/lib/l10n/package_uk.arb +++ b/lib/l10n/package_uk.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Останнє оновлення {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 днів" + } + } + }, "failedToLoad": "Не вдалося завантажити", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_vi.arb b/lib/l10n/package_vi.arb index 2e607ec..48425e1 100644 --- a/lib/l10n/package_vi.arb +++ b/lib/l10n/package_vi.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "Cập nhật lần cuối {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 ngày" + } + } + }, "failedToLoad": "Không thể tải", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_zh.arb b/lib/l10n/package_zh.arb index a239bd4..51009e9 100644 --- a/lib/l10n/package_zh.arb +++ b/lib/l10n/package_zh.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "最後更新 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 天" + } + } + }, "failedToLoad": "載入失敗", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_zh_Hans.arb b/lib/l10n/package_zh_Hans.arb index 7618eea..7d3173b 100644 --- a/lib/l10n/package_zh_Hans.arb +++ b/lib/l10n/package_zh_Hans.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "最后更新 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 天" + } + } + }, "failedToLoad": "加载失败", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_zh_Hant.arb b/lib/l10n/package_zh_Hant.arb index f72d0ef..3c7f55c 100644 --- a/lib/l10n/package_zh_Hant.arb +++ b/lib/l10n/package_zh_Hant.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "最後更新 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 天" + } + } + }, "failedToLoad": "載入失敗", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/package_zh_TW.arb b/lib/l10n/package_zh_TW.arb index bc36313..8ccf839 100644 --- a/lib/l10n/package_zh_TW.arb +++ b/lib/l10n/package_zh_TW.arb @@ -18,6 +18,15 @@ } } }, + "lastUpdated": "最後更新 {daysAgo}", + "@lastUpdated": { + "placeholders": { + "daysAgo": { + "type": "String", + "example": "28 天" + } + } + }, "failedToLoad": "載入失敗", "@failedToLoad": { "description": "This is the error message that is displayed when the data fails to load." diff --git a/lib/l10n/untranslated.json b/lib/l10n/untranslated.json index 930d104..9e26dfe 100644 --- a/lib/l10n/untranslated.json +++ b/lib/l10n/untranslated.json @@ -1,197 +1 @@ -{ - "af": [ - "lastUpdated" - ], - - "ar": [ - "lastUpdated" - ], - - "az": [ - "lastUpdated" - ], - - "be": [ - "lastUpdated" - ], - - "bg": [ - "lastUpdated" - ], - - "bo": [ - "lastUpdated" - ], - - "ca": [ - "lastUpdated" - ], - - "cs": [ - "lastUpdated" - ], - - "da": [ - "lastUpdated" - ], - - "de": [ - "lastUpdated" - ], - - "de_CH": [ - "lastUpdated" - ], - - "el": [ - "lastUpdated" - ], - - "es": [ - "lastUpdated" - ], - - "es_419": [ - "lastUpdated" - ], - - "fa": [ - "lastUpdated" - ], - - "fi": [ - "lastUpdated" - ], - - "fr": [ - "lastUpdated" - ], - - "gl": [ - "lastUpdated" - ], - - "hi": [ - "lastUpdated" - ], - - "hr": [ - "lastUpdated" - ], - - "hu": [ - "lastUpdated" - ], - - "id": [ - "lastUpdated" - ], - - "is": [ - "lastUpdated" - ], - - "it": [ - "lastUpdated" - ], - - "ja": [ - "lastUpdated" - ], - - "ko": [ - "lastUpdated" - ], - - "lt": [ - "lastUpdated" - ], - - "lv": [ - "lastUpdated" - ], - - "ms": [ - "lastUpdated" - ], - - "nb": [ - "lastUpdated" - ], - - "nl": [ - "lastUpdated" - ], - - "pl": [ - "lastUpdated" - ], - - "pt": [ - "lastUpdated" - ], - - "pt_BR": [ - "lastUpdated" - ], - - "ro": [ - "lastUpdated" - ], - - "ru": [ - "lastUpdated" - ], - - "sk": [ - "lastUpdated" - ], - - "sl": [ - "lastUpdated" - ], - - "sr": [ - "lastUpdated" - ], - - "sv": [ - "lastUpdated" - ], - - "sw": [ - "lastUpdated" - ], - - "th": [ - "lastUpdated" - ], - - "tr": [ - "lastUpdated" - ], - - "uk": [ - "lastUpdated" - ], - - "vi": [ - "lastUpdated" - ], - - "zh": [ - "lastUpdated" - ], - - "zh_Hans": [ - "lastUpdated" - ], - - "zh_Hant": [ - "lastUpdated" - ], - - "zh_TW": [ - "lastUpdated" - ] -} +{} \ No newline at end of file From 122c3c01c127452f7fefb2a9359d0326cb1dacc3 Mon Sep 17 00:00:00 2001 From: Elias Date: Tue, 11 Feb 2025 12:52:31 +0100 Subject: [PATCH 5/5] chore: bump version --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b18818..b05236e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.1 + +- Added support for hiding author and date information from articles (read more here: ). + ## 0.8.0 - **BREAKING**: Replaced providing the feedback and help urls with just providing the `organizationName`. diff --git a/pubspec.yaml b/pubspec.yaml index 395029f..cbb4634 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: featurebase description: "Featurebase Unofficial Flutter SDK" -version: 0.8.0 +version: 0.8.1 homepage: https://github.com/ae1dev/flutter_featurebase platforms: