diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c45e8008bb..ddb06a8ef4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,35 @@ updates: commit-message: prefix: "chore" include: "scope" - open-pull-requests-limit: 300 + open-pull-requests-limit: 20 + groups: + mui-packages: + # Define patterns to include dependencies in the group (based on dependency name) + patterns: + - "@mui/*" + i18n: + patterns: + - "i18next" + - "react-i18next" + basics: + patterns: + - "@types/node" + - "@types/react" + - "@types/react-dom" + - "react" + - "react-dom" + - "typescript" + emotion: + patterns: + - "@emotion/*" + redux: + patterns: + - "@reduxjs/toolkit" + - "react-redux" + vite: + patterns: + - "@vitejs/plugin-react" + - "vite" - package-ecosystem: "github-actions" directory: "/" schedule: @@ -15,4 +43,4 @@ updates: commit-message: prefix: "chore" include: "scope" - open-pull-requests-limit: 300 + open-pull-requests-limit: 20 diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml index 0e0e08786a..b8cb16ceee 100644 --- a/.github/workflows/auto-assign-pr.yml +++ b/.github/workflows/auto-assign-pr.yml @@ -16,4 +16,4 @@ jobs: assign-author: runs-on: ubuntu-latest steps: - - uses: toshimaru/auto-author-assign@v1.6.2 + - uses: toshimaru/auto-author-assign@v2.0.1 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4bdaad70dc..ab0cb5c883 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index 6a314645e0..2c1f977fea 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Sync Crowdin translations - uses: crowdin/github-action@v1.12.0 + uses: crowdin/github-action@v1.14.1 with: upload_translations: false # default is false # Use this option to upload translations for a single specified language diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 076688eb0a..57ec650d3f 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,6 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Dependency Review" uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb1402a882..2df78b5bcc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,9 +25,9 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: "18" cache: "yarn" diff --git a/package.json b/package.json index f2ebb8ac49..fc24e1579f 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,13 @@ "@mui/x-data-grid": "^5.17.22", "@reduxjs/toolkit": "^1.9.1", "axios": "^0.27.2", - "i18next": "^22.4.9", + "i18next": "^23.6.0", "lodash.isequal": "^4.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-i18next": "^12.3.1", "react-redux": "^8.0.5", - "react-router-dom": "^6.4.1", + "react-router-dom": "^6.18.0", "react-zoom-pan-pinch": "^2.5.0", "reactour": "^1.19.0", "redux": "^4.2.0", diff --git a/src/components/LogoForm.jsx b/src/components/LogoForm.jsx index c8537ceb3b..c124d63a6a 100644 --- a/src/components/LogoForm.jsx +++ b/src/components/LogoForm.jsx @@ -26,7 +26,7 @@ const logoTypeOptions = [ ]; const isValidAnnotation = ({ type, value }) => { - if (type.length === 0) return false; + if (type?.length === 0) return false; if (!value && !TYPE_WITHOUT_VALUE.includes(type)) return false; return true; }; @@ -34,7 +34,7 @@ const isValidAnnotation = ({ type, value }) => { const getFormattedValues = ({ type, value }) => { if (!isValidAnnotation({ type, value })) return null; - let formattedValue = value.toLowerCase().trim(); + let formattedValue = value?.toLowerCase().trim(); if (TYPE_WITHOUT_VALUE.includes(type)) { formattedValue = ""; } @@ -64,7 +64,7 @@ export const useLogoForm = (value, type, request) => { innerType !== type || (!TYPE_WITHOUT_VALUE.includes(innerType) && (innerValue !== null - ? innerValue.toLowerCase() !== value.toLowerCase() + ? innerValue.toLowerCase() !== value?.toLowerCase() : innerValue !== value)); const isValid = isValidAnnotation({ diff --git a/src/components/LogoSearchForm.jsx b/src/components/LogoSearchForm.jsx index d6ba7e2ee0..1aa89438d7 100644 --- a/src/components/LogoSearchForm.jsx +++ b/src/components/LogoSearchForm.jsx @@ -69,7 +69,6 @@ const LogoSearchForm = (props) => { return ( -

{innerType}

Yes/No! Don't know the answer? That's alright, just skip it.", - "text3": "You can also use your keyboard shortcuts: y,n and k.", - "text4": "You can filter the products based on country, brands, popularity and much more!", - "text5": "If you don't want to do this every single time, you can also save the filters by clicking on the star. Next time you come back, find the saved filters on the home page itself" + "title": "Klausimų žaidimas", + "text1": "Ar šis maisto produktas priklauso šiam prekės ženklui?", + "text2": "Tiesiog atsakykite Taip/Ne! Nežinai atsakymo? Viskas gerai, tiesiog praleisk.", + "text3": "Taip pat galite naudoti sparčiuosius klavišus: y, n ir k.", + "text4": "Galite filtruoti produktus pagal šalį, prekės ženklus, populiarumą ir dar daugiau!", + "text5": "Jei nenorite to daryti kiekvieną kartą, taip pat galite išsaugoti filtrus spustelėdami žvaigždutę. Kai kitą kartą grįšite, rasite išsaugotus filtrus pačiame pagrindiniame puslapyje" }, "page3": { - "title": "Logos Game", - "text1": "Another popular game is the logos game where you have to select all the logos you feel are the same.", - "text2": "As shown in the example, once you select all the similar logos, just type their value and select where it is a brand, a label or something else. It's that simple!" + "title": "Logotipų žaidimas", + "text1": "Kitas populiarus žaidimas yra logotipų žaidimas, kuriame turite pasirinkti visus logotipus kurie, jūsų manymu, yra vienodi.", + "text2": "Kaip parodyta pavyzdyje, kai pasirenkate visus panašius logotipus, tiesiog įveskite jų vertę ir pasirinkite, kur tai yra prekės ženklas, etiketė ar kažkas kita. Tai taip paprasta!" }, "page4": { - "title": "Eco-Score Questions Game", - "text1": "Help us finish the remaining questions in the most high priority labels!", - "text2": "These cards are linked to labels used in the computation of the Eco-Score.", - "text3": "What is Eco-Score?", - "text4": "Eco-Score captures the total environmental footprint, making it easier for consumers to compare products and decide which is better for the environment." + "title": "Eco-Score klausimų žaidimas", + "text1": "Padėkite mums užbaigti likusius klausimus didžiausio prioriteto etiketėse!", + "text2": "Šios kortelės yra susietos su etiketėmis, naudojamomis apskaičiuojant „Eco-Score“.", + "text3": "Kas yra Eco-Score?", + "text4": "„Eco-Score“ fiksuoja bendrą ekologinį pėdsaką, todėl vartotojams lengviau palyginti produktus ir nuspręsti, kurie produktai yra geresni aplinkai." }, "page5": { - "title": "Settings", - "text1": "Set your preferred language, and report issues from our settings page.", - "text2": "If you're a developer, you can also explore our database content using our dev mode." + "title": "Nustatymai", + "text1": "Nusistatyk pageidaujamą kalbą ir pranešk apie problemas mūsų nustatymų puslapyje.", + "text2": "Jei esate kūrėjas, taip pat galite tyrinėti mūsų duomenų bazės turinį naudodami kūrėjo režimą." }, "page6": { - "title": "Tour", - "text1": "Got stuck somewhere? Want to take the tour again?", - "text2": "Just click on the question mark and start the journey again!" + "title": "Gidas", + "text1": "Užstrigai? Nori dar kartą peržvelgti gidą?", + "text2": "Tiesiog spustelėkite klaustuką ir pradėkite kelionę iš naujo!" } }, "logos": { @@ -288,8 +288,8 @@ }, "page2": { "title": "Įspėjimas", - "text1": "If the crop contains multiple logos, do not select it.", - "text2": "If the crop contains only a partial part of a logo, you can select it." + "text1": "Jei apkarpymas turi kelis logotipus, jo nepasirinkite.", + "text2": "Jei apkarpymas turi tik dalį logotipo, galite jį pasirinkti." }, "page3": { "title": "Patvirtinti", @@ -316,11 +316,11 @@ "3": "Maistinių medžiagų pasirinkimas", "4": "Vertybių pasirinkimas" }, - "loading": "Loading...", - "unknown_brand": "Brand Unknown", - "value_missing": "You forgot to input a value.", - "next": "Next step", - "prev": "Prev step", + "loading": "Įkeliama...", + "unknown_brand": "Prekinis ženklas nežinomas", + "value_missing": "Pamiršai įvesti vertę.", + "next": "Kitas žingsnis", + "prev": "Ankstesnis žingsnis", "skip": "Praleisti šį produktą", "validate": "Patvirtinkite lentelę", "unselect_picture": "Nėra informacijos apie maistingumą", @@ -329,16 +329,16 @@ "value": "Vertė", "unit": "Vienetas", "nutriments": { - "nutriment_energy-kj": "Energy (kJ)", + "nutriment_energy-kj": "Energija (kJ)", "nutriment_energy-kcal": "Energija (kCal)", "nutriment_fat": "Riebalai", - "nutriment_saturated-fat": "Saturated fat", + "nutriment_saturated-fat": "Sotieji riebalai", "nutriment_carbohydrates": "Carbohydrate", "nutriment_sugars": "Cukrus", "nutriment_proteins": "Baltymai", "nutriment_fiber": "Ląsteliena", - "nutriment_salt": "Salt", - "nutriment_sodium": "Sodium" + "nutriment_salt": "Druska", + "nutriment_sodium": "Natris" }, "history": { "title": "Sesijos istorija", @@ -360,19 +360,19 @@ "redirect2": "Spauskite čia" }, "nutriscore": { - "image_alt": "cropped image", - "label": "Annotate Nutri-Score logo detection by batch.", - "description": "To do so, select all the images showing the correct/wrong Nutri-Score value ({{label}}), and click on the bottom buttons to say if you selected a set correct or wrong ones.", - "images_remaining": "Still {{remaining}} to annotate", - "image_sizes": "Image sizes", - "zoom_on_logo": "Zoom on logo", + "image_alt": "apkarpytas vaizdas", + "label": "Anotuokite „Nutri-Score“ logotipo aptikimą pagal partiją.", + "description": "Norėdami tai padaryti, pasirinkite visus vaizdus, kuriuose rodoma teisinga / neteisinga „Nutri-Score“ reikšmė ({{label}}), ir spustelėkite apatinius mygtukus, kad nurodytumėte, ar rinkinį pasirinkote teisingą, ar neteisingą.", + "images_remaining": "Dar {{remaining}} anotuoti", + "image_sizes": "Vaizdo dydžiai", + "zoom_on_logo": "Padidinti logotipą", "select_all": "Pažymėti viską", "deselect_all": "Išžymėti viską", - "incorrect": "Wrong", - "correct": "Correct ({{label}})" + "incorrect": "Neteisingai", + "correct": "Teisingai ({{label}})" }, "eco-score": { "description": "Čia pateikiama klausimų, kurie galėtų pagerinti Eco-Score skaičiavimą, suvestinė", - "countryLabel": "Country" + "countryLabel": "Šalis" } } diff --git a/src/i18n/nn.json b/src/i18n/nn.json index 62892c7eec..bc211ef03a 100644 --- a/src/i18n/nn.json +++ b/src/i18n/nn.json @@ -1,10 +1,10 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "Hvilket spill vil du spille?", "cards": { "questions": { - "title": "Questions", + "title": "Spørsmål", "description": "Tell us if the given image answers the questions" }, "logos": { @@ -121,7 +121,7 @@ "menu": { "title": "Hunger Games", "games": "Games", - "questions": "Questions", + "questions": "Spørsmål", "logos": "Logos", "logos-annotation": "Logos annotation", "logos-search": "Logos search", diff --git a/src/i18n/no.json b/src/i18n/no.json index 62892c7eec..bc211ef03a 100644 --- a/src/i18n/no.json +++ b/src/i18n/no.json @@ -1,10 +1,10 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "Hvilket spill vil du spille?", "cards": { "questions": { - "title": "Questions", + "title": "Spørsmål", "description": "Tell us if the given image answers the questions" }, "logos": { @@ -121,7 +121,7 @@ "menu": { "title": "Hunger Games", "games": "Games", - "questions": "Questions", + "questions": "Spørsmål", "logos": "Logos", "logos-annotation": "Logos annotation", "logos-search": "Logos search", diff --git a/src/i18n/pt.json b/src/i18n/pt.json index 3b034b13d7..e477a19460 100644 --- a/src/i18n/pt.json +++ b/src/i18n/pt.json @@ -19,8 +19,8 @@ }, "account_band": { "title": "Quer fazer valer a sua contribuição? Crie uma conta ou entre no Open Food Facts!", - "log_in": "Nome de Utilizador", - "sign_up": "Inscrever", + "log_in": "Nome do Utilizador", + "sign_up": "Criar conta", "contribution_details": "Entenda porque a sua contribuição é importante" }, "saved_filters": "Filtros salvos", @@ -52,7 +52,7 @@ "questions": { "category": "categoria", "categories": "Categorias", - "label": "etiqueta", + "label": "rótulo", "labels": "Rótulos", "brand": "marca", "brands": "Marcas", @@ -62,16 +62,16 @@ "ingredients": "Ingredientes", "product_weight": "peso do produto", "popularity_sort": "Ordenar por popularidade", - "see_examples": "Veja exemplos deste ", + "see_examples": "Veja exemplos disto ", "no": "Não", "skip": "Pular", "yes": "Sim", - "no_questions_remaining": "Nenhuma pergunta restando", + "no_questions_remaining": "Não há perguntas restantes", "countries": "Países", - "view": "Visão", - "edit": "Edite", - "hide_images": "Oculte imagens (carregamento mais rápido)", - "display_images": "Mostre imagens", + "view": "Exibir", + "edit": "Editar", + "hide_images": "Ocultar imagens (carregamento mais rápido)", + "display_images": "Mostrar imagens", "annotations": "Anotações", "last_annotations": "Últimas anotações", "remaining_annotations": "Perguntas restantes", @@ -112,8 +112,8 @@ "flag": "Algo errado? Relatar/marcar a imagem!", "unflag": "Desmarcar a imagem", "reset_filters": "Limpar filtros", - "log_in": "Nome de Utilizador", - "sign_up": "Inscrever", + "log_in": "Nome do Utilizador", + "sign_up": "Criar conta", "login_title": "Faça o seu comentário contar", "login_description": "No momento, você não está conectado ao Open Food Facts. Para obter suas respostas aplicadas diretamente aos produtos e associadas à sua conta, considere fazer login na sua conta do Open Food Facts ou criar uma.", "please_wait_while_we_fetch_the_question": "Por favor aguarde enquanto buscamos a pergunta!" diff --git a/src/i18n/sk.json b/src/i18n/sk.json index 5107d25de4..263aa49805 100644 --- a/src/i18n/sk.json +++ b/src/i18n/sk.json @@ -1,32 +1,32 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "Akú hru by ste si chceli zahrať?", "cards": { "questions": { - "title": "Questions", + "title": "Otázky", "description": "Tell us if the given image answers the questions" }, "logos": { - "title": "Logos", - "description": "Find all the logos matching the given logo" + "title": "Logá", + "description": "Nájdite všetky logá zodpovedajúce danému logu" }, "eco_score": { - "title": "Eco-score", - "description": "Annotate the questions with the highest value" + "title": "Eko-skóre", + "description": "Označte otázky s najvyššou hodnotou" } } }, "account_band": { "title": "Want to make your contribution count? Create an account or sign in on Open Food Facts!", - "log_in": "Login", + "log_in": "Prihlásenie", "sign_up": "Zaregistrovať sa", - "contribution_details": "Learn why your contribution matters" + "contribution_details": "Zistite, prečo je váš príspevok dôležitý" }, - "saved_filters": "Saved Filters", + "saved_filters": "Uložené filtre", "contribution_modal": { - "title": "Your contribution matters", - "information": "Hunger Games is an effort to leverage the results of our OCR and artificial intelligence. When you use Hunger Games by Open Food Facts, you improve our entire database which helps the community make better food choices. We gather your annotations and use them to make Open Food Facts more accurate and efficient.", + "title": "Váš príspevok je dôležitý", + "information": "Hunger Games je snaha využiť výsledky nášho OCR a umelej inteligencie. Keď používate Hunger Games od Open Food Facts, zlepšujete celú našu databázu, čo pomáha komunite lepšie si vyberať jedlo. Zhromažďujeme vaše anotácie a používame ich na to, aby boli Open Food Facts presnejšie a efektívnejšie.", "thank_you": "Thank you for helping us improve Open Food Facts so that more people can use it easily." }, "statistics": { @@ -112,7 +112,7 @@ "flag": "Something wrong? Report/flag the image!", "unflag": "Unflag the image", "reset_filters": "Reset filters", - "log_in": "Login", + "log_in": "Prihlásenie", "sign_up": "Zaregistrovať sa", "login_title": "Make your annotation count", "login_description": "You are not currently logged into Open Food Facts. To get your answers directly applied to products, and associated to your account, consider logging in to your Open Food Facts account, or creating one", @@ -121,8 +121,8 @@ "menu": { "title": "Hunger Games", "games": "Games", - "questions": "Questions", - "logos": "Logos", + "questions": "Otázky", + "logos": "Logá", "logos-annotation": "Logos annotation", "logos-search": "Logos search", "logos-product-search": "Annotation per products", @@ -131,7 +131,7 @@ "insights": "Insights", "nutritions": "Nutrition facts", "settings": "Nastavenia", - "eco-score": "Eco-score", + "eco-score": "Eko-skóre", "dashboard": "Logos dashboard", "tour": "Show tour", "logged_in_user": "Logged as {{userName}}", diff --git a/src/i18n/tw.json b/src/i18n/tw.json index 9f4da064d6..3a0a47670a 100644 --- a/src/i18n/tw.json +++ b/src/i18n/tw.json @@ -46,7 +46,7 @@ } }, "flagged_images": { - "title": "Images flagged by users", + "title": "Ggggfrtgdwvhh", "loading": "Loading" }, "questions": { diff --git a/src/i18n/uk.json b/src/i18n/uk.json index 7ef18c2549..7c4a1a8d18 100644 --- a/src/i18n/uk.json +++ b/src/i18n/uk.json @@ -205,7 +205,7 @@ "crop_image_title": "кадрування логотипу", "no_more_questions": "Більше жодних питань щодо цього логотипу. Ви можете спробувати знайти більше логотипів за допомогою наступної гри.", "loading_messages": { - "pending_reference_logos": "We are loading some logos examples to initialise the search", + "pending_reference_logos": "Ми завантажуємо деякі приклади логотипів для початку пошуку", "failed_reference_logos": "Ми не знайшли жодного логотипу з такою приміткою. Спробуйте скористатися наступною грою, щоб примітити деякі з них." } }, @@ -363,7 +363,7 @@ "image_alt": "обрізане зображення", "label": "Коментувати логотип Nutri-Score за партією.", "description": "Для цього виберіть усі зображення, які показують правильне/неправильне значення Nutri-Score ({{label}}), і натисніть нижні кнопки, щоб повідомити про правильний або неправильний вибір.", - "images_remaining": "Still {{remaining}} to annotate", + "images_remaining": "Ще {{remaining}} для приміток", "image_sizes": "Розмір зображення", "zoom_on_logo": "Приблизити лого", "select_all": "Вибрати все", diff --git a/src/i18n/uz.json b/src/i18n/uz.json index 353069e756..3a24193b87 100644 --- a/src/i18n/uz.json +++ b/src/i18n/uz.json @@ -1,15 +1,15 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "Qaysi oʻyinni oʻynashni istaysiz?", "cards": { "questions": { - "title": "Questions", - "description": "Tell us if the given image answers the questions" + "title": "Savollar", + "description": "Agar ushbu rasm savollarga javob bera olsa, bizga maʼlum qiling" }, "logos": { - "title": "Logos", - "description": "Find all the logos matching the given logo" + "title": "Logotiplar", + "description": "Berilgan logotipga mos keluvchi barcha logotiplarni toping" }, "eco_score": { "title": "Eco-score", @@ -121,8 +121,8 @@ "menu": { "title": "Hunger Games", "games": "Games", - "questions": "Questions", - "logos": "Logos", + "questions": "Savollar", + "logos": "Logotiplar", "logos-annotation": "Logos annotation", "logos-search": "Logos search", "logos-product-search": "Annotation per products", diff --git a/src/i18n/yo.json b/src/i18n/yo.json index fbd2946c8f..efe4a54d5f 100644 --- a/src/i18n/yo.json +++ b/src/i18n/yo.json @@ -1,31 +1,31 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "Ere wo ni o fẹ lati ṣe?", "cards": { "questions": { - "title": "Questions", - "description": "Tell us if the given image answers the questions" + "title": "Awọn ibeere", + "description": "Sọ fun wa ti aworan ti a fun ba dahun awọn ibeere naa" }, "logos": { "title": "Logos", - "description": "Find all the logos matching the given logo" + "description": "Wa gbogbo awọn aami ti o baamu aami ti a fun" }, "eco_score": { - "title": "Eco-score", - "description": "Annotate the questions with the highest value" + "title": "Eco-Dimegilio", + "description": "Ṣe alaye awọn ibeere pẹlu iye ti o ga julọ" } } }, "account_band": { - "title": "Want to make your contribution count? Create an account or sign in on Open Food Facts!", - "log_in": "Login", - "sign_up": "Sign up", - "contribution_details": "Learn why your contribution matters" + "title": "Ṣe o fẹ lati jẹ ki idasi rẹ ka? Ṣẹda akọọlẹ kan tabi wọle si Awọn Otitọ Ounjẹ Ṣii!", + "log_in": "Username", + "sign_up": "Forukọsilẹ", + "contribution_details": "Kọ idi ti ilowosi rẹ ṣe pataki" }, - "saved_filters": "Saved Filters", + "saved_filters": "Awọn Ajọ ti a fipamọ", "contribution_modal": { - "title": "Your contribution matters", + "title": "Ilowosi rẹ ṣe pataki", "information": "Hunger Games is an effort to leverage the results of our OCR and artificial intelligence. When you use Hunger Games by Open Food Facts, you improve our entire database which helps the community make better food choices. We gather your annotations and use them to make Open Food Facts more accurate and efficient.", "thank_you": "Thank you for helping us improve Open Food Facts so that more people can use it easily." }, @@ -112,8 +112,8 @@ "flag": "Something wrong? Report/flag the image!", "unflag": "Unflag the image", "reset_filters": "Reset filters", - "log_in": "Login", - "sign_up": "Sign up", + "log_in": "Username", + "sign_up": "Forukọsilẹ", "login_title": "Make your annotation count", "login_description": "You are not currently logged into Open Food Facts. To get your answers directly applied to products, and associated to your account, consider logging in to your Open Food Facts account, or creating one", "please_wait_while_we_fetch_the_question": "Please wait while we fetch the question!" @@ -121,7 +121,7 @@ "menu": { "title": "Hunger Games", "games": "Games", - "questions": "Questions", + "questions": "Awọn ibeere", "logos": "Logos", "logos-annotation": "Logos annotation", "logos-search": "Logos search", @@ -131,7 +131,7 @@ "insights": "Insights", "nutritions": "Nutrition facts", "settings": "Ètò", - "eco-score": "Eco-score", + "eco-score": "Eco-Dimegilio", "dashboard": "Logos dashboard", "tour": "Show tour", "logged_in_user": "Logged as {{userName}}", diff --git a/src/i18n/zh.json b/src/i18n/zh.json index ae0976bb60..ebb879db43 100644 --- a/src/i18n/zh.json +++ b/src/i18n/zh.json @@ -1,100 +1,100 @@ { "home": { "game_selector": { - "title": "What game would you like to play?", + "title": "你想要玩什麼遊戲?", "cards": { "questions": { - "title": "Questions", - "description": "Tell us if the given image answers the questions" + "title": "常見問答", + "description": "請讓我們知道這圖片是否回答了那些問題。" }, "logos": { - "title": "Logos", - "description": "Find all the logos matching the given logo" + "title": "標誌", + "description": "請找出與指定表章匹配的所有表章" }, "eco_score": { - "title": "Eco-score", - "description": "Annotate the questions with the highest value" + "title": "環保評分", + "description": "註釋最具價值的問題" } } }, "account_band": { - "title": "Want to make your contribution count? Create an account or sign in on Open Food Facts!", + "title": "想要讓您的貢獻有所價值嗎?在Open Food Facts上創建帳戶或登入吧!", "log_in": "用戶名", "sign_up": "註冊", - "contribution_details": "Learn why your contribution matters" + "contribution_details": "了解為何您的貢獻很重要" }, - "saved_filters": "Saved Filters", + "saved_filters": "已儲存的篩選器", "contribution_modal": { - "title": "Your contribution matters", - "information": "Hunger Games is an effort to leverage the results of our OCR and artificial intelligence. When you use Hunger Games by Open Food Facts, you improve our entire database which helps the community make better food choices. We gather your annotations and use them to make Open Food Facts more accurate and efficient.", - "thank_you": "Thank you for helping us improve Open Food Facts so that more people can use it easily." + "title": "您的貢獻很重要", + "information": "「飢餓遊戲」是我們運用OCR(光學字符識別)和人工智能的一項成果。當您使用Open Food Facts的「飢餓遊戲」時,您可以幫助我們改善整個資料庫,從而替社區做出更好的飲食選擇。我們將會收集您的註解,並將使用它們,以使Open Food Facts變得更加準確和高效。", + "thank_you": "感謝您協助我們改進Open Food Facts,讓更多人能夠更輕鬆地使用它。" }, "statistics": { - "title": "{{userName}} statistics:", + "title": "{{userName}} 的統計資料:", "editorCount": { "title": "編輯", - "description": "Number of editions done" + "description": "已完成版本數" }, "contributorCount": { "title": "貢獻者", - "description": "Adding a new product" + "description": "新增新商品" }, "photographerCount": { - "title": "Photographer", - "description": "Taking photos for a product" + "title": "攝影師", + "description": "為產品拍攝照片" } } }, "flagged_images": { - "title": "Images flagged by users", - "loading": "Loading" + "title": "由用戶標記的圖片", + "loading": "載入中" }, "questions": { - "category": "分類", - "categories": "分類", + "category": "類別", + "categories": "類別", "label": "標籤", "labels": "標籤", "brand": "品牌", "brands": "品牌", "packaging": "包裝", - "quantity": "分量", - "insightTypeLabel": "Only shows", + "quantity": "數量", + "insightTypeLabel": "僅顯示", "ingredients": "成分", - "product_weight": "product weight", - "popularity_sort": "Sort by popularity", - "see_examples": "See examples of this ", + "product_weight": "產品重量", + "popularity_sort": "依熱門程度排序", + "see_examples": "查看此 的例子", "no": "否", - "skip": "Skip", + "skip": "略過", "yes": "是", - "no_questions_remaining": "No questions remaining", - "countries": "Countries", - "view": "View", + "no_questions_remaining": "沒有待處理的問題", + "countries": "國家地區", + "view": "檢視", "edit": "編輯", - "hide_images": "Hide images (faster loading)", - "display_images": "Display images", - "annotations": "三、 Annotations", - "last_annotations": "Last annotations", - "remaining_annotations": "Remaining questions", - "annotated_annotations": "Annotated", + "hide_images": "隱藏圖片(載入較快)", + "display_images": "顯示圖片", + "annotations": "3. Annotations", + "last_annotations": "上一次注解", + "remaining_annotations": "剩餘問題", + "annotated_annotations": "已注解", "filters": { - "active_filter_number": "+{{count}} filters", - "active_filter_number_one": "+{{count}} filter", - "active_filter_number_zero": "no filter", + "active_filter_number": "+{{count}} 篩選器", + "active_filter_number_one": "+{{count}} 篩選器", + "active_filter_number_zero": "沒有篩選器", "short_label": { "value": "值", "country": "國家", "brand": "品牌", - "popularity": "popularity", - "campaign": "camp" + "popularity": "人氣", + "campaign": "展銷" }, "long_label": { - "type": "Question Type", - "value": "Proposed Value", - "country": "Product Country", - "brand": "Product Brand", - "popularity": "Sort by popularity", + "type": "問題類型", + "value": "建議值", + "country": "產地", + "brand": "產品品牌", + "popularity": "依熱門程度排序", "edit": "", - "campaign": "Campaign" + "campaign": "展銷活動" }, "placeholders": { "value": "Value (Fanta, en:organic,...)", @@ -102,9 +102,9 @@ "campaign": "Annotation campaigns" }, "actions": { - "edit": "Edit Filters", + "edit": "編輯篩選器", "cancel": "取消", - "apply": "應用" + "apply": "套用" } }, "other_questions": "Other questions", @@ -119,86 +119,86 @@ "please_wait_while_we_fetch_the_question": "Please wait while we fetch the question!" }, "menu": { - "title": "Hunger Games", - "games": "Games", - "questions": "Questions", - "logos": "Logos", + "title": "飢餓遊戲", + "games": "遊戲", + "questions": "常見問答", + "logos": "標誌", "logos-annotation": "Logos annotation", "logos-search": "Logos search", "logos-product-search": "Annotation per products", "logos-deep-search": "Infinite annotation", - "manage": "Manage", - "insights": "Insights", - "nutritions": "營養素表", + "manage": "管理", + "insights": "深層研析", + "nutritions": "營養成分", "settings": "設定", - "eco-score": "Eco-score", + "eco-score": "環保評分", "dashboard": "Logos dashboard", "tour": "Show tour", "logged_in_user": "Logged as {{userName}}", "log_in": "Click to login" }, "insights": { - "insights": "Insights", + "insights": "深層研析", "barcode": "條碼", - "barcode_placeholder": "barcode", - "value_tag": "Value tag", - "value_placeholder": "ex: en:mueslis, bjorg,...", - "type": "Type", - "annotated": "Annotated", - "annotation": "Annotation", - "not_annotated": "Not annotated", - "all": "All", + "barcode_placeholder": "條碼", + "value_tag": "值標籤", + "value_placeholder": "例如: en:mueslis, bjorg,...", + "type": "類型", + "annotated": "已注解", + "annotation": "注解", + "not_annotated": "未注解", + "all": "全部", "label": "標籤", - "product_weight": "Product weight", + "product_weight": "產品重量", "category": "分類", - "expiration_date": "Expiration date", - "packager_code": "Packager code", - "skipped": "Skipped (-1)", - "rejected": "Rejected (0)", - "accepted": "Accepted (1)", + "expiration_date": "過期日", + "packager_code": "包裝商代碼", + "skipped": "跳過 (-1)", + "rejected": "退回 (0)", + "accepted": "接受 (1)", "search": "搜尋", - "count": "Count", - "id": "Id", - "value": "數值", - "created_at": "Created at", - "completed_at": "Completed at", - "automatic": "Automatic", + "count": "次數", + "id": "識別碼", + "value": "值", + "created_at": "創建於", + "completed_at": "完成於", + "automatic": "自動", "human_required": "Human required", "edit_product": "Open product edit", "view_product": "Open product page" }, "logos": { - "annotation": "Annotation: ", - "annotations": "Logo annotations", + "annotation": "注解: ", + "annotations": "標誌注解", "task_description": "Select all logos that are exactly the same, and give them a name like \"en:EU Organic\" and a type like \"label\".", - "select_all": "Select all", - "unselect_all": "Unselect all", - "distance": "Distance:", - "value": "數值", - "submit": "Submit", - "type": "Type", + "select_all": "選取全部", + "unselect_all": "取消選取全部", + "distance": "距離:", + "value": "值", + "submit": "送出", + "type": "類型", "label": "標籤", "brand": "品牌", - "packager_code": "Packager code", - "packaging": "包装", - "qr_code": "QR code", + "packager_code": "包裝商代碼", + "packaging": "包裝套件", + "qr_code": "QR 代碼", "category": "分類", - "nutrition_label": "Nutrition label", + "nutrition_label": "營養標示貼標", "no_logo": "Not a logo", "store": "商店", - "detail": "Logo detail", - "id": "Logo ID:", - "barcode": "Barcode:", - "full_image": "Full image", - "update": "Update", - "no_found": "No logo found", + "detail": "標誌詳細說明", + "id": "標誌 ID:", + "barcode": "條碼:", + "full_image": "完整圖片", + "update": "更新", + "no_found": "未發現標誌", "search": "搜尋", - "number_of_results": "Number of results:", - "loading": "載入中……", - "refresh": "Refresh", + "number_of_results": "結果總數:", + "loading": "載入中…", + "refresh": "重新整理", "search_specific": "Search specific logo", - "load_more": "Load more", - "no_results": "No logo found", + "load_more": "載入更多", + "no_results": "未發現標誌", "result_count": "Shows {{showing}} on {{available}} available", "flag": "Something wrong? Report/flag the image!", "unflag": "Unflag the image", @@ -220,7 +220,7 @@ "join_community": "加入社群", "text1": "Open Food Facts is a collaborative project built by tens of thousands of volunteers and managed by a non-profit organization with 8 employees. We need your donations to fund the Open Food Facts 2024 budget and to continue to develop the project.", "thank_you": "Thank you", - "donate": "捐款", + "donate": "贊助/捐款", "join_the_community": { "discover_our": "Discover our ", "code_of_conduct": "Code of conduct ", @@ -229,25 +229,25 @@ "subscribe_to_our": "Subscribe to our ", "newsletter": "newsletter" }, - "discover_the_project": "探索項目", + "discover_the_project": "探索專案", "Who_we_are": "我們是誰", "Vision_Mission_Values_and_Programs": "Vision, Mission, Values and Programs", "FAQS": "FAQS", "open_Food_Facts_blog": "Open Food Facts blog", - "Press": "傳媒", + "Press": "投稿", "Open_Food_Facts_wiki": "Open Food Facts wiki (en)", "Translators": "翻譯員", - "Partners": "夥伴", + "Partners": "合作伙伴", "Open_Beauty_Facts": "Open Beauty Facts - 化妝品", "text2": "來自全世界共同協作、自由且開放的食品資料庫。" }, "helper": { "welcome": { "page1": { - "title": "Welcome to Hunger Games", - "text1": "Hunger Games is a collection of mini-games that help contribute to Open Food Facts in many ways. You can play are really exciting games from anywhere. Here is a guided tour of the entire website which will get you started.", + "title": "歡迎來到《飢餓遊戲》", + "text1": "「飢餓遊戲」是一系列以多種方式幫助貢獻Open Food Facts的小遊戲。您可以隨時隨地遊抏這些刺激的遊戲。以下的網站導覽將引導您入門整個網站。", "text2": "Make sure to login to the Open Food Facts website to get credit for your contributions. If you make a mistake, please take the time to correct it by heading to the website.", - "text3": "In case of any doubt about the games, click on the question mark icon at the top right of the page, and you can reach us on slack at the #hunger-games channel" + "text3": "如果對遊戲有任何疑問,請點擊頁面右上角的問號圖標,您可以通過 Slack 上的 #hunger-games 頻道聯繫我們。" }, "page2": { "title": "Questions Game", @@ -282,7 +282,7 @@ }, "logos": { "page1": { - "title": "Selection", + "title": "選項", "text1": "Select the crops of a same logo by clicking on them", "text2": "Selected logos go to the top of the page, you can unselect them by clicking again on them" }, @@ -292,14 +292,14 @@ "text2": "If the crop contains only a partial part of a logo, you can select it." }, "page3": { - "title": "Validate", + "title": "驗證", "text1": "Indicate the type of logo (label, brand, QRcode, ...)", "text2": "If it is a label or a brand logo, indicate which one it is", "text3": "Now you can submit your selection", - "text4": "Thank you :)" + "text4": "謝謝您!:D" } }, - "previous": "Prev", + "previous": "上一步", "next": "下一個", "close": "關閉" }, @@ -308,15 +308,15 @@ "cropTheTable": "Crop the image to simplify your annotation", "verifyNutrimentDetected": "Indicate if the nutriment detected is correct", "selectMissingNutriments": "Add missing nutriments (you can click even if the word has no box)", - "selectValue": "Select the nutritional value of: " + "selectValue": "選取欲查看營養值的成分:" }, "steps": { - "1": "Crop", - "2": "Special values", + "1": "裁切", + "2": "特殊值", "3": "Nutriments Selection", "4": "Values Selection" }, - "loading": "Loading...", + "loading": "載入中...", "unknown_brand": "Brand Unknown", "value_missing": "You forgot to input a value.", "next": "Next step", @@ -326,30 +326,30 @@ "unselect_picture": "No nutrition info", "basis": "data for: ", "servingSize": "serving size", - "value": "數值", + "value": "值", "unit": "單位", "nutriments": { - "nutriment_energy-kj": "能量(kJ)", + "nutriment_energy-kj": "Energy (kJ)", "nutriment_energy-kcal": "Energy (kCal)", "nutriment_fat": "脂肪", "nutriment_saturated-fat": "飽和脂肪", "nutriment_carbohydrates": "碳水化合物", "nutriment_sugars": "糖", - "nutriment_proteins": "蛋白质", + "nutriment_proteins": "蛋白質", "nutriment_fiber": "Fibers", "nutriment_salt": "鹽", "nutriment_sodium": "鈉" }, "history": { "title": "Session History", - "status": "status", + "status": "狀態", "product name": "product name", "view": "view page", "edit": "edit page", - "SKIP": "ignored", + "SKIP": "已忽略", "VALIDATED": "edited", "WRONG_IMAGE": "unselected picture", - "close": "close", + "close": "關閉", "open": "open history" } }, @@ -366,13 +366,13 @@ "images_remaining": "Still {{remaining}} to annotate", "image_sizes": "Image sizes", "zoom_on_logo": "Zoom on logo", - "select_all": "Select all", - "deselect_all": "Unselect all", + "select_all": "選取全部", + "deselect_all": "取消選取全部", "incorrect": "Wrong", "correct": "Correct ({{label}})" }, "eco-score": { "description": "Here is a summary of questions that could improve Eco-Score computation", - "countryLabel": "Country" + "countryLabel": "地區" } } diff --git a/src/pages/logos/LogoSearch.jsx b/src/pages/logos/LogoSearch.jsx index 7b3e755749..cf1a1e8e49 100644 --- a/src/pages/logos/LogoSearch.jsx +++ b/src/pages/logos/LogoSearch.jsx @@ -41,7 +41,7 @@ const request = async ({ barcode, value, type, count }) => { export default function LogoSearch() { const { t } = useTranslation(); - const [isLoading, setIsLoading] = React.useState(true); + const [isLoading, setIsLoading] = React.useState(false); const [searchState, setSearchState] = useUrlParams( { type: "", @@ -61,7 +61,16 @@ export default function LogoSearch() { [setSearchState] ); + const filterStateHasValue = + (searchState.type && + (TYPE_WITHOUT_VALUE.includes(searchState.type) || searchState.value)) || + searchState.barcode; + React.useEffect(() => { + if (!filterStateHasValue) { + // Avoid fetching data if no value to filter + return () => {}; + } let isValidRequest = true; setIsLoading(true); setResult({ logos: [], count: undefined }); diff --git a/src/pages/logos/ProductLogoAnnotations.jsx b/src/pages/logos/ProductLogoAnnotations.jsx index 2f25f23dfb..5cbd6687ef 100644 --- a/src/pages/logos/ProductLogoAnnotations.jsx +++ b/src/pages/logos/ProductLogoAnnotations.jsx @@ -25,6 +25,12 @@ const OFF_2_ROBOTOFF = { labels: "label", packaging: "packaging", }; +const ROBOTOFF_2_OFF = { + category: "categories", + label: "labels", + packaging: "packaging", +}; + const fetchProducts = async ({ page, filter }) => { try { const { @@ -87,6 +93,12 @@ const useLogoFetching = (filter) => { }, [filter]); React.useEffect(() => { + const filterStateIsIncomplet = !filter.tagtype || !filter.tag; + if (filterStateIsIncomplet) { + // Avoid fetching data if no value to filter + return () => {}; + } + let isValid = true; setIsLoading(true); setCanLoadMore(false); @@ -181,7 +193,7 @@ export default function AnnotateLogosFromProducts() { { tagtype: "labels", tag_contains: "contains", - tag: "en:eg-oko-verordnung", + tag: "", }, { tag: ["valueTag", "value_tag", "value"], @@ -228,7 +240,10 @@ export default function AnnotateLogosFromProducts() { sx={{ minWidth: 200 }} > {logoTypeOptions.map(({ value: typeValue, labelKey }) => ( - + {t(labelKey)} ))} diff --git a/src/pages/logosValidator/dashboardDefinition.ts b/src/pages/logosValidator/dashboardDefinition.ts index a0ee35691b..b6f866df44 100644 --- a/src/pages/logosValidator/dashboardDefinition.ts +++ b/src/pages/logosValidator/dashboardDefinition.ts @@ -41,7 +41,7 @@ export type LogoDefinition = { }; const UNTYPED_LOGOS = { - // Nutriscore + // Nutri-Score "en:nutriscore-grade-a": { tag: "en:nutriscore-grade-a", label: "Nutriscore A", @@ -122,6 +122,13 @@ const UNTYPED_LOGOS = { type: "label", }, // Various origins. + "en:qs-certification-mark": { + tag: "en:qs-certification-mark", + label: "QS Certification Mark", + // logo does not exist yet + logo: "https://world.openfoodfacts.org/images/lang/en/labels/qs-certification-mark.79x90.png", + type: "label", + }, "en:dolphin-safe": { tag: "en:dolphin-safe", label: "Dolphin Safe", @@ -153,6 +160,7 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/de/labels/ohne-gentechnik.90x90.svg", type: "label", }, + // France "en:made-in-france": { tag: "en:made-in-france", label: "Fabriqué en France", @@ -246,7 +254,7 @@ const UNTYPED_LOGOS = { "fr:legumes-de-france": { tag: "fr:legumes-de-france", label: "Légumes de France", - logo: "https://static.openfoodfacts.org/images/lang/fr/labels/legumes-de-france.90x90.svg", + logo: "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https://images.openfoodfacts.org/images/products/325/622/009/4726/5.jpg&y_min=0.6817449927330017&x_min=0.25617462396621704&y_max=0.7520487904548645&x_max=0.4584151804447174", type: "label", }, "en:harvested-in-france": { @@ -258,7 +266,7 @@ const UNTYPED_LOGOS = { "fr:agri-ethique-france": { tag: "fr:agri-ethique-france", label: "Agri-Éthique France", - logo: "https://static.openfoodfacts.org/images/lang/fr/labels/agri-ethique-france.90x90.svg", + logo: "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https://images.openfoodfacts.org/images/products/833/057/656/3435/1.jpg&y_min=0.6357665061950684&x_min=0.3311133086681366&y_max=0.7579669952392578&x_max=0.5272933840751648", type: "label", }, "en:apples-from-france": { @@ -417,25 +425,13 @@ const UNTYPED_LOGOS = { logo: "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https://static.openfoodfacts.org/images/products/123/456/789/0123/231.jpg&y_min=0.60532558&x_min=0.307998389&y_max=0.77711761&x_max=0.475660861", type: "label", }, - "en:suisse-garantie": { - tag: "en:suisse-garantie", - label: "suisse garantie", - logo: "https://static.openfoodfacts.org/images/lang/en/labels/suisse-garantie.62x90.png", - type: "label", - }, - "en:terrasuisse": { - tag: "en:terrasuisse", - label: "terrasuisse", - logo: "https://static.openfoodfacts.org/images/lang/en/labels/terrasuisse.87x90.svg", - type: "label", - }, "en:british-lion-quality": { tag: "en:british-lion-quality", label: "british lion quality", logo: "https://static.openfoodfacts.org/images/lang/en/labels/british-lion-quality.97x90.png", type: "label", }, - // Eco-score + // Eco-Score // To-Do add the origin france logos "en:organic": { tag: "en:organic", @@ -504,6 +500,7 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/packaging/01-pet.73x90.svg", type: "packaging", }, + // Packaging - Materials "en:1-pet": { tag: "01-pet", label: "1-PET", @@ -843,7 +840,7 @@ const UNTYPED_LOGOS = { "en:pefc": { tag: "en:pefc", label: "PEFC", - // logo does not exist yet + // FIXME: logo does not exist yet on openfoodfacts-server logo: "https://static.openfoodfacts.org/images/lang/en/labels/pefc.90x90.svg", type: "label", }, @@ -859,6 +856,7 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/labels/triman.90x90.svg", type: "label", }, + // Recycling - Shapes "fr:bouteille": { tag: "fr:bouteille", label: "Bottle", @@ -1819,6 +1817,7 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/icons/packaging-shapes/citeo/light-mode/tube-2.svg", type: "packaging", }, + // Recycling - Bins "fr:bac-de-tri": { tag: "fr:bac-de-tri", label: "Bac de tri", @@ -1831,6 +1830,7 @@ const UNTYPED_LOGOS = { logo: "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https://static.openfoodfacts.org/images/products/123/456/789/0123/227.jpg&y_min=0.516038656&x_min=0.736438572&y_max=0.940771222&x_max=0.916798651", type: "packaging", }, + // Recycling labels "es:ecoponto-amarelo": { tag: "es:ecoponto-amarelo", label: "Ecoponto amarelo", @@ -1886,7 +1886,7 @@ const UNTYPED_LOGOS = { type: "packaging", }, - // To-Do add Halal logos + // Halal "en:halal-food-council-of-europe": { tag: "en:halal-food-council-of-europe", label: "Halal Food Council of Europe", @@ -1937,6 +1937,7 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/labels/keyhole.90x90.png", type: "label", }, + // Australia "en:health-star-rating-0-5": { tag: "en:health-star-rating-0-5", label: "Health Star Rating 0.5", @@ -2083,7 +2084,26 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/labels/2020-silver-medal-of-the-german-agricultural-society.90x90.png", type: "label", }, - + // India + "en:green-dot-india": { + tag: "en:green-dot-india", + label: "Green Dot India", + logo: "https://static.openfoodfacts.org/images/lang/en/labels/green-dot-india.90x90.svg", + type: "label", + }, + // Switzerland + "en:suisse-garantie": { + tag: "en:suisse-garantie", + label: "suisse garantie", + logo: "https://static.openfoodfacts.org/images/lang/en/labels/suisse-garantie.62x90.png", + type: "label", + }, + "en:terrasuisse": { + tag: "en:terrasuisse", + label: "terrasuisse", + logo: "https://static.openfoodfacts.org/images/lang/en/labels/terrasuisse.87x90.svg", + type: "label", + }, // Kosher "en:klbd-kosher": { tag: "en:kashrut-division-of-the-london-beth-din", @@ -2295,7 +2315,13 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/labels/certified-belgian-abbey-beer.66x90.png", type: "label", }, - // CGA + "en:not-advised-for-pregnant-women": { + tag: "en:not-advised-for-pregnant-women", + label: "not advised for pregnant women", + logo: "https://static.openfoodfacts.org/images/lang/en/labels/not-advised-for-pregnant-women.90x90.svg", + type: "label", + }, + // France - CGA "en:concours-general-agricole": { tag: "en:concours-general-agricole", label: "concours general agricole", @@ -2472,12 +2498,14 @@ const UNTYPED_LOGOS = { logo: "https://static.openfoodfacts.org/images/lang/en/labels/real-california-milk.90x90.png", type: "label", }, + // Brands Kroger: { tag: "Kroger", label: "Kroger", logo: "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https://static.openfoodfacts.org/images/products/001/111/002/5388/1.jpg&y_min=0.131732494&x_min=0.293668717&y_max=0.279532224&x_max=0.629243255", type: "brand", }, + // Gluten "es:sin-tacc": { tag: "es:Sin-TACC", label: "Sin TACC", @@ -2595,7 +2623,7 @@ export const DASHBOARD: DashBoardTheme[] = [ // Packaging shapes { tag: "packaging-shapes", - title: "Packaging Shapes", + title: "🥫 Packaging Shapes", logos: [ "fr:bouteille", "fr:aerosol-2", @@ -2762,7 +2790,7 @@ export const DASHBOARD: DashBoardTheme[] = [ // Packaging { tag: "packaging", - title: "Packaging", + title: "♻️ Packaging", logos: [ "fr:bac-de-tri", "fr:tri-verre", @@ -2786,7 +2814,7 @@ export const DASHBOARD: DashBoardTheme[] = [ // Packaging { tag: "packaging-materials", - title: "Packaging materials", + title: "♳ Packaging materials", logos: [ "en:1-pet", "en:1-PETE", @@ -2878,7 +2906,7 @@ export const DASHBOARD: DashBoardTheme[] = [ // Origins dashboard { tag: "origin-france", - title: "Origine France", + title: "🇫🇷 France", logos: [ "en:made-in-france", "en:transformed-in-france", @@ -2923,15 +2951,21 @@ export const DASHBOARD: DashBoardTheme[] = [ "en:produced-in-brittany", "fr:viande-de-chevreau-francaise", "en:french-horse", - "en:suisse-garantie", - "en:terrasuisse", - "en:british-lion-quality", + "en:saveurs-en-or", + ], + }, + // United Kingdom + { + tag: "united-kingdom", + title: "🇬🇧 United Kingdom", + logos: [ + "en:british-lion-quality", ], }, // vegetarian vegetalian categories { tag: "vegan-and-vegetarian", - title: "Vegan and Vegetarian", + title: "🌱 Vegan and Vegetarian", logos: [ "en:vege-project-vegetarian", "en:vegetarian-society-approved-vegan", @@ -2972,10 +3006,27 @@ export const DASHBOARD: DashBoardTheme[] = [ "en:naturland", ], }, + // Australia + { + tag: "australia", + title: "🇦🇺 Australia", + logos: [ + "en:health-star-rating-0-5", + "en:health-star-rating-1", + "en:health-star-rating-1-5", + "en:health-star-rating-2", + "en:health-star-rating-2-5", + "en:health-star-rating-3", + "en:health-star-rating-3-5", + "en:health-star-rating-4", + "en:health-star-rating-4-5", + "en:health-star-rating-5", + ], + }, // United States { tag: "united-states", - title: "United States", + title: "🇺🇸 United States", logos: [ "en:real-california-milk", "en:real-california-cheese", @@ -2983,15 +3034,50 @@ export const DASHBOARD: DashBoardTheme[] = [ "en:non-gmo-project", ], }, + // Germany + { + tag: "germany", + title: "🇩🇪 Germany", + logos: [ + "en:gold-medal-of-the-german-agricultural-society", + "en:silver-medal-of-the-german-agricultural-society", + "en:bronze-medal-of-the-german-agricultural-society", + "en:qs-certification-mark", // https://world.openfoodfacts.org/images/lang/en/labels/qs-certification-mark.79x90.png + "en:2009-silver-medal-of-the-german-agricultural-society.90x90.png", + "en:2010-gold-medal-of-the-german-agricultural-society.90x90.png", + "en:2010-silver-medal-of-the-german-agricultural-society.90x90.png", + "en:2015-gold-medal-of-the-german-agricultural-society.90x90.png", + "en:2016-bronze-medal-of-the-german-agricultural-society.90x90.png", + "en:2017-bronze-medal-of-the-german-agricultural-society.90x90.png", + "en:2017-gold-medal-of-the-german-agricultural-society.90x90.png", + "en:2017-silver-medal-of-the-german-agricultural-society.90x90.png", + "en:2018-bronze-medal-of-the-german-agricultural-society.90x90.png", + "en:2018-gold-medal-of-the-german-agricultural-society.90x90.png", + "en:2018-silver-medal-of-the-german-agricultural-society.90x90.png", + "en:2019-gold-medal-of-the-german-agricultural-society.90x90.png", + "en:2019-silver-medal-of-the-german-agricultural-society.90x90.png", + "en:2020-silver-medal-of-the-german-agricultural-society.90x90.png", + ], + }, + // Switzerland + { + tag: "switzerland", + title: "🇨🇭 Switzerland", + logos: [ + "en:suisse-garantie", + "en:terrasuisse", + ], + }, // Beers and Wines { tag: "beers-and-wines", - title: "Beers and Wines", + title: "🍺 Beers and Wines", logos: [ "en:world-beer-cup", "en:belgian-hops", "en:belgian-family-brewers", "en:certified-belgian-abbey-beer", + "en:not-advised-for-pregnant-women", ], }, // Climate claims diff --git a/src/pages/settings/index.jsx b/src/pages/settings/index.jsx index 3a4e3736d1..0da58eabba 100644 --- a/src/pages/settings/index.jsx +++ b/src/pages/settings/index.jsx @@ -85,11 +85,6 @@ export default function Settings() { {devMode && [ { pageUrl: "logos", pageName: "logos", isExperimental: false }, - { - pageUrl: "dashboard", - pageName: "dashboard", - isExperimental: false, - }, { pageUrl: "insights", pageName: "insights", diff --git a/yarn.lock b/yarn.lock index ce2a3a1fdd..8a54cf670d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -969,10 +969,10 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.7.1": - version: 1.7.1 - resolution: "@remix-run/router@npm:1.7.1" - checksum: d13ad7e0b3b35379f8fdec1eec4f515325b618e431915e12fb9f1cd812ee959add0e7045edcb229ba17888ecfc787869b64e6cb4153ae3be148887e234b6ffac +"@remix-run/router@npm:1.11.0": + version: 1.11.0 + resolution: "@remix-run/router@npm:1.11.0" + checksum: 1966436ab3ab982862195e4871790644ce21e01511aa3f4350436296224e4dec2e6ee35f1f4cb83db69f7aa0e8ad4a0a01928b05359ae654edc8e2aa82bf754b languageName: node linkType: hard @@ -2044,7 +2044,7 @@ __metadata: "@vitejs/plugin-react": ^4.0.4 axios: ^0.27.2 husky: ^8.0.2 - i18next: ^22.4.9 + i18next: ^23.6.0 lodash.isequal: ^4.5.0 prettier: ^2.8.8 pretty-quick: ^3.1.3 @@ -2052,7 +2052,7 @@ __metadata: react-dom: ^18.2.0 react-i18next: ^12.3.1 react-redux: ^8.0.5 - react-router-dom: ^6.4.1 + react-router-dom: ^6.18.0 react-zoom-pan-pinch: ^2.5.0 reactour: ^1.19.0 redux: ^4.2.0 @@ -2072,12 +2072,12 @@ __metadata: languageName: node linkType: hard -"i18next@npm:^22.4.9": - version: 22.5.1 - resolution: "i18next@npm:22.5.1" +"i18next@npm:^23.6.0": + version: 23.6.0 + resolution: "i18next@npm:23.6.0" dependencies: - "@babel/runtime": ^7.20.6 - checksum: 175f8ab7fac2abcee147b00cc2d8e7d4fa9b05cdc227f02cac841fc2fd9545ed4a6d88774f594f8ad12dc944e4d34cc8e88aa00c8b9947baef9e859d93abd305 + "@babel/runtime": ^7.22.5 + checksum: 0898be75ce56a5901eb9763c8cd941a23cfc24fbe7b32ba0479c08f58c40c1c88c95596430154a6250087ec76d150335144b2cb637ebaa443490b9af7b6e275e languageName: node linkType: hard @@ -2749,13 +2749,13 @@ __metadata: linkType: hard "postcss@npm:^8.4.26": - version: 8.4.27 - resolution: "postcss@npm:8.4.27" + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 1cdd0c298849df6cd65f7e646a3ba36870a37b65f55fd59d1a165539c263e9b4872a402bf4ed1ca1bc31f58b68b2835545e33ea1a23b161a1f8aa6d5ded81e78 + checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea languageName: node linkType: hard @@ -2938,27 +2938,27 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:^6.4.1": - version: 6.14.1 - resolution: "react-router-dom@npm:6.14.1" +"react-router-dom@npm:^6.18.0": + version: 6.18.0 + resolution: "react-router-dom@npm:6.18.0" dependencies: - "@remix-run/router": 1.7.1 - react-router: 6.14.1 + "@remix-run/router": 1.11.0 + react-router: 6.18.0 peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: 6ddda481edb2c614671bcaf24b0ca07ca00215f1d0350ede43a03ba24c3401a537dfe4a9f5e108a512c2703e4a8ce99a3301c15caf16012b67b248b1a055d69a + checksum: ca5c9a9f748f4ff9677d25762970fc59cb216568aad0ebc668b22398222a940f767680bc9a3e65a92e940d3fe05731eda8a4b352ccbf1054904b3b785a9f5e6f languageName: node linkType: hard -"react-router@npm:6.14.1": - version: 6.14.1 - resolution: "react-router@npm:6.14.1" +"react-router@npm:6.18.0": + version: 6.18.0 + resolution: "react-router@npm:6.18.0" dependencies: - "@remix-run/router": 1.7.1 + "@remix-run/router": 1.11.0 peerDependencies: react: ">=16.8" - checksum: 16f3d108e0f833bfee447192e3f40bd6731b8b11d42ca6925443ec8aeb157a889fe8ece67baf690f75f0d146d0a212656f9216fcc2df6fd3a2bd263108ed0abb + checksum: 03e9a23c5b75d8813720745e2952bb9e62ec310d238cde4f19e0ce73582701fa5e04cf609ff9ced978e9e6c531b5e333b9aee35371e6c4743afc2829e32e926a languageName: node linkType: hard