diff --git a/com.github.philip_scott.notes-up.yml b/com.github.philip_scott.notes-up.yml index a951518..22dc68d 100644 --- a/com.github.philip_scott.notes-up.yml +++ b/com.github.philip_scott.notes-up.yml @@ -61,4 +61,4 @@ modules: buildsystem: meson sources: - type: dir - path: . \ No newline at end of file + path: . diff --git a/data/com.github.philip_scott.notes-up.desktop.in b/data/com.github.philip_scott.notes-up.desktop.in index 9f70ceb..18601c7 100644 --- a/data/com.github.philip_scott.notes-up.desktop.in +++ b/data/com.github.philip_scott.notes-up.desktop.in @@ -7,4 +7,4 @@ Terminal=false Type=Application StartupNotify=true Categories=Office;WordProcessor; -MimeType=application/x-notesup; \ No newline at end of file +MimeType=application/x-notesup; diff --git a/meson.build b/meson.build index e96a615..fb348f1 100644 --- a/meson.build +++ b/meson.build @@ -19,6 +19,7 @@ subdir('src') executable( meson.project_name(), sources, + config, asresources, dependencies: [ dependency('granite'), diff --git a/po/fr.po b/po/fr.po index 0bd5283..9be709f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: com.github.philip_scott.notes-up\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-11-30 15:38+0100\n" -"PO-Revision-Date: 2019-04-02 18:31+0200\n" +"PO-Revision-Date: 2022-03-23 10:56+0100\n" "Last-Translator: NathanBnm\n" "Language-Team: Français\n" "Language: fr\n" @@ -16,6 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 2.3\n" #: src/Plugins/Break.vala:28 msgid "Page break when exporting to PDF: " @@ -27,7 +28,7 @@ msgstr "Saut de page" #: src/Plugins/Break.vala:47 msgid "Page break on export: " -msgstr "Saut de page en export : " +msgstr "Saut de page à l'export : " #: src/Plugins/Color.vala:35 msgid "" @@ -43,11 +44,11 @@ msgstr "Couleur de police" #: src/Plugins/Highlight.vala:28 src/Widgets/HelpBox.vala:62 msgid "Enable Syntax Highlighting" -msgstr "Mise en surbrillance" +msgstr "Activer la coloration syntaxtique" #: src/Plugins/Highlight.vala:32 msgid "Syntax Highlighing" -msgstr "Surbrillance" +msgstr "Coloration syntaxtique" #: src/Plugins/Image.vala:28 msgid "Load an embeded image" @@ -229,20 +230,19 @@ msgstr "Supprimer" #: src/Widgets/Sidebar/NotebookItem.vala:53 msgid "Edit Section" -msgstr "" +msgstr "Modifier la section" #: src/Widgets/Sidebar/NotebookItem.vala:54 src/Widgets/Headerbar.vala:354 msgid "New Section" -msgstr "" +msgstr "Nouvelle section" #: src/Widgets/Sidebar/NotebookItem.vala:55 -#, fuzzy msgid "Delete Section" -msgstr "Supprimer la Page" +msgstr "Supprimer la section" #: src/Widgets/Sidebar/NotebookItem.vala:56 msgid "Move Section" -msgstr "" +msgstr "Déplacer la section" #: src/Widgets/Sidebar/NotebookList.vala:32 msgid "New Notebook" @@ -262,7 +262,7 @@ msgstr "Étiquettes" #: src/Widgets/Sidebar/Sidebar.vala:33 msgid "Sections" -msgstr "" +msgstr "Sections" #: src/Widgets/Sidebar/Sidebar.vala:54 msgid "All Notes" @@ -273,9 +273,8 @@ msgid "Not in a Notebook" msgstr "Pas dans un Carnet de Notes" #: src/Widgets/Sidebar/Sidebar.vala:260 -#, fuzzy msgid "My Notes" -msgstr "Toutes les Notes" +msgstr "Mes notes" #: src/Widgets/Sidebar/TrashItem.vala:28 msgid "Restore" @@ -347,23 +346,23 @@ msgstr "Changer de thème" #: src/Widgets/Headerbar.vala:233 msgid "Show All" -msgstr "" +msgstr "Afficher tout" #: src/Widgets/Headerbar.vala:234 msgid "Show Sections and Pages" -msgstr "" +msgstr "Afficher les sections et les pages" #: src/Widgets/Headerbar.vala:235 msgid "Show Only Pages" -msgstr "" +msgstr "Afficher seulement les pages" #: src/Widgets/Headerbar.vala:236 msgid "Hide All" -msgstr "" +msgstr "Masquer tout" #: src/Widgets/Headerbar.vala:263 msgid "Panel Options" -msgstr "" +msgstr "Options des panneaux" #: src/Widgets/Headerbar.vala:327 msgid "High Contrast" @@ -484,12 +483,12 @@ msgstr "Couleur" #: src/Widgets/PageInfoEditor.vala:71 #, c-format msgid "Created: %s" -msgstr "Créé : %s" +msgstr "Créé le : %s" #: src/Widgets/PageInfoEditor.vala:78 #, c-format msgid "Updated: %s" -msgstr "Mis à jour : %s" +msgstr "Mis à jour le : %s" #: src/Widgets/PageInfoEditor.vala:100 msgid "Not in Notebook" @@ -544,7 +543,7 @@ msgstr "Q" #: src/Application.vala:42 msgid "N" -msgstr "N" +msgstr "N" #: src/Application.vala:43 msgid "F" @@ -568,17 +567,15 @@ msgstr "T" #: src/Application.vala:48 msgid "I" -msgstr "I" +msgstr "I" #: src/Application.vala:49 -#, fuzzy msgid "P" -msgstr "M" +msgstr "P" #: src/Application.vala:50 -#, fuzzy msgid "P" -msgstr "N" +msgstr "N" #: src/Application.vala:66 msgid "Notes-Up" @@ -591,18 +588,3 @@ msgstr "Votre Carnet de Notes en Markdown." #: src/Application.vala:68 msgid "About Notes" msgstr "À Propos" - -#~ msgid "Keep Sidebar Visible:" -#~ msgstr "Garder la barre latérale visible :" - -#~ msgid "Edit Notebook" -#~ msgstr "Éditer le Carnet de Notes" - -#~ msgid "Delete Notebook" -#~ msgstr "Supprimer le Carnet" - -#~ msgid "Notebooks" -#~ msgstr "Carnets de Notes" - -#~ msgid "My First Notebook" -#~ msgstr "Mon premier Carnet de Notes" diff --git a/src/Application.vala b/src/Application.vala index b6864cd..39d28cc 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -77,10 +77,10 @@ public class ENotes.Application : Granite.Application { construct { flags |= ApplicationFlags.HANDLES_OPEN; - application_id = "com.github.philip_scott.notes-up"; + application_id = Constants.PROJECT_NAME; program_name = PROGRAM_NAME; - exec_name = TERMINAL_NAME; - app_launcher = "com.github.philip_scott.notes-up"; + exec_name = Constants.PROJECT_NAME; + app_launcher = Constants.PROJECT_NAME; state = new State (); } diff --git a/src/Constants.vala.in b/src/Constants.vala.in new file mode 100644 index 0000000..ecb5c90 --- /dev/null +++ b/src/Constants.vala.in @@ -0,0 +1,9 @@ + +namespace Constants { + public const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@; + public const string PROJECT_NAME = @PROJECT_NAME@; + public const string VERSION = @VERSION@; + public const string INSTALL_PREFIX = @PREFIX@; + public const string DATADIR = @DATADIR@; + public const string LOCALEDIR = @LOCALEDIR@; +} diff --git a/src/Main.vala b/src/Main.vala index ee1952c..25019d1 100644 --- a/src/Main.vala +++ b/src/Main.vala @@ -19,19 +19,19 @@ * Authored by: Felipe Escoto */ -public const string APP_NAME = "Notes-Up"; -public const string TERMINAL_NAME = "notes-up"; public static int main (string[] args) { - /* Initiliaze gettext support */ - Intl.setlocale (LocaleCategory.ALL, Intl.get_language_names ()[0]); + /* Initialize gettext support */ + GLib.Intl.setlocale (LocaleCategory.ALL, ""); + GLib.Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, Constants.LOCALEDIR); + GLib.Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8"); + GLib.Intl.textdomain (Constants.GETTEXT_PACKAGE); - Environment.set_application_name (APP_NAME); - Environment.set_prgname (APP_NAME); + Environment.set_application_name (N_("Notes-Up")); + Environment.set_prgname (Constants.PROJECT_NAME); var application = new ENotes.Application (); return application.run (args); } - diff --git a/src/meson.build b/src/meson.build index d3aaeac..9493310 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,18 @@ + +conf = configuration_data() +conf.set_quoted('PROJECT_NAME', meson.project_name()) +conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +conf.set_quoted('VERSION', meson.project_version()) +conf.set_quoted('PREFIX', get_option('prefix')) +conf.set_quoted('DATADIR', join_paths (get_option('prefix'), get_option('datadir'))) +conf.set_quoted('LOCALEDIR', join_paths (get_option('prefix'), get_option('localedir'))) +config = configure_file( + input : 'Constants.vala.in', + output : 'Constants.vala', + configuration : conf +) + + sources = files( 'Main.vala', 'Application.vala',