ElkArte Community

Project Support => Support => Topic started by: Ruth on April 15, 2023, 05:21:32 pm

Title: generic string in the profiles
Post by: Ruth on April 15, 2023, 05:21:32 pm
Hi!

I think, this string is working not too well at the moment. It does not look good with the "Unwatched Topics" and the posts.

Code: [Select]
$txt['showGeneric_help'] = 'This section allows you to view all %1$s made by this member. Note that you can only see %1$s made in areas you currently have access to.';

Look at this:

QuoteThis section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

and

QuoteThis section allows you to view all Unwatched topics made by this member. Note that you can only see Unwatched topics made in areas you currently have access to. 

Not good with this capital of "Unwatched"...and this sentence is irritating, because people might think, other members could see their unwatched topics.

But this with the posts is worser. If I edit this string "show posts" to "posts" the "show" will be gone as well on profile summary.
Title: Re: generic string in the profiles
Post by: Ruth on April 15, 2023, 05:37:37 pm
There is still the "old" string there in the language files for the profiles:

Code: [Select]
$txt['showPosts_help'] = 'This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.';

Maybe this one could be used in this section for showing all posts? Then all would be fine again.



Edit:

Or maybe one of the other "show posts"-strings in the profiles could be edited to a single word and then used together with this generic string?  There are 3 of them, all together:

Code: [Select]
$txt['showPosts'] = 'Show Posts';
$txt['showMessages'] = 'Messages';
$txt['show_member_posts'] = 'View Member Posts';

Yes...the string "Messages" is also used there and looks a lot better than "Show posts":
Title: Re: generic string in the profiles
Post by: Steeley on April 15, 2023, 08:03:53 pm
Quote from: Ruth – Not good with this capital of "Unwatched"...and this sentence is irritating, because people might think, other members could see their unwatched topics.

Indeed   :sad:

Better:
"This section allows you to view all Unwatched topics made by you".  (Or:  "This section allows you to view all your Unwatched topics.")
"This section in the member profile allows you to view all posts made by the member." (<---Is this permission dependent? If so, then it should start or end with "If permissions allow, ..")
Title: Re: generic string in the profiles
Post by: Spuds on May 13, 2023, 01:34:13 pm
That is what happens when we get clever and use generic help messages !!

Here is what we can do.  In ProfileInfo.controller.php
Code: (find) [Select]
			'description' => sprintf($txt['showGeneric_help'], $txt['show' . $action_title]),
Code: (replace) [Select]
			'description' => $txt['show' . $action_title . '_help'] ?? sprintf($txt['showGeneric_help'], strtolower($txt['show' . $action_title])),

This will then look for strings like showPosts_help, showMessages_help, showTopics_help, showAttachments_help and showUnwatched_help and use that (if found).  If the string does not exist, then you will get the current behavior (but in lowercase)
Title: Re: generic string in the profiles
Post by: Ruth on May 14, 2023, 12:23:44 am
Thank you, Spuds!

I tried it. I think, in english all would look proper now.

But in german this words should all have a capital character first...like posts, attachments, etc.

We write "Beiträge", "Dateianhänge", etc. not "beiträge", "dateianhänge"

But anyway....i think, it is a lot better than before.

It is not possible to tell the system to use some of the strings with capitals? They are there....
Title: Re: generic string in the profiles
Post by: Spuds on May 14, 2023, 09:40:19 am
That change would only lowercase "Beiträge" where it was used in the description, the button/menu would not be changed, but this may not be proper in German.  If we feel the lowercase is incorrect, we can just use

Code: [Select]
			'description' => $txt['show' . $action_title . '_help'] ?? sprintf($txt['showGeneric_help'], $txt['show' . $action_title]),
Title: Re: generic string in the profiles
Post by: Ruth on May 14, 2023, 10:15:56 am
Thank you very much, Spuds! Now everything is perfect.  :smiley:
Title: Re: generic string in the profiles
Post by: Spuds on May 14, 2023, 11:58:12 am
 :partying_face: :balloon: :sparkler: