Ticket #8055 (closed defect: fixed)
Opened 3 years ago
Last modified 2 years ago
i18n for ticket field names
| Reported by: | kabuchan@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12 |
| Component: | i18n | Version: | none |
| Severity: | normal | Keywords: | i18n |
| Cc: | felix.schwarz@… | ||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by cboos) (diff)
Hi
Can not extract and translate like this.
trac/ticket/templates/ticket.html line 312
<label for="field-${field.name}" py:if="field"
py:strip="field.type == 'radio'">${field.edit_label or field.label or field.name}:</label>
Type:,Priority:,Milestone:,Milestone:,Version:,Severity:
,Keywords:,Cc:
trac/ticket/templates/ticket.html line 400
<input type="submit" name="preview" value="${_('Preview')}" accesskey="r" />
<input type="submit" name="submit" value="${ticket.exists and 'Submit changes' or 'Create ticket'}" />
</div>
-
trac/ticket/templates/ticket.html
397 397 <input type="hidden" name="cnum" value="${cnum}" /> 398 398 </py:if> 399 399 <input type="submit" name="preview" value="${_('Preview')}" accesskey="r" /> 400 <input type="submit" name="submit" value="${ticket.exists and 'Submit changes' or 'Create ticket'}" />400 <input type="submit" name="submit" value="${ticket.exists and _('Submit changes') or _('Create ticket')}" /> 401 401 </div> 402 402 403 403 </form>
and can not translate messages including tag.
#: trac/admin/templates/admin_components.html:42 msgid "" "Description (you may use\n" " [1:WikiFormatting]\n" " here):" #: trac/admin/templates/admin_milestones.html:55 #: trac/admin/templates/admin_versions.html:35 #: trac/ticket/templates/milestone_edit.html:85 msgid "Description (you may use [1:WikiFormatting] here):" #: trac/templates/error.html:131 msgid "" "Before you do that, though, [1:please first try\n" " [2:searching]\n" " for similar issues], as it is quite likely that this " "problem\n" " has been reported before. For questions about " "installation\n" " and configuration of Trac, please try the\n" " [3:mailing list]\n" " instead of filing a ticket." #: trac/ticket/templates/report_edit.html:25 msgid "Description: (you may use [1:WikiFormatting] here)" #: trac/ticket/templates/ticket.html:266 msgid "" "Comment (you may use\n" " [1:WikiFormatting]\n" " here):" #: trac/timeline/templates/timeline.html:20 msgid "" "[1:View changes from [2:]] [3:]\n" " and [4:[5:] days back][6:]\n" " [7:done by [8:]]" #: trac/wiki/templates/wiki_edit.html:87 msgid "" "[1:Note:] See [2:WikiFormatting] and\n" " [3:TracWiki] for help on editing wiki content."
Attachments
Change History
comment:1 in reply to: ↑ description Changed 3 years ago by cboos
- Description modified (diff)
- Keywords i18n added
- Milestone set to 0.12
- Owner set to cboos
- Summary changed from i18n bugs to i18n for ticket field names
comment:2 Changed 3 years ago by kabuchan@…
I try genshi/advanced-i18n.It can translated.
Thank you.
system info
Trac: 0.12dev-r7828
Python: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)]
setuptools: 0.6c9
SQLite: 3.3.4
pysqlite: 2.3.2
Genshi: 0.6dev-r994 ( → branches/experimental/advanced-i18n/)
Babel: 1.0dev-r467
mod_python: 3.3.1
Subversion: 1.5.5 (r34862)
jQuery: 1.2.6
comment:3 Changed 3 years ago by cboos
- Component changed from general to i18n
comment:4 Changed 3 years ago by cboos
Depends on #3919.
comment:5 Changed 3 years ago by rblank
Wasn't that fixed in #3919 as well?
comment:6 Changed 3 years ago by cboos
Right, but this needs to be redone (ticket:5474#comment:38), and I'll need to verify all the points from comment:1.
Changed 2 years ago by millerdev@…
- Attachment ticket_localize.patch added
Fixes localization field names in ticket view.
comment:7 follow-up: ↓ 8 Changed 2 years ago by millerdev@…
Just attached a patch that localizes the field names in the ticket view.
comment:8 in reply to: ↑ 7 Changed 2 years ago by cboos
- Status changed from new to assigned
Replying to millerdev@…:
Just attached a patch that localizes the field names in the ticket view.
Thanks! I committed it in r8953. As I said in comment:6 above, this will change again, but that doesn't mean we can't fix the current status in the meantime, especially when we get a patch ;-)
comment:9 follow-up: ↓ 10 Changed 2 years ago by millerdev@…
OK, I don't know French, but I think you said the labels should be changed directly in the fields of the ticket object. Is that right? If so, I'll revise my patch to do that instead.
comment:10 in reply to: ↑ 9 Changed 2 years ago by cboos
Replying to millerdev@…:
OK, I don't know French, but I think you said the labels should be changed directly in the fields of the ticket object. Is that right?
Yes, actually the original solution with field_labels instead of fields was done because fields had to be left unchanged across requests. Now that we make a deep copy of fields for each request, we can freely modify it, so no need for field_labels anymore.
Changed 2 years ago by millerdev@…
- Attachment ticket_localize_2.patch added
Better ticket localization
comment:11 Changed 2 years ago by Felix Schwarz <felix.schwarz@…>
- Cc felix.schwarz@… added
comment:12 Changed 2 years ago by cboos
- Description modified (diff)
- Resolution set to fixed
- Status changed from assigned to closed



Replying to kabuchan@…:
Yes, translation of ticket field names is still an open point.
Let's use this ticket as a reminder for this.
Note also that in general, when there's something written "<some text>:", then the ':' must be part of the string to be translated, as different languages have different typographic rule (e.g. in French that would be translated to "<un texte> :").
…just an example among many :-) Thanks.
There's still an awful lot of places where messages should be recomposed in order to lead to meaningful translations.
I don't understand what you mean. Are you saying that those messages don't get translated? If so, are you using the proper versions of the supporting packages, i.e. Genshi advanced-i18n branch and Babel 0.9.4? (see TracL10N#GettingtheToolChain? for pointers).