textpattern / textpacks

Textpattern CMS language files.
https://textpattern.com
GNU General Public License v2.0
23 stars 22 forks source link

Tweak `form_not_found` and `while_parsing_page_form` #306

Closed Bloke closed 1 year ago

Bloke commented 3 years ago

When debugging mode is on, error messages like this can pop up:

No form data found for: theme.formname. while parsing form None on page sompage

Q1: The form_not_found is in the lang files. Do we need to translate this error message given it only appears in debugging mode and we've shifted all such strings to mode.ini?

Q1a: The form_not_found string uses {list} when it doesn't (to my knowledge) ever present a list of forms. If it does, great. If not, can we change it to {form} or {theme}.{form} and alter the corresponding replacement variable(s) in txplib_misc.php?

Q2: Can we fix the extraneous full stop in form_not_found so the message reads better? Are there any situations where form_not_found appears without the subsequent locus?

An alternative might be to change the while_parsing_page_form string to something like:

Issue detected while parsing form <strong>{form}</strong> on page <strong>{page}</strong>.

That way, it's a complete sentence so it can appear legitimately on its own, or after the form_not_found and we don't have to worry about checking whether one or both are present to output grammatically valid information.

Further...

Q3: Should the {form} in while_parsing_page_form reference the theme too?

philwareham commented 3 years ago

Please do what you think is best, and I'll make sure the Textpacks/Crowdin are updated to match. Cheers.

My opinion is anything within good reason that can be removed from Textpacks is helpful, as it means less work for translators.

philwareham commented 1 year ago

Bump. Was this string added? If not, can you let me know working for it and I'll add. Thanks.

Bloke commented 1 year ago

It's not been added or altered. I'll tweak.