1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

core: add description to built-in light theme

This commit is contained in:
Sébastien Helleu
2026-07-04 12:23:21 +02:00
parent 04e60b9cb0
commit f970538ba3
16 changed files with 76 additions and 18 deletions
+4 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-05-30 14:01+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: Czech <weechat-dev@nongnu.org>\n"
@@ -6331,6 +6331,9 @@ msgstr "%s: chyba: slovník \"%s\" není ve vašem systému dostupný"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Využití paměti (viz \"man mallinfo\" pro nápovědu):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:28+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -7169,6 +7169,9 @@ msgstr "Die Systemfunktion „%s“ ist nicht verfügbar"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Ressourcennutzung (siehe „man getrusage“ für Hilfe):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:46+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: Spanish <weechat-dev@nongnu.org>\n"
@@ -6486,6 +6486,9 @@ msgstr "%s: error: diccionario \"%s\" no está disponible en tu sistema"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Uso de memoria (ver en \"man mallinfo\" por ayuda):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+5 -2
View File
@@ -23,8 +23,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"PO-Revision-Date: 2026-07-04 21:52+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-07-04 22:02+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: French <flashcode@flashtux.org>\n"
"Language: fr\n"
@@ -7057,6 +7057,9 @@ msgstr "La fonction système \"%s\" n'est pas disponible"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Utilisation des ressources (voir \"man getrusage\" pour de l'aide) :"
msgid "WeeChat default theme for light-background terminals"
msgstr "Thème par défaut de WeeChat par défaut pour les terminaux à fond clair"
msgid "Automatic backup"
msgstr "Sauvegarde automatique"
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-03-08 08:59+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: Hungarian <weechat-dev@nongnu.org>\n"
@@ -6000,6 +6000,9 @@ msgstr "%s a \"%s\" modul nem található\n"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr ""
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-05-30 14:02+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: Italian <weechat-dev@nongnu.org>\n"
@@ -6474,6 +6474,9 @@ msgstr "%s: errore: il dizionario \"%s\" non è disponibile su questo sistema"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Uso della memoria (consultare \"man mallinfo\" per aiuto):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-05-30 14:02+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <weechat-dev@nongnu.org>\n"
@@ -6652,6 +6652,9 @@ msgstr "%s: エラー: 辞書 \"%s\" がシステム上に見つかりません"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "メモリ使用量 (ヘルプを見るには \"man mallinfo\" を参照してください):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:55+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <soltys@soltys.info>\n"
@@ -6830,6 +6830,9 @@ msgstr "Funkcja systemowa \"%s\" nie jest dostępna"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Zużycie zasobów (zobacz \"man getrusage\"):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:48+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <weechat-dev@nongnu.org>\n"
@@ -6708,6 +6708,9 @@ msgstr "%s: erro: o dicionário \"%s\" não está disponível no sistema"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Utilização de memória (ver \"man mallingo\" para obter ajuda):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -46,7 +46,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:49+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: Portuguese (Brazil) <weechat-dev@nongnu.org>\n"
@@ -6375,6 +6375,9 @@ msgstr "%s: erro: dicionário \"%s\" não está disponível em seu sistema"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Uso de memória (veja \"man mallinfo\" para ajuda):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-03-08 08:59+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: Russian <weechat-dev@nongnu.org>\n"
@@ -6037,6 +6037,9 @@ msgstr "%s plugin \"%s\" не найден\n"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr ""
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:52+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: Serbian <ivan.pesic@gmail.com>\n"
@@ -6812,6 +6812,9 @@ msgstr "Системска функција „%s” није доступна"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Употреба ресурса (за помоћ погледајте „man getrusage”):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2026-06-28 08:53+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: Turkish <emir_sari@icloud.com>\n"
@@ -6612,6 +6612,9 @@ msgstr "Sistem işlevi \"%s\" kullanılabilir değil"
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr "Özkaynak kullanımı (yardım için bkz. \"man getrusage\"):"
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+4 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2026-07-04 21:47+0200\n"
"POT-Creation-Date: 2026-07-04 22:01+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5594,6 +5594,9 @@ msgstr ""
msgid "Resource usage (see \"man getrusage\" for help):"
msgstr ""
msgid "WeeChat default theme for light-background terminals"
msgstr ""
msgid "Automatic backup"
msgstr ""
+15 -3
View File
@@ -26,6 +26,8 @@
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "weechat.h"
#include "core-hashtable.h"
@@ -88,14 +90,16 @@ struct t_theme_builtin_entry theme_builtin_light_core[] =
/*
* Build a hashtable of overrides from a NULL-terminated table and
* register it under the given theme name.
* register it under the given theme name, with an optional description.
*/
void
theme_builtin_register_entries (const char *name,
const char *description,
const struct t_theme_builtin_entry *entries)
{
struct t_hashtable *overrides;
struct t_theme *theme;
int i;
if (!name || !entries)
@@ -111,7 +115,12 @@ theme_builtin_register_entries (const char *name,
for (i = 0; entries[i].option; i++)
hashtable_set (overrides, entries[i].option, entries[i].value);
theme_register (NULL, NULL, name, overrides);
theme = theme_register (NULL, NULL, name, overrides);
if (theme && description)
{
free (theme->description);
theme->description = strdup (description);
}
hashtable_free (overrides);
}
@@ -125,5 +134,8 @@ theme_builtin_register_entries (const char *name,
void
theme_builtin_init (void)
{
theme_builtin_register_entries ("light", theme_builtin_light_core);
theme_builtin_register_entries (
"light",
_("WeeChat default theme for light-background terminals"),
theme_builtin_light_core);
}
+4
View File
@@ -1143,6 +1143,10 @@ TEST(CoreTheme, BuiltinInit)
theme = theme_search ("light");
CHECK(theme != NULL);
/* the built-in "light" theme carries a description */
CHECK(theme->description != NULL);
CHECK(theme->description[0] != '\0');
/* sanity check: many core color overrides (>= 30) */
CHECK(theme_overrides_count (theme) >= 30);