mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
core: implement theme file parsing and transient file reads in /theme apply
Add a small INI-style parser for *.theme files and wire it into the
/theme command so user themes living in directory "themes" inside the
WeeChat configuration directory can be applied (and inspected) without
ever being cached.
Parser (theme_file_parse in core-theme.c) accepts two sections:
[info]
name = "..." \ shown by /theme info; ignored for apply
description = "..." |
date = "..." |
weechat = "..." /
(unknown keys are ignored with a warning)
[options]
full.option.name = "value"
Surrounding single or double quotes around a value are stripped (same
rule used by the regular config file reader). The parsed result is a
heap-allocated t_theme; the caller frees with theme_free.
Resolution rule in theme_apply: if the path
"${weechat_config_dir}/themes/<name>.theme" is readable it is parsed
and used (file shadows any built-in of the same name); otherwise the
built-in registry is consulted. The transient t_theme is freed before
the final refresh, so user themes have no steady-state memory
footprint regardless of how many .theme files have accumulated.
/theme list now also scans the themes directory and appends user
files to the listing (each marked "(file)"). backup-*.theme are
hidden by default; pass "-backups" to include them.
/theme info <name> works for both sources: file path is shown when the
information comes from disk; "built-in (in-memory)" otherwise.
This commit is contained in:
@@ -69,6 +69,9 @@ autorejoin
|
||||
away
|
||||
away-notify
|
||||
backspace
|
||||
backup
|
||||
backup-
|
||||
backups
|
||||
bare
|
||||
bash
|
||||
beep
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1005,8 +1005,10 @@ msgstr "Volba vytvořena: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s: upozornění: slovník \"%s\" není dostupný ve vašem systému"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "no variable"
|
||||
msgid "No theme available"
|
||||
msgstr "není proměnná"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1021,6 +1023,14 @@ msgstr "%sKlávesa \"%s\" nenalezena"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Volba \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " soubor: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3699,19 +3709,24 @@ msgid "manage color themes"
|
||||
msgstr "seznam položek polí"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "seznam filtrů"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6293,6 +6308,28 @@ msgstr "%sKlávesa \"%s\" nenalezena"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: skript \"%s\" není nainstalován"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%sUpozornění: %s, řádek %d: neznámý identifikátor sekce (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%sUpozornění: %s, řádek %d: neznámý identifikátor sekce (\"%s\")"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: nemůžu parsovat soubor \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1003,8 +1003,10 @@ msgstr "Einstellung erstellt: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%sFunktion \"%s\" ist auf dem Rechner nicht verfügbar"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "not available"
|
||||
msgid "No theme available"
|
||||
msgstr "nicht verfügbar"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1019,6 +1021,14 @@ msgstr "%sTastenbelegung \"%s\" nicht gefunden"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Einstellung \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " Datei: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -4091,7 +4101,7 @@ msgid "manage color themes"
|
||||
msgstr "Verwalten von benutzerdefinierten Bar-Items"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
@@ -4099,15 +4109,23 @@ msgstr ""
|
||||
#| "raw[list]: list remote relay servers (without argument, this list is "
|
||||
#| "displayed)"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr ""
|
||||
"raw[list]: listet relay-Server auf (ohne Angabe von Argumente wird diese "
|
||||
"Liste standardmäßig ausgegeben)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "raw[tags]: display tags for lines"
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
"raw[tags]: schaltet für jede Zeile die dazugehörigen Schlagwörter an / aus"
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -7128,6 +7146,32 @@ msgstr "%sTastenbelegung \"%s\" nicht gefunden"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: Skript \"%s\" ist nicht installiert"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: ignoring unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%sWarnung: %s, Zeile %d: unbekannte Sektion wird ignoriert (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid ""
|
||||
#| "%sWarning: %s, line %d: ignoring unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
"%sWarnung: %s, Zeile %d: ignoriert unbekannte Einstellung für Sektion "
|
||||
"\"%s\": %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: Datei \"%s\" Analyse nicht möglich"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1034,8 +1034,9 @@ msgstr "Opción creada: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s: atención: diccionario \"%s\" no está disponible en su sistema"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
msgid "No theme available"
|
||||
msgstr "Variables"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1050,6 +1051,14 @@ msgstr "%sTecla \"%s\" no encontrada"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Opción \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " archivo: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3792,19 +3801,24 @@ msgid "manage color themes"
|
||||
msgstr "lista de elementos de barra"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "lista de filtros"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6449,6 +6463,31 @@ msgstr "%sTecla \"%s\" no encontrada"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: el script \"%s\" no esta instalado"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr ""
|
||||
"%sAtención: %s, línea %d: identificador de sección desconocido (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
"%sAtención: %s, línea %d: opción desconocida para la sección \"%s\": %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: no es posible analizar el archivo \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"PO-Revision-Date: 2026-07-04 15:46+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+0200\n"
|
||||
"PO-Revision-Date: 2026-07-04 16:05+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: French <flashcode@flashtux.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -989,8 +989,8 @@ msgstr "Option créée : "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%sLa fonction \"%s\" n'est pas disponible sur ce système"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr "Aucun thème enregistré"
|
||||
msgid "No theme available"
|
||||
msgstr "Aucun thème disponible"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr "Thèmes :"
|
||||
@@ -1003,6 +1003,13 @@ msgstr "%sThème \"%s\" non trouvé"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Thème \"%s%s%s\" :"
|
||||
|
||||
#, c-format
|
||||
msgid " source: %s"
|
||||
msgstr " source : %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr " source : intégré (en mémoire)"
|
||||
|
||||
#, c-format
|
||||
msgid " description: %s"
|
||||
msgstr " description : %s"
|
||||
@@ -4019,22 +4026,29 @@ msgid "manage color themes"
|
||||
msgstr "gestion des thèmes de couleurs"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgstr "[list] || apply <nom> || info <nom>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr "[list [-backups]] || apply <nom> || info <nom>"
|
||||
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr ""
|
||||
"raw[list] : afficher les thèmes enregistrés (sans paramètre, cette liste est "
|
||||
"affichée), le thème actif est marqué avec \"->\""
|
||||
"raw[list] : afficher les thèmes enregistrés et tous les fichiers *.theme "
|
||||
"dans le répertoire de configuration de WeeChat ; le thème actif "
|
||||
"(correspondant à weechat.look.theme) est marqué avec \"->\""
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr "raw[-backups] : afficher les fichier de sauvegarde de thèmes"
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
"raw[apply] : appliquer un thème (définir chaque option personnalisable par "
|
||||
"thème à la valeur du thème)"
|
||||
"thème à la valeur du thème) ; si un fichier nommé <nom>.theme existe dans le "
|
||||
"répertoire \"themes\", il masque tout thème intégré du même nom"
|
||||
|
||||
msgid ""
|
||||
"raw[info]: display details on a theme (name, description, creation date, "
|
||||
@@ -7012,6 +7026,26 @@ msgstr "%sThème : option \"%s\" non trouvée, ignorée"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%sThème : l'option \"%s\" n'est pas personnalisable par thème, ignorée"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr "%s%s : ligne %d : en-tête de section mal formé"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%s%s : ligne %d : section \"%s\" inconnue, ignorée"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr "%s%s : ligne %d : séparateur '=' manquant"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%s%s : ligne %d : clé [info] \"%s\" inconnue, ignorée"
|
||||
|
||||
#, c-format
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%sÉchec de l'analyse du fichier de thème \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
@@ -18898,3 +18932,13 @@ msgid ""
|
||||
msgstr ""
|
||||
"%s%s : impossible d'accepter de continuer le fichier \"%s\" (port : %d, "
|
||||
"position de départ : %llu) : xfer non trouvé ou non prêt pour le transfert"
|
||||
|
||||
#~ msgid "No theme registered"
|
||||
#~ msgstr "Aucun thème enregistré"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "raw[list]: list registered themes (default action with no argument); "
|
||||
#~ "active theme is marked with \"->\""
|
||||
#~ msgstr ""
|
||||
#~ "raw[list] : afficher les thèmes enregistrés (sans paramètre, cette liste "
|
||||
#~ "est affichée), le thème actif est marqué avec \"->\""
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -991,8 +991,9 @@ msgstr "nincs a szobában"
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s a \"%s\" modul nem található\n"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
msgid "No theme available"
|
||||
msgstr " . típus: szám\n"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1005,6 +1006,13 @@ msgstr "%s a \"%s\" szerver nem található\n"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Felhasználók a %s%s%s szobában: %s["
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid " source: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid " description: %s"
|
||||
msgstr " . leírás : %s\n"
|
||||
@@ -3546,18 +3554,23 @@ msgid "manage color themes"
|
||||
msgstr "Aliaszok listája:\n"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "Aliaszok listája:\n"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -5963,6 +5976,26 @@ msgstr "%s a \"%s\" szerver nem található\n"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s a \"%s\" szerver nem található\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%s %s, %d. sor: ismeretlen csoportazonosító (\"%s\")\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%s %s, %d. sor: ismeretlen csoportazonosító (\"%s\")\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -999,8 +999,9 @@ msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr ""
|
||||
"%s: attenzione: il dizionario \"%s\" non è disponibile su questo sistema"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
msgid "No theme available"
|
||||
msgstr "Variabili"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1015,6 +1016,14 @@ msgstr "%sTasto \"%s\" non trovato"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Opzione \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " file: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3723,19 +3732,24 @@ msgid "manage color themes"
|
||||
msgstr "elenco degli elementi barra"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "elenco dei filtri"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6437,6 +6451,31 @@ msgstr "%sTasto \"%s\" non trovato"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: script \"%s\" non installato"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr ""
|
||||
"%sAttenzione: %s, riga %d: identificatore di sezione sconosciuto (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
"%sAttenzione: %s, riga %d: opzione sconosciuta per la sezione \"%s\": %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: impossibile analizzare il file \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1004,8 +1004,10 @@ msgstr "作成されたオプション: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s: 警告: 辞書 \"%s\" がこのシステム上では利用できません"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "no variable"
|
||||
msgid "No theme available"
|
||||
msgstr "変数がありません"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1020,6 +1022,14 @@ msgstr "%sキー \"%s\" が見つかりません"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "オプション \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " ファイル: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3807,19 +3817,24 @@ msgid "manage color themes"
|
||||
msgstr "バー要素のリスト"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "フィルタのリスト"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6614,6 +6629,29 @@ msgstr "%sキー \"%s\" が見つかりません"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: スクリプト \"%s\" はインストールされていません"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%s警告: %s、行 %d: セクションインジケータ (\"%s\") は未定義"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%s警告: %s、行 %d: セクション \"%s\" の無効なオプション: %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: ファイル \"%s\" を解析できません"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -980,8 +980,10 @@ msgstr "Opcja utworzona: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%sFunkcja „%s” nie jest dostępna w tym systemie"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "not available"
|
||||
msgid "No theme available"
|
||||
msgstr "niedostępne"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -996,6 +998,14 @@ msgstr "%sKlawisz \"%s\" nie znaleziony"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Opcja \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " plik: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3917,7 +3927,7 @@ msgid "manage color themes"
|
||||
msgstr "zarządza niestandardowymi elementami pasków"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
@@ -3925,15 +3935,22 @@ msgstr ""
|
||||
#| "raw[list]: list remote relay servers (without argument, this list is "
|
||||
#| "displayed)"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr ""
|
||||
"raw[list]: wyświetl pośredników (bez podania argumentu wyświetlana jest ta "
|
||||
"lista)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "raw[tags]: display tags for lines"
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr "raw[tags]: wyświetl tagi dla linii"
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6790,6 +6807,32 @@ msgstr "%sKlawisz \"%s\" nie znaleziony"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: skrypt \"%s\" nie zainstalowany"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: ignoring unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr ""
|
||||
"%sOstrzeżenie: %s, linia %d: ignoruje nieznany identyfikator sekcji (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid ""
|
||||
#| "%sWarning: %s, line %d: ignoring unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
"%sOstrzeżenie: %s, linia %d: ignoruje nieznaną opcję dla sekcji \"%s\": %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: nie można przetworzyć pliku \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1006,8 +1006,10 @@ msgstr "Opção criada: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s: aviso: o dicionário \"%s\" não está disponível no sistema"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "no variable"
|
||||
msgid "No theme available"
|
||||
msgstr "nenhum variável"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1022,6 +1024,14 @@ msgstr "%sTecla \"%s\" não encontrada"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Opção \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " ficheiro: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3816,19 +3826,24 @@ msgid "manage color themes"
|
||||
msgstr "lista de itens da barra"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "lista de filtros"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6670,6 +6685,29 @@ msgstr "%sTecla \"%s\" não encontrada"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: o script \"%s\" não está instalado"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%sAviso: %s, linha %d: identificador de secção desconhecido (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%sAviso: %s, linha %d: opção desconhecida na secção \"%s\": %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: não foi possível analisar o ficheiro \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
+44
-7
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1025,8 +1025,9 @@ msgstr "Opção criada: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s: aviso: dicionário \"%s\" não está disponível em seu sistema"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
msgid "No theme available"
|
||||
msgstr "Variáveis"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1041,6 +1042,14 @@ msgstr "%sTecla \"%s\" não encontrada"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Opção \"%s%s%s\":"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " arquivo: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3737,19 +3746,24 @@ msgid "manage color themes"
|
||||
msgstr "lista de itens da barra"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "lista de filtros"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6338,6 +6352,29 @@ msgstr "%sTecla \"%s\" não encontrada"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s%s: script \"%s\" não carregado"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%sAviso: %s, linha %d: identificador de seção desconhecido (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%sAviso: %s, linha %d: opção \"%s\" desconhecido para seção \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: não foi possível interpretar arquivo \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -1012,8 +1012,9 @@ msgstr "не на канале"
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s plugin \"%s\" не найден\n"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
msgid "No theme available"
|
||||
msgstr " . тип: целочисленный\n"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -1026,6 +1027,13 @@ msgstr "%s сервер \"%s\" не найден\n"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Ники %s%s%s: %s["
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid " source: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid " description: %s"
|
||||
msgstr " . описание: %s\n"
|
||||
@@ -3570,18 +3578,23 @@ msgid "manage color themes"
|
||||
msgstr "Список сокращений:\n"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "Список сокращений:\n"
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6000,6 +6013,26 @@ msgstr "%s сервер \"%s\" не найден\n"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s сервер \"%s\" не найден\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%s %s, строка %d: неизвестный идентификатор секции (\"%s\")\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%s %s, строка %d: неизвестный идентификатор секции (\"%s\")\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "Не могу записать лог-файл \"%s\"\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -976,8 +976,10 @@ msgstr "Креирана опција: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%sФункција „%s” није доступна на овом систему"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "not available"
|
||||
msgid "No theme available"
|
||||
msgstr "није доступно"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -992,6 +994,14 @@ msgstr "%sНије пронађен тастер „%s”"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "Опција „%s%s%s”:"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " фајл: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3894,7 +3904,7 @@ msgid "manage color themes"
|
||||
msgstr "управљање прилагођеним ставкама траке"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
@@ -3902,15 +3912,22 @@ msgstr ""
|
||||
#| "raw[list]: list remote relay servers (without argument, this list is "
|
||||
#| "displayed)"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr ""
|
||||
"raw[list]: листа сервера релеја удаљених (без аргумента се приказује ова "
|
||||
"листа)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "raw[tags]: display tags for lines"
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr "raw[tags]: исписује ознаке за линије"
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6772,6 +6789,32 @@ msgstr "%sНије пронађен тастер „%s”"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: скрипта „%s” није инсталирана"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: ignoring unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr ""
|
||||
"%sУпозорење: %s, линија %d: игнорише се непознати идентификатор одељка („%s”)"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid ""
|
||||
#| "%sWarning: %s, line %d: ignoring unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
"%sУпозорење: %s, линија %d: игнорише се непозната опција за одељак „%s”: %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: није успело парсирање фајла „%s”"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -971,8 +971,10 @@ msgstr "Seçenek oluşturuldu: "
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr "%s\"%s\" işlevi sisteminizde kullanılabilir değil"
|
||||
|
||||
msgid "No theme registered"
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "not available"
|
||||
msgid "No theme available"
|
||||
msgstr "kullanılamıyor"
|
||||
|
||||
msgid "Themes:"
|
||||
msgstr ""
|
||||
@@ -987,6 +989,14 @@ msgstr "%s\"%s\" düğmesi bulunamadı"
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr "\"%s%s%s\" seçeneği:"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid " file: %s"
|
||||
msgid " source: %s"
|
||||
msgstr " dosya: %s"
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "description"
|
||||
msgid " description: %s"
|
||||
@@ -3753,19 +3763,26 @@ msgid "manage color themes"
|
||||
msgstr "özel çubuk ögelerini yönet"
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "list of filters"
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr "süzgeçlerin listesi"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "raw[tags]: display tags for lines"
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr "raw[tags]: Satırlar için künyeleri görüntüle"
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -6572,6 +6589,29 @@ msgstr "%s\"%s\" düğmesi bulunamadı"
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr "%s: \"%s\" betiği kurulu değil"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown section identifier (\"%s\")"
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr "%sUyarı: %s, %d. satır: Bilinmeyen bölüm tanımlayıcısı (\"%s\")"
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%sWarning: %s, line %d: unknown option for section \"%s\": %s"
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr "%sUyarı: %s, %d. satır: \"%s\" bölümü için bilinmeyen seçenek: %s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to parse file \"%s\""
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr "%s%s: \"%s\" dosyası ayrıştırılamıyor"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
+38
-6
@@ -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 15:44+0200\n"
|
||||
"POT-Creation-Date: 2026-07-04 16:03+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"
|
||||
@@ -926,7 +926,7 @@ msgstr ""
|
||||
msgid "%sFunction \"%s\" is not available on this system"
|
||||
msgstr ""
|
||||
|
||||
msgid "No theme registered"
|
||||
msgid "No theme available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Themes:"
|
||||
@@ -940,6 +940,13 @@ msgstr ""
|
||||
msgid "Theme \"%s%s%s\":"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid " source: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid " source: built-in (in-memory)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid " description: %s"
|
||||
msgstr ""
|
||||
@@ -3339,17 +3346,22 @@ msgid "manage color themes"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated
|
||||
msgid "[list] || apply <name> || info <name>"
|
||||
msgid "[list [-backups]] || apply <name> || info <name>"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[list]: list registered themes (default action with no argument); active "
|
||||
"theme is marked with \"->\""
|
||||
"raw[list]: list registered themes and any *.theme files in the WeeChat "
|
||||
"configuration directory; the active theme (matching weechat.look.theme) is "
|
||||
"marked with \"->\""
|
||||
msgstr ""
|
||||
|
||||
msgid "raw[-backups]: display backup theme files"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"raw[apply]: apply a theme (set every themable option to the value from the "
|
||||
"theme)"
|
||||
"theme); if a file named <name>.theme exists in directory \"themes\" it "
|
||||
"shadows any built-in theme of the same name"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
@@ -5561,6 +5573,26 @@ msgstr ""
|
||||
msgid "%sTheme: option \"%s\" is not themable, skipped"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: malformed section header"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown section \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: missing '=' separator"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s: line %d: ignoring unknown [info] key \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sFailed to parse theme file \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sUnable to create theme backup; aborting apply (disable option "
|
||||
|
||||
+154
-22
@@ -7181,16 +7181,71 @@ COMMAND_CALLBACK(sys)
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for "dir_exec_on_files": collects names of files matching
|
||||
* "*.theme" into an arraylist passed as data; "backup-*.theme" is
|
||||
* excluded when *(int *)data->show_backups is zero.
|
||||
*
|
||||
* The arraylist is iterated outside this callback so all dirent
|
||||
* processing can happen in one place.
|
||||
*/
|
||||
|
||||
struct t_command_theme_dir_collect
|
||||
{
|
||||
struct t_arraylist *names; /* arraylist of char * (owned) */
|
||||
int show_backups; /* include backup-*.theme ? */
|
||||
};
|
||||
|
||||
void
|
||||
command_theme_collect_file_cb (void *data, const char *filename)
|
||||
{
|
||||
struct t_command_theme_dir_collect *ctx;
|
||||
const char *base;
|
||||
char *name;
|
||||
size_t len;
|
||||
|
||||
ctx = (struct t_command_theme_dir_collect *)data;
|
||||
base = strrchr (filename, '/');
|
||||
base = (base) ? base + 1 : filename;
|
||||
len = strlen (base);
|
||||
if ((len < 7) || (strcmp (base + len - 6, ".theme") != 0))
|
||||
return;
|
||||
if (!ctx->show_backups && (strncmp (base, "backup-", 7) == 0))
|
||||
return;
|
||||
name = string_strndup (base, len - 6);
|
||||
if (name)
|
||||
arraylist_add (ctx->names, name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare two theme file names (callback used by arraylist sort).
|
||||
*
|
||||
* Return negative, zero, or positive value (like strcmp).
|
||||
*/
|
||||
|
||||
int
|
||||
command_theme_strcmp_cb (void *data, struct t_arraylist *arraylist,
|
||||
void *pointer1, void *pointer2)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) arraylist;
|
||||
|
||||
return strcmp ((const char *)pointer1, (const char *)pointer2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for command "/theme": list or display details on themes.
|
||||
*/
|
||||
|
||||
COMMAND_CALLBACK(theme)
|
||||
{
|
||||
struct t_arraylist *list;
|
||||
struct t_theme *ptr_theme;
|
||||
const char *ptr_active;
|
||||
int i, size;
|
||||
struct t_arraylist *list, *file_names;
|
||||
struct t_command_theme_dir_collect collect;
|
||||
struct t_theme *ptr_theme, *file_theme;
|
||||
const char *ptr_active, *ptr_name;
|
||||
char *path, *dir;
|
||||
int i, size, show_backups;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -7198,20 +7253,46 @@ COMMAND_CALLBACK(theme)
|
||||
(void) buffer;
|
||||
(void) argv_eol;
|
||||
|
||||
/* "/theme" or "/theme list": list themes */
|
||||
/* "/theme" or "/theme list [-backups]": list themes */
|
||||
if ((argc == 1) || (string_strcmp (argv[1], "list") == 0))
|
||||
{
|
||||
show_backups = ((argc >= 3)
|
||||
&& (string_strcmp (argv[2], "-backups") == 0));
|
||||
ptr_active = CONFIG_STRING(config_look_theme);
|
||||
|
||||
list = theme_list ();
|
||||
if (!list || (arraylist_size (list) == 0))
|
||||
|
||||
/* scan ${weechat_config_dir}/themes/ for *.theme files */
|
||||
file_names = arraylist_new (8, 1, 0,
|
||||
&command_theme_strcmp_cb, NULL,
|
||||
NULL, NULL);
|
||||
if (file_names)
|
||||
{
|
||||
gui_chat_printf (NULL, _("No theme registered"));
|
||||
dir = NULL;
|
||||
string_asprintf (&dir, "%s/themes", weechat_config_dir);
|
||||
if (dir)
|
||||
{
|
||||
collect.names = file_names;
|
||||
collect.show_backups = show_backups;
|
||||
dir_exec_on_files (dir, 0, 0,
|
||||
&command_theme_collect_file_cb,
|
||||
&collect);
|
||||
free (dir);
|
||||
}
|
||||
}
|
||||
|
||||
if ((!list || (arraylist_size (list) == 0))
|
||||
&& (!file_names || (arraylist_size (file_names) == 0)))
|
||||
{
|
||||
gui_chat_printf (NULL, _("No theme available"));
|
||||
arraylist_free (list);
|
||||
arraylist_free (file_names);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
ptr_active = CONFIG_STRING(config_look_theme);
|
||||
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, _("Themes:"));
|
||||
size = arraylist_size (list);
|
||||
size = (list) ? arraylist_size (list) : 0;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
ptr_theme = (struct t_theme *)arraylist_get (list, i);
|
||||
@@ -7227,6 +7308,26 @@ COMMAND_CALLBACK(theme)
|
||||
? ": " : "",
|
||||
(ptr_theme->description) ? ptr_theme->description : "");
|
||||
}
|
||||
size = (file_names) ? arraylist_size (file_names) : 0;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
ptr_name = (const char *)arraylist_get (file_names, i);
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
" %s %s%s%s (file)",
|
||||
(ptr_active && (strcmp (ptr_active, ptr_name) == 0))
|
||||
? "->" : " ",
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
ptr_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
}
|
||||
if (file_names)
|
||||
{
|
||||
size = arraylist_size (file_names);
|
||||
for (i = 0; i < size; i++)
|
||||
free (arraylist_get (file_names, i));
|
||||
arraylist_free (file_names);
|
||||
}
|
||||
arraylist_free (list);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -7242,21 +7343,46 @@ COMMAND_CALLBACK(theme)
|
||||
if (string_strcmp (argv[1], "info") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(3, "info");
|
||||
ptr_theme = theme_search (argv[2]);
|
||||
if (!ptr_theme)
|
||||
/* file shadows registry: try user file first */
|
||||
path = theme_user_file_path (argv[2]);
|
||||
file_theme = NULL;
|
||||
if (path && (access (path, R_OK) == 0))
|
||||
file_theme = theme_file_parse (path);
|
||||
if (!file_theme)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sTheme \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
argv[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
free (path);
|
||||
path = NULL;
|
||||
ptr_theme = theme_search (argv[2]);
|
||||
if (!ptr_theme)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sTheme \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
argv[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_theme = file_theme;
|
||||
}
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL,
|
||||
_("Theme \"%s%s%s\":"),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
ptr_theme->name,
|
||||
(ptr_theme->name && ptr_theme->name[0])
|
||||
? ptr_theme->name : argv[2],
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
if (path)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_(" source: %s"), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_(" source: built-in (in-memory)"));
|
||||
}
|
||||
gui_chat_printf (NULL,
|
||||
_(" description: %s"),
|
||||
(ptr_theme->description) ? ptr_theme->description : "");
|
||||
@@ -7271,6 +7397,8 @@ COMMAND_CALLBACK(theme)
|
||||
_(" overrides: %d"),
|
||||
(ptr_theme->overrides)
|
||||
? ptr_theme->overrides->items_count : 0);
|
||||
free (path);
|
||||
theme_free (file_theme);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -9933,14 +10061,18 @@ command_init (void)
|
||||
NULL, "theme",
|
||||
N_("manage color themes"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
N_("[list]"
|
||||
N_("[list [-backups]]"
|
||||
" || apply <name>"
|
||||
" || info <name>"),
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[list]: list registered themes (default action with no "
|
||||
"argument); active theme is marked with \"->\""),
|
||||
N_("raw[list]: list registered themes and any *.theme files in "
|
||||
"the WeeChat configuration directory; the active theme "
|
||||
"(matching weechat.look.theme) is marked with \"->\""),
|
||||
N_("raw[-backups]: display backup theme files"),
|
||||
N_("raw[apply]: apply a theme (set every themable option to the "
|
||||
"value from the theme)"),
|
||||
"value from the theme); if a file named <name>.theme "
|
||||
"exists in directory \"themes\" it shadows any built-in "
|
||||
"theme of the same name"),
|
||||
N_("raw[info]: display details on a theme (name, description, "
|
||||
"creation date, WeeChat version, number of option overrides)"),
|
||||
N_("name: name of a theme"),
|
||||
@@ -9955,7 +10087,7 @@ command_init (void)
|
||||
"(file name: \"backup-<timestamp>.theme\"); the previous "
|
||||
"state can be restored with: `/theme apply backup-<timestamp>`. "
|
||||
"This is controlled by the option weechat.look.theme_backup.")),
|
||||
"list"
|
||||
"list -backups"
|
||||
" || apply"
|
||||
" || info",
|
||||
&command_theme, NULL, NULL);
|
||||
|
||||
+254
-9
@@ -30,6 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "core-arraylist.h"
|
||||
@@ -456,6 +457,217 @@ theme_apply_set_option_cb (void *data,
|
||||
config_file_option_set (option, (const char *)value, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Strip one optional pair of matching surrounding quotes (' or ") from
|
||||
* the in-place string.
|
||||
*
|
||||
* Return a pointer that may differ from the input (advance past an opening quote).
|
||||
*/
|
||||
|
||||
char *
|
||||
theme_file_strip_quotes (char *value)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
if (!value)
|
||||
return value;
|
||||
len = strlen (value);
|
||||
if ((len >= 2)
|
||||
&& (((value[0] == '"') && (value[len - 1] == '"'))
|
||||
|| ((value[0] == '\'') && (value[len - 1] == '\''))))
|
||||
{
|
||||
value[len - 1] = '\0';
|
||||
return value + 1;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse a .theme file into a transient t_theme.
|
||||
*
|
||||
* The file uses two INI-like sections: [info] (keys: name, description,
|
||||
* date, weechat) and [options] (key = full option name like
|
||||
* "irc.color.input_nick", value = string). Unknown [info] keys produce a
|
||||
* warning and are ignored; unknown sections produce a warning and the
|
||||
* lines in them are skipped.
|
||||
*
|
||||
* Return a heap-allocated t_theme (caller frees with theme_free), or
|
||||
* NULL if the file cannot be opened.
|
||||
*/
|
||||
|
||||
struct t_theme *
|
||||
theme_file_parse (const char *path)
|
||||
{
|
||||
FILE *file;
|
||||
char line[8192], *ptr, *end, *eq, *key, *value;
|
||||
int line_number, in_options;
|
||||
struct t_theme *theme;
|
||||
|
||||
if (!path)
|
||||
return NULL;
|
||||
|
||||
file = fopen (path, "r");
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
theme = theme_alloc ("");
|
||||
if (!theme)
|
||||
{
|
||||
fclose (file);
|
||||
return NULL;
|
||||
}
|
||||
/* clear the placeholder name; the file should provide it */
|
||||
free (theme->name);
|
||||
theme->name = NULL;
|
||||
/* description/date/weechat_version come from the file too */
|
||||
free (theme->description);
|
||||
theme->description = NULL;
|
||||
free (theme->date);
|
||||
theme->date = NULL;
|
||||
free (theme->weechat_version);
|
||||
theme->weechat_version = NULL;
|
||||
|
||||
line_number = 0;
|
||||
in_options = 0;
|
||||
while (fgets (line, sizeof (line) - 1, file))
|
||||
{
|
||||
line_number++;
|
||||
|
||||
/* trim trailing CR / LF */
|
||||
end = strchr (line, '\r');
|
||||
if (end)
|
||||
*end = '\0';
|
||||
end = strchr (line, '\n');
|
||||
if (end)
|
||||
*end = '\0';
|
||||
|
||||
/* skip leading whitespace */
|
||||
ptr = line;
|
||||
while ((ptr[0] == ' ') || (ptr[0] == '\t'))
|
||||
ptr++;
|
||||
|
||||
/* skip empty lines and comments */
|
||||
if (!ptr[0] || (ptr[0] == '#'))
|
||||
continue;
|
||||
|
||||
/* section header */
|
||||
if (ptr[0] == '[')
|
||||
{
|
||||
end = strchr (ptr, ']');
|
||||
if (!end)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%s%s: line %d: malformed section header"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
path, line_number);
|
||||
continue;
|
||||
}
|
||||
*end = '\0';
|
||||
if (strcmp (ptr + 1, "info") == 0)
|
||||
{
|
||||
in_options = 0;
|
||||
}
|
||||
else if (strcmp (ptr + 1, "options") == 0)
|
||||
{
|
||||
in_options = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%s%s: line %d: ignoring unknown section \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
path, line_number, ptr + 1);
|
||||
in_options = -1; /* skip lines until next known section */
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_options < 0)
|
||||
continue;
|
||||
|
||||
/* "key = value" */
|
||||
eq = strchr (ptr, '=');
|
||||
if (!eq)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%s%s: line %d: missing '=' separator"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
path, line_number);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* trim key */
|
||||
key = ptr;
|
||||
end = eq - 1;
|
||||
while ((end > key) && ((end[0] == ' ') || (end[0] == '\t')))
|
||||
end--;
|
||||
end[1] = '\0';
|
||||
|
||||
/* trim value */
|
||||
value = eq + 1;
|
||||
while ((value[0] == ' ') || (value[0] == '\t'))
|
||||
value++;
|
||||
end = value + strlen (value) - 1;
|
||||
while ((end > value) && ((end[0] == ' ') || (end[0] == '\t')))
|
||||
end--;
|
||||
end[1] = '\0';
|
||||
|
||||
value = theme_file_strip_quotes (value);
|
||||
|
||||
if (in_options)
|
||||
{
|
||||
hashtable_set (theme->overrides, key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* [info] section */
|
||||
if (strcmp (key, "name") == 0)
|
||||
{
|
||||
free (theme->name);
|
||||
theme->name = strdup (value);
|
||||
}
|
||||
else if (strcmp (key, "description") == 0)
|
||||
{
|
||||
free (theme->description);
|
||||
theme->description = strdup (value);
|
||||
}
|
||||
else if (strcmp (key, "date") == 0)
|
||||
{
|
||||
free (theme->date);
|
||||
theme->date = strdup (value);
|
||||
}
|
||||
else if (strcmp (key, "weechat") == 0)
|
||||
{
|
||||
free (theme->weechat_version);
|
||||
theme->weechat_version = strdup (value);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%s%s: line %d: ignoring unknown [info] key \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
path, line_number, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose (file);
|
||||
|
||||
if (!theme->name)
|
||||
theme->name = strdup ("");
|
||||
if (!theme->description)
|
||||
theme->description = strdup ("");
|
||||
if (!theme->date)
|
||||
theme->date = strdup ("");
|
||||
if (!theme->weechat_version)
|
||||
theme->weechat_version = strdup ("");
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
/*
|
||||
* Apply a theme registered in memory.
|
||||
*
|
||||
@@ -475,21 +687,50 @@ theme_apply_set_option_cb (void *data,
|
||||
int
|
||||
theme_apply (const char *name)
|
||||
{
|
||||
struct t_theme *theme;
|
||||
struct t_theme *file_theme = NULL;
|
||||
struct t_theme *registry_theme = NULL;
|
||||
struct t_hashtable *overrides = NULL;
|
||||
char *path = NULL;
|
||||
char *backup_name = NULL;
|
||||
|
||||
if (!name || !name[0])
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
theme = theme_search (name);
|
||||
if (!theme)
|
||||
/*
|
||||
* Resolution: a user file with the given name shadows any built-in
|
||||
* of the same name. Read the file transiently (parse, apply, free)
|
||||
* so user themes have no steady-state memory footprint.
|
||||
*/
|
||||
path = theme_user_file_path (name);
|
||||
if (path && (access (path, R_OK) == 0))
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sTheme \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
name);
|
||||
return WEECHAT_RC_ERROR;
|
||||
file_theme = theme_file_parse (path);
|
||||
if (!file_theme)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sFailed to parse theme file \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
path);
|
||||
free (path);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
overrides = file_theme->overrides;
|
||||
}
|
||||
else
|
||||
{
|
||||
registry_theme = theme_search (name);
|
||||
if (!registry_theme)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sTheme \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
name);
|
||||
free (path);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
overrides = registry_theme->overrides;
|
||||
}
|
||||
free (path);
|
||||
|
||||
/* create a backup of current themable state, if enabled */
|
||||
if (CONFIG_BOOLEAN(config_look_theme_backup)
|
||||
@@ -498,6 +739,7 @@ theme_apply (const char *name)
|
||||
backup_name = theme_make_backup ();
|
||||
if (!backup_name)
|
||||
{
|
||||
theme_free (file_theme);
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sUnable to create theme backup; aborting apply "
|
||||
@@ -510,9 +752,12 @@ theme_apply (const char *name)
|
||||
/* apply each override; per-option refreshes are suppressed via the
|
||||
theme_applying flag (see config_change_color) */
|
||||
theme_applying = 1;
|
||||
hashtable_map (theme->overrides, &theme_apply_set_option_cb, NULL);
|
||||
hashtable_map (overrides, &theme_apply_set_option_cb, NULL);
|
||||
theme_applying = 0;
|
||||
|
||||
/* file_theme (if any) is transient: discard now */
|
||||
theme_free (file_theme);
|
||||
|
||||
/* single refresh at the end */
|
||||
if (gui_init_ok)
|
||||
{
|
||||
|
||||
@@ -46,6 +46,9 @@ extern struct t_theme *theme_register (const char *name,
|
||||
extern struct t_arraylist *theme_list (void);
|
||||
extern int theme_apply (const char *name);
|
||||
extern char *theme_make_backup (void);
|
||||
extern char *theme_user_file_path (const char *name);
|
||||
extern struct t_theme *theme_file_parse (const char *path);
|
||||
extern void theme_free (struct t_theme *theme);
|
||||
|
||||
extern void theme_init (void);
|
||||
extern void theme_end (void);
|
||||
|
||||
@@ -48,6 +48,8 @@ extern void theme_free (struct t_theme *theme);
|
||||
extern char *theme_user_file_path (const char *name);
|
||||
extern char *theme_make_backup_name (void);
|
||||
extern int theme_write_file_full (const char *name, const char *description);
|
||||
extern char *theme_file_strip_quotes (char *value);
|
||||
extern struct t_theme *theme_file_parse (const char *path);
|
||||
}
|
||||
|
||||
TEST_GROUP(CoreTheme)
|
||||
@@ -486,6 +488,158 @@ TEST(CoreTheme, Apply)
|
||||
free (saved_theme_label);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test functions:
|
||||
* theme_file_strip_quotes
|
||||
*/
|
||||
|
||||
TEST(CoreTheme, FileStripQuotes)
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
/* NULL passes through */
|
||||
POINTERS_EQUAL(NULL, theme_file_strip_quotes (NULL));
|
||||
|
||||
/* len < 2: too short to be a matched quote pair */
|
||||
strcpy (buf, "");
|
||||
STRCMP_EQUAL("", theme_file_strip_quotes (buf));
|
||||
strcpy (buf, "a");
|
||||
STRCMP_EQUAL("a", theme_file_strip_quotes (buf));
|
||||
strcpy (buf, "\"");
|
||||
STRCMP_EQUAL("\"", theme_file_strip_quotes (buf));
|
||||
|
||||
/* no quotes: returned as-is */
|
||||
strcpy (buf, "hello");
|
||||
STRCMP_EQUAL("hello", theme_file_strip_quotes (buf));
|
||||
|
||||
/* matched double quotes are stripped */
|
||||
strcpy (buf, "\"hello\"");
|
||||
STRCMP_EQUAL("hello", theme_file_strip_quotes (buf));
|
||||
|
||||
/* matched single quotes are stripped */
|
||||
strcpy (buf, "'world'");
|
||||
STRCMP_EQUAL("world", theme_file_strip_quotes (buf));
|
||||
|
||||
/* mismatched: unchanged */
|
||||
strcpy (buf, "\"unmatched'");
|
||||
STRCMP_EQUAL("\"unmatched'", theme_file_strip_quotes (buf));
|
||||
strcpy (buf, "'unmatched\"");
|
||||
STRCMP_EQUAL("'unmatched\"", theme_file_strip_quotes (buf));
|
||||
|
||||
/* exactly two quotes => empty string after stripping */
|
||||
strcpy (buf, "\"\"");
|
||||
STRCMP_EQUAL("", theme_file_strip_quotes (buf));
|
||||
|
||||
/* internal quotes only on one side: unchanged */
|
||||
strcpy (buf, "no\"quote");
|
||||
STRCMP_EQUAL("no\"quote", theme_file_strip_quotes (buf));
|
||||
}
|
||||
|
||||
/*
|
||||
* Test functions:
|
||||
* theme_file_parse
|
||||
*/
|
||||
|
||||
TEST(CoreTheme, FileParse)
|
||||
{
|
||||
const char *path = "/tmp/weechat_test_theme_parse.theme";
|
||||
FILE *file;
|
||||
struct t_theme *theme;
|
||||
|
||||
/* NULL and missing file => NULL */
|
||||
POINTERS_EQUAL(NULL, theme_file_parse (NULL));
|
||||
unlink (path); /* belt-and-suspenders */
|
||||
POINTERS_EQUAL(NULL, theme_file_parse (path));
|
||||
|
||||
/* write a well-formed file: [info] + [options], mixed quoting,
|
||||
blanks and comments scattered around */
|
||||
file = fopen (path, "w");
|
||||
CHECK(file != NULL);
|
||||
fprintf (file, "# leading comment\n");
|
||||
fprintf (file, "\n");
|
||||
fprintf (file, "[info]\n");
|
||||
fprintf (file, "name = \"solarized_light\"\n");
|
||||
fprintf (file, "description = \"Light-bg theme\"\n");
|
||||
fprintf (file, "date = \"2026-05-26 09:42:10\"\n");
|
||||
fprintf (file, "weechat = \"4.10.0-dev\"\n");
|
||||
fprintf (file, "unknown_info_key = \"ignored\"\n");
|
||||
fprintf (file, "\n");
|
||||
fprintf (file, "[options]\n");
|
||||
fprintf (file, "weechat.color.chat = default\n"); /* unquoted */
|
||||
fprintf (file, " weechat.color.separator = \"blue\"\n"); /* whitespace + quotes */
|
||||
fprintf (file, "irc.color.input_nick = 'lightcyan'\n"); /* single quotes */
|
||||
fclose (file);
|
||||
|
||||
theme = theme_file_parse (path);
|
||||
CHECK(theme != NULL);
|
||||
|
||||
/* [info] fields populated */
|
||||
STRCMP_EQUAL("solarized_light", theme->name);
|
||||
STRCMP_EQUAL("Light-bg theme", theme->description);
|
||||
STRCMP_EQUAL("2026-05-26 09:42:10", theme->date);
|
||||
STRCMP_EQUAL("4.10.0-dev", theme->weechat_version);
|
||||
|
||||
/* [options] entries: three known keys, "unknown_info_key" must NOT
|
||||
leak in (it lives under [info]) */
|
||||
LONGS_EQUAL(3, theme->overrides->items_count);
|
||||
STRCMP_EQUAL("default",
|
||||
(const char *)hashtable_get (theme->overrides,
|
||||
"weechat.color.chat"));
|
||||
STRCMP_EQUAL("blue",
|
||||
(const char *)hashtable_get (theme->overrides,
|
||||
"weechat.color.separator"));
|
||||
STRCMP_EQUAL("lightcyan",
|
||||
(const char *)hashtable_get (theme->overrides,
|
||||
"irc.color.input_nick"));
|
||||
POINTERS_EQUAL(NULL, hashtable_get (theme->overrides,
|
||||
"unknown_info_key"));
|
||||
|
||||
theme_free (theme);
|
||||
unlink (path);
|
||||
|
||||
/* parse a file that has only [info]: overrides hashtable empty,
|
||||
missing [info] keys default to empty string */
|
||||
file = fopen (path, "w");
|
||||
CHECK(file != NULL);
|
||||
fprintf (file, "[info]\n");
|
||||
fprintf (file, "name = \"only_info\"\n");
|
||||
fclose (file);
|
||||
|
||||
theme = theme_file_parse (path);
|
||||
CHECK(theme != NULL);
|
||||
STRCMP_EQUAL("only_info", theme->name);
|
||||
STRCMP_EQUAL("", theme->description);
|
||||
STRCMP_EQUAL("", theme->date);
|
||||
STRCMP_EQUAL("", theme->weechat_version);
|
||||
LONGS_EQUAL(0, theme->overrides->items_count);
|
||||
theme_free (theme);
|
||||
unlink (path);
|
||||
|
||||
/* malformed lines must not crash; a missing-'=' line and a stray
|
||||
section header are tolerated, the rest of the file still parses */
|
||||
file = fopen (path, "w");
|
||||
CHECK(file != NULL);
|
||||
fprintf (file, "[info]\n");
|
||||
fprintf (file, "name = \"robust\"\n");
|
||||
fprintf (file, "broken line without equals\n");
|
||||
fprintf (file, "[unknown_section]\n");
|
||||
fprintf (file, "ignored = value\n");
|
||||
fprintf (file, "[options]\n");
|
||||
fprintf (file, "weechat.color.chat = red\n");
|
||||
fclose (file);
|
||||
|
||||
theme = theme_file_parse (path);
|
||||
CHECK(theme != NULL);
|
||||
STRCMP_EQUAL("robust", theme->name);
|
||||
LONGS_EQUAL(1, theme->overrides->items_count);
|
||||
STRCMP_EQUAL("red",
|
||||
(const char *)hashtable_get (theme->overrides,
|
||||
"weechat.color.chat"));
|
||||
POINTERS_EQUAL(NULL, hashtable_get (theme->overrides, "ignored"));
|
||||
theme_free (theme);
|
||||
unlink (path);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test functions:
|
||||
* theme_init
|
||||
|
||||
Reference in New Issue
Block a user