Update rocket_i18n and add gettext_macros (#431)

Internationalization now uses proc-macros that generate the .pot file
automatically.
This commit is contained in:
Baptiste Gelez
2019-02-02 15:23:50 +01:00
committed by GitHub
parent 8696185d1e
commit 7eef4643c8
57 changed files with 6306 additions and 5484 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
@(ctx: BaseContext, blogs: Vec<Blog>, drafts: Vec<Post>)
@:base(ctx, "Your Dashboard", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Your Dashboard"), {}, {}, {
<h1>@i18n!(ctx.1, "Your Dashboard")</h1>
<section>
+1 -1
View File
@@ -6,7 +6,7 @@
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, recents: Vec<Post>, reshares: Vec<Post>)
@:base(ctx, &user.name(ctx.0), {}, {}, {
@:base(ctx, user.name(ctx.0), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[
+1 -1
View File
@@ -6,7 +6,7 @@
@(ctx: BaseContext, form: UpdateUserForm, errors: ValidationErrors)
@:base(ctx, "Edit your account", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Edit your account"), {}, {}, {
@if let Some(u) = ctx.2.clone() {
<h1>@i18n!(ctx.1, "Your Profile")</h1>
<form method="post" action="@uri!(user::update: _name = u.username.clone())">
+1 -1
View File
@@ -5,7 +5,7 @@
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, followers: Vec<User>, page: i32, n_pages: i32)
@:base(ctx, &i18n!(ctx.1, "{0}'s followers"; user.name(ctx.0)), {}, {}, {
@:base(ctx, i18n!(ctx.1, "{0}'s followers"; user.name(ctx.0)), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[
+1 -1
View File
@@ -6,7 +6,7 @@
@(ctx: BaseContext, enabled: bool, form: &NewUserForm, errors: ValidationErrors)
@:base(ctx, "Create your account", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Create your account"), {}, {}, {
@if enabled {
<h1>@i18n!(ctx.1, "Create an account")</h1>
<form method="post" action="@uri!(user::create)">