-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Combine jdiel's "language switching" pull request with tvoliter's templatization of index.html using mustache #1358
Changes from all commits
da48df8
5f2c46f
e319956
c3a9992
c387fc0
a388de1
ee3a6de
b4338bd
6ecb6d9
545c15b
c155b92
a5440c2
6593119
71c97d6
ea0ba01
bf7c36b
1e2c63d
cb74555
baa2c8f
ada344b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
<!-- | ||
Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
--> | ||
|
||
|
||
<!-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needs copyright header There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks good There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm getting a jslint error for this html template fragment. I'm not sure what the solution is though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed this too. I think JSLint expects it to be a fully formed html structure since it sees the .html suffix. Since this is really an html fragment it doesn’t have or tags. I don’t know if the JSLint options you can put in comments work in HTML comments. |
||
This is the HTML for the body tag of index.html. It is loaded dynamically by the | ||
htmlContentLoad module and localized using a combination of mustache.js and i18n.js. | ||
|
||
LOCALIZATION NOTE: | ||
All display text for this file must use templating so the text can be localized. | ||
|
||
English text goes in src/nls/strings.js. All other translations go in the strings.js file for | ||
the specific local in the nls folder. If a translation is missing for a specific key English | ||
is used as a fallback | ||
|
||
Strings should be referenced using the double brackets syntax. | ||
Example: {{keyname}}. Note, all strings are HTML escaped unless the form | ||
{{&keyname}} is used. | ||
|
||
--> | ||
|
||
<!-- Main UI --> | ||
<div class="main-view"> | ||
<div id="sidebar-resizer"></div> | ||
<div id="sidebar" class="sidebar quiet-scrollbars"> | ||
<!-- Left-hand 'Project panel' --> | ||
<div id="projects" class="panel"> | ||
<div id="project-header"></div> | ||
<div id="file-section"> | ||
<div id="open-files-container"> | ||
<!-- This will contain a dynamically generated <ul> at runtime --> | ||
<ul> | ||
</ul> | ||
</div> | ||
|
||
<div id="project-files-header" class="project-file-header-area"> | ||
<span id="project-title" class="title"></span> | ||
</div> | ||
<div id="project-files-container"> | ||
<!-- This will contain a dynamically generated <ul> hierarchy at runtime --> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Right-hand content: toolbar, editor, bottom panels --> | ||
<div class="content"> | ||
<!-- Toolbar containing menus, filename, and icons --> | ||
<div id="main-toolbar" class="toolbar"> | ||
<!-- Menu bar --> | ||
<ul class="nav" data-dropdown="dropdown"> | ||
</ul> | ||
|
||
<!-- Toolbar --> | ||
<div class="buttons"> | ||
<span class="experimental-label">{{EXPERIMENTAL_BUILD}}</span> | ||
|
||
<a href="#" id="toolbar-go-live"></a> <!-- tooltip for this is set in JS --> | ||
|
||
<span id="gold-star" title="No JSLint errors - good job!"> | ||
★ | ||
</span> | ||
</div> | ||
|
||
<!-- Filename label --> | ||
<div class="title-wrapper"> | ||
<span class="title"></span> <span class='dirty-dot' style="visibility:hidden;">•</span> | ||
</div> | ||
</div> | ||
|
||
<div id="editor-holder"> | ||
<div id="not-editor"> | ||
<div id="not-editor-content">[ ]</div> | ||
</div> | ||
</div> | ||
|
||
<div id="jslint-results" class="bottom-panel"> | ||
<div class="toolbar simple-toolbar-layout"> | ||
<div class="title">{{JSLINT_ERRORS}}</div> | ||
</div> | ||
<div class="table-container"></div> | ||
</div> | ||
<div id="search-results" class="bottom-panel"> | ||
<div class="toolbar simple-toolbar-layout"> | ||
<div class="title">{{SEARCH_RESULTS}}</div> | ||
<div class="title" id="search-result-summary"></div> | ||
<a href="#" class="close">×</a> | ||
</div> | ||
<div class="table-container"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Modal Windows --> | ||
<div class="error-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<a href="#" class="close">×</a> | ||
<h1 class="dialog-title">Error</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<p class="dialog-message">Message goes here</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{OK}}</a> | ||
</div> | ||
</div> | ||
<div class="save-close-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<a href="#" class="close">×</a> | ||
<h1 class="dialog-title">{{SAVE_CHANGES}}</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<p class="dialog-message">Message goes here</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="dontsave">{{DONT_SAVE}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{SAVE}}</a> | ||
<a href="#" class="dialog-button btn" data-button-id="cancel">{{CANCEL}}</a> | ||
</div> | ||
</div> | ||
<div class="ext-changed-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">Title goes here</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<p class="dialog-message">Message goes here</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="dontsave">{{RELOAD_FROM_DISK}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="cancel">{{KEEP_CHANGES_IN_EDITOR}}</a> | ||
</div> | ||
</div> | ||
<div class="ext-deleted-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">Title goes here</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<p class="dialog-message">Message goes here</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="dontsave">{{CLOSE_DONT_SAVE}}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="cancel">{{KEEP_CHANGES_IN_EDITOR}}</a> | ||
</div> | ||
</div> | ||
<div class="live-development-error-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">Title goes here</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<p class="dialog-message">Message goes here</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="cancel">{{CANCEL}}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{RELAUNCH_CHROME}}</a> | ||
</div> | ||
</div> | ||
<div class="about-dialog template modal hide"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">{{ABOUT}}</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<img class="about-icon" src="styles/images/brackets_icon.svg"> | ||
<div class="about-text"> | ||
<h2>{{BRACKETS}}</h2> | ||
<p class="dialog-message">{{ABOUT_TEXT_LINE1}} <span id="about-build-number"><!-- populated programmatically --></span></p> | ||
<p class="dialog-message">{{ABOUT_TEXT_LINE2}}</p> | ||
<p class="dialog-message">{{ABOUT_TEXT_LINE3}}<span class="non-clickble-link">http://www.adobe.com/go/thirdparty/</span>{{ABOUT_TEXT_LINE4}}</p> | ||
<p class="dialog-message">{{ABOUT_TEXT_LINE5}}<span class="non-clickble-link">https://github.com/adobe/brackets/</span></p> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{CLOSE}}</a> | ||
</div> | ||
</div> | ||
<div id="context-menu-bar"> | ||
<ul data-dropdown="dropdown"></ul> | ||
</div> | ||
<div id="codehint-menu-bar"> | ||
<ul data-dropdown="dropdown"></ul> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll file a general issue to move blocks such as this one into a template.