ElkArte Community

Elk Development => Theme development => Topic started by: emanuele on May 08, 2014, 07:07:20 pm

Title: Markup in language strings, how to find a balance
Post by: emanuele on May 08, 2014, 07:07:20 pm
I was looking at the PR from @AaronB here (https://github.com/elkarte/Elkarte/pull/1557) and I started mumbling. (You should run now until you still have time :P)

While thinking, I realised that some of those descriptions were clearly <dl>s and not stuff piled up with <br>s.
So I tried to add the <dl> code into the string, but honestly it was a mess.
Then I tried to split the description and came up with this:
https://github.com/emanuele45/Dialogo/commit/f2c14b53f06153f55d1144f2930ad52ab80920d4
honestly looks a bit ugly that too... many strings, some more complex array and so on.

So, any idea where the balance is or how to find a balance?
What do you think of that commit?
Title: Re: Markup in language strings, how to find a balance
Post by: Spuds on May 13, 2014, 09:35:20 am
I delayed responding hoping someone else may have an idea on this one.  I struggle with this all the time and I don't know if there is a great balance.  I personally try to do a little markup as possible in the strings, but there are times when its frankly much easier to add it there and easier to change/edit.  So I really don't have any idea, seems this comes up more often now that we have moved more of the markup out of the sources (not all, but a good amount). 
Title: Re: Markup in language strings, how to find a balance
Post by: Bloc on May 13, 2014, 10:25:24 am
If I may chime in..perhaps you better off using as neutral tags as possible, making it easier to change it later on? Unless its absolutely better semantically(if it really IS a def. list for example, that require dl to make sense to screen readers etc), just using spans and even divs, goes a long way in providing hooks to style things. Simple as possible works best for themers that can't change its HTML code anwyay. List tags are not so useful then.
Title: Re: Markup in language strings, how to find a balance
Post by: Bloc on May 13, 2014, 11:53:05 am
Heh, thats funny..I wrote I M H O and it translated it as "I am right, you are wrong" ?   :o
Title: Re: Markup in language strings, how to find a balance
Post by: Spuds on May 13, 2014, 01:01:19 pm
Quote from: colby67 – Heh, thats funny..I wrote I M H O and it translated it as "I am right, you are wrong" ?   :o
LOL .. yeah we have been testing the word censor, there are lots of one off joke translations just for the fun of it.  You may find things change around here from time to time since one way to test things is on a live site, so we enable, disable, etc to test. 
Title: Re: Markup in language strings, how to find a balance
Post by: Bloc on May 13, 2014, 02:48:34 pm
:D