Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: DEG 1935 on March 19, 2024, 10:02:16 PM

Title: Button texts
Post by: DEG 1935 on March 19, 2024, 10:02:16 PM
It took me a while till I found where the button texts (or at least the specific one I was looking for) can be found: ./themes/default/languages/index.german.php and ./themes/default/languages/index.german_informal.php. That's the first problem already ‒ there are two German language files which need to be consistent, at least in terms of button texts (and they are not in this case). One is for the "formal" version ("Sie"), and the other one for the "informal" version ("Du").

But my original issue was (with the "informal" version): When I (just for testing purposes) was composing a post, the "POST" button said "SCHREIBEN". That didn't make any sense, as "SCHREIBEN" means "WRITE", and this task I did just finish. I did now just want to send it, and this is in German pretty much the same as in English ("SENDEN" or "ABSENDEN"). This is just to explain why I was so desperately looking for the place where to find these string(s).

Later on I realized that in the "formal" version (which I don't use for myself) the very same button said "ABSCHICKEN" rather than "ABSENDEN". That's just another term for the same thing, but in the "formal" version it did at least make more sense. So, the two German language files are not consistent (which IMO should be fixed).

Now to my actual/original questions:


I'd just like to test some variants, as I find that the current stage isn't very good to read (especially for elderly people).
Title: Re: Button texts
Post by: Kindred on March 20, 2024, 12:25:16 AM
Converted to caps is a css thing...

Bold is a css thing...
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 12:32:27 AM
Quote from: Kindred on March 20, 2024, 12:25:16 AMConverted to caps is a css thing...

Bold is a css thing...
Which means...? Possible or not (and if possible, where and how)?
Title: Re: Button texts
Post by: Sesquipedalian on March 20, 2024, 03:04:29 AM
This line in index.css (https://github.com/SimpleMachines/SMF/blob/c30ea0c0e54f32ffd180ba033e78854d6e92c0b1/Themes/default/css/index.css#L1008) forces the text in buttons to be shown in uppercase.

As for changing the strings, you can do that by following these steps:

Title: Re: Button texts
Post by: grega on March 20, 2024, 04:35:39 AM
Quote from: DEG-1935 on March 19, 2024, 10:02:16 PMLater on I realized that in the "formal" version (which I don't use for myself) the very same button said "ABSCHICKEN" rather than "ABSENDEN". That's just another term for the same thing, but in the "formal" version it did at least make more sense. So, the two German language files are not consistent (which IMO should be fixed).

I changed in german_informal the term Schreiben to Abschicken for $txt['post'] string.
It will be available in around a day in the language package
https://download.simplemachines.org/index.php?languages;id=20
not sure though when it will be updated here.
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 06:51:21 AM
@grega: Thanks (though I like "Absenden" more). Is it for sure that this is/was the only inconsistency?

@Sesquipedalian: Also thanks, that's exactly what I did. :D
Title: Re: Button texts
Post by: grega on March 20, 2024, 07:15:55 AM
Quote from: DEG-1935 on March 20, 2024, 06:51:21 AM[...] Is it for sure that this is/was the only inconsistency?

No, there are many more, but I am not an official translator for German(though I do speak it as well as my mother language) thus I won't be aligning the rest.
Title: Re: Button texts
Post by: Kindred on March 20, 2024, 08:08:15 AM
Thing is - they don't have to be 100% consistent.  They are two different language packs.
I believe that Spanish has similar differences
Title: Re: Button texts
Post by: Diego Andrés on March 20, 2024, 08:50:29 AM
Quote from: Kindred on March 20, 2024, 08:08:15 AMI believe that Spanish has similar differences
Kinda, but neutral Spanish is perfectly understandable by any speaker, which is why having two is absurd.
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 08:48:10 PM
Quote from: Sesquipedalian on March 20, 2024, 03:04:29 AMThis line in index.css (https://github.com/SimpleMachines/SMF/blob/c30ea0c0e54f32ffd180ba033e78854d6e92c0b1/Themes/default/css/index.css#L1008) forces the text in buttons to be shown in uppercase.
Thanks! Managed to comment this line out (I'm a complete CSS noob) and add a new line "font-weight: bold;" and find this much better readable now.

Some more questions:




And as I can't find any board in this forum where I can ask such a question: Apparently I can't edit any preferences in my user profile such as Avatar etc. (the item is simply missing). That is why and what do I have to do to be able to do that?

Ah! Now it works (apparently one has to write at least 10 posts.)
Title: Re: Button texts
Post by: Kindred on March 20, 2024, 09:27:28 PM
Height has nothing to do with font size.
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 09:32:57 PM
Quote from: Kindred on March 20, 2024, 08:08:15 AMThing is - they don't have to be 100% consistent.  They are two different language packs.
I believe that Spanish has similar differences
Probably, I don't know. But as for the German language pack(s), they have to be consistent, at least in terms of button texts as these are independent of the "Du" or "Sie" thing and are commonly offered both as an alternative to the users. Also all other texts shall have the same meaning and not mean something completely different (as it was in this case with the "Send/Post" button).

But once my new forum is online, I may x-check both versions in detail.
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 09:36:11 PM
Quote from: Kindred on March 20, 2024, 09:27:28 PMHeight has nothing to do with font size.
Hmm. If I use a larger font size, the height of the characters will also be larger. So the buttons will also need a larger height. Not...?
Title: Re: Button texts
Post by: Kindred on March 20, 2024, 11:09:33 PM
Height has to do with the size of the container. Period... line-height has to do with the space until the next line of text. font-size is the size of the text...


If your font-size is too big for the defined line-height, then you will get overlapping lines of text.

If the text is too big for the container, then the way it displays is based on the defined overflow handling
Title: Re: Button texts
Post by: DEG 1935 on March 20, 2024, 11:36:29 PM
"Container", "overflow handling", this all doesn't tell me anything. Sorry.

You said "Height has nothing to do with font size". And we're talking about the height of the button, at least this is defined with the code line marked in blue in my post above (https://www.simplemachines.org/community/index.php?msg=4172036), as far as I understand it, especially as "font size" is even explicitely mentioned in the comment behind the formula (which means to me that the height of the button depends on the font size?).

To me, the height of a button has a lot to do with the font size describing the function of that button.

Anyway, I asked three clear questions, probably someone may want to as well clearly answer them.
Title: Re: Button texts
Post by: Kindred on March 21, 2024, 07:50:52 AM
That "formula" mentioning font-size is a comment (see the /*  */ around it?)

The change applies to all objects that use the css identifier/class

Looks like the formula is using the default snf sizes.  .9 and. 85

Again,  height has nothing to do with font-size. Its used in the Calc to determine the height of the button container in this case - but, as you can see, the font-size for those buttons has been changed from the default,  but the height has not.

Capitalize does exactly what it says,  it makes the first letter caps.


I recommend reading up on css basics and learning to use the inspector tool that comes with most browsers these days. That way you can make changes to the css on your view of the site to find out what a change dies without changing the actual file
Title: Re: Button texts
Post by: DEG 1935 on March 21, 2024, 03:07:48 PM
Quote from: Kindred on March 21, 2024, 07:50:52 AMThat "formula" mentioning font-size is a comment (see the /*  */ around it?)

That's what I wrote:

Quote from: DEG-1935 on March 20, 2024, 11:36:29 PM[...] especially as "font size" is even explicitely mentioned in the comment behind the formula [...]

Anything wrong with that?

Thanks for the answers, although they are not as clear as I was hoping.
Title: Re: Button texts
Post by: Diego Andrés on March 21, 2024, 03:23:59 PM
That was from years ago (or a decade).
All you need is a min-height. To center the text you can use a line-height, padding (without the min-height), or make it a flex container.

For example:
align-items: center;
display: flex;
font-size: 16px;
min-height: 25px;
padding: .5em 1em;

Quote from: Kindred on March 20, 2024, 09:27:28 PMHeight has nothing to do with font size.
It does if it's using relative units like em or rem.
Title: Re: Button texts
Post by: Kindred on March 21, 2024, 04:12:51 PM
Quote from: Diego Andrés on March 21, 2024, 03:23:59 PM
Quote from: Kindred on March 20, 2024, 09:27:28 PMHeight has nothing to do with font size.
It does if it's using relative units like em or rem.

I don't think so...  to the best of my understanding em and rem are at the PAGE level not the individual container level
Title: Re: Button texts
Post by: Diego Andrés on March 21, 2024, 04:52:54 PM
rem is root so it will use the font size of the page/browser.
em is parent container so if for some reason the button is inside a container with a custom font size, it will be relative to that.
Title: Re: Button texts
Post by: shawnb61 on March 21, 2024, 08:05:09 PM
Random thought:

Zooming increases fonts, buttons, toolbars, etc...

Maybe teach the users to use ctl+mouse wheel to zoom???

Or...  Maybe try an automated zoom with a little code, something like this:
https://di-grand.com/blog/en/css-html/6598-changing-the-browser-zoom-for-a-website-with-javascript-for-small-screens.html

I could see this being a handy little "senior-frendly-ize" mod, and if done right, would work with any theme.

(My vision is terrible, I spend most of my web time zoomed ~180%...  And 200%+ is looking more appealing every day...)
Title: Re: Button texts
Post by: m4z on March 26, 2024, 04:12:23 AM
Quote from: DEG 1935 on March 20, 2024, 09:32:57 PMBut as for the German language pack(s), they have to be consistent, at least in terms of button texts as these are independent of the "Du" or "Sie" thing and are commonly offered both as an alternative to the users. Also all other texts shall have the same meaning and not mean something completely different (as it was in this case with the "Send/Post" button).

But once my new forum is online, I may x-check both versions in detail.

Translating is a lot of work (according to Crowdin, we have around 7100 strings in SMF 2.1). Feel free to help (https://www.simplemachines.org/community/index.php?topic=577121.0).
For German, I try to be consistent (https://dokuwiki.charta-scriptoria.de/doku.php?id=smf:glossary-german) but my focus has been on formal German because that's still what my forum uses.


Quote from: DEG 1935 on March 20, 2024, 11:36:29 PMAnyway, I asked three clear questions, probably someone may want to as well clearly answer them.

Remember these are volunteers answering, so someone may want to stay friendly and humble. :)