gocodebox / gocodebox/lifterlms

Dates in course restriction messages do not display on sites localized in Spanish

Open
#1,334 3 comments 0 reactions 0 assignees View on GitHub
good first issue hacktoberfest help wanted Severity: Normal Status: Has Alternative Type: Enhancement
Dominant language
PHP
Stars
212
Forks
140
Avg merge
2d 14h
Merged PRs (30d)
19

Description

### Reproduction Steps

+ Switch your site's language to spanish
+ Update the translations
+ Create a new course
+ Go set enrollment restrictions
(see the default messages, the shortcode atts are translated, and there are even stray spaces)
+ Save
+ Visit the course on front as visitor

### Expected Behavior
(I would expect the shortcode atts to not be translated)
+ I would expect to see the restriction dates displaying correctly

### Actual Behavior

(shortcode atts are translated, e.g.:
`La inscripción en este curso se abre en [lifterlms_course_info id = " 4981 " clave = "enrollment_start_date "].
`)
The date doesn't display.

The problem is that those shortcodes are localized in spanish:
https://translate.wordpress.org/projects/wp-plugins/lifterlms/stable/es/default/?filters%5Bterm%5D=course_info&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=priority&sort%5Bhow%5D=desc

We could contact the spanish PTE, but that might take too long...

**Solution:** We have to prevent such a thing, we don't have to allow those shortcodes to be localized, let's use placeholders.
**Alternative:** (not ideal) Users can manually amend the wrong shortcodes referring to our documentation: https://lifterlms.com/docs/shortcodes/#lifterlms_course_info

### Error Messages / Logs

n/a

### System and Environment Information

System Report

```

LifterLMS 4.4.3
WordPress 5.5.1
```

This issue has be recreated:
+ [x] Locally
+ [ ] On a staging site
+ [x] On a production website
+ [x] With only LifterLMS and a default theme

### Browser, Device, and Operating System Information

n/a

### Related User Information
HS-134066

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.