Patch #20288
Finalize CodeRay 1.1.0 upgrade
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Third-party libraries | |||
Target version: | 3.2.0 |
Description
The current CodeRay CSS styles are still based on CodeRay 1.0.6 (included since Redmine 1.4.0) with the custom changes from r10132 (included since Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9, an upgrade that didn't needed changes in the CSS styles. Starting with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade that came with new/changed token_kinds and lots of changes in the alpha stylesheet, that in turn is used as a base for Redmine's own CodeRay CSS styles. As such, this upgrade needed CSS stylesheet changes like done before in r7618 and r7623 (for 1.0.0 upgrade) and r9389 (for 1.0.6 upgrade). But these changes, plus an update of the Redmine core documentation that is shipped along the core (wiki_syntax_detailed_[markdown|textile].html), aren't integrated up until today.
This patch serial, made against source:/trunk@14420, fixes these issues and can be applied using "patch -p1 < 0001-...
". It is produced using git format-patch
, so the patches include all info (including extensive commit messages) from the commits I made on a local branch.
Note: these issues are affecting 2.6-stable, 3.0-stable, 3.1-stable and current trunk. This patch serial only provides fixes for current trunk. If backport-patches are needed (in case this patch serial doesn't merge cleanly on stable branches), let me know.
Related issues
Associated revisions
[#20288] Remove debug style (used only by CodeRay's internal debug scanner).
Contributed by Mischa The Evil.
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132).
This commit updates the CSS styles to match with CodeRay 1.1.0,
while it preserves the custom changes applied in r10132.
The CSS styles were still based on CodeRay 1.0.6 (included since
Redmine 1.4.0) with the custom changes from r10132 (included since
Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9,
an upgrade that didn't needed changes in the CSS styles. Starting
with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade
that came with new/changed token_kinds and lots of changes in the
alpha stylesheet, that in turn is used as a base for Redmine's own
CodeRay CSS styles. As such, this upgrade needed CSS stylesheet
changes like done before in r7618 and r7623 (for 1.0.0 upgrade)
and r9389 (for 1.0.6 upgrade). But these changes, plus an update
of the Redmine core documentation that is shipped along the core
(wiki_syntax_detailed_[markdown|textile].html), aren't integrated
up untill today.
Contributed by Mischa The Evil.
[#20288] Update the i18n'ed core doc to match CodeRay 1.1.0 capabilities.
This commit includes:
1. an update of the list of languages supported by CodeRay: * added: + clojure [added in CodeRay 1.0.x] + diff (patch) [added in CodeRay 0.8.x] + go [added in CodeRay 1.1.x] + haml [added in CodeRay 1.0.x] + lua [added in CodeRay 1.1.x] + sass [added in CodeRay 1.1.x] + taskpaper [added in CodeRay 1.1.x] + text (plain, plaintext) [never been documented in Redmine] * removed: - scheme [removed from CodeRay 1.0.x] * renamed: ~ erb (eruby, rhtml) [renamed from rhtml in CodeRay 1.0.x] 2. the inclusion of additional, comma-separated language mappings (aliases) inside parentheses: * cpp (c++, cplusplus) * delphi (pascal) * diff (patch) * erb (eruby, rhtml) * html (xhtml) * javascript (ecmascript, ecma_script, java_script, js) * ruby (irb) * text (plain, plaintext) * yaml (yml)
Regarding the i18n: I used English as the base language. The
changed sentence was the same in 94 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.
The only four exceptions were:
- cs; public\help\cs\wiki_syntax_detailed_textile.html
- fr; public\help\fr\wiki_syntax_detailed_textile.html
- ja; public\help\ja\wiki_syntax_detailed_textile.html
- zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html
In the above given files, the sentence containing the supported
languages is translated (and/or stylized). I have chosen to
replace the whole translated sentence with the new English base
sentence, as such leaving decisions about stylizing language names
to translators and the people that actually use the respective
languages. In general (and for English, as it's the base language)
I think we can better stick to non-capitalized language names to
prevent any formatting confusion.
Contributed by Mischa The Evil.
[#20288] Add a note about case-insensitivity of CodeRay language names/aliases.
Regarding the i18n: I used English as the base language. The
changed sentence was the same in 93 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.
The only five exceptions were:
- cs; public\help\cs\wiki_syntax_detailed_textile.html
- fr; public\help\fr\wiki_syntax_detailed_textile.html
- ja; public\help\ja\wiki_syntax_detailed_textile.html
- ru; public\help\ru\qiki_syntax_detailed_textile.html
- zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html
In the above given files, the changed sentence is translated. I
have replaced the whole translated sentence with the new English
base sentence, as such leaving new translations up to translators.
Contributed by Mischa The Evil.
[#20288] Make clear that syntax highlighting cannot only be used in wiki pages.
Regarding the i18n: I used English as the base language. The
changed sentence was the same in 93 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.
The only five exceptions were:
- cs; public\help\cs\wiki_syntax_detailed_textile.html
- fr; public\help\fr\wiki_syntax_detailed_textile.html
- ja; public\help\ja\wiki_syntax_detailed_textile.html
- ru; public\help\ru\qiki_syntax_detailed_textile.html
- zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html
In the above given files, the changed sentence is translated. I
have replaced the whole translated sentence with the new English
base sentence, as such leaving new translations up to translators.
Contributed by Mischa The Evil.
[#20288] Update the CodeRay Ruby syntax highlight example.
This commit changes the following:
- Remove line numbering from syntax highlight example.
- Add span with 'CodeRay' class around the syntax highlight example.
- Fix span classes in the syntax highlight example:
- Ruby scanner changed from ':reserved' to ':keyword' with CodeRay 1.0.0.
- Remove obsolete line numbering styles.
- Fix internal stylesheet to match CodeRay 1.1.0 (preserving r10132's changes).
- Sort internal styles and remove superfluous newlines between styles.
Contributed by Mischa The Evil.
History
#1
Updated by Mischa The Evil almost 7 years ago
- File deleted (
0007-Update-the-CodeRay-Ruby-syntax-highlight-example.patch)
#2
Updated by Mischa The Evil almost 7 years ago
- File deleted (
0006-Make-clear-that-syntax-highlighting-cannot-only-be-u.patch)
#3
Updated by Mischa The Evil almost 7 years ago
- File deleted (
0005-Add-a-note-about-case-insensitivity-of-CodeRay-langu.patch)
#4
Updated by Mischa The Evil almost 7 years ago
- File deleted (
0004-Update-the-i18n-ed-core-doc-to-match-CodeRay-1.1.0-c.patch)
#5
Updated by Mischa The Evil almost 7 years ago
- File 0004-Update-the-i18n-ed-core-doc-to-match-CodeRay-1.1.0-c.patch
added
- File 0005-Add-a-note-about-case-insensitivity-of-CodeRay-langu.patch
added
- File 0006-Make-clear-that-syntax-highlighting-cannot-only-be-u.patch
added
- File 0007-Update-the-CodeRay-Ruby-syntax-highlight-example.patch
added
I did a rebase on my local branch to update the second part1 of this patch serial to fix an ugly spelling mistake (parenthesis -> parentheses). So here is an update of the respective patch files.
1 patch files 0001-0003 changes public/stylesheets/application.css (and were locally done on one branch) whereas patch files 0004-0007 changes public/help/xx[-xx]/wiki_syntax_detailed_[markdown||textile].html files (which were locally done on another branch).
#6
Updated by Toshi MARUYAMA almost 7 years ago
- Target version set to 3.2.0
#7
Updated by Jean-Philippe Lang over 6 years ago
- Status changed from New to Closed
Looks like it can be closed.
#8
Updated by Go MAEDA over 6 years ago
- Duplicated by Defect #17577: <code> blocks have no numbers, help shows line numbers for <code> blocks though added