mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-10 14:02:20 -05:00
translate hardcoded strings
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, onMounted, reactive, toRefs, useRouter } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, ref, onMounted, reactive, toRefs, useRouter, useContext } from "@nuxtjs/composition-api";
|
||||
import { until } from "@vueuse/core";
|
||||
import { invoke } from "@vueuse/shared";
|
||||
import draggable from "vuedraggable";
|
||||
@@ -186,6 +186,8 @@ export default defineComponent({
|
||||
|
||||
const drag = ref(false);
|
||||
|
||||
const { i18n } = useContext();
|
||||
|
||||
const { recipeAssetPath } = useStaticRoutes();
|
||||
|
||||
function assetURL(assetName: string) {
|
||||
@@ -194,7 +196,7 @@ export default defineComponent({
|
||||
|
||||
const state = reactive({
|
||||
loading: true,
|
||||
loadingText: "Loading recipe...",
|
||||
loadingText: i18n.tc("general.loading-recipe"),
|
||||
tab: null,
|
||||
selectedRecipeField: "" as SelectedRecipeLeaves | "",
|
||||
canvasSelectedText: "",
|
||||
@@ -256,7 +258,7 @@ export default defineComponent({
|
||||
onMounted(() => {
|
||||
invoke(async () => {
|
||||
await until(props.recipe).not.toBeNull();
|
||||
state.loadingText = "Loading OCR data...";
|
||||
state.loadingText = i18n.tc("general.loading-ocr-data");
|
||||
|
||||
const assetName = props.recipe.assets[0].fileName;
|
||||
const imagesrc = assetURL(assetName);
|
||||
|
||||
Reference in New Issue
Block a user