#12222 closed defect (fixed)
Bad translatable string for Pygments options config section
Reported by: | Lele Gaifax | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.2 |
Component: | i18n | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed incorrect entries in pot (translation) file due to string interpolation in option description. |
||
API Changes: |
Add |
||
Internal Changes: |
Description
At source:/trunk/trac/mimeview/pygments.py#L51 the description uses interpolation to inject the same URL in a couple of places: that confuses the i18n extractor, that puts a wrong entry in the pot file (see source:/trunk/trac/locale/tracini.pot#L506).
Attachments (0)
Change History (11)
comment:1 by , 9 years ago
Component: | general → i18n |
---|---|
Milestone: | → 1.2 |
comment:3 by , 9 years ago
API Changes: | modified (diff) |
---|---|
Owner: | set to |
Status: | new → assigned |
Thanks for the reviewing.
Additional changes:
- [cdca0ce8c/jomae.git]: add unit tests for
doc_args
- [1d4c6e35e/jomae.git]: add
doc()
method toConfigSection
andOption
to retrieve localized document - [e6e07f069/jomae.git]: add unit tests
doc()
methods
comment:4 by , 9 years ago
Would it make sense to have the doc()
method be a property instead, or is there a possibility we'll need to pass parameters in the future?
comment:5 by , 9 years ago
Okay. I agree to use @property
decorator the doc()
methods. [6a422f6b8/jomae.git].
comment:7 by , 9 years ago
We could use parameters to jquery_location
, jquery_ui_location
and jquery_ui_theme_location
in [trac]
section like this. Extracted messages wouldn't be changed even if we upgrade the jquery or jquery-ui.
jquery_location = Option('trac', 'jquery_location', '', - """Location of the jQuery !JavaScript library (version 1.11.3). + """Location of the jQuery !JavaScript library (version %(version)s). An empty value loads jQuery from the copy bundled with Trac. Alternatively, jQuery could be loaded from a CDN, for example: - http://code.jquery.com/jquery-1.11.3.min.js, - http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min.js or - https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js. + http://code.jquery.com/jquery-%(version)s.min.js, + http://ajax.aspnetcdn.com/ajax/jQuery/jquery-%(version)s.min.js or + https://ajax.googleapis.com/ajax/libs/jquery/%(version)s/jquery.min.js. - (''since 1.0'')""") + (''since 1.0'')""", doc_args={'version': '1.11.3'})
comment:8 by , 9 years ago
That looks like a great idea. Much simpler to edit the version number when upgrading jQuery.
comment:10 by , 8 years ago
Release Notes: | modified (diff) |
---|
comment:11 by , 8 years ago
Release Notes: | modified (diff) |
---|
Right. Thanks for the reporting!
Considering, how about adding
doc_args
to pass parameters to the extracted messages? See jomae.git@t12222.