fix(mobile): empty translation placeholders (#18063)

* fix: empty placeholders

* fix: use namedArgs

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-05-06 18:51:05 +05:30
committed by GitHub
parent 2af8095880
commit ece977d9ca
28 changed files with 228 additions and 203 deletions

View File

@@ -61,7 +61,8 @@ class AlbumThumbnailCard extends ConsumerWidget {
if (album.ownerId == ref.read(currentUserProvider)?.id) {
owner = 'owned'.tr();
} else if (album.ownerName != null) {
owner = 'album_thumbnail_shared_by'.tr(args: [album.ownerName!]);
owner = 'album_thumbnail_shared_by'
.tr(namedArgs: {'user': album.ownerName!});
}
}
@@ -74,10 +75,9 @@ class AlbumThumbnailCard extends ConsumerWidget {
children: [
TextSpan(
text: album.assetCount == 1
? 'album_thumbnail_card_item'
.tr(args: ['${album.assetCount}'])
? 'album_thumbnail_card_item'.tr()
: 'album_thumbnail_card_items'
.tr(args: ['${album.assetCount}']),
.tr(namedArgs: {'count': '${album.assetCount}'}),
),
if (owner != null) const TextSpan(text: ''),
if (owner != null) TextSpan(text: owner),