News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Translator flexible <textarea and some formating of the text

Started by makie, June 04, 2024, 08:29:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

makie

Quote from: prissi on June 04, 2024, 01:25:00 AMCan we have the boxes a little smaller and side by side so does not have to scroll so much when checking the translations in more than one language?

Also, it would be cool if linebreaks would work in the fields, entering them as \n\n is quite cumbersome.
As you know, the input field in the translator can be made larger or smaller with the mouse.
Previously, a default size of the text field was created depending on the object type.

I changed it to a minimum size of one line. Depending on the length of the existing text, the window will be large enough to accommodate the entire text. However, the program cannot calculate the number of lines precisely because it does not know the exact text wrap in the browser. This usually makes the window too large, but occasionally too small. But then you can drag it larger with the mouse. Despite this, the page should be more compact and less likely to scroll down.

In addition, the program now formats the text slightly. This is temporary and the formatting will not be saved.

This brings us to "\n"
QuoteAlso, it would be cool if linebreaks would work in the fields, entering them as \n\n is quite cumbersome.
I think, the formatting the text should be left to the Simutrans program. Only then will the font size and running length of the text be determined. "\n" should therefore only be used for paragraphs and not to format the text. Otherwise the text will be too easily formatted for the window of the translator.

If the translator converts the Enter key to "\n", and it used to do that, then we will soon get a lot of incorrect and superfluous "\n" as we used to. Even worse is if the translator converts them back to invisible x0A for display. This caused a mess in the translator's database. I had to struggle with that quite a bit in the past.

"\n" should be used deliberately and that's why I'm fine with it being a bit cumbersome.

This program change of mine should not change the way the translator works. The change should only be optical. It might take some getting used to.

If there are any problems or suggestions, post them here.

@Issac can you make it sticky