Update rocket_i18n and add gettext_macros (#431)
Internationalization now uses proc-macros that generate the .pot file automatically.
This commit is contained in:
+3
-3
@@ -128,7 +128,7 @@ pub fn dashboard(user: User, conn: DbConn, intl: I18n) -> Result<Ructe, ErrorPag
|
||||
#[get("/dashboard", rank = 2)]
|
||||
pub fn dashboard_auth(i18n: I18n) -> Flash<Redirect> {
|
||||
utils::requires_login(
|
||||
i18n!(i18n.catalog, "You need to be logged in order to access your dashboard"),
|
||||
&i18n!(i18n.catalog, "You need to be logged in order to access your dashboard"),
|
||||
uri!(dashboard),
|
||||
)
|
||||
}
|
||||
@@ -161,7 +161,7 @@ pub fn follow(name: String, conn: DbConn, user: User, worker: Worker) -> Result<
|
||||
#[post("/@/<name>/follow", rank = 2)]
|
||||
pub fn follow_auth(name: String, i18n: I18n) -> Flash<Redirect> {
|
||||
utils::requires_login(
|
||||
i18n!(i18n.catalog, "You need to be logged in order to follow someone"),
|
||||
&i18n!(i18n.catalog, "You need to be logged in order to follow someone"),
|
||||
uri!(follow: name = name),
|
||||
)
|
||||
}
|
||||
@@ -224,7 +224,7 @@ pub fn edit(name: String, user: User, conn: DbConn, intl: I18n) -> Result<Ructe,
|
||||
#[get("/@/<name>/edit", rank = 2)]
|
||||
pub fn edit_auth(name: String, i18n: I18n) -> Flash<Redirect> {
|
||||
utils::requires_login(
|
||||
i18n!(i18n.catalog, "You need to be logged in order to edit your profile"),
|
||||
&i18n!(i18n.catalog, "You need to be logged in order to edit your profile"),
|
||||
uri!(edit: name = name),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user