#30603 closed defect (bug) (fixed)
Twenty Fifteen: Translators comments missing from GlotPress
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Bundled Theme | Keywords: | i18n-change needs-patch |
Focuses: | docs | Cc: |
Description
Translators comments missing from GlotPress:
Example:
- String: https://translate.wordpress.org/projects/wp/dev/twentyfifteen/en-au/default?filters[original_id]=201487
- Source: http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentyfifteen/functions.php#L184
Results:
- Only the context is displayed
Context: Add new subset (greek, cyrillic, devanagari, vietnamese)
Expected:
- The context
Context: Add new subset (greek, cyrillic, devanagari, vietnamese)
AND the translators commentTranslators: To add an additional character subset specific to your language, translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
to be displayed.`
An example of a 'Working Translators Comment':
Attachments (3)
Change History (19)
#3
follow-up:
↓ 4
@
10 years ago
Thinking the error is the capital T
. There are couple of multi-line translators:
comments that seem to work fine?
#4
in reply to:
↑ 3
;
follow-up:
↓ 11
@
10 years ago
Replying to azaozz:
Thinking the error is the capital
T
.
That's not the error because the i18n tool is using stripos()
here, see trunk/tools/i18n/extract.php@29563#L174.
#5
@
10 years ago
- Focuses docs added
- Keywords i18n-change needs-patch added; has-patch removed
In the i18n tools it seems to me that there isn't a mechanism for handling inner-comment lines only beginning with a space and an asterisk: ' *'. That could be the issue with the comments not getting matched up.
FWIW, in my search I could only find five instances where translator comments were multi-line, four of them in TwentyFifteen and one of them in TwentyFourteen. I'd suggest lowercasing the 'T' for consistency and moving to single-line comments as a precaution.
Adversely, we could update the RegEx in find_function_calls()
to handle multi-line comments. I'm thinking that would be a good later-addition at this juncture.
#6
@
10 years ago
- Keywords has-patch commit added; needs-patch removed
30603.2.diff lowercases the 'T'.
#7
follow-up:
↓ 13
@
10 years ago
- Owner set to iandstewart
- Resolution set to fixed
- Status changed from new to closed
In 30790:
#8
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The twentyfifteen.pot
needs updating after r30790
#11
in reply to:
↑ 4
@
10 years ago
Thanks y'all, working as intended now :)
And to follow up for those following along and future reference:
Replying to ocean90:
Replying to azaozz:
Thinking the error is the capital
T
.
That's not the error because the i18n tool is using
stripos()
here, see trunk/tools/i18n/extract.php@29563#L174
This's correct stripos()
looks for /*
or //
on a new line, nothing to do with the capitalisation of the letter T
.
In the 30603.diff patch I have switched the translators comment to a single line rather than multiline, I am not 100% sure this is the correct fix, "I think" it is though ;)