[#5487] How to change cb_terms_and_condition Modal Box Headline

8 years 8 months ago #269562 by krileon
Your only option at this point is to just remove the title from the modal window usage. You an find it at the below location.

IN: components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
ON: Line 7986
FROM:
					$attributes			.=	' ' . cbTooltip( $_CB_framework->getUi(), $tooltip, $termsType, array( $termsWidth, $termsHeight ), null, null, null, 'data-hascbtooltip="true" data-cbtooltip-modal="true"' );
TO:
					$attributes			.=	' ' . cbTooltip( $_CB_framework->getUi(), $tooltip, null, array( $termsWidth, $termsHeight ), null, null, null, 'data-hascbtooltip="true" data-cbtooltip-modal="true"' );

I hope that somebody understands what I mean. In german language this structure for the plugin at all just does not make sense because of grammar that comes into the play.

Type is translated and substituted in. It can be moved around or excluded. Your only issue is it's added as the modal window title, which in some situations could be weird out of context I suppose depending on what Type is. Regardless your translation of "Terms and Conditions" should make sense no matter the language. You're complicating the translation with "the" though. Move the "the" outside of the Type. Example as follows.

'TERMS_FIELD_ACCEPT_URL_CONDITIONS' => 'Accept the <a href="[url]"[attributes]>[type]</a>',

When we refactor our field classes we'll be making sure several field language strings can be used generic like above or be specific to a field. This way you'd just translate it on a field by field basis as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 8 months ago #269570 by Matsalban
Well the "the" in german can be in three different cases for "the" which are "der or die or das" so the problem is that you have to translate "Terms & Conditions" in german in three different context so that you cannot take the "the" outside of the "type". In addition to that in German you always start with a big letter at the beginning of a sentence as well as headline but if the same word is used in the context of a sentence then it is written with a small letter and big letter.

So in this specific case this problem already appears with the Terms and conditions and can be solved via the way you described at first.

But the problem exists once someone wants to use the conditions plugin more than once in the same registration form alike I do with "T&C" and "Disclaimer". Because now you need two different sentences in front or after the checkbox with each individual "the" and tall vs small letters.

So at the moment the conditional plugin is not usable for any language other then english. In spanish "la or le", french "La or le or les" and italian for example they also do have three "the" types plus grammar rules.

It would be a lot helpful when someone could just set a different language tag for the Headline in the modal box or more easy use the conditional field name instead of the type. But at the moment I don`t even find the field name tag in the code.

I hope this helps.

Best

Please Log in to join the conversation.

8 years 8 months ago #269575 by krileon
I don't know what more to advise. Eventually we'll have language keys added to these strings so they can be translated global with their generic key or on a field by field basis, which solves the problem. For now the above advise is all I can offer, sorry. My previous reply provides the code location to remove the type from the modal window title, but I suppose I still don't understand why "the terms and conditions" doesn't read will as a title when translated.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 8 months ago - 8 years 8 months ago #269581 by Matsalban
Look in german it is:
Terms & condition = Allgemeine Geschäftsbedingungen

In a sentence it will be: Ja, ich stimme den allgemeinen Geschäftsbedingungen von CB zu.

A headline of the modal box now looks like this: "den allgemeinen Geschäftsbedingungen" - which doesn`t make sense because it would need to be " Allgemeine Geschäftsbedingungen"

This could be solved when hard coded alike you described in your first comment.
But now I am using the conditions plugin on the same formular again for the disclaimer.
So now we have the conflict that with your method.

Disclaimer = Datenschutzrechtliche Einwilligungserklärung
In a sentence it will be: Ja, ich stimme der datenschutzrechtlichen Einwilligungserklärung von CB zu.
A headline of the modal box now looks like this: "der datenschutzrechtlichen Einwilligungserklärung"which doesn`t make sense because it would need to be " Datenschutzrechtliche Einwilligungserklärung".

I hope you can see the problem now. The type is in this case and actually in every other language besides english the wrong language tag to use in the headline. It would be a much better solution to use the name instead.

I hope this helps you finalize this plugin because in this way at the moment it is of no use once used on a page other than english alike I do in german.

Btw. thank you very much for the link to the code snipped. That did the job for now.

Help is much appreciated.
Best

Please Log in to join the conversation.

8 years 8 months ago #269608 by krileon
I understand the issue, but saying it's of no use because of a modal window title is a bit much. We will be making field by field language keys for field language strings so translations can become field specific, which removes the issue of having multiple fields and not being able to hardcode in the type into the sentence. I've also provided the code to completely remove the title display from the modal window, which eliminates the issue entirely as the modal window just won't have a title.

It's a constant struggle designing around languages I don't speak or write so please bare with us as I only speak and write English. We don't want a solution that requires adding more parameters to backend as the more parameters we have the more confused people get and the more support/problems it causes than solves. So the solution is field specific language keys that can be used when needed, but at this time we're busy and don't have time to implement them. I however have created a feature ticket so it's not forgotten.

forge.joomlapolis.com/issues/5487


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 8 months ago #269702 by Matsalban
Kyle,
don`t feel critizised but it is a fact that the conditions plugin is the way it is right now of no use on a website with a language other than english. It is not a critic it is just a fact.

Of no use because this makes a website developer look stupid as well as the website owner is going to be laught at because he is not even capable of his own language. It is just some basic grammar rules that always apply to languages and within this in almost all languages besides english there is a case for female and male as well as things. And also there is a rule that Terms & Conditions aren`t even written in tall letters in english language. Which is the case in the coditions plugin right here.

In addition to that it doesn`t only appear in the modal box. It is also in all two other options that are possible in the conditional plugin.
And also in addition to that one gets in real trouble when trying to use the conditional plugin more than once in the same registration form.

So I would assume you think about priorising the correction of this plugin or as long as it is in this stadium comment that out in the promotional text on your website. Since it is misleading and actually that was one fact why I choose CB instead of one of the other three competitors on the Joomla market right now.

I hope this helps and you don`t feel personal critizised. I also only speak three languages. But my mother tongue is german so I know that the best and within this you can use my help to correct the plugin. Just an offer.

Best

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.223 seconds

Facebook Twitter LinkedIn