Opened 9 years ago
Closed 9 years ago
#32975 closed defect (bug) (fixed)
Improve translation string in theme edit screen
Reported by: | ramiy | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2.2 |
Component: | I18N | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When translating the "__( 'Header' )
" string to hebrew, we use it in the context of custom-header, because this string is used to link to "themes.php?page=custom-header
".
Source: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/admin-bar.php#L735
But it seems like the same string "__( 'Header' )
" is used in the content of descripting the "header.php
" file name.
Source: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/file.php#L21
The problem
As a translator, I can't create two different translation strings. And the result is that in the theme edit screen, the header.php file description translated to "custom header" (in hebrew).
The solution
We can replace "__( 'Header' )
" with "_x( 'Header', 'context' )
".
Or we can use different strings, replacing "__( 'Header' )
" with "__( 'Theme Header' )
".
I personally prefer the second solution, as it adds more descriptive text to the user, but both solution do the job.
Let's take a look