Skip to content

Commit

Permalink
Merge pull request #120 from CrisisCleanup/translations
Browse files Browse the repository at this point in the history
Translations
  • Loading branch information
hueachilles authored Aug 15, 2024
2 parents e3499bf + 12f37f1 commit 13463ba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

android {
defaultConfig {
val buildVersion = 222
val buildVersion = 223
applicationId = "com.crisiscleanup"
versionCode = buildVersion
versionName = "0.9.${buildVersion - 168}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.crisiscleanup.core.network.model.NetworkCountResult
import com.crisiscleanup.core.network.model.NetworkFlagsFormData
import com.crisiscleanup.core.network.model.NetworkIncident
import com.crisiscleanup.core.network.model.NetworkIncidentOrganization
import com.crisiscleanup.core.network.model.NetworkIncidentShort
import com.crisiscleanup.core.network.model.NetworkLanguageDescription
import com.crisiscleanup.core.network.model.NetworkLanguageTranslation
import com.crisiscleanup.core.network.model.NetworkList
Expand All @@ -14,7 +15,6 @@ import com.crisiscleanup.core.network.model.NetworkLocation
import com.crisiscleanup.core.network.model.NetworkOrganizationShort
import com.crisiscleanup.core.network.model.NetworkOrganizationsResult
import com.crisiscleanup.core.network.model.NetworkPersonContact
import com.crisiscleanup.core.network.model.NetworkShortIncident
import com.crisiscleanup.core.network.model.NetworkTeamResult
import com.crisiscleanup.core.network.model.NetworkUserProfile
import com.crisiscleanup.core.network.model.NetworkWorkTypeRequest
Expand Down Expand Up @@ -44,7 +44,7 @@ interface CrisisCleanupNetworkDataSource {
fields: List<String> = listOf("id", "name", "short_name", "incident_type"),
limit: Int = 250,
ordering: String = "-start_at",
): List<NetworkShortIncident>
): List<NetworkIncidentShort>

suspend fun getIncidentLocations(
locationIds: List<Long>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ data class NetworkIncidentFormField(
data class NetworkIncidentsListResult(
val errors: List<NetworkCrisisCleanupApiError>? = null,
val count: Int? = null,
val results: List<NetworkShortIncident>? = null,
val results: List<NetworkIncidentShort>? = null,
)

@Serializable
data class NetworkShortIncident(
data class NetworkIncidentShort(
val id: Long,
val name: String,
@SerialName("short_name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ private fun AllListsView(
if (pagingLists.itemCount == 0) {
item {
Text(
t("~~Create new lists using Crisis Cleanup in the browser."),
t("list.create_new_in_browser"),
listItemModifier,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private fun TeamsScreen(
contentType = "title-text-item",
) {
Text(
text = t("~~My Teams"),
text = t("teams.my_teams"),
modifier = listItemModifier,
style = LocalFontStyles.current.header1,
)
Expand All @@ -134,7 +134,7 @@ private fun TeamsScreen(
contentType = "subtitle-text-item",
) {
Text(
text = t("~~You don't have a team yet"),
text = t("teams.no_team_yet"),
modifier = Modifier.listItemHorizontalPadding(),
style = LocalFontStyles.current.header2,
)
Expand All @@ -159,7 +159,7 @@ private fun TeamsScreen(
) {
CrisisCleanupButton(
modifier = Modifier.listItemPadding(),
text = t("~~Create team"),
text = t("teams.create_new_team"),
onClick = openCreateTeam,
enabled = false,
)
Expand All @@ -171,7 +171,7 @@ private fun TeamsScreen(
contentType = "subtitle-text-item",
) {
Text(
text = t("~~No other teams"),
text = t("teams.no_other_teams"),
modifier = Modifier.listItemHorizontalPadding()
.listItemTopPadding(),
style = LocalFontStyles.current.header2,
Expand All @@ -183,7 +183,7 @@ private fun TeamsScreen(
contentType = "subtitle-text-item",
) {
Text(
text = t("~~Join a team"),
text = t("teams.join_team"),
modifier = Modifier.listItemHorizontalPadding()
.listItemTopPadding(),
style = LocalFontStyles.current.header2,
Expand Down Expand Up @@ -266,15 +266,15 @@ internal fun TeamView(
val caseCount = team.caseCount
Row(horizontalArrangement = listItemSpacedBy) {
val caseCountTranslateKey =
if (caseCount == 1) "~~1 Case" else "~~{case_count} Cases"
if (caseCount == 1) "teams.one_case" else "teams.case_count_cases"
Text(
t(caseCountTranslateKey)
.replace("{case_count}", "$caseCount"),
)

if (team.caseCompletePercentage > 0) {
Text(
t("~~{percent_complete}% cases completed")
t("teams.percent_complete_cases_completed")
.replace("{percent_complete}", "${team.caseCompletePercentage}"),
color = neutralFontColor,
)
Expand Down

0 comments on commit 13463ba

Please sign in to comment.