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

Add android localizations #98

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class LoginWithPhoneViewModel @Inject constructor(
}

fun onIncompleteCode() {
errorMessage = translator("~~Enter a full phone code.")
errorMessage = translator("loginWithPhone.please_enter_full_phone")
}

fun requestPhoneCode(phoneNumber: String) {
Expand All @@ -166,7 +166,7 @@ class LoginWithPhoneViewModel @Inject constructor(
// TODO Be more specific
// TODO Capture error and report to backend
errorMessage =
translator("loginWithPhone.invalid_phone_unavailable_try_again")
translator("loginWithPhone.please_enter_full_code")
}
} finally {
isRequestingCode.value = false
Expand Down Expand Up @@ -300,7 +300,7 @@ class LoginWithPhoneViewModel @Inject constructor(
} catch (e: Exception) {
// TODO Be more specific on the failure where possible
errorMessage =
translator("~~Check the phone number and code is correct. If login continues to fail try again later or request a new code.")
translator("loginWithPhone.check_number_try_again")
} finally {
isVerifyingCode.value = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class OrgPersistentInviteViewModel @Inject constructor(
} catch (e: Exception) {
logger.logException(e)
inviteFailMessage.value =
translator("~~There are issues with invitations. Please try again later.")
translator("persistentInvitations.invitation_error_try_again_later")
} finally {
isJoiningOrg.value = false
}
Expand Down Expand Up @@ -207,7 +207,7 @@ class OrgPersistentInviteViewModel @Inject constructor(
} catch (e: Exception) {
logger.logException(e)
inviteFailMessage.value =
translator("~~There are issues with invitations. Please try again later.")
translator("persistentInvitations.invitation_error_try_again_later")
} finally {
isJoiningOrg.value = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class PasteOrgInviteViewModel @Inject constructor(
}
} catch (e: Exception) {
inviteCodeError.value =
translator("~~Invites are not working at the moment. Please try again later.")
translator("pasteInvite.invite_not_working_try_again")
logger.logException(e)
} finally {
isVerifyingCode.value = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class RequestOrgAccessViewModel @Inject constructor(
}
} catch (e: Exception) {
inviteInfoErrorMessage.value =
translator("~~Invite is not working at the moment. Please try again alter.")
translator("requestAccess.request_access_not_working")
logger.logException(e)
} finally {
isRequestingInvite.value = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fun LoginWithDifferentMethod(
enabled = enabled,
) {
val text = translator(
"~~Login using different method",
"loginForm.use_different_method",
R.string.loginUsingDifferentMethod,
)
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ private fun LazyListScope.propertyInfoItems(
Image(
modifier = Modifier.size(24.dp),
painter = painterResource(R.drawable.ic_jump_to_case_on_map),
contentDescription = LocalAppTranslator.current.translate("~~Center Case on map"),
contentDescription = LocalAppTranslator.current.translate("actions.jump_to_case"),
)

if (distanceAwayText.isNotBlank()) {
Expand Down Expand Up @@ -1121,7 +1121,7 @@ internal fun EditExistingCaseNotesView(
) {
Icon(
imageVector = CrisisCleanupIcons.CaretUp,
contentDescription = t("~~Scroll to top"),
contentDescription = t("actions.scroll_to_top"),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ class InviteTeammateViewModel @Inject constructor(
sendInvites()
} catch (e: Exception) {
sendInviteErrorMessage.value =
translator("~~Invites are not working at the moment. Please try again later.")
translator("inviteTeammates.invite_error")
logger.logException(e)
} finally {
isSendingInvite.value = false
Expand Down Expand Up @@ -714,7 +714,7 @@ class InviteTeammateViewModel @Inject constructor(

if (!isInviteSuccessful) {
sendInviteErrorMessage.value =
translator("~~Invites are not working at the moment. Please try again later.")
translator("inviteTeammates.invite_error")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fun InviteTeammateContent(
},
) {
Text(
t("~~Invite new user via email invitation link"),
t("inviteTeammates.invite_new_user_via_email"),
listItemModifier,
style = LocalFontStyles.current.header4,
)
Expand Down Expand Up @@ -513,7 +513,7 @@ private fun NewOrganizationInput(
UserInfoErrorText(viewModel.selectedIncidentError)
val incidentLookup by viewModel.incidentLookup.collectAsStateWithLifecycle()
val selectedIncident = incidentLookup[viewModel.selectedIncidentId] ?: EmptyIncident
val selectIncidentHint = t("~~Select Incident")
val selectIncidentHint = t("actions.select_incident")
val incidents by viewModel.incidents.collectAsStateWithLifecycle()
Box(
Modifier
Expand Down
Loading