Opened 8 years ago
Closed 8 years ago
#1903 closed defect (bug) (fixed)
Hardcoded strings in WordCamp.org plugin camptix-attendance
Reported by: | kossmann | Owned by: | iandunn |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | has-patch |
Cc: |
Description
There are two hardcoded strings making it impossible to translate.
Attachments (4)
Change History (16)
#5
@
8 years ago
I think <strong>Note</strong>: Anyone with the secret link can access the attendance UI...
should be a single string rather than two separate strings (Note:
and Anyone with the secret link...
).
Looks good to me otherwise.
#7
@
8 years ago
- Owner changed from kovshenin to iandunn
It looks like Note
isn't a separate string in 3.diff
, but I can make that change when I commit it. The rest looks good to me.
#9
@
8 years ago
1903.3.diff makes the whole string bold, I didn't mean that :)
I just meant the string can be wrapped with esc_html_e()
as is, no need to separate it. Occasional HTML tags in translatable strings are fine, unless thay wrap the whole string or placeholders (e.g. <code>%s</code>
), in which case they can be moved out of the string.
Hi Daniel, thanks for the patch!
This looks pretty good to me. The only minor things I'd change would be to use the
wordcamporg
text domain instead ofcamptix
, and to always use the escaping translate functions (likeesc_html__
).CampTix has it's own text domain because it's distributed in the WordPress.org repository, but the add-ons in the Meta repository should all use
wordcamporg
, so that they'll be included in our single GlotPress project.Not everyone agrees with this, but personally I consider it a best practice to always use the escaping translate functions, to avoid any situations where malicious HTML is inserted into localized strings.