Opened 17 years ago
Closed 13 years ago
#6007 closed enhancement (fixed)
Template Name et al not localizable
Reported by: | SteveAgl | Owned by: | hansengel |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | minor | Version: | 2.5 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
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)
#1
@
17 years ago
- Component changed from Administration to i18n
- Severity changed from major to minor
#2
@
17 years ago
- Keywords has-patch added
- Owner changed from anonymous to hansengel
- Status changed from new to assigned
Actually, SteveAgl, the theme file descriptions aren't translated at all. I attached a patch to add translation functionality.
#3
@
17 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
@
17 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
@
17 years ago
Actually, it might be better to have get_file_description() do this:
return translate($name[1]);
#6
@
17 years ago
- Milestone changed from 2.5 to 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
@
16 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.9 to Future Release
- Type changed from defect (bug) to enhancement
#8
@
16 years ago
- Summary changed from Gettexted file do no translate to Template Name et al not localizable
#11
@
13 years ago
- Keywords close removed
- Milestone changed from Future Release to 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
@
13 years ago
15858.diff:ticket:15858 more or less fixes this.
Translates file descriptions before showing in theme editor