FreeBSD Bugzilla – Attachment 255488 Details for
Bug 282733
[NEW PORT] textproc/dmenu-translate: Quick text translation with dmenu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
textproc/dmenu-translate.patch
dmenu-translate.patch (text/plain), 4.70 KB, created by
Yusuf Yaman
on 2024-11-27 13:30:45 UTC
(
hide
)
Description:
textproc/dmenu-translate.patch
Filename:
MIME Type:
Creator:
Yusuf Yaman
Created:
2024-11-27 13:30:45 UTC
Size:
4.70 KB
patch
obsolete
>From 15c55e6b51e578516ac0a83549c944ec9f872fbe Mon Sep 17 00:00:00 2001 >From: Yusuf Yaman <nxjoseph@protonmail.com> >Date: Wed, 13 Nov 2024 22:55:30 +0300 >Subject: [PATCH] textproc/dmenu-translate: New port: Quick text translation > with dmenu > >dmenu-translate is a simple and efficient tool that allows users to translate >text quickly using the dmenu or any other dmenu-like utility. It supports >multiple languages and translation services, making it easy >to get instant translations with minimal effort. > >WWW: https://github.com/NikitaIvanovV/dmenu-translate > >PR: 282733 >--- > textproc/dmenu-translate/Makefile | 40 +++++++++++++++++ > textproc/dmenu-translate/distinfo | 3 ++ > .../files/patch-dmenu-translate | 45 +++++++++++++++++++ > textproc/dmenu-translate/pkg-descr | 4 ++ > 4 files changed, 92 insertions(+) > create mode 100644 textproc/dmenu-translate/Makefile > create mode 100644 textproc/dmenu-translate/distinfo > create mode 100644 textproc/dmenu-translate/files/patch-dmenu-translate > create mode 100644 textproc/dmenu-translate/pkg-descr > >diff --git a/textproc/dmenu-translate/Makefile b/textproc/dmenu-translate/Makefile >new file mode 100644 >index 0000000..eceb94d >--- /dev/null >+++ b/textproc/dmenu-translate/Makefile >@@ -0,0 +1,40 @@ >+PORTNAME= dmenu-translate >+DISTVERSION= g20230526 >+CATEGORIES= textproc >+ >+MAINTAINER= nxjoseph@protonmail.com >+COMMENT= Quick text translation with dmenu >+WWW= https://github.com/NikitaIvanovV/dmenu-translate >+ >+LICENSE= MIT >+LICENSE_FILE= ${WRKSRC}/LICENSE >+ >+RUN_DEPENDS= gsed:textproc/gsed \ >+ notify-send:devel/libnotify \ >+ trans:textproc/translate-shell \ >+ xterm:x11/xterm >+ >+USE_GITHUB= yes >+GH_ACCOUNT= NikitaIvanovV >+GH_TAGNAME= 8cc717d3d3bec7f1d7db804e1c339362536b6e45 >+ >+NO_ARCH= yes >+NO_BUILD= yes >+ >+PLIST_FILES= bin/${PORTNAME} >+ >+OPTIONS_DEFINE= WAYLAND X11 >+OPTIONS_DEFAULT= WAYLAND X11 >+WAYLAND_DESC= depend on x11/wmenu and x11/wl-clipboard for use with Wayland >+X11_DESC= depend on x11/dmenu and x11/xclip for use with X11 >+ >+WAYLAND_RUN_DEPENDS= wl-copy:x11/wl-clipboard \ >+ wmenu:x11/wmenu >+X11_RUN_DEPENDS= dmenu:x11/dmenu \ >+ xclip:x11/xclip >+ >+do-install: >+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} \ >+ ${STAGEDIR}${PREFIX}/bin/${PORTNAME} >+ >+.include <bsd.port.mk> >diff --git a/textproc/dmenu-translate/distinfo b/textproc/dmenu-translate/distinfo >new file mode 100644 >index 0000000..309b3a1 >--- /dev/null >+++ b/textproc/dmenu-translate/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1732713638 >+SHA256 (NikitaIvanovV-dmenu-translate-g20230526-8cc717d3d3bec7f1d7db804e1c339362536b6e45_GH0.tar.gz) = 418e75f8913366095f2276ee2579228c60ab5b5c292ecf95c08e7a135b54a29c >+SIZE (NikitaIvanovV-dmenu-translate-g20230526-8cc717d3d3bec7f1d7db804e1c339362536b6e45_GH0.tar.gz) = 965509 >diff --git a/textproc/dmenu-translate/files/patch-dmenu-translate b/textproc/dmenu-translate/files/patch-dmenu-translate >new file mode 100644 >index 0000000..c6f7f41 >--- /dev/null >+++ b/textproc/dmenu-translate/files/patch-dmenu-translate >@@ -0,0 +1,45 @@ >+--- dmenu-translate.orig 2024-11-26 19:46:24 UTC >++++ dmenu-translate >+@@ -53,7 +53,7 @@ formatmenu() { >+ } >+ >+ formatmenu() { >+- echo "$1" | tr '\n' ' ' | sed 's/\s\{3,\}//g; s/^\(.\{30\}\).\+/\1.../; s/$/\n/' >++ echo "$1" | tr '\n' ' ' | gsed 's/\s\{3,\}//g; s/^\(.\{30\}\).\+/\1.../; s/$/\n/' >+ } >+ >+ get_selection() { >+@@ -62,12 +62,12 @@ clip_menu() { >+ >+ clip_menu() { >+ { formatmenu "$1"; formatmenu "$2"; } | >+- sed 's/^\s*$//; 1s/^./Primary: &/; 2s/^./Clipboard: &/' | >+- sed '/^$/d' >++ gsed 's/^\s*$//; 1s/^./Primary: &/; 2s/^./Clipboard: &/' | >++ gsed '/^$/d' >+ } >+ >+ lang_menu() { >+- echo "$TRANS_LANGS" | sed 's/\s\+/\n/g' | sed '/:/!s/^/:/' >++ echo "$TRANS_LANGS" | gsed 's/\s\+/\n/g' | gsed '/:/!s/^/:/' >+ echo '[Define]' >+ } >+ >+@@ -86,7 +86,7 @@ save_file() ( >+ } >+ >+ save_file() ( >+- tmp="$(mktemp --tmpdir 'dmenu-translate.XXXXXX')" >++ tmp="$(mktemp --tmpdir -t dmenu-translate)" >+ echo "$1" > "$tmp" >+ echo "$tmp" >+ ) >+@@ -98,7 +98,7 @@ get_text() { >+ get_text() { >+ echo "$2" | while IFS= read -r clip; do >+ [ "$1" = "$clip" ] && { >+- type="$(echo "$clip" | sed 's/^\(\w\+\):.*/\1/')" >++ type="$(echo "$clip" | gsed 's/^\(\w\+\):.*/\1/')" >+ case "$type" in >+ Primary) echo "$primary" ;; >+ Clipboard) echo "$clipboard" ;; >diff --git a/textproc/dmenu-translate/pkg-descr b/textproc/dmenu-translate/pkg-descr >new file mode 100644 >index 0000000..ed7fdda >--- /dev/null >+++ b/textproc/dmenu-translate/pkg-descr >@@ -0,0 +1,4 @@ >+dmenu-translate is a simple and efficient tool that allows users to translate >+text quickly using the dmenu or any other dmenu-like utility. It supports >+multiple languages and translation services, making it easy >+to get instant translations with minimal effort. >-- >2.47.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 282733
:
255145
|
255475
|
255487
| 255488