From c37768c0bdf3dac5e89c073669caee3f85fff825 Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 4 Feb 2026 18:42:27 +0100 Subject: [PATCH 01/31] introduce an enum to control that shit --- meson.build | 1 + po/POTFILES | 1 + src/Enums/PossibleBackends.vala | 48 +++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 src/Enums/PossibleBackends.vala diff --git a/meson.build b/meson.build index f8510bb..0bf4865 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,7 @@ executable( 'src' / 'Enums' / 'Formality.vala', 'src' / 'Enums' / 'StatusCode.vala', 'src' / 'Enums' / 'HighlightColor.vala', + 'src' / 'Enums' / 'PossibleBackends.vala', 'src' / 'Objects' / 'Lang.vala', 'src' / 'Objects' / 'DDModel.vala', diff --git a/po/POTFILES b/po/POTFILES index 727045d..4b9a4fa 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -15,5 +15,6 @@ src/Widgets/RetryButton.vala src/Widgets/SendCodeButton.vala src/Widgets/TextView.vala src/Backend/DeepL.vala +src/Enums/PossibleBackends.vala src/Constants.vala src/Application.vala \ No newline at end of file diff --git a/src/Enums/PossibleBackends.vala b/src/Enums/PossibleBackends.vala new file mode 100644 index 0000000..c09b4d1 --- /dev/null +++ b/src/Enums/PossibleBackends.vala @@ -0,0 +1,48 @@ +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2025 Stella & Charlie (teamcons.carrd.co) + */ + +/** + * A convenient way to track all existing backends + */ +public enum Inscriptions.PossibleBackends { + DEEPL, + LIBRETRANSLATE; + + public string to_name () { + switch (this) { + case DEEPL: return _("DeepL"); + case LIBRETRANSLATE: return _("LibreTranslate"); + default: return _("DeepL"); + } + } + + public string to_label () { + switch (this) { + case DEEPL: return "DeepL-Auth-Key"; + case LIBRETRANSLATE: return "API_KEY"; + default: return "DeepL-Auth-Key"; + } + } + + public string to_backend () { + switch (this) { + case DEEPL: return new Inscriptions.DeepL (); + case LIBRETRANSLATE: return "API_KEY"; + default: return "DeepL-Auth-Key"; + } + } + + public static PossibleBackends from_int (int number) { + switch (number) { + case 0: return DEEPL; + case 1: return LIBRETRANSLATE; + default: return DEEPL; + } + } + + public static PossibleBackends[] all_backends () { + return {DEEPL, LIBRETRANSLATE}; + } +} \ No newline at end of file From ffd3cf6fb5644805a60375ae360fcbaf869cc984 Mon Sep 17 00:00:00 2001 From: teamcons Date: Tue, 10 Feb 2026 21:10:56 +0100 Subject: [PATCH 02/31] Go go Control Enter for translation --- src/Application.vala | 2 +- src/Windows/MainWindow.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application.vala b/src/Application.vala index d163e2b..5496cc4 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -57,7 +57,7 @@ public class Inscriptions.Application : Gtk.Application { // Translation view set_accels_for_action ("window.toggle-orientation", {"o"}); set_accels_for_action ("window.toggle-highlight", {"h"}); - set_accels_for_action ("window.translate", {"t"}); + set_accels_for_action ("window.translate", {"return", "t"}); set_accels_for_action ("window.clear_text", {"l"}); // Source & target diff --git a/src/Windows/MainWindow.vala b/src/Windows/MainWindow.vala index 9b5e1a9..660ddc3 100644 --- a/src/Windows/MainWindow.vala +++ b/src/Windows/MainWindow.vala @@ -163,7 +163,7 @@ public class Inscriptions.MainWindow : Gtk.Window { //TRANSLATORS: The two following texts are for a button. The functionality is diabled. You can safely ignore these. var translate_button = new Gtk.Button () { label = _("Translate"), - tooltip_markup = Granite.markup_accel_tooltip ({"T"}, _("Start translating the entered text")) + tooltip_markup = Granite.markup_accel_tooltip ({"return", "T"}, _("Start translating the entered text")) }; translate_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); translate_button.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_TRANSLATE; From 4e12d1d7c2c2fc7ed795c9db5663ee3652b34bf1 Mon Sep 17 00:00:00 2001 From: William Kelso Date: Mon, 16 Feb 2026 14:41:48 -0500 Subject: [PATCH 03/31] App Icon (#33) * initial design * draft design no2 * revise v2 * don't worry about 24px * show more wear in inscriptions * draw bases, no hieroglyphics * all sizes --------- Co-authored-by: Stella and Charlie <147658063+teamcons@users.noreply.github.com> --- data/icons/128.svg | 424 ++++++++++++++++++++---------------- data/icons/16.svg | 345 +++++++++++++++++++---------- data/icons/24.svg | 236 -------------------- data/icons/32.svg | 375 ++++++++++++++++--------------- data/icons/48.svg | 533 ++++++++++++++------------------------------- data/icons/64.svg | 260 ++++++---------------- 6 files changed, 898 insertions(+), 1275 deletions(-) delete mode 100644 data/icons/24.svg diff --git a/data/icons/128.svg b/data/icons/128.svg index 2e562af..baf22db 100644 --- a/data/icons/128.svg +++ b/data/icons/128.svg @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - image/svg+xml - - - + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:none;stroke:#273445;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" /> diff --git a/data/icons/16.svg b/data/icons/16.svg index f492850..d3d175b 100644 --- a/data/icons/16.svg +++ b/data/icons/16.svg @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - + gradientUnits="userSpaceOnUse" />image/svg+xml diff --git a/data/icons/24.svg b/data/icons/24.svg deleted file mode 100644 index 93f462c..0000000 --- a/data/icons/24.svg +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/data/icons/32.svg b/data/icons/32.svg index 55d7599..49ffb96 100644 --- a/data/icons/32.svg +++ b/data/icons/32.svg @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - image/svg+xml - - - + width="27.000008" /> diff --git a/data/icons/48.svg b/data/icons/48.svg index fb5ed47..b1fd8cc 100644 --- a/data/icons/48.svg +++ b/data/icons/48.svg @@ -1,10 +1,10 @@ image/svg+xml + y="5.5" + ry="3" + rx="3" /> diff --git a/data/icons/64.svg b/data/icons/64.svg index fb5ed47..63a8b8b 100644 --- a/data/icons/64.svg +++ b/data/icons/64.svg @@ -1,10 +1,10 @@ image/svg+xml + style="baseline-shift:baseline;display:inline;overflow:visible;opacity:0.15;vector-effect:none;fill:#000000;fill-opacity:1;stroke-linecap:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1" + d="m 50,22 c -2.197294,0 -4,1.802706 -4,4 0,2.103631 1.651727,3.845549 3.720703,3.990234 l -1.310547,5.246094 c -0.493795,-0.407895 -0.995001,-0.842062 -1.46875,-1.185547 -0.871474,-0.63185 -1.58779,-1.212769 -2.669922,-1.152343 -0.541065,0.03021 -1.165303,0.444046 -1.408203,0.958984 -0.2429,0.514938 -0.268522,1.047841 -0.226562,1.691406 0.08392,1.28713 0.523755,3.082859 1.414062,5.765625 L 44.277344,42 H 56 v -6.835938 c 0.01051,-0.01275 0.02093,-0.02616 0.03125,-0.03906 C 56.714088,34.271453 57,33.166667 57,32 v -0.21875 l -3.091797,-6.701172 a 1,1 0 0 0 -0.03125,-0.0625 C 53.435436,23.289796 51.858868,22 50,22 Z m 0,2 c 1.116414,0 2,0.883586 2,2 0,0.08153 -0.0045,0.161443 -0.01367,0.240234 L 49.550781,24.048828 C 49.69474,24.01666 49.84538,24 50,24 Z m -1.917969,1.421875 2.695313,2.423828 C 50.53925,27.944257 50.276563,28 50,28 c -1.116414,0 -2,-0.883586 -2,-2 0,-0.201797 0.02814,-0.395385 0.08203,-0.578125 z M 52,29.458984 V 36.5 h 1 c 0.346888,0 0.682102,-0.04092 1,-0.117188 V 40 h -8.222656 c -0.647712,-2.071607 -1.091903,-3.774843 -1.144532,-4.582031 -0.01588,-0.243567 0.0063,-0.251867 0.02148,-0.371094 0.155466,0.07423 0.497171,0.176344 1.113281,0.623047 0.766451,0.555705 1.679443,1.335996 2.589844,2.097656 l 1.224609,1.023438 2.320313,-9.277344 c 0.03272,-0.01787 0.06549,-0.03594 0.09766,-0.05469 z m 2,0.595704 0.960938,2.082031 C 54.932572,32.883541 54.762772,33.507473 54.46875,33.875 54.367547,34.001503 54.127024,33.983919 54,34.074219 Z" /> From ee537136138d246c15fef0acfec69ffbf844d07c Mon Sep 17 00:00:00 2001 From: Stella and Charlie <147658063+teamcons@users.noreply.github.com> Date: Mon, 16 Feb 2026 22:15:13 +0100 Subject: [PATCH 04/31] Cleanup refactor (#36) * fix fucked spacing for API level box * Remove unused bloc * repair ctrl+Enter accel * avoid awkward overflow when resizing the paned * Move some actions to MainWindow * Move some more actions into the Translation View * Create constants for setting keys, and slight changes here and there * simplify and refresh * Use constants, group stuff * Further work * woops * Move around some files for better organization * Plumbing for Windows, one day * windows plumbing: Skip non windows relevant things * scrap notifications for now * Introduce a dedicated HeaderBar to keep things clean * Sort widgets out, and ensure refreshing on language switch (and make it also lighter) * Make the logs look like a console * experiment with flatness * rename widget * outta my way * Correct hardcoded value * use slate and custom color as branding, and more windows structure * do not force arbitrary accent * Organize widgets and update PO --- data/Application.css | 14 +- data/inscriptions.metainfo.xml.in | 5 +- data/meson.build | 66 +- meson.build | 60 +- po/POTFILES | 23 +- po/de.po | 590 ++++---- po/extra/de.po | 188 ++- po/extra/extra.pot | 105 +- po/extra/fr.po | 190 ++- po/fr.po | 591 ++++---- po/io.github.elly_code.inscriptions.pot | 438 +++--- po/it.po | 1294 +++++++++-------- po/sv.po | 457 +++--- src/Application.vala | 32 +- src/Backend/BackendTemplate.vala | 15 +- src/Backend/{ => DeepL}/DeepL.vala | 74 +- src/Backend/DeepL/DeepLUtils.vala | 29 + src/Constants.vala | 36 +- src/Enums/HighlightColor.vala | 2 +- src/Services/BackendController.vala | 14 + src/Services/Secrets.vala | 2 +- src/Views/ErrorView.vala | 21 +- src/Views/LogView.vala | 22 +- src/Views/TranslationView.vala | 45 +- src/Widgets/{ => Buttons}/OrientationBox.vala | 41 +- src/Widgets/Buttons/RetryButton.vala | 118 ++ src/Widgets/ErrorBonusBox.vala | 10 +- src/Widgets/HeaderBar.vala | 199 +++ .../{SendCodeButton.vala => LogToolbar.vala} | 46 +- src/Widgets/{ => Panes}/Pane.vala | 24 +- src/Widgets/{ => Panes}/SourcePane.vala | 36 +- src/Widgets/{ => Panes}/TargetPane.vala | 22 +- .../{ => PopoverWidgets}/ApiEntry.vala | 0 .../{ => PopoverWidgets}/ApiLevel.vala | 7 +- .../{ => Popovers}/OptionsPopover.vala | 19 +- .../{ => Popovers}/SettingsPopover.vala | 74 +- src/Widgets/RetryButton.vala | 117 -- src/Widgets/TextView.vala | 23 +- src/Windows/MainWindow.vala | 271 +--- src/meson.build | 53 + windows/deploy.sh | 268 ++++ windows/icons/ico.rc | 1 + windows/icons/icon-mini.ico | Bin 0 -> 4286 bytes windows/icons/icon.ico | Bin 0 -> 25220 bytes windows/icons/install.ico | Bin 0 -> 32110 bytes windows/icons/settings-mini.ico | Bin 0 -> 4286 bytes windows/icons/settings.ico | Bin 0 -> 26817 bytes windows/icons/uninstall.ico | Bin 0 -> 35671 bytes windows/loaders.cache | 119 ++ windows/prep.sh | 18 + 50 files changed, 3389 insertions(+), 2390 deletions(-) rename src/Backend/{ => DeepL}/DeepL.vala (83%) create mode 100644 src/Backend/DeepL/DeepLUtils.vala create mode 100644 src/Services/BackendController.vala rename src/Widgets/{ => Buttons}/OrientationBox.vala (60%) create mode 100644 src/Widgets/Buttons/RetryButton.vala create mode 100644 src/Widgets/HeaderBar.vala rename src/Widgets/{SendCodeButton.vala => LogToolbar.vala} (67%) rename src/Widgets/{ => Panes}/Pane.vala (81%) rename src/Widgets/{ => Panes}/SourcePane.vala (82%) rename src/Widgets/{ => Panes}/TargetPane.vala (90%) rename src/Widgets/{ => PopoverWidgets}/ApiEntry.vala (100%) rename src/Widgets/{ => PopoverWidgets}/ApiLevel.vala (96%) rename src/Widgets/{ => Popovers}/OptionsPopover.vala (87%) rename src/Widgets/{ => Popovers}/SettingsPopover.vala (65%) delete mode 100644 src/Widgets/RetryButton.vala create mode 100644 src/meson.build create mode 100644 windows/deploy.sh create mode 100644 windows/icons/ico.rc create mode 100644 windows/icons/icon-mini.ico create mode 100644 windows/icons/icon.ico create mode 100644 windows/icons/install.ico create mode 100644 windows/icons/settings-mini.ico create mode 100644 windows/icons/settings.ico create mode 100644 windows/icons/uninstall.ico create mode 100644 windows/loaders.cache create mode 100644 windows/prep.sh diff --git a/data/Application.css b/data/Application.css index ec04d5a..0d25913 100644 --- a/data/Application.css +++ b/data/Application.css @@ -17,6 +17,13 @@ * Boston, MA 02110-1301 USA */ +/* +Picked: #2c3944d9 +Base from wpkelso: #33434eff + +@define-color accent_color #33434eff; +*/ + /* Used in the OrientationsBox for the preview icon */ .rotated * { -gtk-icon-transform: rotate(90deg); @@ -32,10 +39,15 @@ /* Pretty coloured titlebar */ .primary-background { - background-color: rgba(44, 57, 68, 1); + background-color: #33434eff; color: #FFFFFF; } .primary-background .button { background-color: @bg_color; } + +/* Pretend the log textview is a console */ +.console { + background-color: #002B36; +} \ No newline at end of file diff --git a/data/inscriptions.metainfo.xml.in b/data/inscriptions.metainfo.xml.in index e0e66a6..a9d76bc 100644 --- a/data/inscriptions.metainfo.xml.in +++ b/data/inscriptions.metainfo.xml.in @@ -13,6 +13,7 @@ Translate text elegantly

A fast, pretty, and ready translation app using DeepL free and paid API

+

Libretranslate support is considered, but

Some points of note: