mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-11 00:10:29 -07: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",
|
"syncStatusEnqueued": "Enqueued",
|
||||||
"syncStatusRunning": "Running",
|
"syncStatusRunning": "Running",
|
||||||
"syncStatusComplete": "Complete",
|
"syncStatusComplete": "Complete",
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,12 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
||||||
children: [
|
children: [
|
||||||
if (widget.items.length == 1)
|
if (widget.items.length == 1)
|
||||||
Text(
|
Text(
|
||||||
'Add to collection',
|
context.localized.addToCollection,
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
Text(
|
Text(
|
||||||
'Add ${widget.items.length} item(s) to collection',
|
context.localized.addItemsToCollection(widget.items.length),
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
@ -76,7 +76,7 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: OutlinedTextField(
|
child: OutlinedTextField(
|
||||||
label: 'New collection',
|
label: context.localized.addToNewCollection,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
onChanged: (value) => setState(() {}),
|
onChanged: (value) => setState(() {}),
|
||||||
),
|
),
|
||||||
|
|
@ -112,8 +112,10 @@ class _AddToCollectionState extends ConsumerState<AddToCollection> {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
fladderSnackbar(context,
|
fladderSnackbar(context,
|
||||||
title: response.isSuccessful
|
title: response.isSuccessful
|
||||||
? "${value == true ? "Added to" : "Removed from"} ${e.key.name} collection"
|
? value == true
|
||||||
: 'Unable to ${value == true ? "add to" : "remove from"} ${e.key.name} collection - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
? 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) {
|
if (context.mounted) {
|
||||||
fladderSnackbar(context,
|
fladderSnackbar(context,
|
||||||
title: response.isSuccessful
|
title: response.isSuccessful
|
||||||
? "Added to ${e.key.name} collection"
|
? context.localized.addedToCollection(e.key.name)
|
||||||
: 'Unable to add to ${e.key.name} collection - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
child: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,12 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
||||||
children: [
|
children: [
|
||||||
if (widget.items.length == 1)
|
if (widget.items.length == 1)
|
||||||
Text(
|
Text(
|
||||||
'Add to collection',
|
context.localized.addToPlaylist,
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
Text(
|
Text(
|
||||||
'Add ${widget.items.length} item(s) to collection',
|
context.localized.addItemsToPlaylist(widget.items.length),
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
@ -71,7 +71,7 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: OutlinedTextField(
|
child: OutlinedTextField(
|
||||||
label: 'New Playlist',
|
label: context.localized.addToNewPlaylist,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
onChanged: (value) => setState(() {}),
|
onChanged: (value) => setState(() {}),
|
||||||
),
|
),
|
||||||
|
|
@ -86,8 +86,8 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
fladderSnackbar(context,
|
fladderSnackbar(context,
|
||||||
title: response.isSuccessful
|
title: response.isSuccessful
|
||||||
? "Added to new ${controller.text} playlist"
|
? context.localized.addedToPlaylist(controller.text)
|
||||||
: 'Unable to create new playlist - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||||
}
|
}
|
||||||
setState(() => controller.text = '');
|
setState(() => controller.text = '');
|
||||||
}
|
}
|
||||||
|
|
@ -124,8 +124,8 @@ class _AddToPlaylistState extends ConsumerState<AddToPlaylist> {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
fladderSnackbar(context,
|
fladderSnackbar(context,
|
||||||
title: response.isSuccessful
|
title: response.isSuccessful
|
||||||
? "Added to ${e.key.name} playlist"
|
? context.localized.addedToPlaylist(controller.text)
|
||||||
: 'Unable to add to playlist - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
: '${context.localized.somethingWentWrong} - (${response.statusCode}) - ${response.base.reasonPhrase}');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
icon: Icon(Icons.add_rounded, color: Theme.of(context).colorScheme.primary),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue