##// END OF EJS Templates
[#20288] Update the i18n'ed core doc to match CodeRay 1.1.0 capabilities....
[#20288] Update the i18n'ed core doc to match CodeRay 1.1.0 capabilities. This commit includes: <pre> 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) </pre> 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. git-svn-id: http://svn.redmine.org/redmine/trunk@14489 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14029:6d78ae91307b
r14107:7c46fe1e4bd6
Show More
revision_graph.js
97 lines | 3.8 KiB | application/javascript | JavascriptLexer
Jean-Philippe Lang
[js-cleanup] add short copyright notices to javascripts and remove superfluous newline (#20240)....
r14029 /* Redmine - project management software
Copyright (C) 2006-2015 Jean-Philippe Lang */
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 var revisionGraph = null;
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 function drawRevisionGraph(holder, commits_hash, graph_space) {
Etienne Massip
Integrated revision graph into scmid column....
r8730 var XSTEP = 20,
CIRCLE_INROW_OFFSET = 10;
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 var commits_by_scmid = commits_hash,
commits = $.map(commits_by_scmid, function(val,i){return val;});
Etienne Massip
Integrated revision graph into scmid column....
r8730 var max_rdmid = commits.length - 1;
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 var commit_table_rows = $('table.changesets tr.changeset');
Etienne Massip
Revision graph code cleanup....
r8653
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 // create graph
if(revisionGraph != null)
revisionGraph.clear();
else
revisionGraph = Raphael(holder);
var top = revisionGraph.set();
Etienne Massip
Integrated revision graph into scmid column....
r8730 // init dimensions
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 var graph_x_offset = commit_table_rows.first().find('td').first().position().left - $(holder).position().left,
graph_y_offset = $(holder).position().top,
Etienne Massip
Better handling of horizontal position....
r8747 graph_right_side = graph_x_offset + (graph_space + 1) * XSTEP,
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 graph_bottom = commit_table_rows.last().position().top + commit_table_rows.last().height() - graph_y_offset;
Etienne Massip
Revision graph code cleanup....
r8653
Etienne Massip
Better handling of horizontal position....
r8747 revisionGraph.setSize(graph_right_side, graph_bottom);
Etienne Massip
Revision graph code cleanup....
r8653
// init colors
Etienne Massip
Integrated revision graph into scmid column....
r8730 var colors = [];
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 Raphael.getColor.reset();
for (var k = 0; k <= graph_space; k++) {
Etienne Massip
Revision graph code cleanup....
r8653 colors.push(Raphael.getColor());
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605 }
Etienne Massip
Revision graph code cleanup....
r8653
var parent_commit;
var x, y, parent_x, parent_y;
Etienne Massip
Variable declaration cleanup....
r9051 var path, title;
Etienne Massip
Added missing local variable declaration....
r9652 var revision_dot_overlay;
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 $.each(commits, function(index, commit) {
Jean-Philippe Lang
Revision graph sometimes broken (#11612)....
r10186 if (!commit.hasOwnProperty("space"))
commit.space = 0;
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 y = commit_table_rows.eq(max_rdmid - commit.rdmid).position().top - graph_y_offset + CIRCLE_INROW_OFFSET;
Etienne Massip
Better handling of horizontal position....
r8747 x = graph_x_offset + XSTEP / 2 + XSTEP * commit.space;
Etienne Massip
Moved head refs to node titles....
r9049 revisionGraph.circle(x, y, 3)
.attr({
fill: colors[commit.space],
Toshi MARUYAMA
fix JavaScript error of revision_graph.js on IE7 (#13823)...
r11508 stroke: 'none'
Etienne Massip
Moved head refs to node titles....
r9049 }).toFront();
Etienne Massip
Revision graph code cleanup....
r8653 // paths to parents
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 $.each(commit.parent_scmids, function(index, parent_scmid) {
parent_commit = commits_by_scmid[parent_scmid];
Etienne Massip
Revision graph code cleanup....
r8653 if (parent_commit) {
Jean-Philippe Lang
Revision graph sometimes broken (#11612)....
r10186 if (!parent_commit.hasOwnProperty("space"))
parent_commit.space = 0;
Jean-Philippe Lang
JQuery in, Prototype/Scriptaculous out (#11445)....
r9885 parent_y = commit_table_rows.eq(max_rdmid - parent_commit.rdmid).position().top - graph_y_offset + CIRCLE_INROW_OFFSET;
Etienne Massip
Better handling of horizontal position....
r8747 parent_x = graph_x_offset + XSTEP / 2 + XSTEP * parent_commit.space;
Etienne Massip
Revision graph code cleanup....
r8653 if (parent_commit.space == commit.space) {
// vertical path
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 path = revisionGraph.path([
Etienne Massip
Revision graph code cleanup....
r8653 'M', x, y,
'V', parent_y]);
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605 } else {
Etienne Massip
Revision graph code cleanup....
r8653 // path to a commit in a different branch (Bezier curve)
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 path = revisionGraph.path([
Etienne Massip
Revision graph code cleanup....
r8653 'M', x, y,
'C', x, y, x, y + (parent_y - y) / 2, x + (parent_x - x) / 2, y + (parent_y - y) / 2,
'C', x + (parent_x - x) / 2, y + (parent_y - y) / 2, parent_x, parent_y-(parent_y-y)/2, parent_x, parent_y]);
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605 }
} else {
Etienne Massip
Redraw revision graph on window resize (#10206)....
r8746 // vertical path ending at the bottom of the revisionGraph
path = revisionGraph.path([
Etienne Massip
Revision graph code cleanup....
r8653 'M', x, y,
Etienne Massip
Better handling of horizontal position....
r8747 'V', graph_bottom]);
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605 }
Etienne Massip
Moved head refs to node titles....
r9049 path.attr({stroke: colors[commit.space], "stroke-width": 1.5}).toBack();
Etienne Massip
Revision graph code cleanup....
r8653 });
Etienne Massip
Moved head refs to node titles....
r9049 revision_dot_overlay = revisionGraph.circle(x, y, 10);
revision_dot_overlay
Etienne Massip
Revision graph code cleanup....
r8653 .attr({
Toshi MARUYAMA
replace tab to space at revision_graph.js...
r10109 fill: '#000',
Etienne Massip
Revision graph code cleanup....
r8653 opacity: 0,
Etienne Massip
Moved head refs to node titles....
r9049 cursor: 'pointer',
href: commit.href
});
if(commit.refs != null && commit.refs.length > 0) {
title = document.createElementNS(revisionGraph.canvas.namespaceURI, 'title');
title.appendChild(document.createTextNode(commit.refs));
revision_dot_overlay.node.appendChild(title);
}
top.push(revision_dot_overlay);
Etienne Massip
Revision graph code cleanup....
r8653 });
top.toFront();
Toshi MARUYAMA
scm: git: mercurial: add a new feature of revision graph (#5501)...
r7605 };