Take a Shot! - yet another screenshot utility...

Moderator: Forum moderators

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

[Original thread: https://oldforum.puppylinux.com/viewtop ... =84528&i=1]

Yeah, I know - there's a lot of them already and it would be complete nonsense to write another, but this one was made due to specific need - to include mouse cursor into screenshot.
I found out that ffmpeg has such ability and it's already in many Puppies, so no external tools are required.

The interface isn't beautiful, but (hopefully) intuitive in use; just keep in mind a couple of things:
- selecting region is a bit unusual: click on top-left corner of desired area and release mouse button, then click again on bottom-right corner
- cursor won't be included into screenshot (and additionally ffmpeg may behave weird in some Puppies) if you have only 16bit color depth, must be 24bit (you can change it via xorgwizard)

Requirements: Bash, Gtkdialog >= 0.8.1, ffmpeg/avconv, xwininfo, getcurpos, awk, tr, gifsicle (optional), xrectsel (optional)

I tested it in: Slacko-5.4 (Compiz) + briefly, using VBox, in Slacko-5.4.0.3 (JWM), Lupu-528 (Openbox), Precise-5.4.2 (JWM) and Akita-14 (JWM/Xorg; ffmpeg segfaults with XVesa).
TAS is currently developed on Fatdog64.

PS. I wrote this tool primarily for myself and I don't know if ffmpeg is really wise choice for such a task, but so far works nice for me.
Anyway, I can't guarantee it'll work flawlessly in all cases. ;)
______________

tas_NLS-1.17.pet contains the following translations:
- Polish (me)
- Spanish (nilsonmorales & vicmz) [needs updating]
- French (musher0 & charlie6) [needs updating]
- Dutch (Bert) [needs updating]
- Portuguese (vicmz & AntonioPt)
- Italian (vicmz) [needs updating]
- German (L18L) [needs updating]
- Russian (Sofiya)
___________

tas.gif
tas.gif (38.4 KiB) Viewed 3006 times

___________

Have fun &
Greetings!

Attachments
tas-1.17.pet
Take a Shot! - version 1.17
MD5: 4fd17bb6366e0ff2cc19938c8451890d tas-1.17.pet
(7.77 KiB) Downloaded 143 times
tas_NLS-1.17.pet
Langpack for tas-1.17 (pl, es, fr, nl, pt, it, de, ru)
MD5: 8ed16fd2dad4c0462086828c0f17ae84 tas_NLS-1.17.pet
(9.54 KiB) Downloaded 97 times
Last edited by JakeSFR on Sat Nov 12, 2022 10:49 am, edited 9 times in total.
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

Changelog

Version 1.1:
1.added dedicated icon (`f00).
2. removed "Open in default image..." checkbox from the main window.
3. added a new window that pops up after taking a shot, with the following options:
- View (via defaultimageviewer - usually Viewnior)
- Edit (via defaultimageeditor - usually MTPaint)
- Continue (go back to the main window)
- Exit
4. Some minor improvements.

Version 1.2:
- i18n (gettext)

Version 1.3:
- bugfix: filename with a colon in its name won't save onto FAT partition nor this forum (thanks to don570)

Version 1.4:
- output formats: removed - TGA, PCX, PPM; added - GIF
- added options to take sequence of snapshots
- 'Add datestamp' checkbox now adds only date
- new checkbox 'Add timestamp'
- program icon changed (/usr/local/lib/X11/mini-icons/mini-camera.xpm)
- lots of minor fixes

Version 1.5:
- bugfix: problems with GIFs in Wary (thanks to Geoffrey)

Version 1.6:
- fixed GIF looping issue in older versions of ffmpeg (thanks to Geoffrey)
- added "Scale" option
- added command-line option "quick", which instantly takes a snapshot of the entire screen
- some other fixes and internal improvements

Version 1.7:
- added tooltip that clarifies 'Window' and 'Region' modes
- when "Number of frames" = 1, "Frames per seconds" gets insensitive (works only if Gtkdialog >= 0.8.3)
- support for photocamera.svg icon from Woof-CE

Version 1.8:
- Added "Toggle extra options" togglebutton, which shows/hides "Number of frames" & "Frames per second" options
- Settings are retained also if TAS window has been closed without taking a screenshot
- Some minor fixes & changes

Version 1.9:
- compatibility with avconv

Version 1.10:
- possible fix for supposed avconv/ffmpeg clash (problem reported by Relztrah)
- fixed date/time stamps not being calculated correctly if DELAY and/or Window/Region modes has been used

Version 1.11:
- disabled beep for Quickshot (it's taken immediately, so there's no point to have it)
- added checkbox "Beep on Shot" (thanks to MochiMoppel)
- can use avplay/ffplay (they support more formats than aplay) as a player for BEEPFILE - aplay as a fallback
- standard beep command as a fallback, if /usr/share/audio/beep_high.wav doesn't exist (thanks to MochiMoppel)
- the default BEEPFILE as well as DEFAULTIMAGEVIEWER and DEFAULTIMAGEEDITOR can be specified in ~/.take_a_shot.rc config file (no need to edit the code anymore)
- added checkbox "Show timer" - it displays a timer in the center of the screen if DELAY > 0

Version 1.12:
- fix for different treatment of newline by 'read' cmd in Bash-4.4 (thanks to peebee & 01micko)
- fix for newer ffmpeg that does not recognize '+nomouse' option anymore
- can make use of xrectsel, if available
- ditched xmessage; everything's done in Gtkdialog now
- minor corrections/fixes

Version 1.13:
- removed 'Add datestamp' and 'Add timestamp' checkboxes; instead a user can freely insert date's % parameters into filename
- fix: some ancient versions of ffmpeg may not support '-draw_mouse' option
- minor corrections

Version 1.14:
- fix: replace slashes to underscores in filename after evaluating date format options (thanks to MrDuckGuy)

Version 1.15:
- added 'Discard' button to the preview dialog (thanks to MochiMoppel)
- increased the size of the preview image (1/5 -> 1/3)

Version 1.16:
- workaround for Bash <= 3, which requires the opening parenthesis for case-esac within $(subshell) (thanks to AntonioPt)

Version 1.17:
- fix falling back to the default filename ("Screenshot") on relaunch, if filename was left empty (thanks to step)

Last edited by JakeSFR on Sat Nov 12, 2022 10:50 am, edited 2 times in total.
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

This is a very good utility. Thank you very much for this

Last edited by Sofiya on Wed Nov 09, 2022 12:22 pm, edited 1 time in total.

KL
PUPPY LINUX Simple fast free

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

Thanks Sofiya, NLS pet updated.

[EDIT] NLS pet re-uploaded after 2 downloads. The package contained superfluous top directory.

Greetings!

Last edited by JakeSFR on Wed Nov 09, 2022 9:04 pm, edited 1 time in total.
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

Hello @JakeSFR and every single one who help this tool to be what it is :)
First of all my goal was to help to improve this tool, 2 since i didn't knew where to share my updates/thoughts/issues so i put it where i put it didn't mean nothing more, 3 sorry for not explain better what kind of issues i found/had.

So here it is in wary a print screen with issue of the function "func_dlg () " where i change '$()' to '` `' ( ps if i let it stay $() i will get another error and dialog will not popup) and then i started to clean and organize the code my way in order to understand better "since i learn php and this is my way of writing code :)" i all so realize that you copy some code 2x didn't get it why so i test it by removing some of does lines and code "did work but..." and last what is the purpose of this code in line 596 till 611 in your version since its called both "if and else" when burst mode is on and creates too many folders. I notice this when i was trying to shrink this peace of code :roll:

i add LANG=C because on my old machine where i run Racy print some errors that at the moment i had that line they were gone but talking about translation how does it work with @Sofiya updates if the full code don't use no variables that the *.mo files have so :D and my goal was to creat some similar via bash :)
@Sofiya i don't know how to edit mo files but i cant translate the full code "text of course" in to Portuguese from Portugal since its incomplete from what i read and im Portugues :D

@MochiMoppel arigato to redirect me here :)
@wiak thankyou for the explanation,rules,....

Well that's all for now and Thank you for understanding me,.... all and i hope i have help a bit more to improve the code,.....
P.S @JakeSFR Im gonna re-organize the code my way anyway then you tell you what you think,... p.s i think the full comments add it in other section can be removed,... since this is the right place to talk about TAS

Attachments
wacyPup.png
wacyPup.png (399.51 KiB) Viewed 2927 times

Why astronauts use Linux
Because you can't open windows in space

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

AntonioPt wrote:

So here it is in wary a print screen with issue of the function "func_dlg () " where i change '$()' to '` `'

Yes, I can confirm that it happens in Wary and Racy, thanks.
I don't see anything wrong with the code, though, seems to be a problem with Bash there.
For example, this test case:

Code: Select all

#!/bin/bash

TEST='
	HEAD
	'$(case "$VAR" in
		*) echo "test" ;;
	esac)'
	TAIL
'

echo "$TEST"

It works with Bash-3.00.16(2) I built some time ago in Fatdog, but not with Bash-3.00.16(1) in Wary.
I managed to use the Bash binary from Wary in Fatdog and the error is still there:

Code: Select all

# ./z
./z: line 6: syntax error near unexpected token `;;'
./z: line 6: `		*) echo "test" ;;'

Using `` instead of $() makes it work, indeed, so if nothing else works, I'll go with that, I guess.

what is the purpose of this code in line 596 till 611 in your version since its called both "if and else" when burst mode is on and creates too many folders. I notice this when i was trying to shrink this peace of code

Its purpose is to check if the destination file/folder already exists and if so, make it unique, by adding consecutive numbers to is, e.g. Screenshot(1), Screenshot(2), and so on, to prevent overwriting existing stuff.

but talking about translation how does it work with @Sofiya updates if the full code don't use no variables that the *.mo files have so :D

I don't understand what do you mean. It works, like any other available translation:

TAS_in_Racy.gif
TAS_in_Racy.gif (95.82 KiB) Viewed 2904 times

Maybe you've downloaded the faulty NLS PET package? See my edit in the reply to Sofiya.

Is there anything else, other than the above error, not working correctly in Racy/Wary?

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

JakeSFR wrote: Wed Nov 09, 2022 10:20 pm
AntonioPt wrote:

So here it is in wary a print screen with issue of the function "func_dlg () " where i change '$()' to '` `'

Yes, I can confirm that it happens in Wary and Racy, thanks.
I don't see anything wrong with the code, though, seems to be a problem with Bash there.
For example, this test case:

Code: Select all

#!/bin/bash

TEST='
	HEAD
	'$(case "$VAR" in
		*) echo "test" ;;
	esac)'
	TAIL
'

echo "$TEST"

It works with Bash-3.00.16(2) I built some time ago in Fatdog, but not with Bash-3.00.16(1) in Wary.
I managed to use the Bash binary from Wary in Fatdog and the error is still there:

Code: Select all

# ./z
./z: line 6: syntax error near unexpected token `;;'
./z: line 6: `		*) echo "test" ;;'

Using `` instead of $() makes it work, indeed, so if nothing else works, I'll go with that, I guess.

what is the purpose of this code in line 596 till 611 in your version since its called both "if and else" when burst mode is on and creates too many folders. I notice this when i was trying to shrink this peace of code

Its purpose is to check if the destination file/folder already exists and if so, make it unique, by adding consecutive numbers to is, e.g. Screenshot(1), Screenshot(2), and so on, to prevent overwriting existing stuff.

but talking about translation how does it work with @Sofiya updates if the full code don't use no variables that the *.mo files have so :D

I don't understand what do you mean. It works, like any other available translation:

TAS_in_Racy.gif

Maybe you've downloaded the faulty NLS PET package? See my edit in the reply to Sofiya.

Is there anything else, other than the above error, not working correctly in Racy/Wary?

Greetings!

Hi @JakeSFR yes there are im making somes prints to see if i can express better :) P.S. yes i did install NLS PET package but didnt manager to run in difrent lang maybe im doing some wrong cant tell
P.S.Im testing from Scratch from your code and notice i screw up when i remove some code :D so i miss lead some people

Why astronauts use Linux
Because you can't open windows in space

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

Hi all
For some reason NOS PET is installed but the translations are not in the proper paths I tested in fossapup and Racy/wacy Here is a print of the same

Attachments
tas_lang.png
tas_lang.png (314.5 KiB) Viewed 2867 times

Why astronauts use Linux
Because you can't open windows in space

User avatar
MochiMoppel
Posts: 1236
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 439 times

Re: Take a Shot! - yet another screenshot utility...

Post by MochiMoppel »

JakeSFR wrote: Wed Nov 09, 2022 10:20 pm

I don't see anything wrong with the code, though, seems to be a problem with Bash there.

Confirmed for bash 3.00.16(1) (have it lying around here, can't remember where I got it from )

Interestingly syntax highlighting in my Geany 1.31.1 makes the same mistake and thinks that the case parenthesis ends the $() expression:

This is what Geany highlights:
TEST=$(case $VAR in *) echo test ;; esac)

bash 3.00.16(1) agrees with Geany and effectively executes this:
TEST=echo test ;; esac)
Error messages for this crap are consistent in all bash versions

This is what Geany highlights and what is understood by all bash versions
TEST=`case $VAR in *) echo test ;; esac`

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

AntonioPt wrote:

For some reason NOS PET is installed but the translations are not in the proper paths I tested in fossapup and Racy/wacy Here is a print of the same

As I already wrote, the NLS pet I uploaded a couple of days ago had an extra top directory. I reuploaded the corrected version the same day. Did you redownload and reinstall it?
Also, it should be LANGUAGE=pt not Language=pt, but you already have your locale changed on the system level, so it's unnecessary.

Anyway, is $() vs `` the only problem? If so, I'll release a fixed version soon.
___________

MochiMoppel wrote:

Interestingly syntax highlighting in my Geany 1.31.1 makes the same mistake and thinks that the case parenthesis ends the $() expression:

Yes, you're right, both get confused by the "extra" ).
However, I just found this:

https://www.linuxquestions.org/questions/linux-newbie-8/bash-case-and-unmatched-parens-4175621991/#post5808842 wrote:

The umatched parens even caused a parser problem in bash <=3 and ksh88 concerning $(subshell).
Fortunately solved in bash 4 and ksh93.
But there has been a work-around: simply add the opening parenthesis!

Code: Select all

case $x in ( [Yy]* ) echo "$x starts with Y";; esac

and it works, indeed.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
MochiMoppel
Posts: 1236
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 439 times

Re: Take a Shot! - yet another screenshot utility...

Post by MochiMoppel »

The bash manual still mentions an opening '(' as an option but doesn't elaborate when and why it should be used.
Now we know :D

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#index-case wrote:

The syntax of the case command is:
case word in
[ [(] pattern [| pattern]…) command-list ;;]…
esac

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

@JakeSFR no i didnt download the new pet but then i copy manualy and did see the translation :) so thank you about that
@JakeSFR i think there isn't nuthing more but explain me some because this afect the syntax highlighting in Geany in Wary/Racy version 0.19.1

FILENAME="`echo "${FILENAME}" | tr '\\\/"' '_'`" <-- this screw the syntax highlighting in Geany in Wary/Racy

DIRECTORY="$(echo "${DIRECTORY}" | tr '%' '_')" this 2 don't screw up syntax highlighting in Geany in Wary/Racy
FILENAME="$(echo "${FILENAME}" | tr '\\\/' '_')" <-- but this its very similar to the other one so i got confuse

i dont know what is the goald but in Geany in Wary/Racy screw syntax highlighting
#SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%"/' '_')" # remove " from regular expretion
SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%/' '_')"

P.s. My view of translation was in a diferent way "some way i do it via php" hehe thats all

Last edited by AntonioPt on Fri Nov 11, 2022 11:50 pm, edited 1 time in total.

Why astronauts use Linux
Because you can't open windows in space

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

AntonioPt wrote:

@JakeSFR i think there isn't nuthing more but explain me some because this afect the syntax highlighting in Geany in Wary/Racy version 0.19.1

FILENAME="`echo "${FILENAME}" | tr '\\\/"' '_'`" <-- this screw the syntax highlighting in Geany in Wary/Racy

DIRECTORY="$(echo "${DIRECTORY}" | tr '%' '_')" this 2 don't screw up syntax highlighting in Geany in Wary/Racy
FILENAME="$(echo "${FILENAME}" | tr '\\\/' '_')" <-- but this its very similar to the other one so i got confuse

i dont know what is the goald but in Geany in Wary/Racy screw syntax highlighting
#SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%"/' '_')" # remove " from regular expretion
SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%/' '_')"

What can I say, this happens, Geany gets confused sometimes...
___________

Ok, I uploaded v1.16 with the workaround for Bash in Racy/Wary.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

AntonioPt wrote: Fri Nov 11, 2022 2:56 pm

@Sofiya there it the rest of the Portugues translation that you need

why did you decide that I need Portuguese???? or some other language

KL
PUPPY LINUX Simple fast free

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

Sofiya wrote: Fri Nov 11, 2022 3:27 pm
AntonioPt wrote: Fri Nov 11, 2022 2:56 pm

@Sofiya there it the rest of the Portugues translation that you need

why did you decide that I need Portuguese???? or some other language

I thought you did the translation pack my apologies for the confusion

P.S. @JakeSFR I didn't find any more errors, just errors derived from Geany and syntax highlighting :D
Kind of funny this code using echo will work ok hahaha

here_works.png
here_works.png (309.23 KiB) Viewed 2699 times

This windows don't save setting will always popup beside that all good

dont_save.png
dont_save.png (318.89 KiB) Viewed 2699 times

Why astronauts use Linux
Because you can't open windows in space

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

JakeSFR wrote: Fri Nov 11, 2022 3:26 pm
AntonioPt wrote:

@JakeSFR i think there isn't nuthing more but explain me some because this afect the syntax highlighting in Geany in Wary/Racy version 0.19.1

FILENAME="`echo "${FILENAME}" | tr '\\\/"' '_'`" <-- this screw the syntax highlighting in Geany in Wary/Racy

DIRECTORY="$(echo "${DIRECTORY}" | tr '%' '_')" this 2 don't screw up syntax highlighting in Geany in Wary/Racy
FILENAME="$(echo "${FILENAME}" | tr '\\\/' '_')" <-- but this its very similar to the other one so i got confuse

i dont know what is the goald but in Geany in Wary/Racy screw syntax highlighting
#SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%"/' '_')" # remove " from regular expretion
SAVENAME="$(echo "${FILENAME_EVAL}" | tr '%/' '_')"

What can I say, this happens, Geany gets confused sometimes...
___________

Ok, I uploaded v1.16 with the workaround for Bash in Racy/Wary.

Greetings!

You welcome and when you can let me know when Portuguese lang is updated

Why astronauts use Linux
Because you can't open windows in space

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

AntonioPt wrote:

This windows don't save setting will always popup beside that all good

Can't reproduce. After selecting the checkbox, the window never shows up again.
This option should be set to "off" in the config file:

Code: Select all

# grep GIFWARNING ~/.take_a_shot.rc 
GIFWARNING="off"
AntonioPt wrote:

You welcome and when you can let me know when Portuguese lang is updated

As soon as you upload the updated tas.mo file.

If you don't know where to start, use this to obtain the existing translation:

Code: Select all

msgunfmt /usr/share/locale/pt/LC_MESSAGES/tas.mo > tas.po

Then this, to add the missing strings to it:

Code: Select all

xgettext -L shell -j tas.po -o tas.po /usr/bin/tas

Open the tas.po file and translate the strings.

To convert tas.po back to tas.mo:

Code: Select all

msgfmt -o tas.mo tas.po

Then put it in /usr/share/locale/pt/LC_MESSAGES and test if everything is looking good.

Btw, the above commands are most likely available in devx.sfs, so you need to load it beforehand.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

AntonioPt wrote: Fri Nov 11, 2022 3:57 pm

I see you are eager to fight, so here is the first task for you, translate it into your language
put your translation in quotation marks msgstr ""

Code: Select all

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-09 04:59+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "(Take a Shot!)"
msgstr ""

msgid "(see 'date --help' for full list)"
msgstr ""

msgid "Beep on Shot"
msgstr ""

msgid "Burst mode"
msgstr ""

msgid "Color depth is lower than 24bits."
msgstr ""

msgid "Continue"
msgstr ""

msgid "Current filename is:"
msgstr ""

msgid "Delay (in seconds):"
msgstr ""

msgid "Directory:"
msgstr ""

msgid "Don't show this warning again"
msgstr ""

msgid "Edit"
msgstr ""

msgid "Error"
msgstr ""

msgid "File no longer exists!"
msgstr ""

msgid "Filename:"
msgstr ""

msgid "Frames per second:"
msgstr ""

msgid "Fullscreen"
msgstr ""

msgid ""
"If output GIF it too big (has large resolution and lots of frames) an "
"attempt to view it in some of image viewers (Viewnior, GPicView, etc.) may "
"result in seizure of all available RAM and hence complete system lockup!\n"
"\n"
"Viewing it in browser (Firefox, Chromium, etc.) is recommended, as it takes "
"significantly less RAM."
msgstr ""
""
""
""
""
""
""

msgid "Include mouse pointer"
msgstr ""

msgid "Info"
msgstr ""

msgid "Log"
msgstr ""

msgid "Number of frames:"
msgstr ""

msgid "Please install 'ffmpeg' or 'avconv' first!"
msgstr ""

msgid "Please wait, optimizing the GIF file..."
msgstr ""

msgid "Preview"
msgstr ""

msgid "Quickshot"
msgstr ""

msgid "Quit"
msgstr ""

msgid "Region"
msgstr ""

msgid "Scale (%):"
msgstr ""

msgid "Screenshot"
msgstr ""

msgid "Show timer"
msgstr ""

msgid "TAS may not work 100% properly."
msgstr ""

msgid "Take a Shot!"
msgstr ""

msgid ""
"To select a window make sure it's not partially covered by other windows and "
"then click its titlebar.\n"
"To select a region click on top-left corner of desired area and release "
"mouse button, then click again on bottom-right corner."
msgstr ""
""
""
""
""

msgid "Try to use 'xorgwizard' to change the setting."
msgstr ""

msgid "View"
msgstr ""

msgid "View log"
msgstr ""

msgid "Warning"
msgstr ""

msgid "Window"
msgstr ""

msgid "You can use date format options, such as:"
msgstr ""

KL
PUPPY LINUX Simple fast free

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

hi there @Sofiya there you go this can be apply to Brazilian to but may have small changes but ... :D

Code: Select all

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Antonio Pires <toslalompt@gmail.com>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-09 04:59+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Antonio Pires <toslalompt@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "(Take a Shot!)"
msgstr "(Tirar Foto!)"

msgid "(see 'date --help' for full list)"
msgstr "(veja 'date --help' para a lista completa)"

msgid "Beep on Shot"
msgstr "Tocar som ao tirar foto"

msgid "Burst mode"
msgstr "Modo de rajada"

msgid "Color depth is lower than 24bits."
msgstr "A profundidade de cor é inferior a 24 bits."

msgid "Continue"
msgstr "Continuar"

msgid "Current filename is:"
msgstr "Arquivo atual é:"

msgid "Delay (in seconds):"
msgstr "Atraso (em segundos):"

msgid "Directory:"
msgstr "Directório:"

msgid "Don't show this warning again"
msgstr "Não mostrar este aviso novamente"

msgid "Edit"
msgstr "Editar"

msgid "Error"
msgstr "Erro"

msgid "File no longer exists!"
msgstr "Ficheiro já não existe!"

msgid "Filename:"
msgstr "Nome do Ficheiro/Arquivo"

msgid "Frames per second:"
msgstr "Frames por segundo:"

msgid "Fullscreen"
msgstr "Ecran inteiro"

msgid ""
"If output GIF it too big (has large resolution and lots of frames) an "
"attempt to view it in some of image viewers (Viewnior, GPicView, etc.) may "
"result in seizure of all available RAM and hence complete system lockup!\n"
"\n"
"Viewing it in browser (Firefox, Chromium, etc.) is recommended, as it takes "
"significantly less RAM."
msgstr ""
"Se a saída do GIF for muito grande (tem resolução grande e muitos frames)"
"uma tentativa de visualizá-lo em alguns visualizadores de imagens (Viewnior, GPicView, etc.)"
"pode resultar na captura de toda a RAM disponível e, portanto, no bloqueio completo do sistema!\n"
"\n"
"É recomendável  visualizár no navegador de internet (Firefox, Chromium, etc.),"
"pois consome significativamente menos RAM."

msgid "Include mouse pointer"
msgstr "Incluir ponteiro do rato"

msgid "Info"
msgstr "Informação"

msgid "Log"
msgstr "Log"

msgid "Number of frames:"
msgstr "Número de frames:"

msgid "Please install 'ffmpeg' or 'avconv' first!"
msgstr "Por favor, instale 'ffmpeg' ou 'avconv' primeiro!"

msgid "Please wait, optimizing the GIF file..."
msgstr "Aguarde, otimizando o arquivo GIF..."

msgid "Preview"
msgstr "Pre Visualizar"

msgid "Quickshot"
msgstr "Foto Rápida"

msgid "Quit"
msgstr "Sair"

msgid "Region"
msgstr "Região"

msgid "Scale (%):"
msgstr "Escala (%):"

msgid "Screenshot"
msgstr "Captura de ecran"

msgid "Show timer"
msgstr "Amostrar contador"

msgid "TAS may not work 100% properly."
msgstr "TAS pode não funcionar a 100% como suposto"

msgid "Take a Shot!"
msgstr "Tirar Foto!"

msgid ""
"To select a window make sure it's not partially covered by other windows and "
"then click its titlebar.\n"
"To select a region click on top-left corner of desired area and release "
"mouse button, then click again on bottom-right corner."
msgstr ""
"Para selecionar uma janela, certifique-se de que ela não esteja parcialmente coberta por outras janelas"
"e depois clique na barra de título."
"Para selecionar uma região clique no canto superior esquerdo da área desejada e solte o botão do rato"
"depois clique novamente no canto inferior direito."

msgid "Try to use 'xorgwizard' to change the setting."
msgstr "Tenta usar 'xorgwizard' para alterar as definições/configurações."

msgid "View"
msgstr "Ver"

msgid "View log"
msgstr "Ver log"

msgid "Warning"
msgstr "Aviso"

msgid "Window"
msgstr "Janela"

msgid "You can use date format options, such as:"
msgstr "Podes usar opções de formato de data, como:"
Last edited by AntonioPt on Fri Nov 11, 2022 9:09 pm, edited 1 time in total.

Why astronauts use Linux
Because you can't open windows in space

User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

AntonioPt wrote: Fri Nov 11, 2022 7:21 pm

hi there @Sofiya there you go this can be apply to Brazilian to but may have small changes but ... :D

Task number two
Delete this disgrace and paste the code as it is inserted by me :geek:

KL
PUPPY LINUX Simple fast free

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

AntonioPt wrote: Fri Nov 11, 2022 7:21 pm

hi there @Sofiya there you go this can be apply to Brazilian to but may have small changes but ...

I appreciate your enthusiasm, but for future reference: in case of files, please don't post them as text, just upload them as attachments.
Or, if it's a code, you can also use the [code]...[/code] tags, like Sofiya did.
You can still edit your post and enclose that text in the above tags.

Now, have you tested your translation with TAS and all is ok?
Refer to my previous post on how to convert a *.po file to a *.mo file.
If the answer is "yes", then I'll update the NLS pet.
Thank you.
___________

@Sofiya: I noticed that the "Format:" string doesn't seem to be translated in your tas.mo.
Is it intentional or it simply didn't exist in the generated *.po file?
As far as I can tell, both xgettext and MoManager correctly extract this string from /usr/bin/tas, at least in Fatdog.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

tas.mo.false.tar.gz
(4.93 KiB) Downloaded 72 times

Russian-language

JakeSFR wrote: Fri Nov 11, 2022 8:48 pm

@Sofiya: I noticed that the "Format:" string doesn't seem to be translated in your tas.mo.
Is it intentional or it simply didn't exist in the generated *.po file?
As far as I can tell, both xgettext and MoManager correctly extract this string from /usr/bin/tas, at least in Fatdog.

Greetings!

I just don't have the "Format" line, but I can add it

Last edited by Sofiya on Sat Nov 12, 2022 5:49 pm, edited 2 times in total.

KL
PUPPY LINUX Simple fast free

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

Sofiya wrote: Fri Nov 11, 2022 8:14 pm
AntonioPt wrote: Fri Nov 11, 2022 7:21 pm

hi there @Sofiya there you go this can be apply to Brazilian to but may have small changes but ... :D

Task number two
Delete this disgrace and paste the code as it is inserted by me :geek:

Done sorry i didnt mean to paste it as a long text,....
@JakeSFR no i didnt do no convert,... since i dont know how to and i dodnt have dev tools in my puppy sorry about that

Why astronauts use Linux
Because you can't open windows in space

User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

see how your file works
language-Portuguese

tas.mo.false.tar.gz
(3.8 KiB) Downloaded 114 times

file updated-delete false.tar.gz

AntonioPt wrote: Fri Nov 11, 2022 9:11 pm

Done sorry i didnt mean to paste it as a long text,....
@JakeSFR no i didnt do no convert,... since i dont know how to and i dodnt have dev tools in my puppy sorry about that

Last edited by Sofiya on Sat Nov 12, 2022 1:50 am, edited 3 times in total.

KL
PUPPY LINUX Simple fast free

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

Sofiya wrote: Fri Nov 11, 2022 9:27 pm

I just don't have the "Format" line, but I can add it

Great, thank you!

AntonioPt wrote: Fri Nov 11, 2022 9:11 pm

@JakeSFR no i didnt do no convert,... since i dont know how to and i dodnt have dev tools in my puppy sorry about that

I already told you how to do it.
And you can download devx.sfs at Ibiblio: for Racy and for Wary.

Anyway, Sofiya was kind enough to convert it for you, so please test it and let me know if everything's fine with it.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

@JakeSFR and @Sofiya

Thank you so much gonna test it and let you know soon and sorry for all the troubles on the way,....

Why astronauts use Linux
Because you can't open windows in space

User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

well lets change this

msgid "Filename:"
msgstr "Nome do Arquivo"

and is missing Discard so shell i only add a line like this ? gonna try to do tomorrow since its late here but let me know if is it ?
all the translation looks fine even i can't see some errors output since i didn't invoke them

msgid "Discard"
msgstr "Descartar"

P.S. i was playing my racy with the low resolution and notice main win was bigger then screen gonna see if i add an extra code to see how big is screen and if bigger then x gonna add option resize in main win
And Thankyou for all

Why astronauts use Linux
Because you can't open windows in space

User avatar
Sofiya
Posts: 2280
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1526 times

Re: Take a Shot! - yet another screenshot utility...

Post by Sofiya »

AntonioPt wrote: Sat Nov 12, 2022 12:15 am

well lets change this

msgid "Filename:"
msgstr "Nome do Arquivo"

msgid "Discard"
msgstr "Descartar"

file updated
download/file.php?id=11874

KL
PUPPY LINUX Simple fast free

User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: Take a Shot! - yet another screenshot utility...

Post by JakeSFR »

Thanks AntonioPt and Sofiya. NLS pet updated.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
AntonioPt
Posts: 219
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 99 times
Been thanked: 37 times

Re: Take a Shot! - yet another screenshot utility...

Post by AntonioPt »

Guys your Tas 1.7 pet have missing files while i was updating my fossa i notice that

Best Regards Antonio

Why astronauts use Linux
Because you can't open windows in space

Post Reply

Return to “Graphics”