Updated duration pickers in Recipe Edit View

This commit is contained in:
Vicnet
2023-10-17 16:14:13 +02:00
parent 40e3047086
commit a025923ba6
4 changed files with 568 additions and 92 deletions

View File

@@ -319,6 +319,7 @@
en, en,
Base, Base,
de, de,
es,
); );
mainGroup = A70171752AA8E71900064C43; mainGroup = A70171752AA8E71900064C43;
productRefGroup = A701717F2AA8E71900064C43 /* Products */; productRefGroup = A701717F2AA8E71900064C43 /* Products */;

View File

@@ -8,6 +8,28 @@
"state" : "translated", "state" : "translated",
"value" : "" "value" : ""
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : ""
}
}
}
},
":" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : ":"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : ":"
}
} }
} }
}, },
@@ -18,6 +40,12 @@
"state" : "translated", "state" : "translated",
"value" : "%@" "value" : "%@"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "%@"
}
} }
} }
}, },
@@ -28,25 +56,11 @@
"state" : "translated", "state" : "translated",
"value" : "%lld" "value" : "%lld"
} }
} },
} "es" : {
},
"%lld hours" : {
"localizations" : {
"de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "%lld Std." "value" : "%lld"
}
}
}
},
"%lld min" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld Min."
} }
} }
} }
@@ -58,6 +72,12 @@
"state" : "translated", "state" : "translated",
"value" : "%lld." "value" : "%lld."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld."
}
} }
} }
}, },
@@ -68,6 +88,28 @@
"state" : "translated", "state" : "translated",
"value" : "•" "value" : "•"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "•"
}
}
}
},
"00" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "00"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "00"
}
} }
} }
}, },
@@ -78,6 +120,12 @@
"state" : "translated", "state" : "translated",
"value" : "Ein Rezept mit diesem Namen existiert bereits." "value" : "Ein Rezept mit diesem Namen existiert bereits."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ya existe una receta con ese nombre."
}
} }
} }
}, },
@@ -88,6 +136,12 @@
"state" : "translated", "state" : "translated",
"value" : "Über uns" "value" : "Über uns"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Acerca de"
}
} }
} }
}, },
@@ -98,6 +152,12 @@
"state" : "translated", "state" : "translated",
"value" : "Hinzufügen" "value" : "Hinzufügen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Agregar"
}
} }
} }
}, },
@@ -108,6 +168,12 @@
"state" : "translated", "state" : "translated",
"value" : "Ein unbekannter Fehler ist aufgetreten." "value" : "Ein unbekannter Fehler ist aufgetreten."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ocurrió un error desconocido."
}
} }
} }
}, },
@@ -118,6 +184,12 @@
"state" : "translated", "state" : "translated",
"value" : "App Token Login" "value" : "App Token Login"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "App Token Login"
}
} }
} }
}, },
@@ -128,6 +200,12 @@
"state" : "translated", "state" : "translated",
"value" : "Abbrechen" "value" : "Abbrechen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancelar"
}
} }
} }
}, },
@@ -138,6 +216,12 @@
"state" : "translated", "state" : "translated",
"value" : "Kategorie" "value" : "Kategorie"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Categoría"
}
} }
} }
}, },
@@ -148,6 +232,12 @@
"state" : "translated", "state" : "translated",
"value" : "Kategorie: %@" "value" : "Kategorie: %@"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Categoría: %@"
}
} }
} }
}, },
@@ -156,17 +246,13 @@
"de" : { "de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Kochzeit" "value" : "Kochen"
} }
} },
} "es" : {
},
"Cook time:" : {
"localizations" : {
"de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Kochdauer:" "value" : "Duración de cocción"
} }
} }
} }
@@ -178,6 +264,12 @@
"state" : "translated", "state" : "translated",
"value" : "Cookbook Client" "value" : "Cookbook Client"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cookbook Client"
}
} }
} }
}, },
@@ -188,6 +280,28 @@
"state" : "translated", "state" : "translated",
"value" : "Kochbücher" "value" : "Kochbücher"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Libros de cocina"
}
}
}
},
"Cooking duration:" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Kochen:"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Duración de cocción:"
}
} }
} }
}, },
@@ -198,6 +312,12 @@
"state" : "translated", "state" : "translated",
"value" : "Löschen" "value" : "Löschen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Borrar"
}
} }
} }
}, },
@@ -208,6 +328,12 @@
"state" : "translated", "state" : "translated",
"value" : "Lokale Daten löschen" "value" : "Lokale Daten löschen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Eliminar datos locales"
}
} }
} }
}, },
@@ -218,6 +344,12 @@
"state" : "translated", "state" : "translated",
"value" : "Rezept Löschen" "value" : "Rezept Löschen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Eliminar receta"
}
} }
} }
}, },
@@ -228,6 +360,12 @@
"state" : "translated", "state" : "translated",
"value" : "Löschen bestätigen." "value" : "Löschen bestätigen."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "¿Eliminar receta?"
}
} }
} }
}, },
@@ -238,6 +376,12 @@
"state" : "translated", "state" : "translated",
"value" : "Das Löschen lokaler Daten hat keine Auswirkungen auf die Rezeptdaten, die auf Ihrem Server gespeichert sind." "value" : "Das Löschen lokaler Daten hat keine Auswirkungen auf die Rezeptdaten, die auf Ihrem Server gespeichert sind."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Eliminar datos locales no afectará los datos de las recetas almacenados en su servidor."
}
} }
} }
}, },
@@ -248,15 +392,11 @@
"state" : "translated", "state" : "translated",
"value" : "Beschreibung" "value" : "Beschreibung"
} }
} },
} "es" : {
},
"Discoverability" : {
"localizations" : {
"de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Kategorisierung" "value" : "Descripción."
} }
} }
} }
@@ -268,6 +408,12 @@
"state" : "translated", "state" : "translated",
"value" : "Alle Rezepte herunterladen" "value" : "Alle Rezepte herunterladen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Descargar todas las recetas"
}
} }
} }
}, },
@@ -278,6 +424,12 @@
"state" : "translated", "state" : "translated",
"value" : "Rezepte herunterladen" "value" : "Rezepte herunterladen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Descargar recetas"
}
} }
} }
}, },
@@ -288,6 +440,12 @@
"state" : "translated", "state" : "translated",
"value" : "Rezept bereits vorhanden." "value" : "Rezept bereits vorhanden."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Receta duplicada."
}
} }
} }
}, },
@@ -298,6 +456,12 @@
"state" : "translated", "state" : "translated",
"value" : "Bearbeiten" "value" : "Bearbeiten"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Editar"
}
} }
} }
}, },
@@ -308,6 +472,12 @@
"state" : "translated", "state" : "translated",
"value" : "Das Eingeben der Serveradresse wird einen Webbrowser öffnen. Bitte folgen Sie dort den bereitgestellten Anmeldeanweisungen. Falls der Browser nicht geöffnet wird, klicken Sie auf den Link 'Im Browser öffnen'.\nNach erfolgreicher Anmeldung kehren Sie zu dieser Anwendung zurück und drücken Sie 'Überprüfen'." "value" : "Das Eingeben der Serveradresse wird einen Webbrowser öffnen. Bitte folgen Sie dort den bereitgestellten Anmeldeanweisungen. Falls der Browser nicht geöffnet wird, klicken Sie auf den Link 'Im Browser öffnen'.\nNach erfolgreicher Anmeldung kehren Sie zu dieser Anwendung zurück und drücken Sie 'Überprüfen'."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ingresar la dirección del servidor abrirá un navegador web. Por favor, siga las instrucciones de inicio de sesión proporcionadas allí. Si el navegador no se abre, haga clic en el enlace 'Abrir en el navegador'.\nDespués de iniciar sesión con éxito, regrese a esta aplicación y presione 'Validar'."
}
} }
} }
}, },
@@ -318,6 +488,12 @@
"state" : "translated", "state" : "translated",
"value" : "Fehler." "value" : "Fehler."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Error."
}
} }
} }
}, },
@@ -328,6 +504,12 @@
"state" : "translated", "state" : "translated",
"value" : "Allgemein" "value" : "Allgemein"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "General"
}
} }
} }
}, },
@@ -338,6 +520,12 @@
"state" : "translated", "state" : "translated",
"value" : "Kontakt-Seite öffnen" "value" : "Kontakt-Seite öffnen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Obtener soporte"
}
} }
} }
}, },
@@ -348,6 +536,12 @@
"state" : "translated", "state" : "translated",
"value" : "Wenn Sie Interesse daran haben, zu diesem Projekt beizutragen oder einfach den Quellcode überprüfen möchten, ermutigen wir Sie, das GitHub-Repository für diese Anwendung zu besuchen." "value" : "Wenn Sie Interesse daran haben, zu diesem Projekt beizutragen oder einfach den Quellcode überprüfen möchten, ermutigen wir Sie, das GitHub-Repository für diese Anwendung zu besuchen."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Si estás interesado en contribuir a este proyecto o simplemente deseas revisar su código fuente, te animamos a visitar el repositorio de GitHub de esta aplicación."
}
} }
} }
}, },
@@ -358,6 +552,12 @@
"state" : "translated", "state" : "translated",
"value" : "Wenn Sie Anfragen oder Rückmeldungen haben, oder Unterstützung benötigen, finden Sie unter diesem Link die Kontaktinformationen." "value" : "Wenn Sie Anfragen oder Rückmeldungen haben, oder Unterstützung benötigen, finden Sie unter diesem Link die Kontaktinformationen."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Si tienes alguna pregunta, comentarios o necesitas asistencia, por favor consulta la página de soporte para obtener información de contacto."
}
} }
} }
}, },
@@ -368,6 +568,12 @@
"state" : "translated", "state" : "translated",
"value" : "Zutaten" "value" : "Zutaten"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ingredientes"
}
} }
} }
}, },
@@ -378,6 +584,12 @@
"state" : "translated", "state" : "translated",
"value" : "Zutaten für %lld Portionen" "value" : "Zutaten für %lld Portionen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ingredientes para %lld porciones."
}
} }
} }
}, },
@@ -388,6 +600,12 @@
"state" : "translated", "state" : "translated",
"value" : "Zutaten pro Portion" "value" : "Zutaten pro Portion"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ingredientes por porción"
}
} }
} }
}, },
@@ -398,6 +616,12 @@
"state" : "translated", "state" : "translated",
"value" : "Anleitung" "value" : "Anleitung"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Instrucciones"
}
} }
} }
}, },
@@ -408,6 +632,12 @@
"state" : "translated", "state" : "translated",
"value" : "Schlagwörter" "value" : "Schlagwörter"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Palabras clave"
}
} }
} }
}, },
@@ -418,6 +648,12 @@
"state" : "translated", "state" : "translated",
"value" : "Sprache" "value" : "Sprache"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Idioma"
}
} }
} }
}, },
@@ -428,6 +664,12 @@
"state" : "translated", "state" : "translated",
"value" : "Abmelden" "value" : "Abmelden"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cerrar sesión"
}
} }
} }
}, },
@@ -438,6 +680,12 @@
"state" : "translated", "state" : "translated",
"value" : "Login-Methode" "value" : "Login-Methode"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Método de inicio de sesión"
}
} }
} }
}, },
@@ -448,6 +696,12 @@
"state" : "translated", "state" : "translated",
"value" : "Fehlender Rezeptname." "value" : "Fehlender Rezeptname."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Falta el nombre de la receta."
}
} }
} }
}, },
@@ -458,6 +712,12 @@
"state" : "translated", "state" : "translated",
"value" : "Netzwerkfehler" "value" : "Netzwerkfehler"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Error de red."
}
} }
} }
}, },
@@ -468,6 +728,12 @@
"state" : "translated", "state" : "translated",
"value" : "Neues Rezept" "value" : "Neues Rezept"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nueva receta"
}
} }
} }
}, },
@@ -478,6 +744,12 @@
"state" : "translated", "state" : "translated",
"value" : "Nextcloud Login" "value" : "Nextcloud Login"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nextcloud Login"
}
} }
} }
}, },
@@ -488,6 +760,12 @@
"state" : "translated", "state" : "translated",
"value" : "Keines" "value" : "Keines"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ninguno"
}
} }
} }
}, },
@@ -498,6 +776,12 @@
"state" : "translated", "state" : "translated",
"value" : "Ok" "value" : "Ok"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ok"
}
} }
} }
}, },
@@ -508,6 +792,12 @@
"state" : "translated", "state" : "translated",
"value" : "Im Browser öffnen" "value" : "Im Browser öffnen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Abrir en el navegador."
}
} }
} }
}, },
@@ -518,6 +808,12 @@
"state" : "translated", "state" : "translated",
"value" : "Andere" "value" : "Andere"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Otro"
}
} }
} }
}, },
@@ -528,6 +824,12 @@
"state" : "translated", "state" : "translated",
"value" : "Bitte tragen Sie einen Rezeptnamen ein." "value" : "Bitte tragen Sie einen Rezeptnamen ein."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Por favor, ingrese un nombre de receta."
}
} }
} }
}, },
@@ -536,17 +838,29 @@
"de" : { "de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Vorbereitungsdauer" "value" : "Vorbereitung"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Duración de preparación"
} }
} }
} }
}, },
"Prep time:" : { "Preparation duration:" : {
"localizations" : { "localizations" : {
"de" : { "de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Vorbereitungsdauer:" "value" : "Vorbereitung:"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Duración de preparación:"
} }
} }
} }
@@ -558,6 +872,12 @@
"state" : "translated", "state" : "translated",
"value" : "Rezepte durchsuchen" "value" : "Rezepte durchsuchen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Buscar recetas"
}
} }
} }
}, },
@@ -568,6 +888,12 @@
"state" : "translated", "state" : "translated",
"value" : "Wählen Sie ein Standard-Kochbuch" "value" : "Wählen Sie ein Standard-Kochbuch"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Seleccionar un libro de cocina predeterminado"
}
} }
} }
}, },
@@ -578,6 +904,28 @@
"state" : "translated", "state" : "translated",
"value" : "Ausgewählte Schlagwörter:" "value" : "Ausgewählte Schlagwörter:"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Palabras clave seleccionadas:"
}
}
}
},
"Servings:" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Portionen:"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Porciones:"
}
} }
} }
}, },
@@ -588,6 +936,12 @@
"state" : "translated", "state" : "translated",
"value" : "Einstellungen" "value" : "Einstellungen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Configuración"
}
} }
} }
}, },
@@ -598,6 +952,12 @@
"state" : "translated", "state" : "translated",
"value" : "Eingeben" "value" : "Eingeben"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Enviar"
}
} }
} }
}, },
@@ -608,6 +968,12 @@
"state" : "translated", "state" : "translated",
"value" : "Kontakt" "value" : "Kontakt"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ayuda"
}
} }
} }
}, },
@@ -618,6 +984,12 @@
"state" : "translated", "state" : "translated",
"value" : "Vielen Dank für's herunterladen!" "value" : "Vielen Dank für's herunterladen!"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Gracias por descargar"
}
} }
} }
}, },
@@ -628,6 +1000,12 @@
"state" : "translated", "state" : "translated",
"value" : "Das ausgewählte Kochbuch wird standardmäßig beim Start der App geöffnet." "value" : "Das ausgewählte Kochbuch wird standardmäßig beim Start der App geöffnet."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "El libro de cocina seleccionado se abrirá por defecto al iniciar la aplicación."
}
} }
} }
}, },
@@ -638,6 +1016,12 @@
"state" : "translated", "state" : "translated",
"value" : "Diese Aktion lässt sich nicht Rückgängig machen!" "value" : "Diese Aktion lässt sich nicht Rückgängig machen!"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "¡Esta acción no es reversible!"
}
} }
} }
}, },
@@ -648,6 +1032,12 @@
"state" : "translated", "state" : "translated",
"value" : "Diese Anwendung ist ein Open-Source-Projekt. Wenn Sie daran interessiert sind, neue Funktionen vorzuschlagen oder beizutragen, oder wenn Sie auf Probleme stoßen, nutzen Sie bitte den Kontakt-Link oder besuchen Sie das GitHub-Repository in den App-Einstellungen." "value" : "Diese Anwendung ist ein Open-Source-Projekt. Wenn Sie daran interessiert sind, neue Funktionen vorzuschlagen oder beizutragen, oder wenn Sie auf Probleme stoßen, nutzen Sie bitte den Kontakt-Link oder besuchen Sie das GitHub-Repository in den App-Einstellungen."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Esta aplicación es un esfuerzo de código abierto. Si estás interesado en sugerir o contribuir con nuevas funciones o te encuentras con algún problema, por favor utiliza el enlace de soporte o visita el repositorio de GitHub en la configuración de la aplicación."
}
} }
} }
}, },
@@ -658,6 +1048,12 @@
"state" : "translated", "state" : "translated",
"value" : "Name" "value" : "Name"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Título"
}
} }
} }
}, },
@@ -668,6 +1064,28 @@
"state" : "translated", "state" : "translated",
"value" : "Küchenutensilien" "value" : "Küchenutensilien"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Utensilios de cocina."
}
}
}
},
"Total duration:" : {
"localizations" : {
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Gesamtdauer:"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Duración total:"
}
} }
} }
}, },
@@ -678,15 +1096,11 @@
"state" : "translated", "state" : "translated",
"value" : "Gesamtdauer" "value" : "Gesamtdauer"
} }
} },
} "es" : {
},
"Total time:" : {
"localizations" : {
"de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Gesamtdauer:" "value" : "Duración total"
} }
} }
} }
@@ -698,6 +1112,12 @@
"state" : "translated", "state" : "translated",
"value" : "Es ist nicht möglich, Ihr Rezept hochzuladen. Bitte überprüfen Sie Ihre Internetverbindung." "value" : "Es ist nicht möglich, Ihr Rezept hochzuladen. Bitte überprüfen Sie Ihre Internetverbindung."
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "No es posible cargar tu receta. Por favor, verifica tu conexión a internet."
}
} }
} }
}, },
@@ -708,6 +1128,12 @@
"state" : "translated", "state" : "translated",
"value" : "Speichern" "value" : "Speichern"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cargar"
}
} }
} }
}, },
@@ -718,6 +1144,12 @@
"state" : "translated", "state" : "translated",
"value" : "Überprüfen" "value" : "Überprüfen"
} }
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Validar"
}
} }
} }
}, },
@@ -728,15 +1160,11 @@
"state" : "translated", "state" : "translated",
"value" : "GitHub öffnen" "value" : "GitHub öffnen"
} }
} },
} "es" : {
},
"Yield/Portions:" : {
"localizations" : {
"de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Portionen:" "value" : "Visita la página de GitHub."
} }
} }
} }

View File

@@ -62,7 +62,9 @@ struct RecipeEditView: View {
@State var uploadNew: Bool = true @State var uploadNew: Bool = true
@State private var image: PhotosPickerItem? = nil @State private var image: PhotosPickerItem? = nil
@State private var times = [Date.zero, Date.zero, Date.zero] @StateObject private var prepDuration: Duration = Duration()
@StateObject private var cookDuration: Duration = Duration()
@StateObject private var totalDuration: Duration = Duration()
@State private var searchText: String = "" @State private var searchText: String = ""
@State private var keywords: [String] = [] @State private var keywords: [String] = []
@State private var keywordSuggestions: [String] = [] @State private var keywordSuggestions: [String] = []
@@ -112,7 +114,7 @@ struct RecipeEditView: View {
} }
}.padding() }.padding()
HStack { HStack {
Text(recipe.name == "" ? String(localized: "New recipe") : recipe.name) Text(recipe.name == "" ? LocalizedStringKey("New recipe") : LocalizedStringKey(recipe.name))
.font(.title) .font(.title)
.bold() .bold()
.padding() .padding()
@@ -148,8 +150,6 @@ struct RecipeEditView: View {
selection: $keywords selection: $keywords
) )
} }
} header: {
Text("Discoverability")
} footer: { } footer: {
ScrollView(.horizontal, showsIndicators: false) { ScrollView(.horizontal, showsIndicators: false) {
HStack { HStack {
@@ -161,20 +161,20 @@ struct RecipeEditView: View {
} }
Section() { Section() {
Picker("Yield/Portions:", selection: $recipe.recipeYield) { Picker("Servings:", selection: $recipe.recipeYield) {
ForEach(0..<99, id: \.self) { i in ForEach(0..<99, id: \.self) { i in
Text("\(i)").tag(i) Text("\(i)").tag(i)
} }
} }
.pickerStyle(.menu) .pickerStyle(.menu)
DatePicker("Prep time:", selection: $times[0], displayedComponents: .hourAndMinute) DurationPicker(title: LocalizedStringKey("Preparation duration:"), duration: prepDuration)
DatePicker("Cook time:", selection: $times[1], displayedComponents: .hourAndMinute) DurationPicker(title: LocalizedStringKey("Cooking duration:"), duration: cookDuration)
DatePicker("Total time:", selection: $times[2], displayedComponents: .hourAndMinute) DurationPicker(title: LocalizedStringKey("Total duration:"), duration: totalDuration)
} }
EditableListSection(title: String(localized: "Ingredients"), items: $recipe.recipeIngredient) EditableListSection(title: LocalizedStringKey("Ingredients"), items: $recipe.recipeIngredient)
EditableListSection(title: String(localized: "Tools"), items: $recipe.tool) EditableListSection(title: LocalizedStringKey("Tools"), items: $recipe.tool)
EditableListSection(title: String(localized: "Instructions"), items: $recipe.recipeInstructions) EditableListSection(title: LocalizedStringKey("Instructions"), items: $recipe.recipeInstructions)
} }
} }
} }
@@ -184,16 +184,15 @@ struct RecipeEditView: View {
.onAppear { .onAppear {
if uploadNew { return } if uploadNew { return }
if let prepTime = recipe.prepTime { if let prepTime = recipe.prepTime {
self.times[0] = Date.fromPTRepresentation(prepTime) prepDuration.initFromPT(prepTime)
} }
if let cookTime = recipe.cookTime { if let cookTime = recipe.cookTime {
self.times[1] = Date.fromPTRepresentation(cookTime) cookDuration.initFromPT(cookTime)
} }
if let totalTime = recipe.totalTime { if let totalTime = recipe.totalTime {
self.times[2] = Date.fromPTRepresentation(totalTime) totalDuration.initFromPT(totalTime)
} }
for keyword in self.recipe.keywords.components(separatedBy: ",") {
for keyword in recipe.keywords.components(separatedBy: ",") {
keywords.append(keyword) keywords.append(keyword)
} }
} }
@@ -213,15 +212,10 @@ struct RecipeEditView: View {
} }
func createRecipe() { func createRecipe() {
if let date = Date.toPTRepresentation(date: times[0]) { self.recipe.prepTime = prepDuration.format()
self.recipe.prepTime = date self.recipe.cookTime = cookDuration.format()
} self.recipe.totalTime = totalDuration.format()
if let date = Date.toPTRepresentation(date: times[1]) {
self.recipe.cookTime = date
}
if let date = Date.toPTRepresentation(date: times[2]) {
self.recipe.totalTime = date
}
if !self.keywords.isEmpty { if !self.keywords.isEmpty {
self.recipe.keywords = self.keywords.joined(separator: ",") self.recipe.keywords = self.keywords.joined(separator: ",")
} }
@@ -339,7 +333,7 @@ struct RecipeEditView: View {
struct EditableListSection: View { struct EditableListSection: View {
@State var title: String @State var title: LocalizedStringKey
@Binding var items: [String] @Binding var items: [String]
var body: some View { var body: some View {
@@ -383,24 +377,75 @@ struct EditableListSection: View {
} }
struct TimePicker: View { struct DurationPicker: View {
@Binding var hours: Int @State var title: LocalizedStringKey
@Binding var minutes: Int @ObservedObject var duration: Duration
var body: some View { var body: some View {
HStack { HStack {
Picker("", selection: $hours) { Text(title)
ForEach(0..<99, id: \.self) { i in Spacer()
Text("\(i) hours").tag(i) TextField("00", text: $duration.hourComponent)
} .keyboardType(.decimalPad)
}.pickerStyle(.wheel) .textFieldStyle(.roundedBorder)
Picker("", selection: $minutes) { .multilineTextAlignment(.trailing)
ForEach(0..<60, id: \.self) { i in .frame(maxWidth: 40)
Text("\(i) min").tag(i) Text(":")
} TextField("00", text: $duration.minuteComponent)
}.pickerStyle(.wheel) .keyboardType(.decimalPad)
.textFieldStyle(.roundedBorder)
.frame(maxWidth: 40)
} }
.padding(.horizontal) .frame(maxHeight: 40)
.clipped()
} }
} }
class Duration: ObservableObject {
@Published var minuteComponent: String = "00" {
didSet {
if minuteComponent.count > 2 {
minuteComponent = oldValue
} else if minuteComponent.count == 1 {
minuteComponent = "0\(minuteComponent)"
} else if minuteComponent.count == 0 {
minuteComponent = "00"
}
let filtered = minuteComponent.filter { $0.isNumber }
if minuteComponent != filtered {
minuteComponent = filtered
}
}
}
@Published var hourComponent: String = "00" {
didSet {
if hourComponent.count > 2 {
hourComponent = oldValue
} else if hourComponent.count == 1 {
hourComponent = "0\(hourComponent)"
} else if hourComponent.count == 0 {
hourComponent = "00"
}
let filtered = hourComponent.filter { $0.isNumber }
if hourComponent != filtered {
hourComponent = filtered
}
}
}
func initFromPT(_ PTRepresentation: String) {
let hourRegex = /([0-9]{1,2})H/
let minuteRegex = /([0-9]{1,2})M/
if let match = PTRepresentation.firstMatch(of: hourRegex) {
self.hourComponent = String(match.1)
}
if let match = PTRepresentation.firstMatch(of: minuteRegex) {
self.minuteComponent = String(match.1)
}
}
func format() -> String {
return "PT\(hourComponent)H\(minuteComponent)M00S"
}
}

View File

@@ -32,18 +32,20 @@ fileprivate enum SettingsAlert {
enum SupportedLanguage: String, Codable { enum SupportedLanguage: String, Codable {
case EN = "en", case EN = "en",
DE = "de" DE = "de",
ES = "es"
func descriptor() -> String { func descriptor() -> String {
switch self { switch self {
case .EN: case .EN:
return "English" return "English"
case .DE: case .DE:
return "Deutsch" return "Deutsch"
case .ES:
return "Español"
} }
} }
static let allValues = [EN, DE] static let allValues = [EN, DE, ES]
} }
struct SettingsView: View { struct SettingsView: View {