Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Hosted Weblate 2021-04-18 20:46:03 +02:00
commit cb4db58e9b
11 changed files with 76 additions and 8485 deletions

View file

@ -430,7 +430,7 @@ Button {
// -----------------------------
// APPBAR
.appbar {
z-index: 32;
z-index: 4;
min-height: 56;
margin: 8;
padding: 4;
@ -449,7 +449,7 @@ Button {
}
}
.toolbar {
z-index: 24;
z-index: 4;
padding: 4;
margin-bottom: 0;
horizontal-alignment: left;
@ -526,7 +526,7 @@ Button {
.recipeTitle {
@extend .tw;
text-align: left;
padding: 16 0;
padding: 16 8;
line-height: 4;
}
}

View file

@ -1038,13 +1038,7 @@ export default {
navigateTo(to, title, page) {
this.showTools = false;
if (page) {
this.$navigateTo(to, {
transition: {
name: "fade",
duration: 250,
curve: "easeOut",
},
});
this.$navigateTo(to);
} else if (title !== this.currentComponent) {
this.setComponent(title);
this.filterFavourites = to == "favourites";
@ -1059,11 +1053,6 @@ export default {
filterFavourites: this.filterFavourites,
filterTrylater: this.filterTrylater,
},
transition: {
name: "fade",
duration: 250,
curve: "easeOut",
},
});
},
viewRecipe(recipeID) {
@ -1073,11 +1062,6 @@ export default {
filterTrylater: this.filterTrylater,
recipeID,
},
transition: {
name: "fade",
duration: 250,
curve: "easeOut",
},
});
},
viewRandomRecipe() {
@ -1087,11 +1071,6 @@ export default {
filterTrylater: true,
recipeID: this.randomRecipeID(),
},
transition: {
name: "fade",
duration: 250,
curve: "easeOut",
},
});
},
touchSelector({ object, action }, comp, title) {

View file

@ -273,11 +273,6 @@ export default {
filterTrylater: true,
recipeID,
},
transition: {
name: "fade",
duration: 250,
curve: "easeOut",
},
});
}
},

View file

@ -201,9 +201,7 @@ export default {
let filename = `${localize("EnRecipes")}_${formattedDate}.zip`;
let fromPath = path.join(knownFolders.documents().path, "EnRecipes");
utils.Zip.zip(fromPath, this.backupFolder, filename)
.then((res) => {
if (res) this.showExportSummary(filename);
})
.then((res) => res && this.showExportSummary(filename))
.catch((err) => {
console.log("Backup error: ", err);
this.progress = null;
@ -262,7 +260,7 @@ export default {
},
showExportSummary(filename) {
this.progress = null;
let description = localize("buto", filename);
let description = localize("buto", `"${filename}"`);
this.$showModal(ConfirmDialog, {
props: {
title: "expSuc",
@ -278,9 +276,7 @@ export default {
if (uri) {
let dest = knownFolders.temp().path;
utils.Zip.unzip(uri, dest)
.then((res) => {
if (res) this.validateZipContent(res, uri);
})
.then((res) => res && this.validateZipContent(res, uri))
.catch(() => this.failedImport(localize("buInc")));
}
});
@ -328,20 +324,15 @@ export default {
file: "mealPlans.json",
},
]);
} else {
knownFolders.temp().clear();
this.progress = null;
this.failedImport(localize("buInc"));
}
if (Folder.exists(ImagesFolderPath)) {
const timer = setInterval(() => {
if (this.importSummary.found) {
knownFolders.temp().clear();
this.importImages(uri);
clearInterval(timer);
if (!this.progress) clearInterval(timer);
if (this.progress && this.importSummary.found) {
Folder.exists(ImagesFolderPath)
? this.importImages(uri)
: this.showImportSummary();
}
}, 100);
}
} else this.failedImport(localize("buInc"));
},
isFileDataValid(file) {
const files = file.filter((e) => File.exists(e.path));
@ -369,11 +360,11 @@ export default {
}
});
});
} else {
this.failedImport(localize("buEmp"));
}
} else this.failedImport(localize("buEmp"));
},
failedImport(description) {
this.progress = null;
knownFolders.temp().clear();
this.$showModal(ConfirmDialog, {
props: {
title: "impFail",
@ -431,17 +422,18 @@ export default {
if (res) {
this.showImportSummary();
this.unlinkBrokenImages();
this.exportFiles("delete");
}
});
},
showImportSummary() {
this.progress = null;
knownFolders.temp().clear();
this.exportFiles("delete");
let { found, imported, updated } = this.importSummary;
let exists = Math.abs(found - imported - updated) + updated;
let importedNote = `\n${localize("recI")} ${imported}`;
let existsNote = `\n${localize("recE")} ${exists}`;
let updatedNote = `\n${localize("recU")} ${updated}`;
this.progress = null;
this.$showModal(ConfirmDialog, {
props: {
title: "impSuc",

View file

@ -324,7 +324,7 @@ export default {
onPageLoad(args) {
const page = args.object;
page.bindingContext = new Observable();
this.busy = false;
this.busy = this.photoOpen = false;
this.setComponent("ViewRecipe");
if (this.yieldMultiplier == this.recipe.yield.quantity)
this.yieldMultiplier = this.recipe.yield.quantity;
@ -622,21 +622,28 @@ export default {
}
},
shareRecipe() {
let overview = `${this.recipe.title}\n\n${localize("stars")}: ${
this.recipe.rating
}\n${localize("cui")}: ${localize(this.recipe.cuisine)}\n${localize(
"cat"
)}: ${localize(this.recipe.category)}\n${localize(
"ts"
)}: ${this.recipe.tags.join(", ")}\n${localize(
"prepT"
)}: ${this.formattedTime(this.recipe.prepTime)}\n${localize(
"cookT"
)}: ${this.formattedTime(this.recipe.cookTime)}\n${localize("yld")}: ${
this.tempYieldQuantity
} ${localize(this.recipe.yield.unit)}\n${localize(
"Difficulty level"
)}: ${localize(this.recipe.difficulty)}\n`;
let overview = `${this.recipe.title}\n\n`;
if (this.recipe.rating)
overview += `${localize("stars")}: ${this.recipe.rating}\n`;
overview += `${localize("cui")}: ${localize(
this.recipe.cuisine
)}\n${localize("cat")}: ${localize(this.recipe.category)}\n`;
if (this.recipe.tags.length)
overview += `${localize("ts")}: ${this.recipe.tags.join(", ")}\n`;
if (this.recipe.prepTime != "00:00")
overview += `${localize("prepT")}: ${this.formattedTime(
this.recipe.prepTime
)}\n`;
if (this.recipe.cookTime != "00:00")
overview += `${localize("cookT")}: ${this.formattedTime(
this.recipe.cookTime
)}\n`;
overview += `${localize("yld")}: ${this.tempYieldQuantity} ${localize(
this.recipe.yield.unit
)}\n${localize("Difficulty level")}: ${localize(
this.recipe.difficulty
)}\n`;
let shareContent = overview;
if (this.recipe.ingredients.length) {
let ingredients = `\n\n${localize("ings")}:\n\n`;
@ -791,7 +798,7 @@ export default {
)
.then(() =>
pv.animate({
height: sh,
height: sh + 8,
translate: { x: -sw + 112, y: -((sh - sw) / 6) },
duration: 250,
curve: CoreTypes.AnimationCurve.ease,

View file

@ -82,7 +82,7 @@
"fltr": "फ़िल्टर",
"Fluid Ounce": "द्रव-औंस",
"French": "फ्रेंच",
"FRI": "शुक्रवार",
"FRI": "शुक्र",
"fsList": "आपकी पसंदीदा रेसिपी यहाँ सूचीबद्ध हैं",
"g": "ग्राम",
"gal": "गैलन",
@ -147,7 +147,7 @@
"minimal": "कम से कम",
"ml": "मिली लीटर",
"Moderate": "उदारवादी",
"MON": "सोमवार",
"MON": "सोम",
"newCui": "नए भोजन",
"Newest first": "नवीनतम पहले",
"newRec": "नई रेसिपी",
@ -223,7 +223,7 @@
"rst": "पुनरारंभ",
"Russian": "रूसी",
"Salads": "सलाद",
"SAT": "शनिवार",
"SAT": "शनि",
"Sauces": "सॉस",
"Scottish": "स्कॉटिश",
"Seafood": "समुद्री भोजन",
@ -250,7 +250,7 @@
"stick": "लाठी",
"stp": "कदम",
"strAdd": "अपने व्यंजनों को जोड़ना शुरू करें!",
"SUN": "रविवार",
"SUN": "रवि",
"sVw": "यादृच्छिक नुस्खा देखने के लिए हिलाएं",
"sVwInfo": "जब आप तय नहीं कर सकते तो आपको क्या खाना बनाना है, यह चुनने में मदद करता है",
"Swedish": "स्वीडिश",
@ -261,7 +261,7 @@
"Teaspoon": "छोटी चम्मच",
"Thai": "थाई",
"Theme": "थीम",
"THU": "गुरूवार",
"THU": "गुर",
"title": "शीर्षक",
"tLInfo": "जिन व्यंजनों को आप बाद में आज़माना चाहते हैं, वे यहाँ सूचीबद्ध हैं",
"today": "आज",
@ -272,7 +272,7 @@
"ts": "टैग",
"tsInfo": "रिक्त स्थान के साथ अलग",
"tsp": "छोटी चम्मच",
"TUE": "मंगलवार",
"TUE": "मंगल",
"Turkish": "तुर्की",
"Undefined": "अपरिभाषित",
"unit": "इकाई",
@ -283,7 +283,7 @@
"Vegetarian": "शाकाहारी",
"Vietnamese": "वियतनामी",
"wAgo": "%s हफ्ते पहले",
"WED": "बुधवार",
"WED": "बुध",
"yesterday": "कल",
"yieldQ": "उपज की मात्रा",
"yieldU": "उपज इकाई",

View file

@ -82,7 +82,7 @@
"fltr": "ഫിൽട്ടർ ചെയ്യുക",
"Fluid Ounce": "ഫ്ലൂയിഡ് un ൺസ്",
"French": "ഫ്രഞ്ച്",
"FRI": "വെള്ളിയാഴ്ച",
"FRI": "വെള്ളി",
"fsList": "നിങ്ങളുടെ പ്രിയപ്പെട്ട പാചകക്കുറിപ്പുകൾ ഇവിടെ പട്ടികപ്പെടുത്തിയിട്ടുണ്ട്",
"g": "ഗ്രാം",
"gal": "ഗാലൺ",
@ -147,7 +147,7 @@
"minimal": "കുറഞ്ഞത്",
"ml": "മില്ലി",
"Moderate": "മിതത്വം",
"MON": "തിങ്കളാഴ്ച",
"MON": "തിങ്ക",
"newCui": "പുതിയ പാചകരീതി",
"Newest first": "ആദ്യത്തെ പുതിയത്",
"newRec": "പുതിയ പാചകക്കുറിപ്പ്",
@ -223,7 +223,7 @@
"rst": "പുനരാരംഭിക്കുക",
"Russian": "റഷ്യൻ",
"Salads": "സലാഡുകൾ",
"SAT": "ശനിയാഴ്ച",
"SAT": "ശനി",
"Sauces": "സോസുകൾ",
"Scottish": "സ്കോട്ടിഷ്",
"Seafood": "കടൽ ഭക്ഷണം",
@ -250,7 +250,7 @@
"stick": "വടി",
"stp": "ഘട്ടം",
"strAdd": "നിങ്ങളുടെ പാചകക്കുറിപ്പുകൾ ചേർക്കാൻ ആരംഭിക്കുക!",
"SUN": "ഞായറാഴ്ച",
"SUN": "ഞായ",
"sVw": "ക്രമരഹിതമായ പാചകക്കുറിപ്പ് കാണാൻ കുലുക്കുക",
"sVwInfo": "നിങ്ങൾക്ക് തീരുമാനിക്കാൻ കഴിയാത്തപ്പോൾ എന്താണ് പാചകം ചെയ്യേണ്ടതെന്ന് തിരഞ്ഞെടുക്കാൻ നിങ്ങളെ സഹായിക്കുന്നു",
"Swedish": "സ്വീഡിഷ്",
@ -261,7 +261,7 @@
"Teaspoon": "ടീസ്പൂൺ",
"Thai": "തായ്",
"Theme": "തീം",
"THU": "വ്യാഴാഴ്ച",
"THU": "വ്യാഴ",
"title": "ശീർഷകം",
"tLInfo": "നിങ്ങൾ പിന്നീട് ശ്രമിക്കാൻ ആഗ്രഹിക്കുന്ന പാചകക്കുറിപ്പുകൾ ഇവിടെ പട്ടികപ്പെടുത്തിയിട്ടുണ്ട്",
"today": "ഇന്ന്",
@ -272,7 +272,7 @@
"ts": "ടാഗുകൾ",
"tsInfo": "സ്‌പെയ്‌സുകൾ ഉപയോഗിച്ച് വേർതിരിക്കുക",
"tsp": "ടീസ്പൂൺ",
"TUE": "ചൊവ്വാഴ്ച",
"TUE": "ചൊവ്വ",
"Turkish": "ടർക്കിഷ്",
"Undefined": "നിർവചിച്ചിട്ടില്ല",
"unit": "യൂണിറ്റ്",
@ -283,7 +283,7 @@
"Vegetarian": "വെജിറ്റേറിയൻ",
"Vietnamese": "വിയറ്റ്നാമീസ്",
"wAgo": "%s ആഴ്ച മുമ്പ്",
"WED": "ബുധനാഴ്ച",
"WED": "ബുധ",
"yesterday": "ഇന്നലെ",
"yieldQ": "വിളവ് അളവ്",
"yieldU": "വിളവ് യൂണിറ്റ്",

View file

@ -10,7 +10,7 @@
<uses-permission android:name="android.permission.INTERNET" tools:node="remove" />
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />
<application android:extractNativeLibs="true"
android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:hardwareAccelerated="true" android:largeHeap="true" android:theme="@style/AppTheme" android:preserveLegacyExternalStorage="true">
android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:hardwareAccelerated="true" android:largeHeap="true" android:theme="@style/AppTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:screenOrientation="userPortrait" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" android:theme="@style/LaunchScreenTheme" android:windowSoftInputMode="adjustResize">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
@ -19,5 +19,14 @@
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity" />
<provider
android:name="androidx.core.content.FileProvider"
android:exported="false"
android:authorities="${applicationId}.provider"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider"/>
</provider>
</application>
</manifest>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-cache-path name="external_cache_path" path="." />
</paths>

View file

@ -264,9 +264,11 @@ export const shareImage = (image, subject) => {
fos.write(baos.toByteArray())
fos.flush()
fos.close()
intent.putExtra(
android.content.Intent.EXTRA_STREAM,
android.net.Uri.fromFile(tmpFile)
let shareUri = global.androidx.core.content.FileProvider.getUriForFile(
ctx,
Application.android.nativeApp.getPackageName() + '.provider',
tmpFile
)
intent.putExtra(android.content.Intent.EXTRA_STREAM, shareUri)
share(intent, subject)
}

8397
package-lock.json generated

File diff suppressed because it is too large Load diff