Skip to content

Commit

Permalink
Merge branch 'master' into small-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Nov 4, 2023
2 parents 94f7110 + 197c025 commit b4903a8
Show file tree
Hide file tree
Showing 30 changed files with 517 additions and 385 deletions.
32 changes: 30 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,40 @@ 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:
interval: "monthly"
commit-message:
prefix: "chore"
include: "scope"
open-pull-requests-limit: 300
open-pull-requests-limit: 20
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/components/LogoForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ 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;
};

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 = "";
}
Expand Down Expand Up @@ -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({
Expand Down
1 change: 0 additions & 1 deletion src/components/LogoSearchForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const LogoSearchForm = (props) => {
return (
<Stack direction="column" spacing={{ xs: 1, sm: 2, md: 4 }} {...other}>
<Stack direction={{ xs: "column", sm: "row" }} spacing={1} wrap="wrap">
<p>{innerType}</p>
<TextField
fullWidth
value={innerType}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResponsiveAppBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const pages = [
},
{ translationKey: "menu.manage" },
{ url: "insights", translationKey: "menu.insights", devModeOnly: true },
{ url: "dashboard", translationKey: "menu.dashboard", devModeOnly: true },
{ url: "dashboard", translationKey: "menu.dashboard" },
// { url: "nutriscore", translationKey: "menu.nutriscore", devModeOnly: true },
{ url: "settings", translationKey: "menu.settings", mobileOnly: true },
];
Expand Down
24 changes: 12 additions & 12 deletions src/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"country": "الدولة",
"brand": "3alama-tijariya",
"popularity": "شعبية",
"campaign": "camp"
"campaign": "مخيم"
},
"long_label": {
"type": "نوع السؤال",
Expand All @@ -99,27 +99,27 @@
"placeholders": {
"value": "القيمة (فانتا، إن:عضوية،...)",
"brand": "أوشان، دانون، هيرتا، ...",
"campaign": "Annotation campaigns"
"campaign": "حملات التعليقات التوضيحية"
},
"actions": {
"edit": "تعديل الفلاتر",
"cancel": "إلغاء",
"apply": "طبق"
}
},
"other_questions": "Other questions",
"send": "Send",
"flag": "Something wrong? Report/flag the image!",
"unflag": "Unflag the image",
"reset_filters": "Reset filters",
"other_questions": "أسئلة أخرى",
"send": "إرسال",
"flag": "هل هناك خطب ما ؟ التبليغ/ابلغ عن الصورة!",
"unflag": "قم بإلغاء التبليغ عن الصورة",
"reset_filters": "إعادة تعيين الفلاتر",
"log_in": "اسم المستخدم",
"sign_up": "تسجيل الدخول",
"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",
"login_title": "اجعل تعليقاتك تصنع الفارق",
"login_description": "أنت تسجل الدخول حاليًا إلى Open Food Facts. للحصول على الإجابات المطبقة مباشرة على المنتجات والمرتبطة بحسابك، فكر في تسجيل دخولك على Open Food Facts، أو إنشاء حساب",
"please_wait_while_we_fetch_the_question": "يُرجى الانتظار ريثما يتم البحث عن السؤال!"
},
"menu": {
"title": "Hunger Games",
"title": "ألعاب الجوع",
"games": "نبتبنرترمر",
"questions": "أسئلة",
"logos": "شعارات",
Expand Down Expand Up @@ -200,8 +200,8 @@
"load_more": "Load more",
"no_results": "لا يوجد شعار",
"result_count": "Shows {{showing}} on {{available}} available",
"flag": "Something wrong? Report/flag the image!",
"unflag": "Unflag the image",
"flag": "هل هناك خطب ما ؟ التبليغ/ابلغ عن الصورة!",
"unflag": "قم بإلغاء التبليغ عن الصورة",
"crop_image_title": "crop of the logo",
"no_more_questions": "No more questions about this logo. You can try to find more logos with the following game.",
"loading_messages": {
Expand Down
16 changes: 8 additions & 8 deletions src/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "Digues-nos si la imatge donada respon les preguntes"
},
"logos": {
"title": "Logos",
"title": "Logotips",
"description": "Trobeu totes les imatges que encaixin amb el logo donat"
},
"eco_score": {
Expand Down Expand Up @@ -109,7 +109,7 @@
},
"other_questions": "Altres preguntes",
"send": "Envia",
"flag": "Qualsevol problema? digues quin",
"flag": "Hi ha cap problema? Denuncia/marca la imatge!",
"unflag": "Desmarqueu la imatge",
"reset_filters": "Restableix filtres",
"log_in": "Nom d'usuari",
Expand All @@ -122,7 +122,7 @@
"title": "Jocs de la fam",
"games": "Jocs",
"questions": "Preguntes",
"logos": "Logos",
"logos": "Logotips",
"logos-annotation": "Anotació de logotips",
"logos-search": "Cerca de logotips",
"logos-product-search": "Anotació per productes",
Expand Down Expand Up @@ -163,8 +163,8 @@
"created_at": "Creat a",
"completed_at": "Completat a",
"automatic": "Automàtic",
"human_required": "fa falta un humá\nes necessita un humá ",
"edit_product": "Oberta l'edició del producte",
"human_required": "Fa falta un humà",
"edit_product": "Obra l'edició del producte",
"view_product": "Obre la pàgina del producte"
},
"logos": {
Expand All @@ -184,7 +184,7 @@
"qr_code": "Codi QR",
"category": "Categoria",
"nutrition_label": "Etiqueta nutricional",
"no_logo": "no si es logotip",
"no_logo": "No és un logotip",
"store": "Botiga",
"detail": "Detall del logotip",
"id": "Identificador del logotip:",
Expand All @@ -199,8 +199,8 @@
"search_specific": "Cerca un logotip específic",
"load_more": "Carrega mes ",
"no_results": "No s'ha trobat cap logotip",
"result_count": "mirar dentro de lo posible (esp)\nmirar dintre del posible o viable",
"flag": "Qualsevol problema? digues quin",
"result_count": "Mostra {{showing}} en {{available}} disponibles",
"flag": "Hi ha cap problema? Denuncia/marca la imatge!",
"unflag": "Desmarqueu la imatge",
"crop_image_title": "retall del logotip",
"no_more_questions": "No hi ha més preguntes sobre aquest logotip. Podeu provar de trobar més logotips amb el següent joc.",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"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.",
"text1": "Hunger Games is a collection of mini-games that help contribute to Open Food Facts in many ways. You can play our really exciting games from anywhere. Here is a guided tour of the entire website which will get you started.",
"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"
},
Expand Down
44 changes: 22 additions & 22 deletions src/i18n/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"description": "Tell us if the given image answers the questions"
},
"logos": {
"title": "Logos",
"description": "Find all the logos matching the given logo"
"title": "Mga logo",
"description": "Hanapin ang lahat ng logo na tumutugma sa ibinigay na logo"
},
"eco_score": {
"title": "Eco-score",
Expand All @@ -25,29 +25,29 @@
},
"saved_filters": "Saved Filters",
"contribution_modal": {
"title": "Your contribution matters",
"title": "Mahalaga ang iyong kontribusyon",
"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."
},
"statistics": {
"title": "{{userName}} statistics:",
"title": "Estadistika ng {{userName}}:",
"editorCount": {
"title": "Editor",
"description": "Number of editions done"
},
"contributorCount": {
"title": "Taga-ambag",
"description": "Adding a new product"
"description": "Pagdaragdag ng bagong produkto"
},
"photographerCount": {
"title": "Photographer",
"title": "Naglalawaran",
"description": "Taking photos for a product"
}
}
},
"flagged_images": {
"title": "Images flagged by users",
"loading": "Loading"
"loading": "Naglo-load"
},
"questions": {
"category": "kategorya",
Expand All @@ -60,17 +60,17 @@
"quantity": "Dami",
"insightTypeLabel": "Only shows",
"ingredients": "Mga sangkap",
"product_weight": "product weight",
"product_weight": "timbang ng produkto",
"popularity_sort": "Sort by popularity",
"see_examples": "See examples of this ",
"see_examples": "Tingnan ang mga halimbawa ng ",
"no": "Hindi",
"skip": "Skip",
"skip": "Laktawan",
"yes": "Oo",
"no_questions_remaining": "No questions remaining",
"countries": "Countries",
"view": "View",
"no_questions_remaining": "Walang natitirang mga katanungan",
"countries": "Mga bansa",
"view": "Tingnan",
"edit": "Pamatnugutan",
"hide_images": "Hide images (faster loading)",
"hide_images": "Itago ang mga larawan (mas mabilis na pag-load)",
"display_images": "Display images",
"annotations": "Annotations",
"last_annotations": "Last annotations",
Expand Down Expand Up @@ -103,28 +103,28 @@
},
"actions": {
"edit": "Edit Filters",
"cancel": "Cancel",
"apply": "Apply"
"cancel": "Kanselahin",
"apply": "I-aplay"
}
},
"other_questions": "Other questions",
"send": "Send",
"other_questions": "Iba pang tanong",
"send": "Ipadala",
"flag": "Something wrong? Report/flag the image!",
"unflag": "Unflag the image",
"reset_filters": "Reset filters",
"log_in": "Username",
"sign_up": "Mag Sign-up",
"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!"
"please_wait_while_we_fetch_the_question": "Maghintay po habang kinukuha namin ang tanong!"
},
"menu": {
"title": "Hunger Games",
"games": "Games",
"questions": "Questions",
"logos": "Logos",
"logos-annotation": "Logos annotation",
"logos-search": "Logos search",
"logos": "Mga logo",
"logos-annotation": "Anotasyon ng mga logo",
"logos-search": "Paghahanap ng mga logo",
"logos-product-search": "Annotation per products",
"logos-deep-search": "Infinite annotation",
"manage": "Manage",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/ky.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"nutrition_label": "Азык-түлүк этикеткасы",
"no_logo": "Not a logo",
"store": "Дүкөн",
"detail": "Логотиптин маалыматы",
"detail": "Tercihlerinizle eşleştirme\n\nNutri-Score E\nÇok kötü beslenme kalitesi",
"id": "Лого ID:",
"barcode": "Штрих-код:",
"full_image": "Толук сүрөт",
Expand Down
Loading

0 comments on commit b4903a8

Please sign in to comment.