Skip to content

Commit

Permalink
ADST-477 (#350)
Browse files Browse the repository at this point in the history
* udpated localisation

* added 2 analytics
  • Loading branch information
aman-alfresco authored May 23, 2024
1 parent 2c05e3c commit 9d9aa89
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion capture/src/main/kotlin/com/alfresco/capture/CameraFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions capture/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">Für Medienaufnahmen müssen die Berechtigungen zur Nutzung von Kamera und Mikrofon erteilt werden.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Die ausgewählte Dateigröße darf beim Hochladen 100 MB nicht überschreiten.</string>
<string name="error_file_size_exceed_10mb">Maximale Dateigröße für Uploads: %d MB.</string>
<string name="error_file_size_exceed">Maximale Dateigröße für Uploads: %d MB.</string>

</resources>
3 changes: 1 addition & 2 deletions capture/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">Para tomar fotos o grabar vídeos, active los permisos de Cámara y Micrófono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">El tamaño del fichero seleccionado no puede superar los 100 MB para cargarlo.</string>
<string name="error_file_size_exceed_10mb">El tamaño máximo de archivo de carga es de %d MB.</string>
<string name="error_file_size_exceed">El tamaño máximo de archivo de carga es de %d MB.</string>

</resources>
3 changes: 1 addition & 2 deletions capture/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">Pour capturer des médias, activez les autorisations de l\'appareil photo et du microphone.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">La taille du fichier sélectionné pour importation ne peut pas dépasser 100 Mo.</string>
<string name="error_file_size_exceed_10mb">La taille de fichier maximale pour les chargements est de %d Mo.</string>
<string name="error_file_size_exceed">La taille de fichier maximale pour les chargements est de %d Mo.</string>

</resources>
3 changes: 1 addition & 2 deletions capture/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">Per acquisire i contenuti multimediali, abilitare le autorizzazioni per la fotocamera e il microfono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Le dimensioni del file selezionato per il caricamento non possono superare 100 MB.</string>
<string name="error_file_size_exceed_10mb">Per gli upload la dimensione massima del file è %d MB.</string>
<string name="error_file_size_exceed">Per gli upload la dimensione massima del file è %d MB.</string>

</resources>
3 changes: 1 addition & 2 deletions capture/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">Om media vast te leggen, schakelt u camera- en microfoonrechten in.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Het geselecteerde bestand mag niet groter zijn dan 100 MB om te kunnen worden geüpload.</string>
<string name="error_file_size_exceed_10mb">Maximum bestandsformaat voor uploads is %d MB.</string>
<string name="error_file_size_exceed">Maximum bestandsformaat voor uploads is %d MB.</string>

</resources>
3 changes: 1 addition & 2 deletions capture/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="capture_failure_permissions">To capture media, turn on Camera and Microphone permissions.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">The selected file size cannot exceed 100MB to upload.</string>
<string name="error_file_size_exceed_10mb">The selected file size cannot exceed %d MB to upload.</string>
<string name="error_file_size_exceed">Maximum file size for uploads is %d MB.</string>

</resources>
2 changes: 1 addition & 1 deletion common/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="dialog_title_delete_content">Eine Datei löschen?</string>
<string name="dialog_negative_button_task">Abbrechen</string>
<string name="dialog_positive_button_task">Bestätigen</string>
<string name="text_complete">Abgeschlossen</string>
<string name="text_complete">Abschließen</string>
<string name="title_content_in_queue">Warnung</string>
<string name="message_content_in_queue">Das Hochladen von Dateien ist in Bearbeitung. Tippen Sie auf Bestätigen, um ohne laufende Dateien fortzufahren.</string>
<string name="no_attached_files">Keine angehängten Dateien</string>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="dialog_title_delete_content">¿Eliminar un fichero?</string>
<string name="dialog_negative_button_task">Cancelar</string>
<string name="dialog_positive_button_task">Confirmar</string>
<string name="text_complete">Por completar</string>
<string name="text_complete">Completar</string>
<string name="title_content_in_queue">Advertencia</string>
<string name="message_content_in_queue">La carga de ficheros está en curso. Toque Confirmar para continuar sin los ficheros en curso.</string>
<string name="no_attached_files">No hay ficheros adjuntos</string>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="dialog_title_delete_content">Supprimer un fichier ?</string>
<string name="dialog_negative_button_task">Annuler</string>
<string name="dialog_positive_button_task">Confirmer</string>
<string name="text_complete">Terminé</string>
<string name="text_complete">Complet</string>
<string name="title_content_in_queue">Avertissement</string>
<string name="message_content_in_queue">Le téléchargement des fichiers est en cours. Tapez sur Confirmer pour continuer sans fichiers en cours.</string>
<string name="no_attached_files">Aucun fichier joint</string>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="dialog_title_delete_content">Eliminare un file?</string>
<string name="dialog_negative_button_task">Annulla</string>
<string name="dialog_positive_button_task">Conferma</string>
<string name="text_complete">Completato</string>
<string name="text_complete">Completo</string>
<string name="title_content_in_queue">Avviso</string>
<string name="message_content_in_queue">Il caricamento dei file è in corso. Toccare su Conferma per continuare senza questi file.</string>
<string name="no_attached_files">Nessun file allegato</string>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<string name="dialog_title_delete_content">Bestand verwijderen?</string>
<string name="dialog_negative_button_task">Annuleren</string>
<string name="dialog_positive_button_task">Bevestigen</string>
<string name="text_complete">Voltooien</string>
<string name="text_complete">Compleet</string>
<string name="title_content_in_queue">Waarschuwing</string>
<string name="message_content_in_queue">Er worden bestanden geüpload. Tik om te bevestigen dat u wilt doorgaan zonder de bestanden in uitvoering.</string>
<string name="no_attached_files">Geen bijgevoegde bestanden</string>
Expand Down
3 changes: 2 additions & 1 deletion common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<string name="dialog_title_delete_content">Delete a file?</string>
<string name="dialog_negative_button_task">Cancel</string>
<string name="dialog_positive_button_task">Confirm</string>
<string name="text_complete">Complete</string><string name="title_content_in_queue">Warning</string>
<string name="text_complete">Complete</string>
<string name="title_content_in_queue">Warning</string>
<string name="message_content_in_queue">Files uploading is in progress. Tap on Confirm to continue without in-progress files.</string>
<string name="no_attached_files">No Attached Files</string>
<string name="title_no_name">No Name</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion process-app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="error_required_field">Dies ist ein Pflichtfeld.</string>
<string name="title_actions">Aktionen</string>
<string name="accessibility_process_actions">Schaltfläche „Aktionen verarbeiten“</string>
<string name="no_attachments">Keine Anhänge</string>
<string name="no_attachments">Keine angehängten Dateien</string>
<string name="error_process_failure">Etwas ist schiefgelaufen. Kontaktieren Sie Ihren Administrator für Hilfe.</string>
<string name="no_attached_folder">Kein angehängter Ordner</string>
<string name="action_info">Information</string>
Expand Down
4 changes: 2 additions & 2 deletions process-app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<string name="accessibility_date_icon">Icono de fecha</string>
<string name="accessibility_link_icon">Icono de enlace</string>
<string name="error_min_value">No puede ser inferior a %1$d</string>
<string name="error_max_value">Ne peut pas être supérieur à %1$d</string>
<string name="error_max_value">No puede ser superior a %1$d</string>
<string name="error_invalid_format">Utilice un formato de número diferente</string>
<string name="error_required_field">Este campo es obligatorio.</string>
<string name="title_actions">Acciones</string>
<string name="accessibility_process_actions">Botón de acciones de procesos</string>
<string name="no_attachments">Sin adjuntos</string>
<string name="no_attachments">No hay ficheros adjuntos</string>
<string name="error_process_failure">Ha surgido un error. Contacte a su administrador para obtener ayuda.</string>
<string name="no_attached_folder">No hay ninguna carpeta adjunta</string>
<string name="action_info">Información</string>
Expand Down
2 changes: 1 addition & 1 deletion process-app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="error_required_field">Ceci est un champ obligatoire.</string>
<string name="title_actions">Actions</string>
<string name="accessibility_process_actions">Bouton d\'actions de traitement</string>
<string name="no_attachments">Aucune pièce jointe</string>
<string name="no_attachments">Aucun fichier joint</string>
<string name="error_process_failure">Un problème est survenu. Pour obtenir de l\'aide, contactez votre administrateur Alfresco.</string>
<string name="no_attached_folder">Aucun dossier joint</string>
<string name="action_info">Information</string>
Expand Down
2 changes: 1 addition & 1 deletion process-app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="error_required_field">Questo è un campo obbligatorio.</string>
<string name="title_actions">Azioni</string>
<string name="accessibility_process_actions">Pulsante Elabora azioni</string>
<string name="no_attachments">Nessun allegato</string>
<string name="no_attachments">Nessun file allegato</string>
<string name="error_process_failure">Si è verificato un problema. Per assistenza, contatta il tuo amministratore.</string>
<string name="no_attached_folder">Cartella non allegata</string>
<string name="action_info">Informazione</string>
Expand Down
2 changes: 1 addition & 1 deletion process-app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="error_required_field">Dit is een verplicht veld.</string>
<string name="title_actions">Acties</string>
<string name="accessibility_process_actions">Knop Procesacties</string>
<string name="no_attachments">Geen bijlagen</string>
<string name="no_attachments">Geen bijgevoegde bestanden</string>
<string name="error_process_failure">Er is iets fout gegaan. Neem contact op met uw beheerder voor hulp.</string>
<string name="no_attached_folder">Geen map bijgevoegd</string>
<string name="action_info">Informatie</string>
Expand Down
4 changes: 2 additions & 2 deletions process-app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<string name="error_required_field">This is a required field.</string>
<string name="title_actions">Actions</string>
<string name="accessibility_process_actions">Process Actions Button</string>
<string name="no_attachments">No attachment(s)</string>
<string name="no_attachments">No Attached Files</string>
<string name="error_process_failure">Something went wrong. Contact your administrator for help.</string>
<string name="no_attached_folder">No Attached Folder</string>
<string name="action_info">Information</string>
<string name="file_empty_message">Looks like you haven’t\nadded any files yet\n(Max file size: %d MB).</string>
<string name="error_hyperlink_invalid_url">%1$s has invalid URL</string>
<string name="error_no_upload_fields">Unable to attach the selected content in this form.</string>
<string name="process_max_file_size">Please note: Maximum file size for uploads is %d MB.</string>
<string name="process_max_file_size">Maximum file size for uploads is %d MB.</string>
</resources>

0 comments on commit 9d9aa89

Please sign in to comment.