mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Added some missing translations (#74)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
8d15e319d3
commit
8dc18c8a3d
3 changed files with 59 additions and 14 deletions
|
|
@ -948,6 +948,49 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"addToNewCollection": "New collection",
|
||||
"addItemsToCollection": "Add {itemLength} item(s) to collection",
|
||||
"addedToCollection": "Added to {collectionName} collection",
|
||||
"@addedToCollection":{
|
||||
"placeholders": {
|
||||
"collectionName":{
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"removedFromCollection": "Removed from {collectionName} collection",
|
||||
"@removedFromCollection":{
|
||||
"placeholders": {
|
||||
"collectionName":{
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@addItemsToCollection": {
|
||||
"placeholders": {
|
||||
"itemLength":{
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"addToNewPlaylist": "New playlist",
|
||||
"addItemsToPlaylist": "Add {itemLength} item(s) to playlist",
|
||||
"addedToPlaylist": "Added to {playlistName} playlist",
|
||||
"@addedToPlaylist":{
|
||||
"placeholders": {
|
||||
"playlistName":{
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@addItemsToPlaylist": {
|
||||
"placeholders": {
|
||||
"itemLength":{
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"syncStatusEnqueued": "Enqueued",
|
||||
"syncStatusRunning": "Running",
|
||||
"syncStatusComplete": "Complete",
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
|||
children: [
|
||||
if (widget.items.length == 1)
|
||||
Text(
|
||||
'Add to collection',
|
||||
context.localized.addToCollection,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
)
|
||||
else
|
||||
Text(
|
||||
'Add ${widget.items.length} item(s) to collection',
|
||||
context.localized.addItemsToCollection(widget.items.length),
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
IconButton(
|
||||
|
|
@ -76,7 +76,7 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
|||
children: [
|
||||
Flexible(
|
||||
child: OutlinedTextField(
|
||||
label: 'New collection',
|
||||
label: context.localized.addToNewCollection,
|
||||
controller: controller,
|
||||
onChanged: (value) => setState(() {}),
|
||||
),
|
||||
|
|
@ -112,8 +112,10 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
|||
if (context.mounted) {
|
||||
fladderSnackbar(context,
|
||||
title: response.isSuccessful
|
||||
? "${value == true ? "Added to" : "Removed from"} ${e.key.name} collection"
|
||||
: 'Unable to ${value == true ? "add to" : "remove from"} ${e.key.name} collection - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
? value == true
|
||||
? context.localized.addedToCollection(e.key.name)
|
||||
: context.localized.removedFromCollection(e.key.name)
|
||||
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
@ -140,8 +142,8 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
|||
if (context.mounted) {
|
||||
fladderSnackbar(context,
|
||||
title: response.isSuccessful
|
||||
? "Added to ${e.key.name} collection"
|
||||
: 'Unable to add to ${e.key.name} collection - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
? context.localized.addedToCollection(e.key.name)
|
||||
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
}
|
||||
},
|
||||
child: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
|||
children: [
|
||||
if (widget.items.length == 1)
|
||||
Text(
|
||||
'Add to collection',
|
||||
context.localized.addToPlaylist,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
)
|
||||
else
|
||||
Text(
|
||||
'Add ${widget.items.length} item(s) to collection',
|
||||
context.localized.addItemsToPlaylist(widget.items.length),
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
IconButton(
|
||||
|
|
@ -71,7 +71,7 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
|||
children: [
|
||||
Flexible(
|
||||
child: OutlinedTextField(
|
||||
label: 'New Playlist',
|
||||
label: context.localized.addToNewPlaylist,
|
||||
controller: controller,
|
||||
onChanged: (value) => setState(() {}),
|
||||
),
|
||||
|
|
@ -86,8 +86,8 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
|||
if (context.mounted) {
|
||||
fladderSnackbar(context,
|
||||
title: response.isSuccessful
|
||||
? "Added to new ${controller.text} playlist"
|
||||
: 'Unable to create new playlist - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
? context.localized.addedToPlaylist(controller.text)
|
||||
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
}
|
||||
setState(() => controller.text = '');
|
||||
}
|
||||
|
|
@ -124,8 +124,8 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
|||
if (context.mounted) {
|
||||
fladderSnackbar(context,
|
||||
title: response.isSuccessful
|
||||
? "Added to ${e.key.name} playlist"
|
||||
: 'Unable to add to playlist - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
? context.localized.addedToPlaylist(controller.text)
|
||||
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue