WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 5 months ago

Last modified 5 months ago

#39116 closed defect (bug) (fixed)

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 11 months ago.

Download all attachments as: .zip

Change History (11)

#1 @davidakennedy
11 months ago

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

@swissspidy
11 months ago

#2 follow-up: @swissspidy
11 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
11 months ago

See #30603 for a historical explanation of this.

#4 @SergeyBiryukov
10 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
9 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
9 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
9 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
9 months 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

This ticket was mentioned in Slack in #core by flixos90. View the logs.


5 months ago

#10 @SergeyBiryukov
5 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Closing as fixed for 4.8 in [39894], let's open a new ticket for any further enhancements.

Last edited 5 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.