Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT - UX Pending] [Upload status screen] Improve link, title, and status labels #2882

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@
private fun Mutation.SyncStatus.toLabel(): Int =
when (this) {
Mutation.SyncStatus.PENDING -> R.string.upload_pending
Mutation.SyncStatus.MEDIA_UPLOAD_IN_PROGRESS -> R.string.media_syncing
Mutation.SyncStatus.IN_PROGRESS -> R.string.syncing
Mutation.SyncStatus.COMPLETED -> R.string.synced
Mutation.SyncStatus.FAILED -> R.string.failed
Mutation.SyncStatus.MEDIA_UPLOAD_PENDING -> R.string.data_synced_media_pending
Mutation.SyncStatus.MEDIA_UPLOAD_AWAITING_RETRY -> R.string.data_synced_media_pending_retry
Mutation.SyncStatus.MEDIA_UPLOAD_IN_PROGRESS -> R.string.uploading_photos
Mutation.SyncStatus.IN_PROGRESS -> R.string.uploading
Mutation.SyncStatus.COMPLETED -> R.string.upload_complete
Mutation.SyncStatus.FAILED -> R.string.retry_pending
Mutation.SyncStatus.MEDIA_UPLOAD_PENDING -> R.string.photos_pending
Mutation.SyncStatus.MEDIA_UPLOAD_AWAITING_RETRY -> R.string.photos_pending_retry

Check warning on line 122 in ground/src/main/java/com/google/android/ground/ui/syncstatus/SyncListItem.kt

View check run for this annotation

Codecov / codecov/patch

ground/src/main/java/com/google/android/ground/ui/syncstatus/SyncListItem.kt#L117-L122

Added lines #L117 - L122 were not covered by tests
Mutation.SyncStatus.UNKNOWN -> error("Unexpected status")
}

Expand Down
2 changes: 1 addition & 1 deletion ground/src/main/res/layout/sync_status_frag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_arrow_back"
app:title="@string/data_sync_status" />
app:title="@string/upload_status" />

<androidx.compose.ui.platform.ComposeView
android:id="@+id/compose_view"
Expand Down
2 changes: 1 addition & 1 deletion ground/src/main/res/menu/nav_drawer_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<item
android:id="@+id/sync_status"
android:icon="@drawable/ic_history"
android:title="@string/sync_status" />
android:title="@string/upload_status" />
<item
android:id="@+id/nav_offline_areas"
android:icon="@drawable/cloud_off"
Expand Down
2 changes: 1 addition & 1 deletion ground/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<fragment
android:id="@+id/sync_status_fragment"
android:name="com.google.android.ground.ui.syncstatus.SyncStatusFragment"
android:label="@string/sync_status"
android:label="@string/upload_status"
tools:layout="@layout/sync_status_frag" />
<navigation
android:id="@+id/data_collection"
Expand Down
17 changes: 8 additions & 9 deletions ground/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<string name="date">Fecha</string>
<string name="time">Hora</string>
<!-- Other strings (to be organized) -->
<string name="sync_status">Estado de sincronización de datos</string>
<string name="upload_status">Estado de carga</string>

<string name="add_point">Añadir punto</string>
<string name="complete_polygon">Completar</string>
Expand Down Expand Up @@ -150,14 +150,13 @@
<string name="about">Acerca de</string>
<string name="terms_of_service">Términos de servicio</string>
<string name="about_ground">Ground es un proyecto de código abierto desarrollado por Google y la FAO bajo la Alianza de Datos Forestales (Forest Data Partnership), con la ayuda de SIG, Ecam y otros contribuyentes de la comunidad de código abierto. \n\nEstá licenciado bajo la <annotation type="apache_license">Apache License, Version 2.0</annotation>. \n\nVer otras <annotation type="all_licenses">licencias</annotation></string>
<string name="failed">Error</string>
<string name="synced">Sincronizado</string>
<string name="syncing">Sincronizando</string>
<string name="upload_pending">Carga pendiente</string>
<string name="data_synced_media_pending">Datos sincronizados\n(multimedia pendiente)</string>
<string name="data_synced_media_pending_retry">Datos sincronizados\n(reintentar multimedia pendiente)</string>
<string name="media_syncing">Sincronizando multimedia</string>
<string name="data_sync_status">Estado de sincronización de datos</string>
<string name="retry_pending">Reintento pendiente</string>
<string name="upload_complete">Realizada</string>
<string name="uploading">Cargando</string>
<string name="upload_pending">Pendiente</string>
<string name="photos_pending">Fotos pendientes</string>
<string name="photos_pending_retry">Fotos pendientes de reintento</string>
<string name="uploading_photos">Carregando fotos</string>
<string name="signout_warning">Si cierra sesión, se perderán todos los datos no guardados.</string>
<string name="admin_request_access">Para continuar, contacte con su administrador del sistema para solicitar acceso.</string>
<string name="signup_request_access">Para continuar, <annotation type="sign_up_link">regístrese para solicitar acceso</annotation>.</string>
Expand Down
17 changes: 8 additions & 9 deletions ground/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<string name="date">Date</string>
<string name="time">l&#8217;heure</string>
<!-- Other strings (to be organized) -->
<string name="sync_status">État de synchronisation des données</string>
<string name="upload_status">État de téléchargement</string>

<string name="add_point">Ajouter un point</string>
<string name="complete_polygon">Finir</string>
Expand Down Expand Up @@ -150,14 +150,13 @@
<string name="about">À propos</string>
<string name="terms_of_service">Conditions générales d&#8217;utilisation</string>
<string name="about_ground">Ground est un projet communautaire open-source développé par Google et la FAO dans le cadre du « Forest Data Partnership » avec l&#8217;aide de SIG, Ecam et des contributeurs de la communauté open-source. \n\nIl est sous licence <annotation type="apache_license">Apache License, Version 2.0</annotation>. \n\nVoir autres <annotation type="all_licenses">Licenses</annotation></string>
<string name="failed">Echec</string>
<string name="synced">Synchronisé</string>
<string name="syncing">Synchronisation</string>
<string name="upload_pending">Téléchargement en attente</string>
<string name="data_synced_media_pending">Données synchronisées\n(media pending)</string>
<string name="data_synced_media_pending_retry">Données synchronisées\n(media pending retry)</string>
<string name="media_syncing">Synchronisation des médias</string>
<string name="data_sync_status">État de synchronisation</string>
<string name="retry_pending">Nouvelle tentative en attente</string>
<string name="upload_complete">Effectué</string>
<string name="uploading">Téléchargement en cours</string>
<string name="upload_pending">En attente</string>
<string name="photos_pending">Photos en attente</string>
<string name="photos_pending_retry">Photos en attente de nouvelle tentative</string>
<string name="uploading_photos">Téléchargement des photos</string>
<string name="signout_warning">Si vous vous déconnectez, toutes les données non sauvegardées seront perdues.</string>
<string name="admin_request_access">Pour continuer, contactez votre administrateur système pour demander l&#8217;accès.</string>
<string name="signup_request_access">Pour continuer, <annotation type="sign_up_link">inscrivez-vous pour demander l&#8217;accès</annotation>.</string>
Expand Down
11 changes: 10 additions & 1 deletion ground/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@

<string name="add_point">Adicionar ponto</string>
<string name="complete_polygon">Completa</string>
</resources>

<string name="upload_status">Estado de carregamento</string>
<string name="upload_pending">Pendente</string>
<string name="retry_pending">Nova tentativa pendente</string>
<string name="uploading">Carregando</string>
<string name="photos_pending">Fotos pendentes</string>
<string name="photos_pending_retry">Fotos pendentes de nova tentativa</string>
<string name="uploading_photos">Carrengando fotos</string>
<string name="upload_complete">Concluído</string>
</resources>
17 changes: 8 additions & 9 deletions ground/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<string name="date">Date</string>
<string name="time">Time</string>
<!-- Other strings (to be organized) -->
<string name="sync_status">Data sync status</string>
<string name="upload_status">Upload status</string>

<string name="add_point">Add point</string>
<string name="complete_polygon">Complete</string>
Expand Down Expand Up @@ -151,14 +151,13 @@
<string name="about">About</string>
<string name="terms_of_service">Terms of service</string>
<string name="about_ground">Ground is an open-source community project built by Google and FAO under the Forest Data Partnership with help from SIG, Ecam, and open-source community contributors. \n\nIt is licensed under the <annotation type="apache_license">Apache License, Version 2.0</annotation>. \n\nView other <annotation type="all_licenses">Licenses</annotation></string>
<string name="failed">Failed</string>
<string name="synced">Synced</string>
<string name="syncing">Syncing</string>
<string name="upload_pending">Upload pending</string>
<string name="data_synced_media_pending">Data synced\n(media pending)</string>
<string name="data_synced_media_pending_retry">Data synced\n(media pending retry)</string>
<string name="media_syncing">Media syncing</string>
<string name="data_sync_status">Data sync status</string>
<string name="retry_pending">Retry pending</string>
<string name="upload_complete">Complete</string>
<string name="uploading">Uploading</string>
<string name="upload_pending">Pending</string>
<string name="photos_pending">Photos pending</string>
<string name="photos_pending_retry">Photos pending retry</string>
<string name="uploading_photos">Uploading photos</string>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amegantz Could you PTAL at these to see if they work?

@jo-spek Once @amegantz approves, do you have someone who could verify the French, Spanish, and Portuguese translations I added to other strings.xml files?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gino-m, yes, as agreed upon in the stand-up, I'll regularly keep an eye on these! Please tag me whenever you add something to strings.xml.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're doing a small redesign of this screen so I'll pause this PR for now. Will def keep you posted on updated/new strings!

<string name="signout_warning">If you sign out, all unsaved data will be lost.</string>
<string name="admin_request_access">To continue, contact your system administrator to request access.</string>
<string name="signup_request_access">To continue, <annotation type="sign_up_link">sign up to request access</annotation>.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ class NavigationDrawerItemClickTest(
listOf(
// TODO(#2385): Restore tests deleted in #2382.
arrayOf(
"Data sync status",
"Upload status",
TEST_SURVEY,
HomeScreenFragmentDirections.showSyncStatus(),
true,
"Clicking 'Data sync status' should navigate to fragment",
"Clicking 'Upload status' should navigate to fragment",
)
)
}
Expand Down