Skip to content

Commit

Permalink
manage the case of deleting an empty note
Browse files Browse the repository at this point in the history
  • Loading branch information
maoschanz committed Nov 20, 2021
1 parent 6954a31 commit a3be105
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 11 deletions.
6 changes: 5 additions & 1 deletion [email protected]/locale/es/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-09-05 16:57+0200\n"
"Last-Translator: Carmen Ortega Mateos <[email protected]>\n"
"Language-Team: Spanish\n"
Expand Down Expand Up @@ -71,6 +71,10 @@ msgstr "Opciones de nota"
msgid "Resize"
msgstr "Modificar tamaño"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "¿Quieres eliminar esta nota?"
Expand Down
Binary file modified [email protected]/locale/fr/LC_MESSAGES/notes-extension.mo
Binary file not shown.
7 changes: 5 additions & 2 deletions [email protected]/locale/fr/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2019-03-21 00:03+0100\n"
"Last-Translator: Romain F. T. <[email protected]>\n"
"Language-Team: French <none>\n"
Expand Down Expand Up @@ -72,6 +72,10 @@ msgstr "Options de la note"
msgid "Resize"
msgstr "Redimensionner"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr "Note vide"

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "Supprimer cette note?"
Expand Down Expand Up @@ -338,4 +342,3 @@ msgstr "Les touches modificatrices doivent être entre chevrons"
#: [email protected]/prefs.ui
msgid "Don't use a keyboard shortcut that already exists."
msgstr "Ne pas utiliser un raccourci clavier qui existe déjà."

6 changes: 5 additions & 1 deletion [email protected]/locale/hr/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: notes-extension\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-01-24 23:57+0100\n"
"Last-Translator: Milo Ivir <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -72,6 +72,10 @@ msgstr "Opcije za bilješke"
msgid "Resize"
msgstr "Promijeni veličinu"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "Izbrisati ovu bilješku?"
Expand Down
6 changes: 5 additions & 1 deletion [email protected]/locale/it/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-11-14 14:42+0100\n"
"Last-Translator: Albano Battistella <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -71,6 +71,10 @@ msgstr "Opzioni note"
msgid "Resize"
msgstr "Ridimensiona"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "Eliminare questa nota?"
Expand Down
6 changes: 5 additions & 1 deletion [email protected]/locale/nl/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-09-05 16:57+0200\n"
"Last-Translator: Heimen Stoffels <[email protected]>\n"
"Language-Team: Dutch <[email protected]>\n"
Expand Down Expand Up @@ -71,6 +71,10 @@ msgstr "Notitie-opties"
msgid "Resize"
msgstr "Grootte aanpassen"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "Wil je deze notitie verwijderen?"
Expand Down
6 changes: 5 additions & 1 deletion [email protected]/locale/notes-extension.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:53+0100\n"
"POT-Creation-Date: 2021-11-20 15:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -70,6 +70,10 @@ msgstr ""
msgid "Resize"
msgstr ""

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr ""
Expand Down
6 changes: 5 additions & 1 deletion [email protected]/locale/tr/LC_MESSAGES/notes-extension.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Notes\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-10-29 17:42+0300\n"
"Last-Translator: Muha Aliss <[email protected]>\n"
"Language-Team: Türkçe\n"
Expand Down Expand Up @@ -72,6 +72,10 @@ msgstr "Not seçenekleri"
msgid "Resize"
msgstr "Boyutlandır"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "Not silinsin mi ?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-20 12:52+0100\n"
"POT-Creation-Date: 2021-11-20 15:01+0100\n"
"PO-Revision-Date: 2020-06-23 17:24+0800\n"
"Last-Translator: Nesquate <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -66,6 +66,10 @@ msgstr "便箋選項"
msgid "Resize"
msgstr "調整大小"

#: [email protected]/noteBox.js
msgid "Empty note"
msgstr ""

#: [email protected]/noteBox.js
msgid "Delete this note?"
msgstr "刪除這個便箋 ?"
Expand Down
1 change: 0 additions & 1 deletion [email protected]/menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const Util = imports.misc.util;

const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const Extension = Me.imports.extension;

const Gettext = imports.gettext.domain('notes-extension');
Expand Down
4 changes: 3 additions & 1 deletion [email protected]/noteBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const GrabHelper = imports.ui.grabHelper;

const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;

const Menus = Me.imports.menus;
const Extension = Me.imports.extension;
Expand Down Expand Up @@ -220,6 +219,9 @@ var NoteBox = class NoteBox {
noteText = lines[0] + "\n" + lines[1] + "\n" + lines[2] + "\n[...]\n";
noteText += lines[lines.length - 2] + "\n" + lines[lines.length - 1];
}
if(noteText === "") {
noteText = "[" + _("Empty note") + "]";
}

let description_label = new St.Label({
style: 'padding-top: 16px;',
Expand Down

0 comments on commit a3be105

Please sign in to comment.