From 8e32f883ec5987d4a10b8a1186b472fa8457f698 Mon Sep 17 00:00:00 2001 From: Iurii Zolotko Date: Tue, 22 Nov 2022 02:01:49 +0700 Subject: [PATCH] Use GTK3's GApplication/GtkApplication #178 (#181) * Use GTK3's GApplication/GtkApplication #178 * fix: remove icons in menu * doc: update CHANGELOG.md * chore(i18n): update po/diffuse.pot Co-authored-by: Yurii Zolotko Co-authored-by: Romain Failliot --- CHANGELOG.md | 1 + po/diffuse.pot | 430 ++++++++++++---------- src/diffuse/main.py | 815 +++++++++++++++++++++++------------------ src/diffuse/widgets.py | 86 ++--- 4 files changed, 731 insertions(+), 601 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59a349e..18b7995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Translation: updated Swedish translation (@eson57) - Dialog: prompt only once if several files needs to be reloaded (@yuriiz) +- Use GTK3's Gtk.Application/Gtk.ApplicationWindow (@yuriiz) ### Fixed diff --git a/po/diffuse.pot b/po/diffuse.pot index bed1b36..48a0c8e 100644 --- a/po/diffuse.pot +++ b/po/diffuse.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-23 20:00-0400\n" +"POT-Creation-Date: 2022-11-14 16:24-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,604 +42,656 @@ msgstr "" msgid "Copyright" msgstr "" -#: src/diffuse/dialogs.py:40 +#: src/diffuse/dialogs.py:41 msgid "Diffuse is a graphical tool for merging and comparing text files." msgstr "" -#: src/diffuse/dialogs.py:45 +#: src/diffuse/dialogs.py:46 msgid "translator-credits" msgstr "" -#: src/diffuse/dialogs.py:82 +#: src/diffuse/dialogs.py:83 msgid "Encoding: " msgstr "" -#: src/diffuse/dialogs.py:94 +#: src/diffuse/dialogs.py:95 msgid "Revision: " msgstr "" -#: src/diffuse/dialogs.py:156 +#: src/diffuse/dialogs.py:163 msgid "Find..." msgstr "" -#: src/diffuse/dialogs.py:164 +#: src/diffuse/dialogs.py:173 msgid "Search For: " msgstr "" -#: src/diffuse/dialogs.py:189 +#: src/diffuse/dialogs.py:198 msgid "Match Case" msgstr "" -#: src/diffuse/dialogs.py:194 +#: src/diffuse/dialogs.py:203 msgid "Search Backwards" msgstr "" -#: src/diffuse/main.py:85 +#: src/diffuse/main.py:84 msgid "Close Tab" msgstr "" -#: src/diffuse/main.py:132 +#: src/diffuse/main.py:131 msgid "Open File..." msgstr "" -#: src/diffuse/main.py:133 +#: src/diffuse/main.py:132 msgid "Reload File" msgstr "" -#: src/diffuse/main.py:134 +#: src/diffuse/main.py:133 msgid "Save File" msgstr "" -#: src/diffuse/main.py:135 +#: src/diffuse/main.py:134 msgid "Save File As..." msgstr "" -#: src/diffuse/main.py:217 +#: src/diffuse/main.py:229 #, python-format msgid "Column %d" msgstr "" -#: src/diffuse/main.py:291 +#: src/diffuse/main.py:303 msgid "Save changes before loading the new file?" msgstr "" -#: src/diffuse/main.py:402 +#: src/diffuse/main.py:414 #, python-format msgid "Error reading revision %(rev)s of %(file)s." msgstr "" -#: src/diffuse/main.py:405 src/diffuse/main.py:1860 +#: src/diffuse/main.py:417 src/diffuse/main.py:2004 #, python-format msgid "Error reading %s." msgstr "" -#: src/diffuse/main.py:427 +#: src/diffuse/main.py:439 msgid "Open File" msgstr "" -#: src/diffuse/main.py:484 -#, python-format -msgid "The file %s changed on disk. Do you want to reload the file?" -msgstr "" - -#: src/diffuse/main.py:510 +#: src/diffuse/main.py:492 #, python-format msgid "Save %(title)s Pane %(pane)d" msgstr "" -#: src/diffuse/main.py:542 +#: src/diffuse/main.py:524 #, python-format msgid "A file named %s already exists. Do you want to overwrite it?" msgstr "" -#: src/diffuse/main.py:549 +#: src/diffuse/main.py:531 #, python-format msgid "" "The file %s has been modified by another process since reading it. If you save, " "all the external changes could be lost. Save anyways?" msgstr "" -#: src/diffuse/main.py:591 +#: src/diffuse/main.py:573 #, python-format msgid "Error encoding to %s." msgstr "" -#: src/diffuse/main.py:595 src/diffuse/preferences.py:300 +#: src/diffuse/main.py:577 src/diffuse/preferences.py:300 #, python-format msgid "Error writing %s." msgstr "" -#: src/diffuse/main.py:625 +#: src/diffuse/main.py:607 msgid "Go To Line..." msgstr "" -#: src/diffuse/main.py:626 +#: src/diffuse/main.py:608 msgid "Line Number: " msgstr "" -#: src/diffuse/main.py:657 +#: src/diffuse/main.py:639 msgid "" "Press the enter key or double click to edit. Press the space bar or use the RMB " "menu to manually align." msgstr "" -#: src/diffuse/main.py:661 +#: src/diffuse/main.py:643 msgid "Press the escape key to finish editing." msgstr "" -#: src/diffuse/main.py:664 +#: src/diffuse/main.py:646 msgid "" "Select target line and press the space bar to align. Press the escape key to " "cancel." msgstr "" -#: src/diffuse/main.py:787 +#: src/diffuse/main.py:768 msgid "_File" msgstr "" -#: src/diffuse/main.py:788 +#: src/diffuse/main.py:770 msgid "_Open File..." msgstr "" -#: src/diffuse/main.py:789 +#: src/diffuse/main.py:771 msgid "Open File In New _Tab..." msgstr "" -#: src/diffuse/main.py:790 +#: src/diffuse/main.py:772 msgid "Open _Modified Files..." msgstr "" -#: src/diffuse/main.py:791 +#: src/diffuse/main.py:773 msgid "Open Commi_t..." msgstr "" -#: src/diffuse/main.py:792 +#: src/diffuse/main.py:774 msgid "_Reload File" msgstr "" -#: src/diffuse/main.py:794 +#: src/diffuse/main.py:776 msgid "_Save File" msgstr "" -#: src/diffuse/main.py:795 +#: src/diffuse/main.py:777 msgid "Save File _As..." msgstr "" -#: src/diffuse/main.py:796 +#: src/diffuse/main.py:778 msgid "Save A_ll" msgstr "" -#: src/diffuse/main.py:798 +#: src/diffuse/main.py:780 msgid "New _2-Way File Merge" msgstr "" -#: src/diffuse/main.py:799 +#: src/diffuse/main.py:781 msgid "New _3-Way File Merge" msgstr "" -#: src/diffuse/main.py:800 +#: src/diffuse/main.py:782 msgid "New _N-Way File Merge..." msgstr "" -#: src/diffuse/main.py:802 +#: src/diffuse/main.py:784 msgid "_Close Tab" msgstr "" -#: src/diffuse/main.py:803 +#: src/diffuse/main.py:785 msgid "_Undo Close Tab" msgstr "" -#: src/diffuse/main.py:804 +#: src/diffuse/main.py:786 msgid "_Quit" msgstr "" -#: src/diffuse/main.py:807 +#: src/diffuse/main.py:790 msgid "_Edit" msgstr "" -#: src/diffuse/main.py:808 +#: src/diffuse/main.py:792 msgid "_Undo" msgstr "" -#: src/diffuse/main.py:809 +#: src/diffuse/main.py:793 msgid "_Redo" msgstr "" -#: src/diffuse/main.py:811 +#: src/diffuse/main.py:795 msgid "Cu_t" msgstr "" -#: src/diffuse/main.py:812 +#: src/diffuse/main.py:796 msgid "_Copy" msgstr "" -#: src/diffuse/main.py:813 +#: src/diffuse/main.py:797 msgid "_Paste" msgstr "" -#: src/diffuse/main.py:815 +#: src/diffuse/main.py:799 msgid "Select _All" msgstr "" -#: src/diffuse/main.py:816 +#: src/diffuse/main.py:800 msgid "C_lear Edits" msgstr "" -#: src/diffuse/main.py:817 +#: src/diffuse/main.py:801 msgid "_Dismiss All Edits" msgstr "" -#: src/diffuse/main.py:819 +#: src/diffuse/main.py:803 msgid "_Find..." msgstr "" -#: src/diffuse/main.py:820 +#: src/diffuse/main.py:804 msgid "Find _Next" msgstr "" -#: src/diffuse/main.py:821 +#: src/diffuse/main.py:805 msgid "Find Pre_vious" msgstr "" -#: src/diffuse/main.py:822 +#: src/diffuse/main.py:806 msgid "_Go To Line..." msgstr "" -#: src/diffuse/main.py:824 +#: src/diffuse/main.py:808 msgid "Pr_eferences..." msgstr "" -#: src/diffuse/main.py:828 +#: src/diffuse/main.py:812 msgid "None" msgstr "" -#: src/diffuse/main.py:846 +#: src/diffuse/main.py:834 msgid "_View" msgstr "" -#: src/diffuse/main.py:847 +#: src/diffuse/main.py:836 msgid "_Syntax Highlighting" msgstr "" -#: src/diffuse/main.py:849 +#: src/diffuse/main.py:838 msgid "Re_align All" msgstr "" -#: src/diffuse/main.py:850 +#: src/diffuse/main.py:839 msgid "_Isolate" msgstr "" -#: src/diffuse/main.py:852 +#: src/diffuse/main.py:841 msgid "_First Difference" msgstr "" -#: src/diffuse/main.py:853 +#: src/diffuse/main.py:842 msgid "_Previous Difference" msgstr "" -#: src/diffuse/main.py:854 +#: src/diffuse/main.py:843 msgid "_Next Difference" msgstr "" -#: src/diffuse/main.py:855 +#: src/diffuse/main.py:844 msgid "_Last Difference" msgstr "" -#: src/diffuse/main.py:857 +#: src/diffuse/main.py:846 msgid "Fir_st Tab" msgstr "" -#: src/diffuse/main.py:858 +#: src/diffuse/main.py:847 msgid "Pre_vious Tab" msgstr "" -#: src/diffuse/main.py:859 +#: src/diffuse/main.py:848 msgid "Next _Tab" msgstr "" -#: src/diffuse/main.py:860 +#: src/diffuse/main.py:849 msgid "Las_t Tab" msgstr "" -#: src/diffuse/main.py:862 +#: src/diffuse/main.py:851 msgid "Shift Pane _Right" msgstr "" -#: src/diffuse/main.py:863 +#: src/diffuse/main.py:852 msgid "Shift Pane _Left" msgstr "" -#: src/diffuse/main.py:866 +#: src/diffuse/main.py:856 msgid "F_ormat" msgstr "" -#: src/diffuse/main.py:867 +#: src/diffuse/main.py:858 msgid "Convert To _Upper Case" msgstr "" -#: src/diffuse/main.py:868 +#: src/diffuse/main.py:859 msgid "Convert To _Lower Case" msgstr "" -#: src/diffuse/main.py:870 +#: src/diffuse/main.py:861 msgid "Sort Lines In _Ascending Order" msgstr "" -#: src/diffuse/main.py:871 +#: src/diffuse/main.py:862 msgid "Sort Lines In D_escending Order" msgstr "" -#: src/diffuse/main.py:873 +#: src/diffuse/main.py:864 msgid "Remove Trailing _White Space" msgstr "" -#: src/diffuse/main.py:874 +#: src/diffuse/main.py:865 msgid "Convert Tabs To _Spaces" msgstr "" -#: src/diffuse/main.py:875 +#: src/diffuse/main.py:866 msgid "Convert Leading Spaces To _Tabs" msgstr "" -#: src/diffuse/main.py:877 +#: src/diffuse/main.py:868 msgid "_Increase Indenting" msgstr "" -#: src/diffuse/main.py:878 +#: src/diffuse/main.py:869 msgid "De_crease Indenting" msgstr "" -#: src/diffuse/main.py:880 +#: src/diffuse/main.py:871 msgid "Convert To _DOS Format" msgstr "" -#: src/diffuse/main.py:881 +#: src/diffuse/main.py:872 msgid "Convert To _Mac Format" msgstr "" -#: src/diffuse/main.py:882 +#: src/diffuse/main.py:873 msgid "Convert To Uni_x Format" msgstr "" -#: src/diffuse/main.py:885 +#: src/diffuse/main.py:877 msgid "_Merge" msgstr "" -#: src/diffuse/main.py:886 +#: src/diffuse/main.py:879 msgid "Copy Selection _Right" msgstr "" -#: src/diffuse/main.py:887 +#: src/diffuse/main.py:880 msgid "Copy Selection _Left" msgstr "" -#: src/diffuse/main.py:889 +#: src/diffuse/main.py:882 msgid "Copy Left _Into Selection" msgstr "" -#: src/diffuse/main.py:890 +#: src/diffuse/main.py:883 msgid "Copy Right I_nto Selection" msgstr "" -#: src/diffuse/main.py:891 +#: src/diffuse/main.py:884 msgid "_Merge From Left Then Right" msgstr "" -#: src/diffuse/main.py:892 +#: src/diffuse/main.py:885 msgid "M_erge From Right Then Left" msgstr "" -#: src/diffuse/main.py:895 +#: src/diffuse/main.py:889 msgid "_Help" msgstr "" -#: src/diffuse/main.py:896 +#: src/diffuse/main.py:891 msgid "_Help Contents..." msgstr "" -#: src/diffuse/main.py:898 +#: src/diffuse/main.py:893 #, python-format msgid "_About %s..." msgstr "" -#: src/diffuse/main.py:913 +#: src/diffuse/main.py:908 msgid "New 2-Way File Merge" msgstr "" -#: src/diffuse/main.py:914 +#: src/diffuse/main.py:909 msgid "New 3-Way File Merge" msgstr "" -#: src/diffuse/main.py:916 +#: src/diffuse/main.py:911 msgid "Realign All" msgstr "" -#: src/diffuse/main.py:917 +#: src/diffuse/main.py:912 msgid "First Difference" msgstr "" -#: src/diffuse/main.py:918 +#: src/diffuse/main.py:913 msgid "Previous Difference" msgstr "" -#: src/diffuse/main.py:919 +#: src/diffuse/main.py:914 msgid "Next Difference" msgstr "" -#: src/diffuse/main.py:920 +#: src/diffuse/main.py:915 msgid "Last Difference" msgstr "" -#: src/diffuse/main.py:922 +#: src/diffuse/main.py:917 msgid "Copy Selection Right" msgstr "" -#: src/diffuse/main.py:923 +#: src/diffuse/main.py:918 msgid "Copy Selection Left" msgstr "" -#: src/diffuse/main.py:924 +#: src/diffuse/main.py:919 msgid "Copy Left Into Selection" msgstr "" -#: src/diffuse/main.py:925 +#: src/diffuse/main.py:920 msgid "Copy Right Into Selection" msgstr "" -#: src/diffuse/main.py:926 +#: src/diffuse/main.py:921 msgid "Merge From Left Then Right" msgstr "" -#: src/diffuse/main.py:927 +#: src/diffuse/main.py:922 msgid "Merge From Right Then Left" msgstr "" -#: src/diffuse/main.py:929 +#: src/diffuse/main.py:924 msgid "Undo" msgstr "" -#: src/diffuse/main.py:930 +#: src/diffuse/main.py:925 msgid "Redo" msgstr "" -#: src/diffuse/main.py:931 src/diffuse/widgets.py:1861 +#: src/diffuse/main.py:926 src/diffuse/widgets.py:1861 msgid "Cut" msgstr "" -#: src/diffuse/main.py:932 src/diffuse/widgets.py:1862 +#: src/diffuse/main.py:927 src/diffuse/widgets.py:1862 msgid "Copy" msgstr "" -#: src/diffuse/main.py:933 src/diffuse/widgets.py:1863 +#: src/diffuse/main.py:928 src/diffuse/widgets.py:1863 msgid "Paste" msgstr "" -#: src/diffuse/main.py:934 src/diffuse/widgets.py:1866 +#: src/diffuse/main.py:929 src/diffuse/widgets.py:1866 msgid "Clear Edits" msgstr "" -#: src/diffuse/main.py:1057 +#: src/diffuse/main.py:996 +msgid "Changes detected" +msgstr "" + +#: src/diffuse/main.py:1000 +#, python-format +msgid "" +"The file \"%s\" changed on disk.\n" +"\n" +"Do you want to reload the file?" +msgstr "" + +#: src/diffuse/main.py:1005 +#, python-format +msgid "" +"The following files changed on disk:\n" +"%s\n" +"\n" +"Do you want to reload these files?" +msgstr "" + +#: src/diffuse/main.py:1120 msgid "Some files have unsaved changes. Select the files to save before closing." msgstr "" -#: src/diffuse/main.py:1071 +#: src/diffuse/main.py:1134 msgid "Tab" msgstr "" -#: src/diffuse/main.py:1076 +#: src/diffuse/main.py:1139 msgid "Pane" msgstr "" -#: src/diffuse/main.py:1087 +#: src/diffuse/main.py:1150 msgid "Close _Without Saving" msgstr "" -#: src/diffuse/main.py:1126 +#: src/diffuse/main.py:1189 #, python-format msgid "Closing this tab will quit %s." msgstr "" -#: src/diffuse/main.py:1209 +#: src/diffuse/main.py:1266 #, python-format msgid "File Merge %d" msgstr "" -#: src/diffuse/main.py:1315 +#: src/diffuse/main.py:1372 #, python-format msgid "Error retrieving commits for %s." msgstr "" -#: src/diffuse/main.py:1347 +#: src/diffuse/main.py:1404 #, python-format msgid "Error retrieving modifications for %s." msgstr "" -#: src/diffuse/main.py:1380 +#: src/diffuse/main.py:1437 msgid "Open File In New Tab" msgstr "" -#: src/diffuse/main.py:1403 +#: src/diffuse/main.py:1460 msgid "Choose Folder With Modified Files" msgstr "" -#: src/diffuse/main.py:1421 +#: src/diffuse/main.py:1478 msgid "No modified files found." msgstr "" -#: src/diffuse/main.py:1427 +#: src/diffuse/main.py:1484 msgid "Choose Folder With Commit" msgstr "" -#: src/diffuse/main.py:1447 +#: src/diffuse/main.py:1504 msgid "No committed files found." msgstr "" -#: src/diffuse/main.py:1483 +#: src/diffuse/main.py:1540 msgid "New N-Way File Merge..." msgstr "" -#: src/diffuse/main.py:1484 +#: src/diffuse/main.py:1541 msgid "Number of panes: " msgstr "" -#: src/diffuse/main.py:1558 +#: src/diffuse/main.py:1615 msgid "Phrase not found. Continue from the end of the file?" msgstr "" -#: src/diffuse/main.py:1560 +#: src/diffuse/main.py:1617 msgid "Phrase not found. Continue from the start of the file?" msgstr "" -#: src/diffuse/main.py:1781 +#: src/diffuse/main.py:1827 +msgid "Do not read any resource files" +msgstr "" + +#: src/diffuse/main.py:1835 +msgid "Specify explicit resource file" +msgstr "" + +#: src/diffuse/main.py:1843 +msgid "File revisions and " +msgstr "" + +#: src/diffuse/main.py:1851 +msgid "Close all tabs with no differences" +msgstr "" + +#: src/diffuse/main.py:1858 +msgid "Use to read and write files" +msgstr "" + +#: src/diffuse/main.py:1866 +msgid "Display