Commit 6897ad01 authored by Julian Sparber's avatar Julian Sparber

roomsettings: update .po file and add i18n

https://gitlab.gnome.org/World/fractal/issues/19
parent f96eeeff
......@@ -23,7 +23,7 @@ fractal-gtk/res/ui/media_viewer_menu.ui
fractal-gtk/res/ui/members.ui
fractal-gtk/res/ui/new_room.ui
fractal-gtk/res/ui/password_dialog.ui
fractal-gtk/res/ui/room_config.ui
fractal-gtk/res/ui/room_settings.ui
fractal-gtk/res/ui/room_menu.ui
fractal-gtk/res/ui/server_chooser_menu.ui
fractal-gtk/res/ui/sticker_group.ui
......@@ -70,6 +70,7 @@ fractal-gtk/src/appop/mod.rs
fractal-gtk/src/appop/notifications.rs
fractal-gtk/src/appop/notify.rs
fractal-gtk/src/appop/room.rs
fractal-gtk/src/appop/room_settings.rs
fractal-gtk/src/appop/start_chat.rs
fractal-gtk/src/appop/state.rs
fractal-gtk/src/appop/stickers.rs
......@@ -93,4 +94,5 @@ fractal-gtk/src/widgets/message.rs
fractal-gtk/src/widgets/mod.rs
fractal-gtk/src/widgets/room.rs
fractal-gtk/src/widgets/roomlist.rs
fractal-gtk/src/widgets/room_settings.rs
fractal-gtk/src/widgets/roomrow.rs
......@@ -6,6 +6,7 @@ use std::rc::Rc;
use self::gtk::prelude::*;
use glib::signal;
use i18n::i18n;
use types::Member;
use widgets;
use widgets::avatar::AvatarExt;
......@@ -38,7 +39,7 @@ impl MembersList {
self.error
.get_style_context()?
.add_class("no_member_search");
self.error.set_text("Nothing found");
self.error.set_text(&i18n("No matching members found"));
b.pack_start(&self.error, true, true, 0);
self.connect();
b.show_all();
......
......@@ -4,6 +4,8 @@ use std::cell::RefCell;
use std::rc::Rc;
use self::gtk::prelude::*;
use i18n::i18n;
use i18n::ni18n_f;
use backend::BKCommand;
use cache::download_to_cache;
......@@ -139,7 +141,7 @@ impl RoomSettings {
if let Ok(window) = window.downcast::<gtk::Window>() {
/* http://gtk-rs.org/docs/gtk/struct.FileChooser.html */
let file_chooser = gtk::FileChooserNative::new(
"Pick a new room avatar",
i18n("Pick a new room avatar").as_str(),
Some(&window),
gtk::FileChooserAction::Open,
Some("Select"),
......@@ -177,7 +179,10 @@ impl RoomSettings {
let description = Some(format!("Private Group · {} members", members.len()));
*/
//Some(format!("Public Room · {} members", members.len()))
Some(format!("Room · {} members", members.len()))
Some(ni18n_f("Room · {} member", "Room · {} members",
members.len() as u32,
&[&members.len().to_string()]))
};
self.room_settings_show_avatar(edit);
......@@ -235,7 +240,7 @@ impl RoomSettings {
if let Some(text) = text {
label.set_text(&text);
} else {
label.set_text("Noname");
label.set_text("");
}
b.hide();
label.show();
......@@ -573,7 +578,7 @@ impl RoomSettings {
for w in b.get_children().iter() {
b.remove(w);
}
label.set_text(&format!("{} members", members.len()));
label.set_text(ni18n_f("{} member", "{} members", members.len() as u32, &[&members.len().to_string()]).as_str());
let list = widgets::MembersList::new(members.clone(), entry);
let w = list.create()?;
b.add(&w);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment