Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelAdell committed Sep 18, 2024
2 parents 4e6667f + 541b74c commit 0e26198
Show file tree
Hide file tree
Showing 20 changed files with 535 additions and 262 deletions.
19 changes: 14 additions & 5 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-25T17:49:07.727Z\n"
"PO-Revision-Date: 2024-06-25T17:49:07.727Z\n"
"POT-Creation-Date: 2024-09-12T09:58:13.550Z\n"
"PO-Revision-Date: 2024-09-12T09:58:13.550Z\n"

msgid "Data values - Create/update"
msgid "Events - Create/update"
msgstr ""

msgid "Event"
msgstr ""

msgid "Import was successful"
msgstr ""

msgid "Import failed"
msgstr ""

msgid "Create/update"
msgstr ""

Expand All @@ -29,6 +35,9 @@ msgstr ""
msgid "Data values - Delete"
msgstr ""

msgid "Data values - Create/update"
msgstr ""

msgid "Failed to import data values"
msgstr ""

Expand Down Expand Up @@ -713,10 +722,10 @@ msgstr ""
msgid "Template"
msgstr ""

msgid "Select template to export..."
msgid "Data Model"
msgstr ""

msgid "Data Model"
msgid "Select template to export..."
msgstr ""

msgid "Start period"
Expand Down
20 changes: 15 additions & 5 deletions i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
msgid ""
msgstr ""
"Project-Id-Version: Bulk Load\n"
"POT-Creation-Date: 2024-06-25T17:49:07.727Z\n"
"POT-Creation-Date: 2024-09-12T09:58:13.550Z\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: POEditor.com\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Data values - Create/update"
msgid "Events - Create/update"
msgstr "Valores de los datos - Crear/actualizar"

msgid "Event"
msgstr "Evento"

msgid "Import was successful"
msgstr ""

#, fuzzy
msgid "Import failed"
msgstr "Importados"

msgid "Create/update"
msgstr "Crear/actualizar"

Expand All @@ -31,6 +38,9 @@ msgstr "La plantilla {{id}} no se pudo cargar"
msgid "Data values - Delete"
msgstr "Valores de los datos - Borrar"

msgid "Data values - Create/update"
msgstr "Valores de los datos - Crear/actualizar"

msgid "Failed to import data values"
msgstr ""

Expand Down Expand Up @@ -745,12 +755,12 @@ msgstr "Respuesta JSON"
msgid "Template"
msgstr "Plantilla"

msgid "Select template to export..."
msgstr "Seleccione plantilla para exportar..."

msgid "Data Model"
msgstr "Modelo de Datos"

msgid "Select template to export..."
msgstr "Seleccione plantilla para exportar..."

msgid "Start period"
msgstr "Periodo inicial"

Expand Down
22 changes: 16 additions & 6 deletions i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
msgid ""
msgstr ""
"Project-Id-Version: Bulk Load App\n"
"POT-Creation-Date: 2024-06-25T17:49:07.727Z\n"
"POT-Creation-Date: 2024-09-12T09:58:13.550Z\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: POEditor.com\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

msgid "Data values - Create/update"
msgstr ""
msgid "Events - Create/update"
msgstr "Créer/mettre à jour"

msgid "Event"
msgstr ""

msgid "Import was successful"
msgstr ""

#, fuzzy
msgid "Import failed"
msgstr "Importé"

msgid "Create/update"
msgstr "Créer/mettre à jour"

Expand All @@ -31,6 +38,9 @@ msgstr "Modèle {{id}} non téléchargé"
msgid "Data values - Delete"
msgstr ""

msgid "Data values - Create/update"
msgstr ""

msgid "Failed to import data values"
msgstr ""

Expand Down Expand Up @@ -765,12 +775,12 @@ msgstr ""
msgid "Template"
msgstr "Modèle"

msgid "Select template to export..."
msgstr "Sélectionnez le modèle à exporter ..."

msgid "Data Model"
msgstr "Modèle de données"

msgid "Select template to export..."
msgstr "Sélectionnez le modèle à exporter ..."

msgid "Start period"
msgstr "Période de début"

Expand Down
20 changes: 15 additions & 5 deletions i18n/pt.po
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
msgid ""
msgstr ""
"Project-Id-Version: Bulk Load\n"
"POT-Creation-Date: 2024-06-25T17:49:07.727Z\n"
"POT-Creation-Date: 2024-09-12T09:58:13.550Z\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: POEditor.com\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Data values - Create/update"
msgid "Events - Create/update"
msgstr "Valores dos dados - Criar/actualizar"

msgid "Event"
msgstr "Evento"

msgid "Import was successful"
msgstr ""

#, fuzzy
msgid "Import failed"
msgstr "Importado"

msgid "Create/update"
msgstr "Crio/atualizar"

Expand All @@ -31,6 +38,9 @@ msgstr "Planilha {{id}} não carregada"
msgid "Data values - Delete"
msgstr "Valores de dados - Eliminar"

msgid "Data values - Create/update"
msgstr "Valores dos dados - Criar/actualizar"

msgid "Failed to import data values"
msgstr ""

Expand Down Expand Up @@ -800,12 +810,12 @@ msgstr "Resposta do JSON"
msgid "Template"
msgstr "Modelo"

msgid "Select template to export..."
msgstr "Selecione o planilha para exportar ..."

msgid "Data Model"
msgstr "Modelo de dados"

msgid "Select template to export..."
msgstr "Selecione o planilha para exportar ..."

msgid "Start period"
msgstr "Período inicial"

Expand Down
20 changes: 15 additions & 5 deletions i18n/ru.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Bulk Load\n"
"POT-Creation-Date: 2024-06-25T17:49:07.727Z\n"
"POT-Creation-Date: 2024-09-12T09:58:13.550Z\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand All @@ -10,12 +10,19 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

msgid "Data values - Create/update"
msgid "Events - Create/update"
msgstr "Значения данных - создание/обновление"

msgid "Event"
msgstr "Событие"

msgid "Import was successful"
msgstr ""

#, fuzzy
msgid "Import failed"
msgstr "Импортировано"

msgid "Create/update"
msgstr "Создание/обновление"

Expand All @@ -32,6 +39,9 @@ msgstr "Шаблон {{id}} не загружен"
msgid "Data values - Delete"
msgstr "Значения данных - Удалить"

msgid "Data values - Create/update"
msgstr "Значения данных - создание/обновление"

msgid "Failed to import data values"
msgstr ""

Expand Down Expand Up @@ -802,12 +812,12 @@ msgstr "Ответ JSON"
msgid "Template"
msgstr "Шаблон"

msgid "Select template to export..."
msgstr "Выберите шаблон для экспорта..."

msgid "Data Model"
msgstr "Модель данных"

msgid "Select template to export..."
msgstr "Выберите шаблон для экспорта..."

msgid "Start period"
msgstr "Начальный период"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bulk-load",
"description": "Bulk importing made easy",
"version": "3.23.3",
"version": "3.24.0",
"license": "GPL-3.0",
"author": "EyeSeeTea team",
"homepage": ".",
Expand Down
17 changes: 11 additions & 6 deletions src/data/Dhis2Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ import _ from "lodash";
import { D2Api } from "../types/d2-api";
import { Event } from "../domain/entities/DhisDataPackage";
import { SynchronizationResult } from "../domain/entities/SynchronizationResult";
import { ImportPostResponse, postImport } from "./Dhis2Import";
import i18n from "../locales";
import { promiseMap } from "../utils/promises";
import { ImportPostResponse, postImport } from "./Dhis2Import";

export async function postEvents(api: D2Api, events: Event[]): Promise<SynchronizationResult[]> {
const eventsResult = await promiseMap(_.chunk(events, 200), eventsToSave => {
return postImport(() => api.post<ImportPostResponse>("/events", {}, { events: eventsToSave }).getData(), {
title: i18n.t("Data values - Create/update"),
model: i18n.t("Event"),
splitStatsList: true,
});
return postImport(
api,
async () => await api.post<ImportPostResponse>("/tracker", {}, { events: eventsToSave }).getData(),
{
title: i18n.t("Events - Create/update"),
model: i18n.t("Event"),
splitStatsList: true,
}
);
});

return eventsResult;
}
Loading

0 comments on commit 0e26198

Please sign in to comment.