Opened 8 years ago
Closed 7 years ago
#2571 closed defect (bug) (fixed)
Remove tabs and newlines from internationalized strings
Reported by: | grapplerulrich | Owned by: | iandunn |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | WordCamp Site & Plugins | Keywords: | good-first-bug has-patch |
Cc: |
Description
As I was sharing the new WordCamp Bern page I got the feedback that people were more likely to overlook the subscribe box and instead fill out the contact form at the bottom.
https://2017.bern.wordcamp.org/
This got me thinking what the arrows were supposed to mean and realized that they were tabs from the translation.
<?php printf( // translators: %s is the name of the blog __( '%s is in the early planning stages. In the meantime, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.', 'wordcamporg' ), esc_html( get_bloginfo( 'name' ) ) ); ?>
Better maybe to split up the strings and mention where the items are on the page. I have added "above" and "below" to the string.
<?php printf( // translators: %s is the name of the blog __( '%s is in the early planning stages..', 'wordcamporg' ), esc_html( get_bloginfo( 'name' ) ) ); _e( 'In the meantime, you can subscribe to updates above, or contact the organizers below to get involved.', 'wordcamporg' ),?>
Attachments (4)
Change History (18)
#2
@
8 years ago
The line breaks are there in the code for readability,
Line breaks are usually okay but tabs shouldn't be included in strings like in this case.
Maybe GlotPress should be stripping them out automatically?
This was fixed in 2.2: https://github.com/GlotPress/GlotPress-WP/issues/473
#3
@
8 years ago
Removing the tabs would be worse for readability than removing the newlines, so I'd prefer to do the latter if we have to.
It sounds like the localized strings can be fixed by just re-saving them in GlotPress, though; is that right?
#4
@
8 years ago
Here is an example of how it looks like in Glotpress https://translate.wordpress.org/projects/meta/wordcamp/en-gb/default?filters%5Bterm%5D=+is+in+the+early+planning+sta&filters%5Buser_login%5D=&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filter=Filter&sort%5Bby%5D=priority&sort%5Bhow%5D=desc
The problem is not with the translation but with the string.
#6
@
8 years ago
As we are making a change can we change the text to:
%s is in the early planning stages. In the meantime, you can subscribe to updates above, or contact the organizers below to get involved.
#8
@
8 years ago
- Owner set to iandunn
- Priority changed from normal to low
- Status changed from new to accepted
- Summary changed from Improving coming soon text to Remove newlines from internationalized strings
2571.2.patch
looks good to me.
Since the underlying issue is bigger than just this one string, I renamed the ticket to widen the focus, and it can remain open until they're all fixed.
Individual patches can of course be committed in the meantime. I added 2571.2.patch
to my list, but if anyone else has time before I get to it, feel free.
#10
@
8 years ago
- Summary changed from Remove newlines from internationalized strings to Remove tabs and newlines from internationalized strings
#12
@
8 years ago
- Keywords has-patch added; needs-patch removed
@coreymckrill In 2571.3.patch:
- Fix the issue for the remaining WordCamp.org strings.
- Add translator comments for placeholders in the edited strings.
- Remove some unnecessary HTML from the edited strings.
The line breaks are there in the code for readability, but IIRC the i18n guidelines are to keep entire paragraphs as a single string, rather than breaking them up into multiple strings.
I would assume that the arrows are something that the translator accidentally added. Maybe GlotPress should be stripping them out automatically?
cc @ocean90 for a second opinion.