feat: finalize strings

This commit is contained in:
Evangelos Paterakis 2023-02-24 06:19:16 +02:00
parent 0716ff02d5
commit bf0ee280ee
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
28 changed files with 120 additions and 185 deletions

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>dev.geopjr.Tooth</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<name>Tooth</name>
<summary>Browse the Fediverse</summary>
<description>
<p>
Explore the federated social web with Tooth for GNOME. Stay connected to your favorite communities, family and friends with support for popular Fediverse platforms like Mastodon, GoToSocial, Pleroma &amp; more!
</p>
<p>
The Fediverse is a decentralized social network that consists of multiple interconnected platforms and communities, allowing users to communicate and share content across different networks and servers. It promotes user privacy and data ownership, and offers an alternative to centralized social media platforms.
</p>
</description>
<provides>
<binary>dev.geopjr.Tooth</binary>
</provides>
<developer_name translatable="no">Evangelos "GeopJr" Paterakis</developer_name>
<url type="homepage">https://github.com/bleakgrey</url>
<url type="bugtracker">https://github.com/GeopJr/Tooth/issues</url>
<url type="donation">https://liberapay.com/bleakgrey/donate</url>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
<content_attribute id="social-audio">moderate</content_attribute>
<content_attribute id="social-contacts">intense</content_attribute>
</content_rating>
<custom>
<value key="Purism::form_factor">workstation</value>
<value key="Purism::form_factor">mobile</value>
</custom>
<releases>
<release version="1.0.0" date="2021-02-02">
<description>
<ul>
<li>Initial release</li>
</ul>
</description>
</release>
</releases>
</component>

View File

@ -1,15 +1,15 @@
[Desktop Entry]
Type=Application
Name=Tooth
Comment=Mastodon Client
GenericName=Mastodon Client
Exec=dev.geopjr.tooth %u
Icon=dev.geopjr.tooth
Comment=Browse the Fediverse
GenericName=Fediverse Client
Exec=dev.geopjr.Tooth %u
Icon=dev.geopjr.Tooth
Terminal=false
Categories=GNOME;GTK;Network;
Keywords=toot;mastodon;social;network;post;
X-GNOME-Gettext-Domain=dev.geopjr.tooth
X-GNOME-UsesNotifications=true
Keywords=toot;mastodon;fediverse;gotosocial;pleroma;
X-GNOME-Gettext-Domain=dev.geopjr.Tooth
X-GNOME-UsesNotifications=true
MimeType=x-scheme-handler/tooth;
# Translators: Do NOT translate or transliterate this text (these are enum types)!
X-Purism-FormFactor=Workstation;Mobile;

View File

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2020 Bleak Grey -->
<component type="desktop">
<id>dev.geopjr.tooth</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<name>Tooth</name>
<summary>Lightning fast client for Mastodon</summary>
<description>
<p>
Tooth is a GTK client for the world's largest, decentralized, microblogging platform, Mastodon. With the user experience in mind, it provides a clean, native interface that allows you to integrate Mastodon's social experience seamlessly with your desktop environment.
</p>
<p>
Mastodon is a free and open source microblogging platform similar to Twitter, but with user privacy and decentralization in mind. It is one of many protocols that interacts with the Fediverse of protocols like Pleroma, GNU Social, and others. The power of federated microblogging that Mastodon brings and the agility of Tooth creates a fantastic duo for all of your social media needs.
</p>
</description>
<provides>
<binary>dev.geopjr.tooth</binary>
</provides>
<developer_name>bleak_grey</developer_name>
<url type="homepage">https://github.com/bleakgrey</url>
<url type="bugtracker">https://github.com/GeopJr/tooth/issues</url>
<url type="donation">https://liberapay.com/bleakgrey/donate</url>
<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">none</content_attribute>
<content_attribute id="violence-realistic">none</content_attribute>
<content_attribute id="violence-bloodshed">none</content_attribute>
<content_attribute id="violence-sexual">none</content_attribute>
<content_attribute id="violence-desecration">none</content_attribute>
<content_attribute id="violence-slavery">none</content_attribute>
<content_attribute id="violence-worship">none</content_attribute>
<content_attribute id="drugs-alcohol">none</content_attribute>
<content_attribute id="drugs-narcotics">none</content_attribute>
<content_attribute id="drugs-tobacco">none</content_attribute>
<content_attribute id="sex-nudity">none</content_attribute>
<content_attribute id="sex-themes">none</content_attribute>
<content_attribute id="sex-homosexuality">none</content_attribute>
<content_attribute id="sex-prostitution">none</content_attribute>
<content_attribute id="sex-adultery">none</content_attribute>
<content_attribute id="sex-appearance">none</content_attribute>
<content_attribute id="language-profanity">none</content_attribute>
<content_attribute id="language-humor">none</content_attribute>
<content_attribute id="language-discrimination">none</content_attribute>
<content_attribute id="social-chat">moderate</content_attribute>
<content_attribute id="social-info">none</content_attribute>
<content_attribute id="social-audio">moderate</content_attribute>
<content_attribute id="social-location">none</content_attribute>
<content_attribute id="social-contacts">intense</content_attribute>
<content_attribute id="money-purchasing">none</content_attribute>
<content_attribute id="money-gambling">none</content_attribute>
</content_rating>
<custom>
<value key="Purism::form_factor">workstation</value>
<value key="Purism::form_factor">mobile</value>
</custom>
<releases>
<release version="1.0.0" date="2021-02-02">
<description>
<ul>
<li>Initial release</li>
</ul>
</description>
</release>
</releases>
</component>

View File

@ -46,7 +46,8 @@
<property name="vexpand">1</property>
<property name="icon_name">tooth-network-server-symbolic</property>
<property name="title" translatable="yes">What is your Server?</property>
<property name="description" translatable="yes">If you don&apos;t have one yet, you can register &lt;a href=&quot;https://joinmastodon.org/servers&quot;&gt;here&lt;/a&gt;.</property>
<!-- translators: Please replace the joinmastodon.org link with the one for your language if available -->
<property name="description" translatable="yes">If you don&apos;t have an account yet, &lt;a href=&quot;https://joinmastodon.org/servers&quot;&gt;choose a server and register one&lt;/a&gt;.</property>
<style>
<class name="compact"/>
</style>
@ -205,7 +206,7 @@
<property name="vexpand">1</property>
<property name="icon_name">tooth-check-round-outline-symbolic</property>
<property name="title">Hello!</property>
<property name="description" translatable="true">Your account is connected and ready to use.</property>
<property name="description" translatable="true">Your account is connected and ready to use!</property>
<style>
<class name="compact"/>
</style>

View File

@ -36,12 +36,11 @@
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Multiple Columns</property>
<property name="subtitle" translatable="yes">Warning: Expirimental and highly flammable</property>
<property name="activatable_widget">multiple_columns</property>
<property name="sensitive">0</property>
<property name="title" translatable="yes">Larger font size</property>
<property name="activatable_widget">larger_font_size</property>
<property name="subtitle" translatable="yes">Makes the font larger for posts</property>
<child>
<object class="GtkSwitch" id="multiple_columns">
<object class="GtkSwitch" id="larger_font_size">
<property name="valign">center</property>
</object>
</child>
@ -49,16 +48,12 @@
</child>
<child>
<object class="AdwActionRow">
<property name="visible">0</property>
<property name="title" translatable="yes">Text scale (%)</property>
<property name="activatable_widget">post_text_size</property>
<property name="title" translatable="yes">Larger line height</property>
<property name="activatable_widget">larger_line_height</property>
<property name="subtitle" translatable="yes">Makes the line height larger for posts</property>
<child>
<object class="GtkSpinButton" id="post_text_size">
<object class="GtkSwitch" id="larger_line_height">
<property name="valign">center</property>
<property name="text" translatable="yes">100</property>
<property name="climb_rate">0.05</property>
<property name="adjustment">font_adjustment</property>
<property name="value">100</property>
</object>
</child>
</object>
@ -105,26 +100,13 @@
<child>
<object class="GtkSpinButton" id="timeline_page_size">
<property name="valign">center</property>
<property name="text" translatable="yes">10</property>
<property name="text">10</property>
<property name="adjustment">page_adjustment</property>
<property name="value">10</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="visible">0</property>
<property name="title" translatable="yes">Infinite scrolling</property>
<property name="activatable_widget">infinite_scrolling</property>
<property name="subtitle" translatable="yes">Warning: This will increase memory usage</property>
<child>
<object class="GtkSwitch" id="infinite_scrolling">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="live_updates_row">
<property name="title" translatable="yes">Stream timelines</property>
@ -161,38 +143,6 @@
</child>
</object>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Status</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Larger font size</property>
<property name="activatable_widget">larger_font_size</property>
<property name="subtitle" translatable="yes">Makes the status font larger</property>
<child>
<object class="GtkSwitch" id="larger_font_size">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Larger line height</property>
<property name="activatable_widget">larger_line_height</property>
<property name="subtitle" translatable="yes">Makes the status line height larger</property>
<child>
<object class="GtkSwitch" id="larger_line_height">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>

View File

@ -7,13 +7,13 @@
<attribute name="display-hint">circular-buttons</attribute>
<!-- <attribute name="label" translatable="yes">Interaction</attribute> -->
<item>
<attribute name="label" translatable="yes">Mention</attribute>
<attribute name="label" translatable="yes">Mention</attribute>
<attribute name="action">view.mention</attribute>
<attribute name="target">public</attribute>
<attribute name="verb-icon">tooth-online-symbolic</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Direct Message</attribute>
<attribute name="label" translatable="yes">Direct Message</attribute>
<attribute name="action">view.mention</attribute>
<attribute name="target">direct</attribute>
<attribute name="verb-icon">tooth-mail-symbolic</attribute>
@ -26,7 +26,6 @@
</section>
<section>
<!-- <submenu> -->
<attribute name="label" translatable="yes">Moderation</attribute>
<item>
<attribute name="label" translatable="yes">Hide Boosts</attribute>
@ -54,7 +53,6 @@
<!-- <attribute name="hidden-when">action-disabled</attribute> -->
</item>
</section>
<!-- </submenu> -->
</section>
<section>
@ -79,12 +77,12 @@
<!-- <section> -->
<item>
<attribute name="label" translatable="yes">With Replies</attribute>
<attribute name="label" translatable="yes">Include Replies</attribute>
<attribute name="action">view.include-replies</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">With Media</attribute>
<attribute name="label" translatable="yes">Include Media</attribute>
<attribute name="action">view.only-media</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>

View File

@ -58,7 +58,7 @@
<property name="width_request">128</property>
<property name="height_request">128</property>
<property name="pixel_size">128</property>
<property name="icon_name">dev.geopjr.tooth-symbolic</property>
<property name="icon_name">dev.geopjr.Tooth-symbolic</property>
<style>
<class name="dim-label"/>
</style>

View File

@ -13,7 +13,7 @@
<object class="GtkButton" id="compose_button">
<property name="icon-name">tooth-edit-symbolic</property>
<property name="action-name">app.compose</property>
<property name="tooltip_text" translatable="yes">Toot</property>
<property name="tooltip_text" translatable="yes">Compose</property>
</object>
</child>
<child type="end">

View File

@ -237,13 +237,13 @@
<property name="visible">0</property>
<child>
<object class="GtkLabel" id="reblog_count_label">
<property name="label">Reblogs</property>
<property name="label">Boosts</property>
<property name="use_markup">1</property>
</object>
</child>
<child>
<object class="GtkLabel" id="fav_count_label">
<property name="label">Favourites</property>
<property name="label">Favorites</property>
<property name="use_markup">1</property>
</object>
</child>

View File

@ -2,4 +2,4 @@
cd ..
cd build
ninja dev.geopjr.tooth-update-po
ninja dev.geopjr.Tooth-update-po

View File

@ -37,7 +37,7 @@ public class Tooth.API.Attachment : Entity, Widgetizable {
mime = type.get_content_type ();
}
catch (Error e) {
throw new Oopsie.USER (_("Can't open file %s:\n%s").printf (uri, e.message));
throw new Oopsie.USER ("Can't open file %s:\n%s".printf (uri, e.message));
}
var buffer = new Soup.Buffer.take (contents);

View File

@ -32,6 +32,7 @@ public class Tooth.API.Tag : Entity, Widgetizable {
suffix = _("in the past 2 days");
}
// translators: the first two are numbers, the last one is either "yesterday" or "in the past 2 days"
w.subtitle = _("Used %d times by %d people %s").printf (total_uses, total_accounts, suffix);
}
w.activated.connect(on_activated);

View File

@ -116,7 +116,7 @@ namespace Tooth {
StyleContext.add_provider_for_display (Gdk.Display.get_default (), zoom_css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
}
catch (Error e) {
var msg = _("Could not start application: %s").printf (e.message);
var msg = "Could not start application: %s".printf (e.message);
inform (Gtk.MessageType.ERROR, _("Error"), msg);
error (msg);
}

View File

@ -52,11 +52,11 @@ public class Tooth.AttachmentsPage : ComposerPage {
public override void on_build (Dialogs.Compose dialog, API.Status status) {
base.on_build (dialog, status);
// Empty state
var attach_button = new Button.with_label (_("Add Media")) {
halign = Align.CENTER,
sensitive = accounts.active.instance_info.compat_status_max_media_attachments > 0
};
// Empty state
attach_button.add_css_class("pill");
attach_button.clicked.connect (show_file_selector);
@ -85,6 +85,7 @@ public class Tooth.AttachmentsPage : ComposerPage {
icon_name = "tooth-eye-open-negative-filled-symbolic",
valign = Gtk.Align.CENTER,
halign = Gtk.Align.CENTER,
// translators: sensitive as in not safe for work or similar
tooltip_text = _("Mark media as sensitive"),
css_classes = {"flat"}
};
@ -92,6 +93,7 @@ public class Tooth.AttachmentsPage : ComposerPage {
var sensitive_media_button_active = src.get_boolean ();
target.set_boolean (sensitive_media_button_active);
sensitive_media_button.icon_name = sensitive_media_button_active ? "tooth-eye-not-looking-symbolic" : "tooth-eye-open-negative-filled-symbolic";
// translators: sensitive as in not safe for work or similar
sensitive_media_button.tooltip_text = sensitive_media_button_active ? _("Unmark media as sensitive") : _("Mark media as sensitive");
return true;
});
@ -158,6 +160,7 @@ public class Tooth.AttachmentsPage : ComposerPage {
filter.add_mime_type (mime_type);
}
// translators: Open file
var chooser = new FileChooserNative (_("Open"), dialog, Gtk.FileChooserAction.OPEN, null, null) {
select_multiple = true,
filter = filter

View File

@ -7,6 +7,7 @@ public class Tooth.EditorPage : ComposerPage {
public bool can_publish { get; set; default = false; }
construct {
// translators: "Text" as in text-based input
title = _("Text");
icon_name = "tooth-edit-symbolic";
@ -174,7 +175,7 @@ public class Tooth.EditorPage : ComposerPage {
cw_button = new ToggleButton () {
icon_name = "tooth-warning-symbolic",
tooltip_text = _("Spoiler Warning")
tooltip_text = _("Content Warning")
};
cw_button.toggled.connect (validate);
cw_button.bind_property ("active", revealer, "reveal_child", GLib.BindingFlags.SYNC_CREATE);

View File

@ -17,9 +17,6 @@ public class Tooth.Dialogs.MainWindow: Adw.ApplicationWindow, Saveable {
var gtk_settings = Gtk.Settings.get_default ();
// settings.bind_property ("dark-theme", gtk_settings, "gtk-application-prefer-dark-theme", BindingFlags.SYNC_CREATE);
settings.notify["post-text-size"].connect (() => on_zoom_level_changed ());
on_zoom_level_changed ();
// button_press_event.connect (on_button_press);
}
@ -82,19 +79,6 @@ public class Tooth.Dialogs.MainWindow: Adw.ApplicationWindow, Saveable {
// return false;
// }
void on_zoom_level_changed () {
var scale = settings.post_text_size;
var css = "";
if (scale > 100) {
css ="""
.%s label {
font-size: %i%;
}
""".printf (ZOOM_CLASS, scale);
}
// app.zoom_css_provider.load_from_data (css.data);
}
[GtkCallback]
void on_view_changed () {
var view = leaflet.visible_child as Views.Base;

View File

@ -4,7 +4,7 @@ using Gtk;
public class Tooth.Dialogs.NewAccount: Adw.Window {
const string AUTO_AUTH_DESCRIPTION = _("Allow access to your account in the browser. If something went wrong, <a href=\"tooth://manual_auth\">try manual authorization</a>.");
const string CODE_AUTH_DESCRIPTION = _("Copy the authorization code from the browser and paste it here.");
const string CODE_AUTH_DESCRIPTION = _("Copy the authorization code from the browser and paste it below.");
const string scopes = "read write follow";

View File

@ -7,7 +7,6 @@ public class Tooth.Dialogs.Preferences : Adw.PreferencesWindow {
[GtkChild] unowned Switch autostart;
[GtkChild] unowned Switch work_in_background;
[GtkChild] unowned SpinButton timeline_page_size;
[GtkChild] unowned SpinButton post_text_size;
[GtkChild] unowned Switch live_updates;
[GtkChild] unowned Switch public_live_updates;
[GtkChild] unowned Switch show_spoilers;
@ -45,7 +44,6 @@ public class Tooth.Dialogs.Preferences : Adw.PreferencesWindow {
settings.bind ("autostart", autostart, "active", SettingsBindFlags.DEFAULT);
settings.bind ("work-in-background", work_in_background, "active", SettingsBindFlags.DEFAULT);
settings.bind ("timeline-page-size", timeline_page_size.adjustment, "value", SettingsBindFlags.DEFAULT);
settings.bind ("post-text-size", post_text_size.adjustment, "value", SettingsBindFlags.DEFAULT);
settings.bind ("live-updates", live_updates, "active", SettingsBindFlags.DEFAULT);
settings.bind ("public-live-updates", public_live_updates, "active", SettingsBindFlags.DEFAULT);
settings.bind ("show-spoilers", show_spoilers, "active", SettingsBindFlags.DEFAULT);

View File

@ -133,7 +133,7 @@ public class Tooth.InstanceAccount : API.Account, Streamable {
break;
case KIND_REBLOG:
icon = "tooth-media-playlist-repeat-symbolic";
descr = _("%s boosted your status").printf (account.display_name);
descr = _("%s boosted your post").printf (account.display_name);
descr_url = account.url;
break;
case KIND_REMOTE_REBLOG:
@ -143,7 +143,7 @@ public class Tooth.InstanceAccount : API.Account, Streamable {
break;
case KIND_FAVOURITE:
icon = "tooth-starred-symbolic";
descr = _("%s favorited your status").printf (account.display_name);
descr = _("%s favorited your post").printf (account.display_name);
descr_url = account.url;
break;
case KIND_FOLLOW:

View File

@ -130,13 +130,14 @@ public class Tooth.Mastodon.Account : InstanceAccount {
});
set_visibility (new Visibility () {
id = "unlisted",
// translators: Probably follow Mastodon's translation
name = _("Unlisted"),
icon_name = "tooth-padlock2-open-symbolic",
description = _("Don\'t post to public timelines")
});
set_visibility (new Visibility () {
id = "private",
name = _("Followers-only"),
name = _("Followers Only"),
icon_name = "tooth-padlock2-symbolic",
description = _("Post to followers only")
});

View File

@ -76,6 +76,7 @@ public class Tooth.SecretAccountStore : AccountStore {
account.instance_info = null;
generator.set_root (account.to_json ());
var secret = generator.to_data (null);
// translators: The variable is the backend like "Mastodon"
var label = _("%s Account").printf (account.backend);
try {

View File

@ -7,7 +7,6 @@ public class Tooth.Settings : GLib.Settings {
public bool autostart { get; set; }
public bool work_in_background { get; set; }
public int timeline_page_size { get; set; }
public int post_text_size { get; set; }
public bool live_updates { get; set; }
public bool public_live_updates { get; set; }
public bool show_spoilers { get; set; }
@ -22,7 +21,6 @@ public class Tooth.Settings : GLib.Settings {
init ("autostart");
init ("work-in-background");
init ("timeline-page-size");
init ("post-text-size");
init ("live-updates");
init ("public-live-updates");
init ("show-spoilers");
@ -44,10 +42,13 @@ public enum Tooth.ColorScheme {
public string to_string () {
switch (this) {
case SYSTEM:
// translators: Follow System's dark mode preference
return _("Follow System");
case LIGHT:
// translators: Light mode theme
return _("Light");
case DARK:
// translators: Dark mode theme
return _("Dark");
default:
assert_not_reached ();

View File

@ -20,6 +20,9 @@ public class Tooth.DateTime {
var days = delta / TimeSpan.DAY;
return _(@"$(days)d left");
} else {
// translators: %b is Month name (short)
// %-e is the Day number
// %Y is the year (with century)
return date.format (_("expires on %b %-e, %Y"));
}
}
@ -29,6 +32,11 @@ public class Tooth.DateTime {
var now = new GLib.DateTime.now_local ();
var delta = now.difference (date);
if (delta < 0)
// translators: %b is Month name (short)
// %-e is the Day number
// %Y is the year (with century)
// %H is the hours (24h format)
// %m is the minutes
return date.format (_("expires on %b %-e, %Y %H:%m"));
else if (delta <= TimeSpan.MINUTE)
return _("expired on just now");
@ -44,9 +52,14 @@ public class Tooth.DateTime {
return _("expired yesterday");
}
else if (date.get_year () == now.get_year ()) {
// translators: %b is Month name (short)
// %-e is the Day number
return date.format (_("expired on %b %-e"));
}
else {
// translators: %b is Month name (short)
// %-e is the Day number
// %Y is the year (with century)
return date.format (_("expired on %b %-e, %Y"));
}
}
@ -56,6 +69,11 @@ public class Tooth.DateTime {
var now = new GLib.DateTime.now_local ();
var delta = now.difference (date);
if (delta < 0)
// translators: %b is Month name (short)
// %-e is the Day number
// %Y is the year (with century)
// %H is the hours (24h format)
// %m is the minutes
return date.format (_("%b %-e, %Y %H:%m"));
else if (delta <= TimeSpan.MINUTE)
return _("Just now");
@ -71,9 +89,14 @@ public class Tooth.DateTime {
return _("Yesterday");
}
else if (date.get_year () == now.get_year ()) {
// translators: %b is Month name (short)
// %-e is the Day number
return date.format (_("%b %-e"));
}
else {
// translators: %b is Month name (short)
// %-e is the Day number
// %Y is the year (with century)
return date.format (_("%b %-e, %Y"));
}
}

View File

@ -13,7 +13,7 @@ public class Tooth.Host {
try {
var success = AppInfo.launch_default_for_uri (uri, null);
if (!success)
throw new Oopsie.USER (_("launch_default_for_uri() failed"));
throw new Oopsie.USER ("launch_default_for_uri() failed");
}
catch (Error e){
Gtk.show_uri(app.active_window, uri, Gdk.CURRENT_TIME);

View File

@ -1,6 +1,6 @@
public class Tooth.HtmlUtils {
public const string FALLBACK_TEXT = _("[ There was an error parsing this text :c ]");
public const string FALLBACK_TEXT = "[ There was an error parsing this text ]";
public static string remove_tags (string content) {
try {

View File

@ -487,12 +487,16 @@ public class Tooth.Views.Profile : Views.Timeline {
.then ((sess, msg) => {
var toast_msg = "";
if (button.remove) {
// translators: First variable is a handle, second variable is a list name
toast_msg = _("User \"%s\" got removed from \"%s\"").printf (profile.handle, list.title);
button.icon_name = "tooth-plus-large-symbolic";
// translators: First variable is a handle, second variable is a list name
button.tooltip_text = _("Add \"%s\" to \"%s\"").printf (profile.handle, list.title);
} else {
// translators: First variable is a handle, second variable is a list name
toast_msg = _("User \"%s\" got added to \"%s\"").printf (profile.handle, list.title);
button.icon_name = "tooth-minus-large-symbolic";
// translators: First variable is a handle, second variable is a list name
button.tooltip_text = _("Remove \"%s\" from \"%s\"").printf (profile.handle, list.title);
}

View File

@ -165,7 +165,7 @@ public class Tooth.Widgets.Attachment.Item : Adw.Bin {
var menu_model = new GLib.Menu ();
menu_model.append (_("Open in Browser"), "attachment.open-in-browser");
menu_model.append (_("Copy URL"), "attachment.copy-url");
menu_model.append (_("Save as…"), "attachment.save-as");
menu_model.append (_("Save Media"), "attachment.save-as");
context_menu = new PopoverMenu.from_model(menu_model);
context_menu.set_parent(this);

View File

@ -367,12 +367,12 @@ public class Tooth.Widgets.Status : ListBoxRow {
formal_bindings.bind_property ("content", content, "content", BindingFlags.SYNC_CREATE);
formal_bindings.bind_property ("reblogs_count", reblog_count_label, "label", BindingFlags.SYNC_CREATE, (b, src, ref target) => {
int64 srcval = (int64) src;
target.set_string (@"<b>$srcval</b> " + _("Reblogs"));
target.set_string (@"<b>$srcval</b> " + _("Boosts"));
return true;
});
formal_bindings.bind_property ("favourites_count", fav_count_label, "label", BindingFlags.SYNC_CREATE, (b, src, ref target) => {
int64 srcval = (int64) src;
target.set_string (@"<b>$srcval</b> " + _("Favourites"));
target.set_string (@"<b>$srcval</b> " + _("Favorites"));
return true;
});
formal_bindings.bind_property ("replies_count", reply_button_content, "label", BindingFlags.SYNC_CREATE, (b, src, ref target) => {
@ -469,7 +469,7 @@ public class Tooth.Widgets.Status : ListBoxRow {
icon_toggled_name = "tooth-starred-symbolic"
};
favorite_button.add_css_class("ttl-status-action-star");
favorite_button.tooltip_text = _("Favourite");
favorite_button.tooltip_text = _("Favorite");
actions.append (favorite_button);
bookmark_button = new StatusActionButton () {