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
+3 -3
View File
@@ -4,7 +4,7 @@
@(ctx: BaseContext, notifications: Vec<Notification>, page: i32, n_pages: i32)
@:base(ctx, "Notifications", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Notifications"), {}, {}, {
<h1>@i18n!(ctx.1, "Notifications")</h1>
<div class="list">
@@ -15,10 +15,10 @@
<h3>
@if let Some(url) = notification.get_url(ctx.0) {
<a href="@url">
@i18n!(ctx.1, notification.get_message(); notification.get_actor(ctx.0).unwrap().name(ctx.0))
@translate_notification(ctx, notification.clone())
</a>
} else {
@i18n!(ctx.1, notification.get_message(); notification.get_actor(ctx.0).unwrap().name(ctx.0))
@translate_notification(ctx, notification.clone())
}
</h3>
@if let Some(post) = notification.get_post(ctx.0) {