Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#169 2017-02-17 13:49:54
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
lythande wrote #304087:
Could be here it as a
required-sign="(insert here the sign e.g. a *)"
in the plugin?
Yes, but getting the value into the plugin isn’t the problem. It’s outputting it. Think about RTL languages. I can’t just manually add it after the label in the code.
That’s why I think that CSS would be better for this feature, because (as far as I am aware) things like :after
and :before
take the language direction into account.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#170 2017-02-17 14:02:01
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
Bloke wrote #304088:
Yes, but getting the value into the plugin isn’t the problem. It’s outputting it. Think about RTL languages. I can’t just manually add it after the label in the code.
In that case, the character will appear after the label, independently of the language, no? That is, in RTL languages the character will appear to the left of the label.
That’s why I think that CSS would be better for this feature, because (as far as I am aware) things like
:after
and:before
take the language direction into account.
They do, just the same as any inline node would do. And arguably, they are a better fit, as that marker could be seen a presentational (and thus the job for CSS).
PS = I personally certainly appreciate it if you leave the option open to not insert the character in the form. I’m not even sure that it is necessary to include the aria-required
attribute. Most AT agents correctly understand the required
attribute, AFAIK.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#171 2017-02-17 14:07:17
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
phiw13 wrote #304089:
In that case, the character will appear after the label, independently of the language, no?
I don’t know. I thought that if I concatenated them like this in PHP:
$out = $label . $required_sign;
that a browser would flip it incorrectly in RTL. Maybe I’m wrong. I suppose it is just a string of text so maybe it’d do the right thing. But either way, I think CSS is the better thing to do.
I’m not even sure that it is necessary to include the
aria-required
attribute. Most AT agents correctly understand therequired
attribute, AFAIK.
Okay, no problem. I’ll leave it as-is then, thanks for the insight.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#172 2017-02-17 15:58:16
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
The point is, screenreaders for blind peoples to read computer and internet, they can’t read the CSS “*”, so the information is not catch for blind peoples.
I have look again what do handling the other barrier-free websides with this information (require-fields). Some have the “*” include the label-text. I think, that would be the best solution. If another have a form for make it for rtl-text, so maybe they have other formular?
At last: blind peoples / screenreader need still the aria-required="true"
and aria-invalid="true"
inside of a input-form for get information, that this field must filling.
Edit: you can see this code on the old zem_contact_reborn works here: http://www.karinmuellerschmied.de/kontakt/
Last edited by lythande (2017-02-17 16:08:58)
Offline
#173 2017-02-17 16:24:34
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
lythande wrote #304093:
The point is, screenreaders for blind peoples to read computer and internet, they can’t read the CSS “*”
So what happens when a screenreader encounters an asterisk in a Label? Does it read out “your name asterisk” or “your name star”? Surely the asterisk — being a visual representation symbol — is only of interest to people who can actually see it? Having it read out as a character doesn’t help, does it? Doesn’t the HTML required
attribute do the equivalent — better — for the visually-impaired by indicating audibly that the field is required? I genuinely don’t know, as I’ve never used one.
Anyway, I tested what phiw13 said above and the browser does indeed flip the entire string correctly, including the star. So it’s not hard to do in the plugin, if we deem it widely useful.
screenreader need still the
aria-required="true"
andaria-invalid="true"
inside of a input-form for get information, that this field must filling.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#174 2017-02-17 16:48:46
Offline
#175 2017-02-20 03:42:28
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Offline
#176 2017-02-20 08:50:00
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
GugUser wrote #304143:
What could be the problem with the textpacks?
Weird, it works for me. What do you get if you put this on your contact page (somewhere after the contact form):
<txp:php>
echo '<!--<pre>';
$rs = safe_rows('lang, name, data', 'txp_lang', "name like 'zem_contact%'");
var_dump($rs);
echo '</pre>-->';
</txp:php>
If you then View Source of the page you should be able to see all the loaded textpack info for the plugin. The only thing I can think of is that I have English as default language and the others loaded as additional languages. Maybe if you have a non-English language set as default, the plugin fails for some reason, I don’t know. I’d have to try it to find out.
If you set lang="de-de"
do you see the ‘Kontakt’ fieldset label (for example) and submit button text displayed in German, when you don’t specify a label
for them?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#177 2017-02-20 13:34:14
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
Thanks Bloke for your answer.
I get the following in the source:
<!--<pre>array(32) {
[0]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(20) "zem_contact_checkbox"
["data"]=>
string(8) "Checkbox"
}
[1]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(19) "zem_contact_contact"
["data"]=>
string(7) "Contact"
}
[2]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(17) "zem_contact_email"
["data"]=>
string(5) "Email"
}
[3]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(25) "zem_contact_email_subject"
["data"]=>
string(16) "{site} > Enquiry"
}
[4]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(24) "zem_contact_email_thanks"
["data"]=>
string(38) "Thank you, your message has been sent."
}
[5]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(25) "zem_contact_field_missing"
["data"]=>
string(66) "Required field, “<strong>{field}</strong>” is missing."
}
[6]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(26) "zem_contact_format_warning"
["data"]=>
string(86) "Value {value} in “<strong>{field}</strong>” is not of the expected format."
}
[7]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(24) "zem_contact_form_expired"
["data"]=>
string(39) "The form has expired, please try again."
}
[8]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(21) "zem_contact_form_used"
["data"]=>
string(59) "The form was already submitted, please fill out a new form."
}
[9]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(27) "zem_contact_general_inquiry"
["data"]=>
string(15) "General enquiry"
}
[10]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(25) "zem_contact_invalid_email"
["data"]=>
string(68) "“<strong>{email}</strong>” is not a valid email address."
}
[11]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(24) "zem_contact_invalid_host"
["data"]=>
string(64) "“<strong>{host}</strong>” is not a valid email host."
}
[12]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(24) "zem_contact_invalid_utf8"
["data"]=>
string(73) "“<strong>{field}</strong>” contains invalid UTF-8 characters."
}
[13]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(25) "zem_contact_invalid_value"
["data"]=>
string(133) "Invalid value for “<strong>{field}</strong>”, “<strong>{value}</strong>” is not one of the available options."
}
[14]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(22) "zem_contact_mail_sorry"
["data"]=>
string(28) "Sorry, unable to send email."
}
[15]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(26) "zem_contact_maxval_warning"
["data"]=>
string(63) "“<strong>{field}</strong>” must not exceed {value}."
}
[16]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(23) "zem_contact_max_warning"
["data"]=>
string(85) "“<strong>{field}</strong>” must not contain more than {value} characters."
}
[17]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(19) "zem_contact_message"
["data"]=>
string(7) "Message"
}
[18]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(26) "zem_contact_minval_warning"
["data"]=>
string(64) "“<strong>{field}</strong>” must be at least {value}."
}
[19]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(23) "zem_contact_min_warning"
["data"]=>
string(80) "“<strong>{field}</strong>” must contain at least {value} characters."
}
[20]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(16) "zem_contact_name"
["data"]=>
string(4) "Name"
}
[21]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(18) "zem_contact_option"
["data"]=>
string(6) "Option"
}
[22]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(27) "zem_contact_pattern_warning"
["data"]=>
string(74) "“<strong>{field}</strong>” does not match the pattern {value}."
}
[23]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(17) "zem_contact_radio"
["data"]=>
string(5) "Radio"
}
[24]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(21) "zem_contact_recipient"
["data"]=>
string(9) "Recipient"
}
[25]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(19) "zem_contact_refresh"
["data"]=>
string(60) "Follow this link if the page does not refresh automatically."
}
[26]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(18) "zem_contact_secret"
["data"]=>
string(6) "Secret"
}
[27]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(16) "zem_contact_send"
["data"]=>
string(4) "Send"
}
[28]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(24) "zem_contact_send_article"
["data"]=>
string(12) "Send article"
}
[29]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(16) "zem_contact_spam"
["data"]=>
string(33) "We do not accept spam, thank you!"
}
[30]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(16) "zem_contact_text"
["data"]=>
string(4) "Text"
}
[31]=>
array(3) {
["lang"]=>
string(5) "de-de"
["name"]=>
string(22) "zem_contact_to_missing"
["data"]=>
string(59) "“<strong>To</strong>” email address is missing."
}
}
</pre>-->
Offline
#178 2017-02-20 14:02:39
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
GugUser wrote #304154:
I get the following in the source <snip>
Well that’s the problem then. You have the English strings loaded against the de-de language. Try installing the German pack:
#@public
#@language de-de
zem_contact_checkbox => Checkbox
zem_contact_contact => Kontakt
zem_contact_email => E-Mail
zem_contact_email_subject => {site} > Anfrage
zem_contact_email_thanks => Vielen Dank, Ihre Nachricht wurde gesendet.
zem_contact_field_missing => Erforderliche Eingabe im Feld “<strong>{field}</strong>” fehlt.
zem_contact_format_warning => Eingabe {value} im Feld “<strong>{field}</strong>” entspricht nicht dem erwarteten Format.
zem_contact_form_expired => Dieses Formular ist abgelaufen, bitte versuchen Sie es erneut.
zem_contact_form_used => Dieses Formular wurde bereits gesendet. Bitte laden Sie das Formular noch einmal.
zem_contact_general_inquiry => Allgemeine Anfrage
zem_contact_invalid_email => “<strong>{email}</strong>” ist keine gültige E-Mailadresse.
zem_contact_invalid_host => “<strong>{host}</strong>” ist kein gültiger E-Mail-Server.
zem_contact_invalid_utf8 => “<strong>{field}</strong>” enthält ungültige UTF-8-Zeichen.
zem_contact_invalid_value => Ungültiger Wert für “<strong>{field}</strong>”, “<strong>{value}</strong>” ist keine verfügbare Option.
zem_contact_mail_sorry => Leider kann keine E-Mail gesendet werden.
zem_contact_maxval_warning => “<strong>{field}</strong>” darf {value} nicht überschreiten.
zem_contact_max_warning => “<strong>{field}</strong>” darf nicht länger als {value} Zeichen sein.
zem_contact_message => Nachricht
zem_contact_minval_warning => “<strong>{field}</strong>” darf {value} nicht unterschreiten.
zem_contact_min_warning => “<strong>{field}</strong>” darf nicht kürzer als {value} Zeichen sein.
zem_contact_name => Name
zem_contact_option => Option
zem_contact_pattern_warning => “<strong>{field}</strong>” entspricht nicht dem Muster {value}.
zem_contact_radio => Radio
zem_contact_recipient => Empfänger
zem_contact_refresh => Bitte folgen Sie diesem Link, falls die Seite icht automatisch neu geladen wird.
zem_contact_secret => Geheimnis
zem_contact_send => Senden
zem_contact_send_article => Artikel senden
zem_contact_spam => Danke, wir brauchen keinen Spam!
zem_contact_text => Text
zem_contact_to_missing => “<strong>To</strong>” E-Mail-Adresse fehlt.
Paste that into your Admin->Languages panel and install it, then see if things improve.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#179 2017-02-20 14:32:46
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
Bloke wrote #304155:
Paste that into your Admin->Languages panel and install it, then see if things improve.
I had tried this before, and then there was a mistake I did not remember. So I installed again the newest plugin version with the translated language strings inside.
Now, after doing the same, it works. I have no idea why now and before not.
Offline
#180 2017-02-21 06:01:18
Re: zem_contact_reborn v4.5.0.0: contact mail form processing
I just installed zem_contact_reborn v4.5.0.0 on a site using MLP.
The English side works well, but on the Japanese side, I get messages like zem_contact_email_thanks
instead of the actual Japanese language strings.
What am I missing?
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline