Opened 19 years ago
Closed 15 years ago
#6007 closed enhancement (fixed)
Template Name et al not localizable
| Reported by: | SteveAgl | Owned by: | hansengel |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | I18N | Version: | 2.5 |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: |
Description
In theme editor the tempalte description for archives.php and links.php are correctly gettext but even if tanslated in po file they don't translate.
Attachments (2)
Change History (20)
#2
@
19 years ago
- Keywords has-patch added
- Owner changed from to
- Status new → assigned
Actually, SteveAgl, the theme file descriptions aren't translated at all. I attached a patch to add translation functionality.
#3
@
19 years ago
You can only pass literal strings to ().
These strings should be translated when $wp_file_descriptions is defined. By the time file.php is loaded, the gettext system should be fully initialized. I'd like to understand why that is apparently not working.
If we can't figure that out, we can change your patch to use translate() instead of ().
#4
@
19 years ago
Oh, we're talking about templates with "Template Name:" in them. The template would have to make a dummy call to () somewhere to get the string in the template. If that is done, then changing your patch to use translate() will work.
#5
@
19 years ago
Actually, it might be better to have get_file_description() do this:
return translate($name[1]);
#6
@
19 years ago
- Milestone 2.5 → 2.6
Actually, we'd have to call translate with the proper domain for the theme. We're getting into the same issue as with plugins. We've pushed that fix to 2.6, so I'll push this one as well.
#7
@
17 years ago
- Keywords needs-patch added; has-patch removed
- Milestone 2.9 → Future Release
- Type defect (bug) → enhancement
#11
@
15 years ago
- Keywords close removed
- Milestone Future Release → 3.4
Let's do this and #15858.
Steps to complete this ticket:
- Run translate() over these.
- Leverage a Text Domain header (where #15858 comes in).
- Extract Template Name from individual template files and add them to the pot, which would require some improvements to http://i18n.svn.wordpress.org/tools/trunk/pot-ext-meta.php.
#15
@
15 years ago
15858.diff:ticket:15858 more or less fixes this.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Translates file descriptions before showing in theme editor