WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 7 weeks ago

#39116 new defect (bug)

Twenty Seventeen: Display & improve translator comment for Libre Franklin font on/off

Reported by: petya Owned by:
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-patch reporter-feedback
Focuses: Cc:

Description

The translator comment for the string that turns Twenty Seventeen's Libre Franklin font on or off (https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentyseventeen/functions.php#L230) is not visible in translate.wordpress.org

Screen: https://www.dropbox.com/s/sv708wl3i5evh6i/Screenshot%202016-12-06%2014.06.22.png?dl=0
Link: https://translate.wordpress.org/projects/wp-themes/twentyseventeen/bg/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=3565021&filters%5Btranslation_id%5D=46251052

The comment is in the code reference and says:

"Translators: If there are characters in your language that are not supported by Libre Franklin, translate this to 'off'. Do not translate into your own language."

Even if the comment was visible, it would be of next to no help to translators without a reference to the link or further explanation. Translators are often neither designers nor developers. My suggestion here is to add a further line explaining which scripts are supported by the font or if they are two many either which are not or a link for translators to check whether their script is supported.

Attachments (1)

39116.diff (603 bytes) - added by swissspidy 4 months ago.

Download all attachments as: .zip

Change History (9)

#1 @davidakennedy
4 months ago

  • Component changed from I18N to Bundled Theme
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.8

@swissspidy
4 months ago

#2 follow-up: @swissspidy
4 months ago

  • Keywords has-patch added; needs-patch removed

makepot.php doesn't recognize /** apparently. 39116.diff resorts to using /* for the multiline comment (correct anyway as per coding standards)

#3 @netweb
4 months ago

See #30603 for a historical explanation of this.

#4 @SergeyBiryukov
3 months ago

  • Summary changed from Display & improve translator comment for Libre Franklin font on/off to Twenty Seventeen: Display & improve translator comment for Libre Franklin font on/off

#5 in reply to: ↑ 2 @SergeyBiryukov
2 months ago

Replying to swissspidy:

makepot.php doesn't recognize /** apparently. 39116.diff resorts to using /* for the multiline comment (correct anyway as per coding standards)

Yep. We could probably fix StringExtractor to recognize that (see #30972 for a previous fix to improve support for multi-line comments), but I think we should just go with 39116.diff, since it should be a regular comment, not a DocBlock.

#6 @SergeyBiryukov
2 months ago

In 39894:

Twenty Seventeen: Remove extra asterisk from a translator comment so the comment could be parsed correctly.

Props swissspidy.
See #39116.

#7 in reply to: ↑ description @SergeyBiryukov
2 months ago

Replying to petya:

My suggestion here is to add a further line explaining which scripts are supported by the font or if they are two many either which are not or a link for translators to check whether their script is supported.

That comment is consistent with the comments from previous bundled themes:

The original comment was added for Twenty Twelve in #21751, see [22020] and [22049].

If the suggestion is to change it, I think it should be done for all themes.

#8 @davidakennedy
7 weeks ago

  • Keywords reporter-feedback added

@petya Would adding a link to the Google Font documentation for the theme's fonts help in this case? Example: https://fonts.google.com/specimen/Merriweather

Note: See TracTickets for help on using tickets.