diff --git a/CHANGELOG.md b/CHANGELOG.md
index 45f0e91a..a78522d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 2.36 (2024-11-24)
+* When searching for hashtags, show remainder of line after hashtag in search results (@jendrikseipp).
+* When searching for a hashtag, scroll to hashtag and highlight it (@jendrikseipp).
+* Add simple way for showing all entries: allow searching for whitespace (which should be part of all days) (@jendrikseipp).
+
# 2.35 (2024-09-22)
* Add option to auto-indent text in editor and activate it by default (#561, #562, Allen Benter, Varunjay Varma).
diff --git a/TODO.md b/TODO.md
index 471c07d6..30c89d35 100644
--- a/TODO.md
+++ b/TODO.md
@@ -11,7 +11,7 @@ status.
- [ ] Use separate file for storing CSS to allow users to override styles more easily.
- [ ] Make default CSS prettier.
- [ ] Allow searching for days that contain *multiple* words or tags.
-- [ ] Add simple way to show all entries: allow searching for whitespace (i.e., don't strip whitespace from search string).
+- [X] Add simple way to show all entries: allow searching for whitespace (i.e., don't strip whitespace from search string).
- [ ] Copy files and pictures into data subdirectory (#163, #469).
- [ ] Require minimum width for calendar panel to avoid hiding it by accident.
@@ -25,11 +25,9 @@ status.
### Remove right-side tags panel (disabled by default)
-- [ ] When searching for a hashtag (see #498):
- - if hashtag is the only text on the line: show text around hashtag.
- - otherwise, show all content on the line except for the hashtag.
-- [ ] When searching for a hashtag, scroll to hashtag and highlight it.
-- [ ] Optional: enable right-side tags panel by default, if journal has right-side tags.
+- [X] When searching for a hashtag (see #498): if hashtag starts the line: show text after hashtag.
+- [X] When searching for a hashtag, scroll to hashtag and highlight it.
+- [-] Optional: enable right-side tags panel by default, if journal has right-side tags.
- [ ] Transform existing right-side tags foo:bar to "#foo bar" when loading a journal.
- [ ] Remove code for right-side tags panel.
diff --git a/data/rednotebook.appdata.xml b/data/rednotebook.appdata.xml
index 16c77e79..6edd95b1 100644
--- a/data/rednotebook.appdata.xml
+++ b/data/rednotebook.appdata.xml
@@ -6,7 +6,9 @@
GPL-2.0+
RedNotebook
- Jendrik Seipp
+
+ Jendrik Seipp
+
jendrikseipp_AT_gmail.com
Graphical diary and journal
@@ -37,12 +39,6 @@
https://rednotebook.app/screenshots/rednotebook-2.0-2.png
-
- ModernToolkit
- HiDpiIcon
- HighContrast
- UserDocs
-
@@ -60,40 +56,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/debian/changelog b/debian/changelog
index 6c8c28ee..ee742b6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+rednotebook (2.36-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * When searching for hashtags, show remainder of line after hashtag in search results (@jendrikseipp).
+ * When searching for a hashtag, scroll to hashtag and highlight it (@jendrikseipp).
+ * Add simple way for showing all entries: allow searching for whitespace (which should be part of all days) (@jendrikseipp).
+
+ -- Jendrik Seipp Sun, 24 Nov 2024 19:15:29 +0100
+
rednotebook (2.35-1) UNRELEASED; urgency=low
* New upstream release
diff --git a/po/eo.po b/po/eo.po
index 9226044b..819c01ab 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8,19 +8,21 @@ msgstr ""
"Project-Id-Version: rednotebook\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-02 08:57+0200\n"
-"PO-Revision-Date: 2015-11-01 21:12+0000\n"
-"Last-Translator: Adolfo Jayme \n"
-"Language-Team: Esperanto \n"
+"PO-Revision-Date: 2024-08-27 14:09+0000\n"
+"Last-Translator: phlostically \n"
+"Language-Team: Esperanto \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 5.7.1-dev\n"
"X-Launchpad-Export-Date: 2016-08-13 05:35+0000\n"
-"X-Generator: Launchpad (build 18169)\n"
#: ../rednotebook/info.py:30
msgid "A Desktop Journal"
-msgstr ""
+msgstr "Komputila taglibro"
#: ../rednotebook/info.py:48
msgid ""
@@ -36,11 +38,11 @@ msgstr ""
#: ../rednotebook/gui/options.py:161
msgid "%A, %x, Day %j"
-msgstr ""
+msgstr "%A, %x, Tago %j"
#: ../rednotebook/gui/options.py:163
msgid "Week %W of Year %Y"
-msgstr ""
+msgstr "Semajno %W de la Jaro %Y"
#: ../rednotebook/gui/options.py:165
msgid "Day %j"
@@ -72,31 +74,31 @@ msgstr ""
#: ../rednotebook/gui/options.py:315
msgid "Check for new version at startup"
-msgstr ""
+msgstr "Kontroli pri nova versio dum lanĉado"
#: ../rednotebook/gui/options.py:318
msgid "Search as you type"
-msgstr ""
+msgstr "Serĉi dum tajpado"
#: ../rednotebook/gui/options.py:328
msgid "Check now"
-msgstr ""
+msgstr "Kontroli nun"
#: ../rednotebook/gui/options.py:335
msgid "Edit font:"
-msgstr ""
+msgstr "Ŝanĝi tiparon:"
#: ../rednotebook/gui/options.py:337
msgid "Preview font:"
-msgstr ""
+msgstr "Rigardi tiparon:"
#: ../rednotebook/gui/options.py:340
msgid "Comma-separated font names"
-msgstr ""
+msgstr "Kome apartigitaj nomoj de tiparoj"
#: ../rednotebook/gui/options.py:343
msgid "Date/Time format"
-msgstr ""
+msgstr "Formo de datoj kaj tempoj"
#: ../rednotebook/gui/options.py:345
msgid "Used by Date/Time button and $date$ template macro."
@@ -104,7 +106,7 @@ msgstr ""
#: ../rednotebook/gui/options.py:348
msgid "Date format"
-msgstr ""
+msgstr "Formo de datoj"
#: ../rednotebook/gui/options.py:350
msgid "Used for dates in titlebar and exports."
@@ -112,7 +114,7 @@ msgstr ""
#: ../rednotebook/gui/options.py:353
msgid "Tags in cloud"
-msgstr ""
+msgstr "Etikedoj en la nubo"
#: ../rednotebook/gui/options.py:355
msgid "Maximum number of tags displayed in the cloud"
@@ -144,7 +146,7 @@ msgstr "Kursive"
#: ../rednotebook/gui/format_menu.py:108
msgid "Monospace"
-msgstr ""
+msgstr "Egallarĝe"
#: ../rednotebook/gui/format_menu.py:116
msgid "Underline"
@@ -180,7 +182,7 @@ msgstr ""
#: ../rednotebook/gui/main_window.py:330
msgid "Show RedNotebook"
-msgstr ""
+msgstr "Montri RedNotebook"
#: ../rednotebook/gui/main_window.py:590
msgid "No directory selected."
@@ -197,11 +199,11 @@ msgstr ""
#: ../rednotebook/gui/insert_menu.py:106 ../rednotebook/gui/insert_menu.py:113
msgid "First Item"
-msgstr ""
+msgstr "Unua ero"
#: ../rednotebook/gui/insert_menu.py:107 ../rednotebook/gui/insert_menu.py:114
msgid "Second Item"
-msgstr ""
+msgstr "Dua ero"
#: ../rednotebook/gui/insert_menu.py:108 ../rednotebook/gui/insert_menu.py:115
msgid "Indented Item"
@@ -225,7 +227,7 @@ msgstr "Dosiero"
#: ../rednotebook/gui/insert_menu.py:150
msgid "Insert a link to a file"
-msgstr ""
+msgstr "Enmeti hiperligon al dosiero"
#: ../rednotebook/gui/insert_menu.py:157
msgid "_Link"
@@ -233,15 +235,15 @@ msgstr "_Ligilo"
#: ../rednotebook/gui/insert_menu.py:159
msgid "Insert a link to a website"
-msgstr ""
+msgstr "Enmeti hiperligon al retejo"
#: ../rednotebook/gui/insert_menu.py:165
msgid "Bullet List"
-msgstr ""
+msgstr "Kugla listo"
#: ../rednotebook/gui/insert_menu.py:173
msgid "Numbered List"
-msgstr ""
+msgstr "Numerita listo"
#: ../rednotebook/gui/insert_menu.py:178
msgid "Title"
@@ -257,7 +259,7 @@ msgstr ""
#: ../rednotebook/gui/insert_menu.py:190
msgid "Date/Time"
-msgstr ""
+msgstr "Dato/tempo"
#: ../rednotebook/gui/insert_menu.py:192
msgid "Insert the current date and time (edit format in preferences)"
@@ -265,7 +267,7 @@ msgstr ""
#: ../rednotebook/gui/insert_menu.py:198
msgid "Line Break"
-msgstr ""
+msgstr "Linifino"
#: ../rednotebook/gui/insert_menu.py:200
msgid "Insert a manual line break"
@@ -273,15 +275,15 @@ msgstr ""
#: ../rednotebook/gui/insert_menu.py:203
msgid "_Insert"
-msgstr ""
+msgstr "_Enmeti"
#: ../rednotebook/gui/insert_menu.py:208
msgid "Level"
-msgstr ""
+msgstr "Nivelo"
#: ../rednotebook/gui/insert_menu.py:243
msgid "Insert"
-msgstr ""
+msgstr "Enmeti"
#: ../rednotebook/gui/insert_menu.py:245
msgid "Insert images, files, links and other content"
@@ -289,7 +291,7 @@ msgstr ""
#: ../rednotebook/gui/insert_menu.py:276
msgid "Width (optional):"
-msgstr ""
+msgstr "Larĝo (nedeviga):"
#: ../rednotebook/gui/insert_menu.py:282
msgid "pixels"
@@ -297,7 +299,7 @@ msgstr "bilderoj"
#: ../rednotebook/gui/insert_menu.py:303
msgid "Width must be an integer."
-msgstr ""
+msgstr "La larĝo devas esti entjero."
#: ../rednotebook/gui/insert_menu.py:387
msgid "No link location has been entered"
@@ -305,11 +307,11 @@ msgstr ""
#: ../rednotebook/gui/search.py:102
msgid "Replace"
-msgstr ""
+msgstr "Anstataŭigi"
#: ../rednotebook/gui/search.py:125 ../rednotebook/gui/exports.py:416
msgid "Date"
-msgstr ""
+msgstr "Dato"
#: ../rednotebook/gui/search.py:125
msgid "Text"
@@ -317,27 +319,27 @@ msgstr "Teksto"
#: ../rednotebook/gui/customwidgets.py:48
msgid "Search"
-msgstr ""
+msgstr "Serĉi"
#: ../rednotebook/gui/customwidgets.py:339
msgid "Save and insert"
-msgstr ""
+msgstr "Konservi kaj enmeti"
#: ../rednotebook/gui/customwidgets.py:341 ../rednotebook/gui/menu.py:110
msgid "Save"
-msgstr ""
+msgstr "Konservi"
#: ../rednotebook/gui/customwidgets.py:343
msgid "Close"
-msgstr ""
+msgstr "Fermi"
#: ../rednotebook/gui/menu.py:93
msgid "_Journal"
-msgstr ""
+msgstr "_Taglibro"
#: ../rednotebook/gui/menu.py:97
msgid "New"
-msgstr ""
+msgstr "Nova"
#: ../rednotebook/gui/menu.py:99
msgid "Create a new journal. The old one will be saved"
@@ -345,7 +347,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:105 tmp/main_window.glade.h:9
msgid "Open"
-msgstr ""
+msgstr "Malfermi"
#: ../rednotebook/gui/menu.py:107
msgid "Load an existing journal. The old journal will be saved"
@@ -353,7 +355,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:114
msgid "Save As"
-msgstr ""
+msgstr "Konservi kiel"
#: ../rednotebook/gui/menu.py:117
msgid ""
@@ -378,7 +380,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:142
msgid "S_tatistics"
-msgstr ""
+msgstr "S_tatistikoj"
#: ../rednotebook/gui/menu.py:144
msgid "Show some statistics about the journal"
@@ -386,7 +388,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:150
msgid "Quit"
-msgstr ""
+msgstr "Forlasi"
#: ../rednotebook/gui/menu.py:152
msgid "Shutdown RedNotebook. It will not be sent to the tray."
@@ -398,7 +400,7 @@ msgstr "_Redakti"
#: ../rednotebook/gui/menu.py:159
msgid "Undo"
-msgstr ""
+msgstr "Malfari"
#: ../rednotebook/gui/menu.py:161
msgid "Undo text or tag edits"
@@ -406,7 +408,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:167
msgid "Redo"
-msgstr ""
+msgstr "Refari"
#: ../rednotebook/gui/menu.py:169
msgid "Redo text or tag edits"
@@ -414,27 +416,27 @@ msgstr ""
#: ../rednotebook/gui/menu.py:175
msgid "Cut"
-msgstr ""
+msgstr "Eltondi"
#: ../rednotebook/gui/menu.py:183
msgid "Copy"
-msgstr ""
+msgstr "Kopii"
#: ../rednotebook/gui/menu.py:191
msgid "Paste"
-msgstr ""
+msgstr "Alglui"
#: ../rednotebook/gui/menu.py:199
msgid "Fullscreen"
-msgstr ""
+msgstr "Plenekrane"
#: ../rednotebook/gui/menu.py:207
msgid "Find"
-msgstr ""
+msgstr "Trovi"
#: ../rednotebook/gui/menu.py:219
msgid "Spell Check"
-msgstr ""
+msgstr "Ortografia kontrolo"
#: ../rednotebook/gui/menu.py:221
msgid "Underline misspelled words"
@@ -446,11 +448,11 @@ msgstr "Preferoj"
#: ../rednotebook/gui/menu.py:236
msgid "_Help"
-msgstr ""
+msgstr "_Helpo"
#: ../rednotebook/gui/menu.py:240
msgid "Contents"
-msgstr ""
+msgstr "Enhavoj"
#: ../rednotebook/gui/menu.py:242
msgid "Open the RedNotebook documentation"
@@ -458,7 +460,7 @@ msgstr ""
#: ../rednotebook/gui/menu.py:248
msgid "Donate"
-msgstr ""
+msgstr "Donaci"
#: ../rednotebook/gui/menu.py:250
msgid "Support RedNotebook with a donation"
@@ -466,15 +468,15 @@ msgstr ""
#: ../rednotebook/gui/menu.py:256
msgid "Translate RedNotebook"
-msgstr ""
+msgstr "Traduki RedNotebook"
#: ../rednotebook/gui/menu.py:258
msgid "Help translate RedNotebook to your language"
-msgstr ""
+msgstr "Helpi traduki RedNotebook al via lingvo"
#: ../rednotebook/gui/menu.py:264
msgid "Report a Problem"
-msgstr ""
+msgstr "Raporti problemon"
#: ../rednotebook/gui/menu.py:266
msgid "Fill out a short form about the problem"
@@ -490,11 +492,11 @@ msgstr ""
#: ../rednotebook/gui/menu.py:277
msgid "About"
-msgstr ""
+msgstr "Pri"
#: ../rednotebook/gui/menu.py:295
msgid "Wrong directory"
-msgstr ""
+msgstr "Malĝusta dosierujo"
#: ../rednotebook/gui/menu.py:299 ../rednotebook/journal.py:248
msgid "You cannot use this directory for your journal:"
@@ -538,11 +540,11 @@ msgstr ""
#: ../rednotebook/gui/menu.py:415
msgid "RedNotebook Documentation"
-msgstr ""
+msgstr "Dokumentaro pri RedNotebook"
#: ../rednotebook/gui/menu.py:443
msgid "Contributors:"
-msgstr ""
+msgstr "Kontribuintoj:"
#. Translators: TRANSLATORS: Replace this string with your names, one name per line.
#: ../rednotebook/gui/menu.py:444 tmp/main_window.glade.h:2
@@ -621,19 +623,19 @@ msgstr ""
#: ../rednotebook/gui/exports.py:150
msgid "Available tags"
-msgstr ""
+msgstr "Haveblaj etikedoj"
#: ../rednotebook/gui/exports.py:153
msgid "Selected tags"
-msgstr ""
+msgstr "Elektitaj etikedoj"
#: ../rednotebook/gui/exports.py:162
msgid "Select"
-msgstr ""
+msgstr "Elekti"
#: ../rednotebook/gui/exports.py:163
msgid "Deselect"
-msgstr ""
+msgstr "Malelekti"
#: ../rednotebook/gui/exports.py:258
msgid "When filtering by tags, you have to select at least one tag."
@@ -645,7 +647,7 @@ msgstr ""
#: ../rednotebook/gui/exports.py:306
msgid "Export Assistant"
-msgstr ""
+msgstr "Elportilo"
#: ../rednotebook/gui/exports.py:314
msgid "Welcome to the Export Assistant."
@@ -675,7 +677,7 @@ msgstr ""
#: ../rednotebook/gui/exports.py:347
msgid "Select Contents"
-msgstr ""
+msgstr "Elektu enhavojn"
#: ../rednotebook/gui/exports.py:353
msgid "Select Export Path"
@@ -683,7 +685,7 @@ msgstr ""
#: ../rednotebook/gui/exports.py:358
msgid "Summary"
-msgstr ""
+msgstr "Resumo"
#: ../rednotebook/gui/exports.py:418
msgid "Export selected text only"
@@ -691,19 +693,19 @@ msgstr ""
#: ../rednotebook/gui/exports.py:422
msgid "Start date"
-msgstr ""
+msgstr "Komenca dato"
#: ../rednotebook/gui/exports.py:423
msgid "End date"
-msgstr ""
+msgstr "Fina dato"
#: ../rednotebook/gui/exports.py:428
msgid "Include text"
-msgstr ""
+msgstr "Inkluzivi tekston"
#: ../rednotebook/gui/exports.py:431
msgid "Include tags"
-msgstr ""
+msgstr "Inkluzivi etikedojn"
#: ../rednotebook/gui/exports.py:435
msgid "Filtered by tags"
@@ -728,7 +730,7 @@ msgstr ""
#: ../rednotebook/gui/exports.py:523
msgid "Plain Text"
-msgstr ""
+msgstr "Ordinara teksto"
#: ../rednotebook/gui/categories.py:133
msgid "Empty entries are not allowed"
@@ -753,12 +755,12 @@ msgstr ""
#: ../rednotebook/util/utils.py:116
#, python-format
msgid "You have version %s."
-msgstr ""
+msgstr "Via versio estas %s."
#: ../rednotebook/util/utils.py:118
#, python-format
msgid "The latest version is %s."
-msgstr ""
+msgstr "La plej nova versio estas %s."
#: ../rednotebook/util/utils.py:121
msgid "If you like the program, please consider making a donation."
@@ -831,6 +833,8 @@ msgid ""
"There are two modes in RedNotebook, the __edit__ mode and the __preview__ "
"mode."
msgstr ""
+"Jen al du reĝimoj de RedNotebook: la __redakta__ reĝimo kaj la "
+"__antaŭrigarda__ reĝimo."
#: ../rednotebook/help.py:51
msgid "Click on Edit above to see the difference."
@@ -838,11 +842,11 @@ msgstr ""
#: ../rednotebook/help.py:54
msgid "Tagging is easy."
-msgstr ""
+msgstr "Uzi etikedojn estas facile."
#: ../rednotebook/help.py:55
msgid "Just use #hashtags like on twitter."
-msgstr ""
+msgstr "Simple uzu #kradvortojn kiel en X."
#: ../rednotebook/help.py:59
msgid ""
@@ -852,14 +856,12 @@ msgid ""
msgstr ""
#: ../rednotebook/help.py:64
-#, fuzzy
-#| msgid "Template"
msgid "Templates"
-msgstr "Ŝablono"
+msgstr "Ŝablonoj"
#: ../rednotebook/help.py:65
msgid "RedNotebook supports templates."
-msgstr ""
+msgstr "RedNotebook ebligas ŝablonojn."
#: ../rednotebook/help.py:66
msgid "Click on the arrow next to the \"Template\" button to see some options."
@@ -910,7 +912,7 @@ msgstr ""
#: ../rednotebook/help.py:89
msgid "Have a nice day!"
-msgstr ""
+msgstr "Bonan tagon!"
#: ../rednotebook/help.py:114
msgid ""
@@ -945,7 +947,7 @@ msgstr ""
#: ../rednotebook/journal.py:385
msgid "Nothing to save"
-msgstr ""
+msgstr "Nenio konservota"
#: ../rednotebook/journal.py:527
msgid "Error"
@@ -971,11 +973,11 @@ msgstr ""
#: ../rednotebook/backup.py:67
msgid "Backup"
-msgstr ""
+msgstr "Savkopio"
#: ../rednotebook/backup.py:70
msgid "Backup now"
-msgstr ""
+msgstr "Fari savkopion nun"
#: ../rednotebook/backup.py:72
msgid "Ask at next start"
@@ -1052,6 +1054,17 @@ msgid ""
"\n"
"**Pictures:** [Image folder \"\"/path/to/the/images/\"\"]\n"
msgstr ""
+"=== Vojaĝo ===\n"
+"**Dato:**\n"
+"\n"
+"**Loko:**\n"
+"\n"
+"**Vojaĝintoj:**\n"
+"\n"
+"**La vojaĝo:**\n"
+"Unue ni iris al xxxxx, kaj poste ni iris al yyyyy …\n"
+"\n"
+"**Bildoj:** [Bildujo \"\"/loko/de/la/bildoj/\"\"]\n"
#: ../rednotebook/templates.py:156
msgid ""
@@ -1063,6 +1076,13 @@ msgid ""
"- **Outcome and Follow up:**\n"
"==================================\n"
msgstr ""
+"==================================\n"
+"=== Telefona interparolo ===\n"
+"- **Homo:**\n"
+"- **Tempo:**\n"
+"- **Temo:**\n"
+"- **Rezulto kaj farendaĵoj:**\n"
+"==================================\n"
#: ../rednotebook/templates.py:168
msgid ""
@@ -1086,10 +1106,8 @@ msgid ""
msgstr ""
#: ../rednotebook/templates.py:196
-#, fuzzy
-#| msgid "Template"
msgid "Template mode"
-msgstr "Ŝablono"
+msgstr "Ŝablona reĝimo"
#: ../rednotebook/templates.py:200
msgid "You are currently editing a template."
@@ -1097,7 +1115,7 @@ msgstr ""
#: ../rednotebook/templates.py:321
msgid "Choose Template Name"
-msgstr ""
+msgstr "Elektu nomon de ŝablono"
#: ../rednotebook/templates.py:362
msgid "This template file contains no text or has unreadable content."
@@ -1113,23 +1131,23 @@ msgstr "Krei novan ŝablonon"
#: tmp/main_window.glade.h:3
msgid "Select backup filename"
-msgstr ""
+msgstr "Elektu nomon de savkopio"
#: tmp/main_window.glade.h:4
msgid "_Cancel"
-msgstr ""
+msgstr "_Nuligi"
#: tmp/main_window.glade.h:5
msgid "_Save"
-msgstr ""
+msgstr "_Konservi"
#: tmp/main_window.glade.h:6
msgid "Select a directory"
-msgstr ""
+msgstr "Elektu dosierujon"
#: tmp/main_window.glade.h:7
msgid "_OK"
-msgstr ""
+msgstr "_Bone"
#: tmp/main_window.glade.h:8
msgid "Select a file"
@@ -1137,25 +1155,23 @@ msgstr "Elektu dosieron"
#: tmp/main_window.glade.h:10
msgid "Insert Link"
-msgstr ""
+msgstr "Enmeti hiperligon"
#: tmp/main_window.glade.h:11
msgid "Link location (e.g. https://www.google.com)"
-msgstr ""
+msgstr "Celo de hiperligo (ekz. https://www.google.com)"
#: tmp/main_window.glade.h:12
msgid "Link name (optional)"
-msgstr ""
+msgstr "Nomo de hiperligo (nedeviga)"
#: tmp/main_window.glade.h:13
msgid "Go to previous day (Ctrl+PageUp)"
msgstr ""
#: tmp/main_window.glade.h:14
-#, fuzzy
-#| msgid "_Backup"
msgid "Back"
-msgstr "_Sekurkopii"
+msgstr "Reen"
#: tmp/main_window.glade.h:15
msgid "Jump to today (Alt+Home)"
@@ -1171,7 +1187,7 @@ msgstr ""
#: tmp/main_window.glade.h:18
msgid "Forward"
-msgstr ""
+msgstr "Antaŭen"
#: tmp/main_window.glade.h:19
msgid "Show a formatted preview of the text (Ctrl+P)"
@@ -1183,7 +1199,7 @@ msgstr ""
#: tmp/main_window.glade.h:23
msgid "Edit"
-msgstr ""
+msgstr "Modifi"
#: tmp/main_window.glade.h:24
msgid "Add a tag or a category entry"
@@ -1191,7 +1207,7 @@ msgstr ""
#: tmp/main_window.glade.h:25
msgid "Add Tag"
-msgstr ""
+msgstr "Aldoni etikedon"
#: tmp/main_window.glade.h:26
msgid "New entry"
@@ -1217,15 +1233,15 @@ msgstr "Ĝenerale"
#: tmp/main_window.glade.h:34
msgid "Select a picture"
-msgstr ""
+msgstr "Elektu bildon"
#: tmp/main_window.glade.h:35
msgid "_Open"
-msgstr ""
+msgstr "_Malfermi"
#: tmp/main_window.glade.h:36
msgid "Exit without saving"
-msgstr ""
+msgstr "Forlasi sen konservado"
#: tmp/main_window.glade.h:37
msgid "Statistics"
@@ -1233,7 +1249,7 @@ msgstr "Statistikoj"
#: tmp/main_window.glade.h:38
msgid "Selected Day"
-msgstr ""
+msgstr "Elektita tago"
#: tmp/main_window.glade.h:39
msgid "Overall"
diff --git a/po/ja.po b/po/ja.po
index 723f8d68..23c27683 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,16 +8,17 @@ msgstr ""
"Project-Id-Version: rednotebook\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-02 08:57+0200\n"
-"PO-Revision-Date: 2018-10-17 13:40+0000\n"
-"Last-Translator: Shinichirou Yamada \n"
-"Language-Team: Japanese \n"
+"PO-Revision-Date: 2024-10-14 09:15+0000\n"
+"Last-Translator: Yuji S \n"
+"Language-Team: Japanese \n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Weblate 5.8-dev\n"
"X-Launchpad-Export-Date: 2018-10-18 05:33+0000\n"
-"X-Generator: Launchpad (build 18790)\n"
#: ../rednotebook/info.py:30
msgid "A Desktop Journal"
@@ -30,6 +31,10 @@ msgid ""
"templates, spell check your notes, and export to plain text, HTML or\n"
"Latex.\n"
msgstr ""
+"RedNotebookはモダンなデスクトップジャーナルです。\n"
+"タグ付け、全文検索ができます。\n"
+"写真やリンクを追加したり、テンプレートから挿入も可能です。\n"
+"プレーンテキスト、HTML、Latexにエクスポートできます。\n"
#: ../rednotebook/gui/options.py:81
msgid "Load RedNotebook at startup"
@@ -77,7 +82,7 @@ msgstr "起動時に新しいバージョンをチェック"
#: ../rednotebook/gui/options.py:318
msgid "Search as you type"
-msgstr ""
+msgstr "種類から探す"
#: ../rednotebook/gui/options.py:328
msgid "Check now"
@@ -101,7 +106,7 @@ msgstr "日付/時間の書式"
#: ../rednotebook/gui/options.py:345
msgid "Used by Date/Time button and $date$ template macro."
-msgstr ""
+msgstr "日付/時刻ボタンと $date$ テンプレート マクロによって使用されます。"
#: ../rednotebook/gui/options.py:348
msgid "Date format"
@@ -109,15 +114,15 @@ msgstr "日付の書式"
#: ../rednotebook/gui/options.py:350
msgid "Used for dates in titlebar and exports."
-msgstr ""
+msgstr "タイトルバーとエクスポートの日付に使用されます。"
#: ../rednotebook/gui/options.py:353
msgid "Tags in cloud"
-msgstr ""
+msgstr "クラウド内のタグ"
#: ../rednotebook/gui/options.py:355
msgid "Maximum number of tags displayed in the cloud"
-msgstr ""
+msgstr "クラウドに表示されるタグの最大数"
#: ../rednotebook/gui/options.py:358
msgid "Exclude from cloud"
@@ -156,8 +161,6 @@ msgid "Strikethrough"
msgstr "取り消し線"
#: ../rednotebook/gui/format_menu.py:132
-#, fuzzy
-#| msgid "Clear format"
msgid "Clear Format"
msgstr "書式を消去"
@@ -177,7 +180,7 @@ msgstr "選択中のテキストまたはタグのフォーマットを変更"
#: ../rednotebook/gui/main_window.py:184
msgid "Preview in Browser"
-msgstr ""
+msgstr "ブラウザでプレビュー"
#: ../rednotebook/gui/main_window.py:330
msgid "Show RedNotebook"
@@ -243,15 +246,15 @@ msgstr "箇条書き"
#: ../rednotebook/gui/insert_menu.py:173
msgid "Numbered List"
-msgstr ""
+msgstr "番号付きリスト"
#: ../rednotebook/gui/insert_menu.py:178
msgid "Title"
-msgstr "タイトル"
+msgstr "ヘッダー"
#: ../rednotebook/gui/insert_menu.py:182
msgid "Line"
-msgstr "線"
+msgstr "区切り線"
#: ../rednotebook/gui/insert_menu.py:184
msgid "Insert a separator line"
@@ -279,7 +282,7 @@ msgstr "挿入(_I)"
#: ../rednotebook/gui/insert_menu.py:208
msgid "Level"
-msgstr ""
+msgstr "レベル"
#: ../rednotebook/gui/insert_menu.py:243
msgid "Insert"
@@ -307,7 +310,7 @@ msgstr "リンクの場所が入力されていません"
#: ../rednotebook/gui/search.py:102
msgid "Replace"
-msgstr ""
+msgstr "置き換え"
#: ../rednotebook/gui/search.py:125 ../rednotebook/gui/exports.py:416
msgid "Date"
@@ -319,7 +322,7 @@ msgstr "テキスト"
#: ../rednotebook/gui/customwidgets.py:48
msgid "Search"
-msgstr ""
+msgstr "検索"
#: ../rednotebook/gui/customwidgets.py:339
msgid "Save and insert"
@@ -327,11 +330,11 @@ msgstr "保存して挿入"
#: ../rednotebook/gui/customwidgets.py:341 ../rednotebook/gui/menu.py:110
msgid "Save"
-msgstr ""
+msgstr "保存"
#: ../rednotebook/gui/customwidgets.py:343
msgid "Close"
-msgstr ""
+msgstr "閉じる"
#: ../rednotebook/gui/menu.py:93
msgid "_Journal"
@@ -339,7 +342,7 @@ msgstr "日記(_J)"
#: ../rednotebook/gui/menu.py:97
msgid "New"
-msgstr ""
+msgstr "新規"
#: ../rednotebook/gui/menu.py:99
msgid "Create a new journal. The old one will be saved"
@@ -347,7 +350,7 @@ msgstr "新しい日記を作成する (現在編集中の日記は保存され
#: ../rednotebook/gui/menu.py:105 tmp/main_window.glade.h:9
msgid "Open"
-msgstr ""
+msgstr "開く"
#: ../rednotebook/gui/menu.py:107
msgid "Load an existing journal. The old journal will be saved"
@@ -355,7 +358,7 @@ msgstr "既存の日記を開く (現在編集中の日記は保存されます)
#: ../rednotebook/gui/menu.py:114
msgid "Save As"
-msgstr ""
+msgstr "指定して保存"
#: ../rednotebook/gui/menu.py:117
msgid ""
@@ -388,11 +391,11 @@ msgstr "日記の統計的なデータを表示する"
#: ../rednotebook/gui/menu.py:150
msgid "Quit"
-msgstr ""
+msgstr "終了"
#: ../rednotebook/gui/menu.py:152
msgid "Shutdown RedNotebook. It will not be sent to the tray."
-msgstr "RedNotebook を終了する (システムトレイには送られません)"
+msgstr "RedNotebook を終了する。システムトレイには残りません。"
#: ../rednotebook/gui/menu.py:155
msgid "_Edit"
@@ -400,7 +403,7 @@ msgstr "編集(_E)"
#: ../rednotebook/gui/menu.py:159
msgid "Undo"
-msgstr ""
+msgstr "元に戻す"
#: ../rednotebook/gui/menu.py:161
msgid "Undo text or tag edits"
@@ -408,7 +411,7 @@ msgstr "テキストまたはタグの編集を元に戻す"
#: ../rednotebook/gui/menu.py:167
msgid "Redo"
-msgstr ""
+msgstr "やり直し"
#: ../rednotebook/gui/menu.py:169
msgid "Redo text or tag edits"
@@ -416,27 +419,27 @@ msgstr "テキストまたはタグの編集をやり直す"
#: ../rednotebook/gui/menu.py:175
msgid "Cut"
-msgstr ""
+msgstr "切り取り"
#: ../rednotebook/gui/menu.py:183
msgid "Copy"
-msgstr ""
+msgstr "コピー"
#: ../rednotebook/gui/menu.py:191
msgid "Paste"
-msgstr ""
+msgstr "貼り付け"
#: ../rednotebook/gui/menu.py:199
msgid "Fullscreen"
-msgstr ""
+msgstr "フル スクリーン"
#: ../rednotebook/gui/menu.py:207
msgid "Find"
-msgstr ""
+msgstr "探す"
#: ../rednotebook/gui/menu.py:219
msgid "Spell Check"
-msgstr ""
+msgstr "スペル チェック"
#: ../rednotebook/gui/menu.py:221
msgid "Underline misspelled words"
@@ -452,7 +455,7 @@ msgstr "ヘルプ(_H)"
#: ../rednotebook/gui/menu.py:240
msgid "Contents"
-msgstr "目次"
+msgstr "目次ドキュメント"
#: ../rednotebook/gui/menu.py:242
msgid "Open the RedNotebook documentation"
@@ -460,23 +463,19 @@ msgstr "RedNotebook ドキュメントを開く"
#: ../rednotebook/gui/menu.py:248
msgid "Donate"
-msgstr ""
+msgstr "寄付する"
#: ../rednotebook/gui/menu.py:250
-#, fuzzy
-#| msgid "Open the RedNotebook documentation"
msgid "Support RedNotebook with a donation"
-msgstr "RedNotebook ドキュメントを開く"
+msgstr "寄付で RedNotebook をサポートする"
#: ../rednotebook/gui/menu.py:256
msgid "Translate RedNotebook"
msgstr "RedNotebook を翻訳"
#: ../rednotebook/gui/menu.py:258
-#, fuzzy
-#| msgid "Translate RedNotebook"
msgid "Help translate RedNotebook to your language"
-msgstr "RedNotebook を翻訳"
+msgstr "RedNotebook をあなたの言語に翻訳するのを手伝ってください"
#: ../rednotebook/gui/menu.py:264
msgid "Report a Problem"
@@ -488,19 +487,19 @@ msgstr "問題について簡潔に要旨を述べる"
#: ../rednotebook/gui/menu.py:272
msgid "Give Feedback"
-msgstr ""
+msgstr "フィードバック"
#: ../rednotebook/gui/menu.py:274
msgid "How can we improve RedNotebook?"
-msgstr ""
+msgstr "RedNotebook をどのように改善できますか?"
#: ../rednotebook/gui/menu.py:277
msgid "About"
-msgstr ""
+msgstr "RedNotebook について"
#: ../rednotebook/gui/menu.py:295
msgid "Wrong directory"
-msgstr "不正なフォルダー"
+msgstr "間違ったフォルダー (ディレクトリ)"
#: ../rednotebook/gui/menu.py:299 ../rednotebook/journal.py:248
msgid "You cannot use this directory for your journal:"
@@ -548,29 +547,20 @@ msgstr "RedNotebook ドキュメント"
#: ../rednotebook/gui/menu.py:443
msgid "Contributors:"
-msgstr ""
+msgstr "貢献者:"
#. Translators: TRANSLATORS: Replace this string with your names, one name per line.
#: ../rednotebook/gui/menu.py:444 tmp/main_window.glade.h:2
msgid "translator-credits"
-msgstr ""
-"Launchpad Contributions:\n"
-" Edward Teo https://launchpad.net/~vanquish-box\n"
-" Iori Namekawa https://launchpad.net/~y1t2y2z1\n"
-" Jbe https://launchpad.net/~jabe2010\n"
-" José Lou Chang https://launchpad.net/~obake\n"
-" Shinichirou Yamada https://launchpad.net/~yamada-strong-yamada-nice-64bit\n"
-" Shushi Kurose https://launchpad.net/~kuromabo\n"
-" Toshiharu Kudoh https://launchpad.net/~toshi-kd2\n"
-" ub https://launchpad.net/~xenolith0bytetestcomgreen"
+msgstr "翻訳者-クレジット"
#: ../rednotebook/gui/clouds.py:74
msgid "filter, these, comma, separated, words, and, #tags"
-msgstr ""
+msgstr "フィルター、カンマ、区切り文字、単語、and、 #タグ"
#: ../rednotebook/gui/clouds.py:79
msgid "mtv, spam, work, job, play"
-msgstr "mtv, spam, work, job, play"
+msgstr "MTV、スパム、仕事、遊び"
#: ../rednotebook/gui/clouds.py:209 ../rednotebook/gui/categories.py:48
#: ../rednotebook/util/markup.py:121 ../rednotebook/help.py:33
@@ -658,11 +648,11 @@ msgstr "以下の設定を選択しました:"
#: ../rednotebook/gui/exports.py:306
msgid "Export Assistant"
-msgstr "エクスポートアシスタント"
+msgstr "エクスポート アシスタント"
#: ../rednotebook/gui/exports.py:314
msgid "Welcome to the Export Assistant."
-msgstr "エクスポートアシスタントへようこそ"
+msgstr "エクスポート アシスタントへようこそ。"
#: ../rednotebook/gui/exports.py:316
msgid "This wizard will help you to export your journal to various formats."
@@ -677,7 +667,7 @@ msgstr "エクスポートしたい日付および保存先を選択できます
#: ../rednotebook/gui/exports.py:332
msgid "PDF: export to HTML, open in browser and print to PDF file"
-msgstr ""
+msgstr "PDF: HTML にエクスポートし、ブラウザで開いて PDF ファイルにプリントします"
#: ../rednotebook/gui/exports.py:337
msgid "Select Export Format"
@@ -685,7 +675,7 @@ msgstr "エクスポートのフォーマットを選択してください"
#: ../rednotebook/gui/exports.py:342
msgid "Select Date Range"
-msgstr "日付範囲を選択してください。"
+msgstr "日付範囲を選択"
#: ../rednotebook/gui/exports.py:347
msgid "Select Contents"
@@ -776,7 +766,7 @@ msgstr "最新バージョンは %s です。"
#: ../rednotebook/util/utils.py:121
msgid "If you like the program, please consider making a donation."
-msgstr ""
+msgstr "プログラムが気に入っていただけましたら、寄付をご検討ください。"
#: ../rednotebook/util/utils.py:123
msgid "Do you want to visit the RedNotebook homepage?"
@@ -871,24 +861,25 @@ msgstr ""
"イアン」っていう映画を見ました。"
#: ../rednotebook/help.py:64
-#, fuzzy
-#| msgid "Template"
msgid "Templates"
msgstr "テンプレート"
#: ../rednotebook/help.py:65
msgid "RedNotebook supports templates."
-msgstr ""
+msgstr "RedNotebook はテンプレートをサポートしています。"
#: ../rednotebook/help.py:66
msgid "Click on the arrow next to the \"Template\" button to see some options."
-msgstr ""
+msgstr "[テンプレート] "
+"ボタンの横にある矢印をクリックして、いくつかのオプションを表示します。"
#: ../rednotebook/help.py:68
msgid ""
"You can have one template for every day\n"
"of the week and unlimited arbitrarily named templates."
msgstr ""
+"毎日 1 つのテンプレートを使用できます\n"
+"今週の、および無制限の任意の名前のテンプレート。"
#. Translators: both are verbs
#: ../rednotebook/help.py:74
@@ -936,22 +927,14 @@ msgid "Have a nice day!"
msgstr "良い一日を!"
#: ../rednotebook/help.py:114
-#, fuzzy
-#| msgid ""
-#| "=== Multiple entries ===\n"
-#| "You can add multiple entries to a single day by using different journals "
-#| "(one named \"Work\", the other \"Family\"), separating your entries with "
-#| "different titles (=== Work ===, === Family ===) and using horizontal "
-#| "separator lines (20 “=”s)."
msgid ""
"=== Multiple entries ===\n"
"You can add multiple entries to a single day by separating your entries with "
"different titles (=== Work ===, === Family ===)."
msgstr ""
-"=== 複数のエントリー ===\n"
-"一日に複数のエントリーを違う日記として書くこともできます。(ひとつは "
-"\"Work\", もうひとつは \"Family\") エントリーに異なるタイトル(=== Work "
-"===, )を使います。そして水平線(20個の\"=”)を入れます。"
+"=== 複数のエントリ ===\n"
+"エントリを異なるタイトル (=== 仕事 ===、=== 家族 ===) で区切ることで、1 "
+"日に複数のエントリを追加できます。"
#: ../rednotebook/help.py:121
msgid ""
@@ -995,19 +978,16 @@ msgstr "エラー"
#: ../rednotebook/journal.py:583
#, python-brace-format
msgid "Replaced {total_replacements} occurrences of the search text"
-msgstr ""
+msgstr "検索テキストの {total_replacements} 件を置換しました"
#: ../rednotebook/journal.py:587
-#, fuzzy
-#| msgid "No text or tag has been selected."
msgid "No text has been replaced"
-msgstr "テキストまたはタグが選択されていません。"
+msgstr "テキストは置換されていません"
#: ../rednotebook/backup.py:58
-#, fuzzy, python-format
-#| msgid "It has been a while since you made your last backup."
+#, python-format
msgid "It has been %d days since you made your last backup."
-msgstr "前回のバックアップ実行からしばらく経過しています。"
+msgstr "最後にバックアップを作成してから %d 日が経過しました。"
#: ../rednotebook/backup.py:60
msgid "You can backup your journal to a zip file to avoid data loss."
@@ -1186,14 +1166,12 @@ msgstr ""
"=====================================\n"
#: ../rednotebook/templates.py:196
-#, fuzzy
-#| msgid "Template"
msgid "Template mode"
-msgstr "テンプレート"
+msgstr "テンプレート モード"
#: ../rednotebook/templates.py:200
msgid "You are currently editing a template."
-msgstr ""
+msgstr "現在テンプレートを編集中です。"
#: ../rednotebook/templates.py:321
msgid "Choose Template Name"
@@ -1217,11 +1195,11 @@ msgstr "バックアップのファイル名を選択"
#: tmp/main_window.glade.h:4
msgid "_Cancel"
-msgstr ""
+msgstr "_キャンセル"
#: tmp/main_window.glade.h:5
msgid "_Save"
-msgstr ""
+msgstr "_保存"
#: tmp/main_window.glade.h:6
msgid "Select a directory"
@@ -1229,7 +1207,7 @@ msgstr "フォルダーの選択"
#: tmp/main_window.glade.h:7
msgid "_OK"
-msgstr ""
+msgstr "_OK"
#: tmp/main_window.glade.h:8
msgid "Select a file"
@@ -1240,10 +1218,8 @@ msgid "Insert Link"
msgstr "リンクの挿入"
#: tmp/main_window.glade.h:11
-#, fuzzy
-#| msgid "Link location (e.g. http://rednotebook.sf.net)"
msgid "Link location (e.g. https://www.google.com)"
-msgstr "リンク先 (例: http://rednotebook.sf.net)"
+msgstr "リンク先 (例: https://www.google.com)"
#: tmp/main_window.glade.h:12
msgid "Link name (optional)"
@@ -1254,10 +1230,8 @@ msgid "Go to previous day (Ctrl+PageUp)"
msgstr "前の日付へ (Ctrl+PageUp)"
#: tmp/main_window.glade.h:14
-#, fuzzy
-#| msgid "Backup"
msgid "Back"
-msgstr "バックアップ"
+msgstr "戻る"
#: tmp/main_window.glade.h:15
msgid "Jump to today (Alt+Home)"
@@ -1273,7 +1247,7 @@ msgstr "次の日付へ (Ctrl+PageDown)"
#: tmp/main_window.glade.h:18
msgid "Forward"
-msgstr ""
+msgstr "進む"
#: tmp/main_window.glade.h:19
msgid "Show a formatted preview of the text (Ctrl+P)"
@@ -1323,7 +1297,7 @@ msgstr "画像の選択"
#: tmp/main_window.glade.h:35
msgid "_Open"
-msgstr ""
+msgstr "_開く"
#: tmp/main_window.glade.h:36
msgid "Exit without saving"
diff --git a/rednotebook/data.py b/rednotebook/data.py
index 512f9e58..b206f87d 100644
--- a/rednotebook/data.py
+++ b/rednotebook/data.py
@@ -100,6 +100,26 @@ def get_text_with_dots(text, start, end, found_text=None):
return res
+def get_search_results_for_tags(text, tags):
+ results = []
+ add_text_to_results = False
+ for line in text.splitlines():
+ line = line.strip()
+ if any(f"#{tag}" == line.lower() for tag in tags):
+ add_text_to_results = True
+ elif any(f"#{tag}" in line.lower() for tag in tags):
+ for tag in tags:
+ # TODO: combine into one regex and really ignore case.
+ line = re.sub(rf"^#{tag}: ", "", line, re.IGNORECASE)
+ line = re.sub(rf"^#{tag}:", "", line, re.IGNORECASE)
+ line = re.sub(rf"^#{tag}", "", line, re.IGNORECASE)
+ line = line.strip()
+ results.append(line[:TEXT_RESULT_LENGTH])
+ if add_text_to_results:
+ results.append(get_text_with_dots(text, 0, TEXT_RESULT_LENGTH))
+ return results
+
+
class Day:
def __init__(self, month, day_number, day_content=None):
day_content = day_content or {"text": ""}
@@ -226,7 +246,7 @@ def search(self, text, tags):
else:
add_text_to_results = True
if add_text_to_results:
- results.append(get_text_with_dots(self.text, 0, TEXT_RESULT_LENGTH))
+ results.extend(get_search_results_for_tags(self.text, tags))
elif text in str(self):
# Date contains searched text.
results.append(get_text_with_dots(self.text, 0, TEXT_RESULT_LENGTH))
diff --git a/rednotebook/gui/clouds.py b/rednotebook/gui/clouds.py
index 8c15f78f..c6e59e75 100644
--- a/rednotebook/gui/clouds.py
+++ b/rednotebook/gui/clouds.py
@@ -21,7 +21,7 @@
import logging
import re
-from gi.repository import GObject, Gtk
+from gi.repository import GLib, Gtk
from rednotebook import data
from rednotebook.gui import browser
@@ -105,7 +105,7 @@ def update(self, force_update=False):
if not force_update:
return
- GObject.idle_add(self._update)
+ GLib.idle_add(self._update)
def get_categories_counter(self):
counter = defaultdict(int)
diff --git a/rednotebook/gui/main_window.py b/rednotebook/gui/main_window.py
index cc547073..010dea2d 100644
--- a/rednotebook/gui/main_window.py
+++ b/rednotebook/gui/main_window.py
@@ -23,7 +23,7 @@
from unittest import mock
import urllib.parse
-from gi.repository import Gdk, GdkPixbuf, GObject, Gtk, GtkSource, Pango
+from gi.repository import Gdk, GdkPixbuf, GLib, GObject, Gtk, GtkSource, Pango
from rednotebook.gui.options import OptionsManager
from rednotebook import info, templates
@@ -446,7 +446,7 @@ def on_edit_button_clicked(self, button):
self.change_mode(preview=False)
# Select (not only highlight) previously selected text by giving focus
# to the day editor.
- GObject.idle_add(self.day_text_field.day_text_view.grab_focus)
+ GLib.idle_add(self.day_text_field.day_text_view.grab_focus)
def on_preview_button_clicked(self, button):
self.journal.save_old_day()
@@ -835,8 +835,8 @@ def show_day(self, new_day):
if self.search_text:
# If a search is currently made, scroll to the text and return.
- GObject.idle_add(self.scroll_to_text, self.search_text)
- GObject.idle_add(self.highlight, self.search_text)
+ GLib.idle_add(self.scroll_to_text, self.search_text)
+ GLib.idle_add(self.highlight, self.search_text)
return
def show_template(self, title, text):
diff --git a/rednotebook/gui/search.py b/rednotebook/gui/search.py
index b0691470..31dd1809 100644
--- a/rednotebook/gui/search.py
+++ b/rednotebook/gui/search.py
@@ -18,7 +18,7 @@
from xml.sax.saxutils import escape
-from gi.repository import GObject, Gtk
+from gi.repository import GLib, GObject, Gtk
from rednotebook.gui.customwidgets import CustomComboBoxEntry, CustomListView
from rednotebook.util import dates
@@ -60,6 +60,13 @@ def on_entry_activated(self, entry):
self.search(search_text)
def search(self, search_text):
+ # Highlight all occurrences in the current day's text.
+ self.main_window.highlight_text(search_text)
+
+ # Scroll to query.
+ if search_text:
+ GLib.idle_add(self.main_window.day_text_field.scroll_to_text, search_text)
+
tags = []
queries = []
for part in search_text.split():
@@ -67,19 +74,10 @@ def search(self, search_text):
tags.append(part.lstrip("#").lower())
else:
queries.append(part)
+ # Preserve original white space if there are no tags.
+ query = " ".join(queries) if tags else search_text
- search_text = " ".join(queries)
-
- # Highlight all occurrences in the current day's text
- self.main_window.highlight_text(search_text)
-
- # Scroll to query.
- if search_text:
- GObject.idle_add(
- self.main_window.day_text_field.scroll_to_text, search_text
- )
-
- self.main_window.search_tree_view.update_data(search_text, tags)
+ self.main_window.search_tree_view.update_data(query, tags)
# Without the following, showing the search results sometimes lets the
# search entry lose focus and search phrases are added to a day's text.
diff --git a/rednotebook/info.py b/rednotebook/info.py
index 2c2996bd..6781b1e7 100644
--- a/rednotebook/info.py
+++ b/rednotebook/info.py
@@ -28,7 +28,7 @@ def _(string):
program_name = "RedNotebook"
tagline = _("A Desktop Journal")
-version = "2.35"
+version = "2.36"
author = "Jendrik Seipp"
author_mail = "jendrikseipp@gmail.com"
copyright_ = "Copyright (c) 2008-2024 Jendrik Seipp"
diff --git a/rednotebook/util/utils.py b/rednotebook/util/utils.py
index e71653e7..113e94f5 100644
--- a/rednotebook/util/utils.py
+++ b/rednotebook/util/utils.py
@@ -25,7 +25,7 @@
from urllib.request import urlopen
import webbrowser
-from gi.repository import GObject, Gtk
+from gi.repository import GLib, Gtk
from rednotebook import info
from rednotebook.util import filesystem
@@ -165,7 +165,7 @@ def _check_new_version(journal, current_version, startup):
)
if newer_version_available or not startup:
- GObject.idle_add(
+ GLib.idle_add(
_show_update_dialog, journal, current_version, new_version, startup
)