use better domain for gettexts

This commit is contained in:
2023-03-17 21:00:24 -04:00
parent a53b352cf7
commit a01d97e360
28 changed files with 923 additions and 837 deletions

View File

@ -90,7 +90,9 @@
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
>
<%= if ammo_group.staged, do: gettext("Unstage"), else: gettext("Stage") %>
<%= if ammo_group.staged,
do: dgettext("actions", "Unstage"),
else: dgettext("actions", "Stage") %>
</button>
<.link

View File

@ -127,7 +127,9 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
patch={Routes.ammo_group_show_path(Endpoint, :edit_shot_group, @ammo_group, @shot_group)}
class="text-primary-600 link"
aria-label={
gettext("Edit shot group of %{shot_group_count} shots", shot_group_count: @shot_group.count)
dgettext("actions", "Edit shot group of %{shot_group_count} shots",
shot_group_count: @shot_group.count
)
}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
@ -140,7 +142,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
phx-value-id={@shot_group.id}
data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")}
aria-label={
gettext("Delete shot record of %{shot_group_count} shots",
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
shot_group_count: @shot_group.count
)
}

View File

@ -63,7 +63,7 @@
patch={Routes.ammo_group_show_path(Endpoint, :edit, @ammo_group)}
class="mx-4 my-2 text-primary-600 link"
aria-label={
gettext("Edit ammo group of %{ammo_group_count} bullets",
dgettext("actions", "Edit ammo group of %{ammo_group_count} bullets",
ammo_group_count: @ammo_group.count
)
}

View File

@ -59,7 +59,9 @@
<.link
navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)}
class="text-primary-600 link"
aria-label={gettext("View %{ammo_type_name}", ammo_type_name: ammo_type.name)}
aria-label={
dgettext("actions", "View %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
>
<i class="fa-fw fa-lg fas fa-eye"></i>
</.link>
@ -67,7 +69,9 @@
<.link
patch={Routes.ammo_type_index_path(Endpoint, :edit, ammo_type)}
class="text-primary-600 link"
aria-label={gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)}
aria-label={
dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -75,7 +79,9 @@
<.link
patch={Routes.ammo_type_index_path(Endpoint, :clone, ammo_type)}
class="text-primary-600 link"
aria-label={gettext("Clone %{ammo_type_name}", ammo_type_name: ammo_type.name)}
aria-label={
dgettext("actions", "Clone %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
>
<i class="fa-fw fa-lg fas fa-copy"></i>
</.link>
@ -92,7 +98,9 @@
name: ammo_type.name
)
}
aria-label={gettext("Delete %{ammo_type_name}", ammo_type_name: ammo_type.name)}
aria-label={
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
>
<i class="fa-lg fas fa-trash"></i>
</.link>

View File

@ -16,7 +16,7 @@
<.link
patch={Routes.ammo_type_show_path(Endpoint, :edit, @ammo_type)}
class="text-primary-600 link"
aria-label={gettext("Edit %{ammo_type_name}", ammo_type_name: @ammo_type.name)}
aria-label={dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: @ammo_type.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -32,7 +32,9 @@
name: @ammo_type.name
)
}
aria-label={gettext("Delete %{ammo_type_name}", ammo_type_name: @ammo_type.name)}
aria-label={
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: @ammo_type.name)
}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>

View File

@ -60,7 +60,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :edit_tags, container)}
class="text-primary-600 link"
aria-label={gettext("Tag %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Tag %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-tags"></i>
</.link>
@ -70,7 +72,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :edit, container)}
class="text-primary-600 link"
aria-label={gettext("Edit %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Edit %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -78,7 +82,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :clone, container)}
class="text-primary-600 link"
aria-label={gettext("Clone %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Clone %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-copy"></i>
</.link>
@ -91,7 +97,9 @@
data-confirm={
dgettext("prompts", "Are you sure you want to delete %{name}?", name: container.name)
}
aria-label={gettext("Delete %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Delete %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>
@ -105,7 +113,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :edit_tags, container)}
class="text-primary-600 link"
aria-label={gettext("Tag %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Tag %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-tags"></i>
</.link>
@ -114,7 +124,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :edit, container)}
class="text-primary-600 link"
aria-label={gettext("Edit %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Edit %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -122,7 +134,9 @@
<.link
patch={Routes.container_index_path(Endpoint, :clone, container)}
class="text-primary-600 link"
aria-label={gettext("Clone %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Clone %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-copy"></i>
</.link>
@ -135,7 +149,9 @@
data-confirm={
dgettext("prompts", "Are you sure you want to delete %{name}?", name: container.name)
}
aria-label={gettext("Delete %{container_name}", container_name: container.name)}
aria-label={
dgettext("actions", "Delete %{container_name}", container_name: container.name)
}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>

View File

@ -42,7 +42,7 @@
<.link
patch={Routes.container_show_path(Endpoint, :edit, @container)}
class="text-primary-600 link"
aria-label={gettext("Edit %{container_name}", container_name: @container.name)}
aria-label={dgettext("actions", "Edit %{container_name}", container_name: @container.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -54,7 +54,9 @@
data-confirm={
dgettext("prompts", "Are you sure you want to delete %{name}?", name: @container.name)
}
aria-label={gettext("Delete %{container_name}", container_name: @container.name)}
aria-label={
dgettext("actions", "Delete %{container_name}", container_name: @container.name)
}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>

View File

@ -26,7 +26,9 @@
type="submit"
class="mx-2 my-1 btn btn-primary"
phx-click={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}
aria-label={gettext("Copy invite link for %{invite_name}", invite_name: invite.name)}
aria-label={
dgettext("actions", "Copy invite link for %{invite_name}", invite_name: invite.name)
}
>
<%= dgettext("actions", "Copy to clipboard") %>
</button>
@ -35,7 +37,9 @@
<.link
patch={Routes.invite_index_path(Endpoint, :edit, invite)}
class="text-primary-600 link"
aria-label={gettext("Edit invite for %{invite_name}", invite_name: invite.name)}
aria-label={
dgettext("actions", "Edit invite for %{invite_name}", invite_name: invite.name)
}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -50,7 +54,9 @@
invite_name: invite.name
)
}
aria-label={gettext("Delete invite for %{invite_name}", invite_name: invite.name)}
aria-label={
dgettext("actions", "Delete invite for %{invite_name}", invite_name: invite.name)
}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>

View File

@ -102,7 +102,7 @@
patch={Routes.range_index_path(Endpoint, :edit, shot_group)}
class="text-primary-600 link"
aria-label={
gettext("Edit shot record of %{shot_group_count} shots",
dgettext("actions", "Edit shot record of %{shot_group_count} shots",
shot_group_count: shot_group.count
)
}
@ -119,7 +119,7 @@
dgettext("prompts", "Are you sure you want to delete this shot record?")
}
aria-label={
gettext("Delete shot record of %{shot_group_count} shots",
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
shot_group_count: shot_group.count
)
}

View File

@ -48,7 +48,7 @@
<.link
patch={Routes.tag_index_path(Endpoint, :edit, tag)}
class="text-primary-600 link"
aria-label={gettext("Edit %{tag_name}", tag_name: tag.name)}
aria-label={dgettext("actions", "Edit %{tag_name}", tag_name: tag.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -61,7 +61,7 @@
data-confirm={
dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name)
}
aria-label={gettext("Delete %{tag_name}", tag_name: tag.name)}
aria-label={dgettext("actions", "Delete %{tag_name}", tag_name: tag.name)}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>