]> danix's work - publisher.git/commitdiff
fix: remove stale f-string prefix on badge strings, reset size hint in MissingTransla...
authorDanilo M. <redacted>
Sun, 3 May 2026 11:01:55 +0000 (13:01 +0200)
committerDanilo M. <redacted>
Sun, 3 May 2026 11:01:55 +0000 (13:01 +0200)
ui/articles_view.py

index 36ca5ec7507c54e00bbafd7d7810dc59a56663b1..511e1025ac7fe9cf67142f6d6a0481bc79fefeef 100644 (file)
@@ -12,9 +12,9 @@ class ArticleItem(QListWidgetItem):
         super().__init__()
         self.article = article
         if article.has_translation:
-            badge = f"🇬🇧 âœ“" if article.lang == "it" else "🇮🇹 âœ“"
+            badge = "🇬🇧 âœ“" if article.lang == "it" else "🇮🇹 âœ“"
         else:
-            badge = f"🇬🇧 âœ—" if article.lang == "it" else "🇮🇹 âœ—"
+            badge = "🇬🇧 âœ—" if article.lang == "it" else "🇮🇹 âœ—"
         line1 = f"{article.slug}  [{badge}]"
         if article.draft:
             line1 = f"[DRAFT]  {line1}"
@@ -96,4 +96,5 @@ class MissingTranslationView(QWidget):
             lang_other = "🇬🇧" if a.lang == "it" else "🇮🇹"
             item = ArticleItem(a)
             item.setText(f"{a.slug}  [manca {lang_other}]  ({a.lang.upper()})")
+            item.setSizeHint(QSize(0, 26))
             self._list.addItem(item)