Skip to content

Commit 620b693

Browse files
committed
fixup
1 parent 8839d19 commit 620b693

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
_build/prod/*.exe
165165
166166
macos:
167-
runs-on: macos-12
167+
runs-on: macos-13
168168
steps:
169169
- name: macOS Cache
170170
uses: actions/cache@v3

lib/todo_app/menu.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule TodoApp.Menu do
22
@moduledoc """
33
Menu that is shown when a user click on the taskbar icon of the TodoApp
44
"""
5-
import TodoWeb.Gettext
5+
use Gettext, backend: TodoWeb.Gettext
66
use Desktop.Menu
77

88
def handle_event(command, menu) do

lib/todo_app/menu_bar.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule TodoApp.MenuBar do
33
Menubar that is shown as part of the main Window on Windows/Linux. In
44
MacOS this Menubar appears at the very top of the screen.
55
"""
6-
import TodoWeb.Gettext
6+
use Gettext, backend: TodoWeb.Gettext
77
use Desktop.Menu
88
alias TodoApp.Todo
99
alias Desktop.Window

lib/todo_web.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule TodoWeb do
2222
use Phoenix.Controller, namespace: TodoWeb
2323

2424
import Plug.Conn
25-
import TodoWeb.Gettext
25+
use Gettext, backend: TodoWeb.Gettext
2626
alias TodoWeb.Router.Helpers, as: Routes
2727
end
2828
end
@@ -77,7 +77,7 @@ defmodule TodoWeb do
7777
def channel do
7878
quote do
7979
use Phoenix.Channel
80-
import TodoWeb.Gettext
80+
use Gettext, backend: TodoWeb.Gettext
8181
end
8282
end
8383

@@ -94,7 +94,7 @@ defmodule TodoWeb do
9494
import Phoenix.View
9595

9696
import TodoWeb.ErrorHelpers
97-
import TodoWeb.Gettext
97+
use Gettext, backend: TodoWeb.Gettext
9898
end
9999
end
100100

lib/todo_web/gettext.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule TodoWeb.Gettext do
55
By using [Gettext](https://hexdocs.pm/gettext),
66
your module gains a set of macros for translations, for example:
77
8-
import TodoWeb.Gettext
8+
use Gettext, backend: TodoWeb.Gettext
99
1010
# Simple translation
1111
gettext("Here is the string to translate")
@@ -20,5 +20,5 @@ defmodule TodoWeb.Gettext do
2020
2121
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
2222
"""
23-
use Gettext, otp_app: :todo_app
23+
use Gettext.Backend, otp_app: :todo_app
2424
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<main role="main" class="container">
22
<p class="alert alert-info" role="alert"
33
phx-click="lv:clear-flash"
4-
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
4+
phx-value-key="info"><%= Phoenix.Flash.get(@flash, :info) %></p>
55

66
<p class="alert alert-danger" role="alert"
77
phx-click="lv:clear-flash"
8-
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
8+
phx-value-key="error"><%= Phoenix.Flash.get(@flash, :error) %></p>
99

1010
<%= @inner_content %>
1111
</main>

0 commit comments

Comments
 (0)