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:
- All strings in the file are written in upper- and lowercase characters ("Absenden" instead of "ABSENDEN"). Apparently somewhere in the code they are converted to "all CAPS". Can someone point me to the place in the code where this does happen?
- Is there any way to display them in bold? And if so, how?
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).
Converted to caps is a css thing...
Bold is a css thing...
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)?
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:
- Navigate to Administration Center ► Languages ► Edit Languages.
- Click the Edit button beside the language that you want to change.
- In the Edit Language Entries section, choose the language file that you want to edit. If you are not sure which file contains the strings that you want to change, try starting with "General Strings."
- Use the editing form to edit any strings you want to change, then click the Save button.
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.
@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
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.
Thing is - they don't have to be 100% consistent. They are two different language packs.
I believe that Spanish has similar differences
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.
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:
- Does this change really apply to ALL buttons in SMF?
- I'd like to have the buttons along with their font a bit larger. In the code I see this line:
min-height: calc(2em + 2em * (0.9 - 0.85)); /* "input" font size minus ".button" font size */
This I don't understand. The font size is defined as "0.7rem" 5 lines above, but this value does not appear in this formula? If I would change the font size (say to 0.9rem), I would need to change this formula as well, right? But how exactly? Or would the size of the buttons "grow" automatically?
- In the code there are statements called "capitalize". What's the difference to "uppercase"?
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.)
Height has nothing to do with font size.
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.
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...?
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
"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.
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
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.
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.
Quote from: Diego Andrés on March 21, 2024, 03:23:59 PMQuote 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
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.
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...)
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. :)