Copy/Paste, Translate

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
User avatar
StandYourGround
Posts: 256
Joined: May 13th, 2009, 2:16 am
Location: On a blue ball spinning through space at incomprehensible speed

Copy/Paste, Translate

Post by StandYourGround »

Can be there a simple way to copy messages from chat? Occasionally I will be in a MP game with people who speak another language (often Russian), and it would be great to be able to copy their text so it can be translated online. It would be more ideal to have some kind of translation built in, but being able to copy text would be a fine first start.
I will now resume lurking silently.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Copy/Paste, Translate

Post by iceiceice »

I made a feature request for this a while ago, and discussed on irc. The situation seems to be, it's possible but would require a multiline text box to be written in the GUI2 framework, which is apparently nontrivial. So I think we have to wait until someone who knows GUI2 writes one.

In the meantime, if you write the text to a map location label, that can be copypasted from the edit dialog, which is good enough for sending hyperlinks usually.

edit: https://gna.org/bugs/index.php?21755

I didn't bring up the translate idea, probably the best we could do is forward the text to google translate or similar. I'm not sure if that's better than you iust copypasting into your browser.

User avatar
StandYourGround
Posts: 256
Joined: May 13th, 2009, 2:16 am
Location: On a blue ball spinning through space at incomprehensible speed

Re: Copy/Paste, Translate

Post by StandYourGround »

There's still the problem that there seems to be no way to select text in chat to copy. Not even in the chat log.
I will now resume lurking silently.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Copy/Paste, Translate

Post by iceiceice »

Well, that's apparently the part that requires GUI2. See the link I posted. The clipboard code we already have, that is very easy to use.

User avatar
Pentarctagon
Project Manager
Posts: 4361
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Copy/Paste, Translate

Post by Pentarctagon »

Perhaps as a stopgap measure there could be a hotkey/button to put the entire chat log on the clipboard? Depending on difficulty/practicality, there could also be a filter somewhere to allow for moving messages 3 to 7 to the clipboard.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Copy/Paste, Translate

Post by iceiceice »

Yeah I mean all of these things are possible, we could also add such to the (GUI1?) lobby chat. Whether stopgaps are worth it depends on what the time horizon is for when we would get a proper multiline textbox though, and really I'm not sure if we have any idea about that right now.

User avatar
Pentarctagon
Project Manager
Posts: 4361
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Copy/Paste, Translate

Post by Pentarctagon »

Would it be a good thing to submit as a feature request on GNA just so it doesn't get completely forgotten?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Iris
Site Administrator
Posts: 6675
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Copy/Paste, Translate

Post by Iris »

Look at the bottom-left corner of the dialog.
Look at the bottom-left corner of the dialog.
Not having a GUI2 multiline textbox didn’t stop me from giving us the ability to copy WML load errors to clipboard before. It’s just that I procrastinated on the chat log item of my to-do list for so long, I missed the deadline (1.11.10). Now I’ll proceed to do likewise with its lobby counterpart. Procrastinate, that is. Unless someone else wants to solve this irksome layout puzzle for me.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
Pentarctagon
Project Manager
Posts: 4361
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Copy/Paste, Translate

Post by Pentarctagon »

Maybe put it on the right end of the chat box or on the bottom of the list of players in the lobby?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Iris
Site Administrator
Posts: 6675
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Copy/Paste, Translate

Post by Iris »

That would imply it’s an action pertaining to the input line or the list of players, respectively.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
Pentarctagon
Project Manager
Posts: 4361
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Copy/Paste, Translate

Post by Pentarctagon »

Next to the lobby chat scrollbar then?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Iris
Site Administrator
Posts: 6675
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Copy/Paste, Translate

Post by Iris »

The scrollbar is part of a GUI1 multiline textbox widget, and overlapping widgets tend to cause all sorts of issues. The button would have to go either below the textbox or along its right edge — either option would require borrowing some horizontal or vertical space from it and making things look weird.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
em3
Posts: 342
Joined: April 1st, 2009, 8:59 pm
Location: Poland

Re: Copy/Paste, Translate

Post by em3 »

I'd say add it below the input box, this place could be used for some more chat related tool buttons later (for example buttons that insert into input box some common commands).
ride on shooting star

User avatar
Iris
Site Administrator
Posts: 6675
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Copy/Paste, Translate

Post by Iris »

There is no space below the input box. You mean to its side? I’d rather not add it until there is a better justification for its presence, especially since I plan to get this backported somehow.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Copy/Paste, Translate

Post by iceiceice »

Is it possible to spawn a context menu on right click events on the lobby chat? I'm not familiar with the GUI code enough to say.

Post Reply