From 9d9aa8915b481a3a32792ff22fbb84abd75ffc45 Mon Sep 17 00:00:00 2001
From: Amanpal Singh <87360222+aman-alfresco@users.noreply.github.com>
Date: Thu, 23 May 2024 20:10:13 +0530
Subject: [PATCH] ADST-477 (#350)
* udpated localisation
* added 2 analytics
---
.../kotlin/com/alfresco/content/actions/Action.kt | 7 ++++---
.../kotlin/com/alfresco/capture/CameraFragment.kt | 10 +++++++++-
capture/src/main/res/values-de/strings.xml | 3 +--
capture/src/main/res/values-es/strings.xml | 3 +--
capture/src/main/res/values-fr/strings.xml | 3 +--
capture/src/main/res/values-it/strings.xml | 3 +--
capture/src/main/res/values-nl/strings.xml | 3 +--
capture/src/main/res/values/strings.xml | 3 +--
common/src/main/res/values-de/strings.xml | 2 +-
common/src/main/res/values-es/strings.xml | 2 +-
common/src/main/res/values-fr/strings.xml | 2 +-
common/src/main/res/values-it/strings.xml | 2 +-
common/src/main/res/values-nl/strings.xml | 2 +-
common/src/main/res/values/strings.xml | 3 ++-
.../com/alfresco/content/data/AnalyticsRepository.kt | 2 ++
.../content/process/ui/fragments/ProcessFragment.kt | 11 ++++++-----
process-app/src/main/res/values-de/strings.xml | 2 +-
process-app/src/main/res/values-es/strings.xml | 4 ++--
process-app/src/main/res/values-fr/strings.xml | 2 +-
process-app/src/main/res/values-it/strings.xml | 2 +-
process-app/src/main/res/values-nl/strings.xml | 2 +-
process-app/src/main/res/values/strings.xml | 4 ++--
22 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/actions/src/main/kotlin/com/alfresco/content/actions/Action.kt b/actions/src/main/kotlin/com/alfresco/content/actions/Action.kt
index d662c194..d8d295de 100644
--- a/actions/src/main/kotlin/com/alfresco/content/actions/Action.kt
+++ b/actions/src/main/kotlin/com/alfresco/content/actions/Action.kt
@@ -6,6 +6,7 @@ import android.view.View
import androidx.annotation.StringRes
import com.alfresco.Logger
import com.alfresco.content.GetMultipleContents.Companion.MAX_FILE_SIZE_10
+import com.alfresco.content.GetMultipleContents.Companion.MAX_FILE_SIZE_100
import com.alfresco.content.data.APIEvent
import com.alfresco.content.data.AnalyticsManager
import com.alfresco.content.data.Entry
@@ -54,12 +55,12 @@ interface Action {
when {
entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_TASK &&
ex.message == ERROR_FILE_SIZE_EXCEED -> {
- bus.send(Error(context.getString(R.string.error_file_size_exceed)))
+ bus.send(Error(context.getString(R.string.error_file_size_exceed, MAX_FILE_SIZE_100)))
}
entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_PROCESS &&
ex.message == ERROR_FILE_SIZE_EXCEED -> {
- bus.send(Error(context.getString(R.string.error_file_size_exceed_10mb, MAX_FILE_SIZE_10)))
+ bus.send(Error(context.getString(R.string.error_file_size_exceed, MAX_FILE_SIZE_10)))
}
}
} catch (ex: Exception) {
@@ -98,7 +99,7 @@ interface Action {
if (entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_TASK &&
ex.message == ERROR_FILE_SIZE_EXCEED
) {
- bus.send(Error(context.getString(R.string.error_file_size_exceed)))
+ bus.send(Error(context.getString(R.string.error_file_size_exceed, MAX_FILE_SIZE_100)))
}
} catch (ex: Exception) {
sendAnalytics(false)
diff --git a/capture/src/main/kotlin/com/alfresco/capture/CameraFragment.kt b/capture/src/main/kotlin/com/alfresco/capture/CameraFragment.kt
index 58ed79a8..118e2d0a 100644
--- a/capture/src/main/kotlin/com/alfresco/capture/CameraFragment.kt
+++ b/capture/src/main/kotlin/com/alfresco/capture/CameraFragment.kt
@@ -375,7 +375,15 @@ class CameraFragment : Fragment(), KeyHandler, MavericksView {
navigateToSave()
} else {
file.delete()
- Snackbar.make(layout.captureDurationView, getString(R.string.error_file_size_exceed), Snackbar.LENGTH_SHORT).show()
+ Snackbar.make(
+ layout.captureDurationView,
+ if (viewModel.isProcessUpload) {
+ getString(R.string.error_file_size_exceed, GetMultipleContents.MAX_FILE_SIZE_10)
+ } else {
+ getString(R.string.error_file_size_exceed, GetMultipleContents.MAX_FILE_SIZE_100)
+ },
+ Snackbar.LENGTH_SHORT,
+ ).show()
}
}
}
diff --git a/capture/src/main/res/values-de/strings.xml b/capture/src/main/res/values-de/strings.xml
index a583201f..33ce1124 100644
--- a/capture/src/main/res/values-de/strings.xml
+++ b/capture/src/main/res/values-de/strings.xml
@@ -27,7 +27,6 @@
Für Medienaufnahmen müssen die Berechtigungen zur Nutzung von Kamera und Mikrofon erteilt werden.
%02d:%02d:%02d
%02d:%02d
- Die ausgewählte Dateigröße darf beim Hochladen 100 MB nicht überschreiten.
- Maximale Dateigröße für Uploads: %d MB.
+ Maximale Dateigröße für Uploads: %d MB.
diff --git a/capture/src/main/res/values-es/strings.xml b/capture/src/main/res/values-es/strings.xml
index 86dcb9d6..abcd4d4d 100644
--- a/capture/src/main/res/values-es/strings.xml
+++ b/capture/src/main/res/values-es/strings.xml
@@ -27,7 +27,6 @@
Para tomar fotos o grabar vídeos, active los permisos de Cámara y Micrófono.
%02d:%02d:%02d
%02d:%02d
- El tamaño del fichero seleccionado no puede superar los 100 MB para cargarlo.
- El tamaño máximo de archivo de carga es de %d MB.
+ El tamaño máximo de archivo de carga es de %d MB.
diff --git a/capture/src/main/res/values-fr/strings.xml b/capture/src/main/res/values-fr/strings.xml
index 23459a11..691b31d5 100644
--- a/capture/src/main/res/values-fr/strings.xml
+++ b/capture/src/main/res/values-fr/strings.xml
@@ -27,7 +27,6 @@
Pour capturer des médias, activez les autorisations de l\'appareil photo et du microphone.
%02d:%02d:%02d
%02d:%02d
- La taille du fichier sélectionné pour importation ne peut pas dépasser 100 Mo.
- La taille de fichier maximale pour les chargements est de %d Mo.
+ La taille de fichier maximale pour les chargements est de %d Mo.
diff --git a/capture/src/main/res/values-it/strings.xml b/capture/src/main/res/values-it/strings.xml
index 9fd13114..5a955202 100644
--- a/capture/src/main/res/values-it/strings.xml
+++ b/capture/src/main/res/values-it/strings.xml
@@ -27,7 +27,6 @@
Per acquisire i contenuti multimediali, abilitare le autorizzazioni per la fotocamera e il microfono.
%02d:%02d:%02d
%02d:%02d
- Le dimensioni del file selezionato per il caricamento non possono superare 100 MB.
- Per gli upload la dimensione massima del file è %d MB.
+ Per gli upload la dimensione massima del file è %d MB.
diff --git a/capture/src/main/res/values-nl/strings.xml b/capture/src/main/res/values-nl/strings.xml
index 0ffb4f9e..4d2b727a 100644
--- a/capture/src/main/res/values-nl/strings.xml
+++ b/capture/src/main/res/values-nl/strings.xml
@@ -27,7 +27,6 @@
Om media vast te leggen, schakelt u camera- en microfoonrechten in.
%02d:%02d:%02d
%02d:%02d
- Het geselecteerde bestand mag niet groter zijn dan 100 MB om te kunnen worden geüpload.
- Maximum bestandsformaat voor uploads is %d MB.
+ Maximum bestandsformaat voor uploads is %d MB.
diff --git a/capture/src/main/res/values/strings.xml b/capture/src/main/res/values/strings.xml
index 7304edf4..47bc6505 100644
--- a/capture/src/main/res/values/strings.xml
+++ b/capture/src/main/res/values/strings.xml
@@ -27,7 +27,6 @@
To capture media, turn on Camera and Microphone permissions.
%02d:%02d:%02d
%02d:%02d
- The selected file size cannot exceed 100MB to upload.
- The selected file size cannot exceed %d MB to upload.
+ Maximum file size for uploads is %d MB.
diff --git a/common/src/main/res/values-de/strings.xml b/common/src/main/res/values-de/strings.xml
index 30991741..d5f8e504 100755
--- a/common/src/main/res/values-de/strings.xml
+++ b/common/src/main/res/values-de/strings.xml
@@ -39,7 +39,7 @@
Eine Datei löschen?
Abbrechen
Bestätigen
- Abgeschlossen
+ Abschließen
Warnung
Das Hochladen von Dateien ist in Bearbeitung. Tippen Sie auf Bestätigen, um ohne laufende Dateien fortzufahren.
Keine angehängten Dateien
diff --git a/common/src/main/res/values-es/strings.xml b/common/src/main/res/values-es/strings.xml
index fcd60a54..00c42b10 100755
--- a/common/src/main/res/values-es/strings.xml
+++ b/common/src/main/res/values-es/strings.xml
@@ -39,7 +39,7 @@
¿Eliminar un fichero?
Cancelar
Confirmar
- Por completar
+ Completar
Advertencia
La carga de ficheros está en curso. Toque Confirmar para continuar sin los ficheros en curso.
No hay ficheros adjuntos
diff --git a/common/src/main/res/values-fr/strings.xml b/common/src/main/res/values-fr/strings.xml
index 0f7be167..fb5581c1 100755
--- a/common/src/main/res/values-fr/strings.xml
+++ b/common/src/main/res/values-fr/strings.xml
@@ -39,7 +39,7 @@
Supprimer un fichier ?
Annuler
Confirmer
- Terminé
+ Complet
Avertissement
Le téléchargement des fichiers est en cours. Tapez sur Confirmer pour continuer sans fichiers en cours.
Aucun fichier joint
diff --git a/common/src/main/res/values-it/strings.xml b/common/src/main/res/values-it/strings.xml
index 411c0371..c7b85aab 100755
--- a/common/src/main/res/values-it/strings.xml
+++ b/common/src/main/res/values-it/strings.xml
@@ -39,7 +39,7 @@
Eliminare un file?
Annulla
Conferma
- Completato
+ Completo
Avviso
Il caricamento dei file è in corso. Toccare su Conferma per continuare senza questi file.
Nessun file allegato
diff --git a/common/src/main/res/values-nl/strings.xml b/common/src/main/res/values-nl/strings.xml
index 2e7755b1..d9f0ce8a 100755
--- a/common/src/main/res/values-nl/strings.xml
+++ b/common/src/main/res/values-nl/strings.xml
@@ -39,7 +39,7 @@
Bestand verwijderen?
Annuleren
Bevestigen
- Voltooien
+ Compleet
Waarschuwing
Er worden bestanden geüpload. Tik om te bevestigen dat u wilt doorgaan zonder de bestanden in uitvoering.
Geen bijgevoegde bestanden
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 04459084..5e559f2c 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -39,7 +39,8 @@
Delete a file?
Cancel
Confirm
- CompleteWarning
+ Complete
+ Warning
Files uploading is in progress. Tap on Confirm to continue without in-progress files.
No Attached Files
No Name
diff --git a/data/src/main/kotlin/com/alfresco/content/data/AnalyticsRepository.kt b/data/src/main/kotlin/com/alfresco/content/data/AnalyticsRepository.kt
index 3486e63a..b5ffd081 100644
--- a/data/src/main/kotlin/com/alfresco/content/data/AnalyticsRepository.kt
+++ b/data/src/main/kotlin/com/alfresco/content/data/AnalyticsRepository.kt
@@ -142,6 +142,8 @@ enum class PageView(val value: String) {
WorkflowView("page_view_workflow_view"),
WorkflowTaskView("page_view_workflow_task_view"),
WorkflowTaskStatusView("page_view_workflow_task_status"),
+ StartFormView("page_view_start_form"),
+ TaskFormView("page_view_task_form"),
None("none"),
}
diff --git a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessFragment.kt b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessFragment.kt
index 50cd74db..7d28c94b 100644
--- a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessFragment.kt
+++ b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessFragment.kt
@@ -24,8 +24,10 @@ import com.airbnb.mvrx.Success
import com.airbnb.mvrx.activityViewModel
import com.airbnb.mvrx.withState
import com.alfresco.content.common.EntryListener
+import com.alfresco.content.data.AnalyticsManager
import com.alfresco.content.data.Entry
import com.alfresco.content.data.OfflineRepository
+import com.alfresco.content.data.PageView
import com.alfresco.content.data.ParentEntry
import com.alfresco.content.data.payloads.FieldType
import com.alfresco.content.data.payloads.FieldsData
@@ -117,11 +119,10 @@ class ProcessFragment : Fragment(), MavericksView, EntryListener {
withState(viewModel) {
if (it.parent.processInstanceId != null) {
- if (it.parent.processInstanceId != null) {
- supportActionBar?.title = it.parent.taskEntry.name.ifEmpty { getString(R.string.title_no_name) }
- } else {
- supportActionBar?.title = getString(R.string.title_workflow)
- }
+ AnalyticsManager().screenViewEvent(PageView.TaskFormView)
+ supportActionBar?.title = it.parent.taskEntry.name.ifEmpty { getString(R.string.title_no_name) }
+ } else {
+ AnalyticsManager().screenViewEvent(PageView.StartFormView)
}
}
diff --git a/process-app/src/main/res/values-de/strings.xml b/process-app/src/main/res/values-de/strings.xml
index 27fbd08f..f94fd631 100644
--- a/process-app/src/main/res/values-de/strings.xml
+++ b/process-app/src/main/res/values-de/strings.xml
@@ -9,7 +9,7 @@
Dies ist ein Pflichtfeld.
Aktionen
Schaltfläche „Aktionen verarbeiten“
- Keine Anhänge
+ Keine angehängten Dateien
Etwas ist schiefgelaufen. Kontaktieren Sie Ihren Administrator für Hilfe.
Kein angehängter Ordner
Information
diff --git a/process-app/src/main/res/values-es/strings.xml b/process-app/src/main/res/values-es/strings.xml
index dad4ccfd..9531b624 100644
--- a/process-app/src/main/res/values-es/strings.xml
+++ b/process-app/src/main/res/values-es/strings.xml
@@ -4,12 +4,12 @@
Icono de fecha
Icono de enlace
No puede ser inferior a %1$d
- Ne peut pas être supérieur à %1$d
+ No puede ser superior a %1$d
Utilice un formato de número diferente
Este campo es obligatorio.
Acciones
Botón de acciones de procesos
- Sin adjuntos
+ No hay ficheros adjuntos
Ha surgido un error. Contacte a su administrador para obtener ayuda.
No hay ninguna carpeta adjunta
Información
diff --git a/process-app/src/main/res/values-fr/strings.xml b/process-app/src/main/res/values-fr/strings.xml
index c7e6d456..5d1300ac 100644
--- a/process-app/src/main/res/values-fr/strings.xml
+++ b/process-app/src/main/res/values-fr/strings.xml
@@ -9,7 +9,7 @@
Ceci est un champ obligatoire.
Actions
Bouton d\'actions de traitement
- Aucune pièce jointe
+ Aucun fichier joint
Un problème est survenu. Pour obtenir de l\'aide, contactez votre administrateur Alfresco.
Aucun dossier joint
Information
diff --git a/process-app/src/main/res/values-it/strings.xml b/process-app/src/main/res/values-it/strings.xml
index 5eaf7568..bd6b6e03 100644
--- a/process-app/src/main/res/values-it/strings.xml
+++ b/process-app/src/main/res/values-it/strings.xml
@@ -9,7 +9,7 @@
Questo è un campo obbligatorio.
Azioni
Pulsante Elabora azioni
- Nessun allegato
+ Nessun file allegato
Si è verificato un problema. Per assistenza, contatta il tuo amministratore.
Cartella non allegata
Informazione
diff --git a/process-app/src/main/res/values-nl/strings.xml b/process-app/src/main/res/values-nl/strings.xml
index 320b4c99..8e3b4aef 100644
--- a/process-app/src/main/res/values-nl/strings.xml
+++ b/process-app/src/main/res/values-nl/strings.xml
@@ -9,7 +9,7 @@
Dit is een verplicht veld.
Acties
Knop Procesacties
- Geen bijlagen
+ Geen bijgevoegde bestanden
Er is iets fout gegaan. Neem contact op met uw beheerder voor hulp.
Geen map bijgevoegd
Informatie
diff --git a/process-app/src/main/res/values/strings.xml b/process-app/src/main/res/values/strings.xml
index 18274c36..4264739b 100644
--- a/process-app/src/main/res/values/strings.xml
+++ b/process-app/src/main/res/values/strings.xml
@@ -9,12 +9,12 @@
This is a required field.
Actions
Process Actions Button
- No attachment(s)
+ No Attached Files
Something went wrong. Contact your administrator for help.
No Attached Folder
Information
Looks like you haven’t\nadded any files yet\n(Max file size: %d MB).
%1$s has invalid URL
Unable to attach the selected content in this form.
- Please note: Maximum file size for uploads is %d MB.
+ Maximum file size for uploads is %d MB.