refactor: use xdg entry comment as page descriptions
This commit is contained in:
parent
d1224aaa5e
commit
4d3d579bbe
27 changed files with 31 additions and 53 deletions
|
|
@ -103,7 +103,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("default-apps", "preferences-default-applications-symbolic")
|
||||
.title(fl!("default-apps"))
|
||||
.description(fl!("default-apps", "desc"))
|
||||
.description(fl!("xdg-entry-default-apps-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
"preferences-X11-applications-symbolic",
|
||||
)
|
||||
.title(fl!("legacy-applications"))
|
||||
.description(fl!("legacy-applications", "desc"))
|
||||
.description(fl!("xdg-entry-x11-applications-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> Info {
|
||||
page::Info::new("startup-apps", "preferences-startup-applications-symbolic")
|
||||
.title(fl!("startup-apps"))
|
||||
.description(fl!("startup-apps", "desc"))
|
||||
.description(fl!("xdg-entry-startup-apps-comment"))
|
||||
}
|
||||
fn content(
|
||||
&self,
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("bluetooth", "bluetooth-symbolic")
|
||||
.title(fl!("bluetooth"))
|
||||
.description(fl!("bluetooth", "desc"))
|
||||
.description(fl!("xdg-entry-bluetooth-comment"))
|
||||
}
|
||||
|
||||
fn content(
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("appearance", "preferences-appearance-symbolic")
|
||||
.title(fl!("appearance"))
|
||||
.description(fl!("appearance", "desc"))
|
||||
.description(fl!("xdg-entry-appearance-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("dock", "preferences-dock-symbolic")
|
||||
.title(fl!("dock"))
|
||||
.description(fl!("dock", "desc"))
|
||||
.description(fl!("xdg-entry-dock-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("panel", "preferences-panel-symbolic")
|
||||
.title(fl!("panel"))
|
||||
.description(fl!("panel", "desc"))
|
||||
.description(fl!("xdg-entry-panel-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("wallpaper", "preferences-desktop-wallpaper-symbolic")
|
||||
.title(fl!("wallpaper"))
|
||||
.description(fl!("wallpaper", "desc"))
|
||||
.description(fl!("xdg-entry-wallpaper-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
"preferences-window-management-symbolic",
|
||||
)
|
||||
.title(fl!("window-management"))
|
||||
.description(fl!("window-management", "desc"))
|
||||
.description(fl!("xdg-entry-window-management-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("workspaces", "preferences-workspaces-symbolic")
|
||||
.title(fl!("workspaces"))
|
||||
.description(fl!("workspaces", "desc"))
|
||||
.description(fl!("xdg-entry-workspaces-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("display", "preferences-desktop-display-symbolic")
|
||||
.title(fl!("display"))
|
||||
.description(fl!("display", "desc"))
|
||||
.description(fl!("xdg-entry-displays-comment"))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "test"))]
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("keyboard", "input-keyboard-symbolic")
|
||||
.title(fl!("keyboard"))
|
||||
.description(fl!("keyboard", "desc"))
|
||||
.description(fl!("xdg-entry-keyboard-comment"))
|
||||
}
|
||||
|
||||
fn context_drawer(&self) -> Option<ContextDrawer<'_, crate::pages::Message>> {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
// XXX icon?
|
||||
page::Info::new("input-devices", "preferences-input-devices-symbolic")
|
||||
.title(fl!("input-devices"))
|
||||
.description(fl!("input-devices", "desc"))
|
||||
.description(fl!("xdg-entry-input-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("mouse", "input-mouse-symbolic")
|
||||
.title(fl!("mouse"))
|
||||
.description(fl!("mouse", "desc"))
|
||||
.description(fl!("xdg-entry-mouse-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("touchpad", "input-touchpad-symbolic")
|
||||
.title(fl!("touchpad"))
|
||||
.description(fl!("touchpad", "desc"))
|
||||
.description(fl!("xdg-entry-touchpad-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
sections: &mut SlotMap<section::Entity, Section<crate::pages::Message>>,
|
||||
) -> Option<page::Content> {
|
||||
crate::slab!(descriptions {
|
||||
wifi_desc = fl!("connections-and-profiles", variant = "wifi");
|
||||
wired_desc = fl!("connections-and-profiles", variant = "wired");
|
||||
vpn_desc = fl!("connections-and-profiles", variant = "vpn");
|
||||
wifi_desc = fl!("xdg-entry-wireless-comment");
|
||||
wired_desc = fl!("xdg-entry-wired-comment");
|
||||
vpn_desc = fl!("xdg-entry-vpn-comment");
|
||||
});
|
||||
|
||||
let device_list = Section::default().descriptions(descriptions).view::<Self>(
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> cosmic_settings_page::Info {
|
||||
page::Info::new("vpn", "preferences-vpn-symbolic")
|
||||
.title(fl!("vpn"))
|
||||
.description(fl!("connections-and-profiles", variant = "vpn"))
|
||||
.description(fl!("xdg-entry-vpn-comment"))
|
||||
}
|
||||
|
||||
fn content(
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> cosmic_settings_page::Info {
|
||||
page::Info::new("wifi", "preferences-wireless-symbolic")
|
||||
.title(fl!("wifi"))
|
||||
.description(fl!("connections-and-profiles", variant = "wifi"))
|
||||
.description(fl!("xdg-entry-wireless-comment"))
|
||||
}
|
||||
|
||||
fn content(
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> cosmic_settings_page::Info {
|
||||
page::Info::new("wired", "preferences-wired-symbolic")
|
||||
.title(fl!("wired"))
|
||||
.description(fl!("connections-and-profiles", variant = "wired"))
|
||||
.description(fl!("xdg-entry-wired-comment"))
|
||||
}
|
||||
|
||||
fn content(
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("power", "preferences-power-and-battery-symbolic")
|
||||
.title(fl!("power"))
|
||||
.description(fl!("power", "desc"))
|
||||
.description(fl!("xdg-entry-power-comment"))
|
||||
}
|
||||
|
||||
fn content(
|
||||
|
|
@ -492,7 +492,7 @@ fn connected_devices() -> Section<crate::pages::Message> {
|
|||
fn profiles() -> Section<crate::pages::Message> {
|
||||
let mut descriptions = Slab::new();
|
||||
|
||||
let _power_desc = descriptions.insert(fl!("power", "desc"));
|
||||
let _power_desc = descriptions.insert(fl!("xdg-entry-power-comment"));
|
||||
|
||||
Section::default()
|
||||
.title(fl!("power-mode"))
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("sound", "preferences-sound-symbolic")
|
||||
.title(fl!("sound"))
|
||||
.description(fl!("sound", "desc"))
|
||||
.description(fl!("xdg-entry-sound-comment"))
|
||||
}
|
||||
|
||||
fn set_id(&mut self, entity: page::Entity) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("about", "help-about-symbolic")
|
||||
.title(fl!("about"))
|
||||
.description(fl!("about", "desc"))
|
||||
.description(fl!("xdg-entry-about-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("users", "system-users-symbolic")
|
||||
.title(fl!("users"))
|
||||
.description(fl!("users", "desc"))
|
||||
.description(fl!("xdg-entry-users-comment"))
|
||||
}
|
||||
|
||||
fn dialog(&self) -> Option<Element<'_, pages::Message>> {
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("time-date", "preferences-system-time-symbolic")
|
||||
.title(fl!("time-date"))
|
||||
.description(fl!("time-date", "desc"))
|
||||
.description(fl!("xdg-entry-date-time-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> Task<crate::pages::Message> {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("time", "preferences-time-and-language-symbolic")
|
||||
.title(fl!("time"))
|
||||
.description(fl!("time", "desc"))
|
||||
.description(fl!("xdg-entry-time-language-comment"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
fn info(&self) -> page::Info {
|
||||
page::Info::new("time-region", "preferences-region-and-language-symbolic")
|
||||
.title(fl!("time-region"))
|
||||
.description(fl!("time-region", "desc"))
|
||||
.description(fl!("xdg-entry-region-language-comment"))
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> cosmic::Task<crate::pages::Message> {
|
||||
|
|
|
|||
26
i18n/en/cosmic_settings.ftl
vendored
26
i18n/en/cosmic_settings.ftl
vendored
|
|
@ -135,6 +135,7 @@ xdg-entry-x11-applications-keywords = COSMIC;X11;Application;Game;Compatibility;
|
|||
|
||||
## Network & Wireless
|
||||
|
||||
# TODO: Remove?
|
||||
connections-and-profiles = { $variant ->
|
||||
[wired] Wired
|
||||
[wifi] Wi-Fi
|
||||
|
|
@ -241,7 +242,6 @@ confirm = Confirm
|
|||
enable = Enable
|
||||
|
||||
bluetooth = Bluetooth
|
||||
.desc = Manage Bluetooth devices
|
||||
.status = This system is visible as { $aliases } while Bluetooth settings are open.
|
||||
.connected = Connected
|
||||
.connecting = Connecting
|
||||
|
|
@ -316,7 +316,6 @@ desktop = Desktop
|
|||
|
||||
wallpaper = Wallpaper
|
||||
.change = Change image every
|
||||
.desc = Wallpaper images, colors, and slideshow options
|
||||
.fit = Wallpaper fit
|
||||
.folder-dialog = Choose wallpaper folder
|
||||
.image-dialog = Choose wallpaper image
|
||||
|
|
@ -347,7 +346,6 @@ never = Never
|
|||
## Desktop: Appearance
|
||||
|
||||
appearance = Appearance
|
||||
.desc = Accent colors and theming
|
||||
|
||||
accent-color = Accent color
|
||||
app-background = Window background
|
||||
|
|
@ -425,12 +423,10 @@ shadow-and-corners = Window shadow and corners
|
|||
## Desktop: Notifications
|
||||
|
||||
notifications = Notifications
|
||||
.desc = Do Not Disturb, lockscreen notifications, and per-application settings
|
||||
|
||||
## Desktop: Panel
|
||||
|
||||
panel = Panel
|
||||
.desc = Primary system bar for menus and applets
|
||||
|
||||
add = Add
|
||||
add-applet = Add applet
|
||||
|
|
@ -480,12 +476,10 @@ panel-missing = Panel configuration is missing
|
|||
## Desktop: Dock
|
||||
|
||||
dock = Dock
|
||||
.desc = An optional bar for apps and applets
|
||||
|
||||
## Desktop: Window management
|
||||
|
||||
window-management = Window management
|
||||
.desc = Super key action, window control options, and additional window tiling options
|
||||
|
||||
super-key = Super key action
|
||||
.launcher = Open Launcher
|
||||
|
|
@ -508,7 +502,6 @@ focus-navigation = Focus navigation
|
|||
## Desktop: Workspaces
|
||||
|
||||
workspaces = Workspaces
|
||||
.desc = Workspace orientation and behavior
|
||||
|
||||
workspaces-overview = Workspaces overview
|
||||
.action-on-typing = Action on typing
|
||||
|
|
@ -548,7 +541,6 @@ color = Color
|
|||
.temperature = Color temperature
|
||||
|
||||
display = Displays
|
||||
.desc = Manage displays and night light
|
||||
.arrangement = Display arrangement
|
||||
.arrangement-desc = Drag displays to rearrange them
|
||||
.enable = Enable display
|
||||
|
|
@ -601,7 +593,6 @@ dialog = Dialog
|
|||
## Sound
|
||||
|
||||
sound = Sound
|
||||
.desc = N/A
|
||||
|
||||
sound-output = Output
|
||||
.volume = Output volume
|
||||
|
|
@ -637,7 +628,6 @@ sound-device-profiles = Device profiles
|
|||
|
||||
# Power & Battery settings page
|
||||
power = Power & battery
|
||||
.desc = Manage power settings
|
||||
|
||||
battery = Battery
|
||||
.minute = { $value } { $value ->
|
||||
|
|
@ -684,7 +674,7 @@ acceleration-desc = Automatically adjusts tracking sensitivity based on speed
|
|||
disable-while-typing = Disable while typing
|
||||
|
||||
input-devices = Input devices
|
||||
.desc = Input devices
|
||||
|
||||
|
||||
primary-button = Primary button
|
||||
.desc = Sets the order of physical buttons
|
||||
|
|
@ -705,7 +695,6 @@ fast = Fast
|
|||
short = Short
|
||||
long = Long
|
||||
keyboard = Keyboard
|
||||
.desc = Input sources, switching, special character entry, shortcuts
|
||||
|
||||
keyboard-sources = Input Sources
|
||||
.desc = Input sources can be switched using Super+Space key combination. This can be customized in the keyboard shortcut settings.
|
||||
|
|
@ -877,7 +866,6 @@ zoom-out = Zoom Out
|
|||
## Input: Mouse
|
||||
|
||||
mouse = Mouse
|
||||
.desc = Mouse speed, acceleration, natural scrolling
|
||||
.speed = Mouse speed
|
||||
.acceleration = Enable mouse acceleration
|
||||
|
||||
|
|
@ -895,7 +883,6 @@ tap-to-click = Tap to click
|
|||
|
||||
touchpad = Touchpad
|
||||
.acceleration = Enable touchpad acceleration
|
||||
.desc = Touchpad speed, click options, gestures
|
||||
.speed = Touchpad speed
|
||||
|
||||
## Input: Gestures
|
||||
|
|
@ -918,10 +905,8 @@ open-workspaces-view = Open Workspaces Overview
|
|||
## Time & language
|
||||
|
||||
time = Time & language
|
||||
.desc = N/A
|
||||
|
||||
time-date = Date & time
|
||||
.desc = Time zone, automatic clock settings, and time formatting
|
||||
.auto = Set automatically
|
||||
.auto-ntp = Date & time will update automatically when the time zone is set
|
||||
|
||||
|
|
@ -940,7 +925,6 @@ time-format = Date & time format
|
|||
.monday = Monday
|
||||
|
||||
time-region = Region & language
|
||||
.desc = Format dates, times, and numbers based on your region
|
||||
|
||||
formatting = Formatting
|
||||
.dates = Dates
|
||||
|
|
@ -965,7 +949,6 @@ applications = Applications
|
|||
## Applications: Default applications
|
||||
|
||||
default-apps = Default Applications
|
||||
.desc = Default web browser, mail client, file browser, and other applications
|
||||
.web-browser = Web browser
|
||||
.file-manager = File manager
|
||||
.mail-client = Mail client
|
||||
|
|
@ -982,7 +965,6 @@ default-apps = Default Applications
|
|||
## Applications: Startup applications
|
||||
|
||||
startup-apps = Startup applications
|
||||
.desc = Configure applications which run on login
|
||||
.add = Add app
|
||||
.user = Applications launched when you log in
|
||||
.none = No startup applications added
|
||||
|
|
@ -993,7 +975,6 @@ startup-apps = Startup applications
|
|||
## Applications: Legacy applications
|
||||
|
||||
legacy-applications = X11 applications compatibility
|
||||
.desc = X11 Window system application scaling and Global shortcuts
|
||||
|
||||
legacy-app-global-shortcuts = Global shortcuts in X11 applications
|
||||
.desc = Global shortcuts allows keystrokes and mouse button events performed in applications to be recognized by other applications for features like push-to-talk or push-to-mute. By default, Global shortcuts is disabled in X11 applications to ensure other applications can’t monitor for keyboard and mouse events containing sensitive information.
|
||||
|
|
@ -1020,7 +1001,6 @@ system = System & accounts
|
|||
## System: About
|
||||
|
||||
about = About
|
||||
.desc = Device name, hardware information, operating system defaults
|
||||
|
||||
about-device = Device name
|
||||
.desc = This name appears to other network or Bluetooth devices
|
||||
|
|
@ -1045,12 +1025,10 @@ about-related = Related settings
|
|||
## System: Firmware
|
||||
|
||||
firmware = Firmware
|
||||
.desc = Firmware details
|
||||
|
||||
## System: Users
|
||||
|
||||
users = Users
|
||||
.desc = Authentication and user accounts
|
||||
.admin = Admin
|
||||
.standard = Standard
|
||||
.profile-add = Choose profile image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue