mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Replace “content” with “contents”
This commit is contained in:
parent
1753f82120
commit
048a3030f3
10
CHANGELOG.md
10
CHANGELOG.md
@ -282,7 +282,7 @@
|
|||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
- When the file encoding is incompatible with the document content, display a notification instead of silently overwriting the document file with lossy data in autosaving until the user explicitly allows it.
|
- When the file encoding is incompatible with the document contents, display a notification instead of silently overwriting the document file with lossy data in autosaving until the user explicitly allows it.
|
||||||
- Suppress displaying the dialog for saving in an incompatible encoding when the user once allowed it.
|
- Suppress displaying the dialog for saving in an incompatible encoding when the user once allowed it.
|
||||||
- Update the C syntax to improve highlighting numbers.
|
- Update the C syntax to improve highlighting numbers.
|
||||||
- Deprecate the future to interpret `Shift_JIS` as Shift JIS or Shift JIS X0213 according to the user's priority setting when referring to encoding declarations in documents in encoding detection.
|
- Deprecate the future to interpret `Shift_JIS` as Shift JIS or Shift JIS X0213 according to the user's priority setting when referring to encoding declarations in documents in encoding detection.
|
||||||
@ -1880,7 +1880,7 @@
|
|||||||
- Live update selection counts while moving the selection.
|
- Live update selection counts while moving the selection.
|
||||||
- Scroll editor by swiping the line number area.
|
- Scroll editor by swiping the line number area.
|
||||||
- Previously, CotEditor scripts written in Unix scripts, such as Ruby or Python, were decoded using the user-preferred file-encoding set in the Format preferences pane for normal documents, now they are always interpreted as UTF-8.
|
- Previously, CotEditor scripts written in Unix scripts, such as Ruby or Python, were decoded using the user-preferred file-encoding set in the Format preferences pane for normal documents, now they are always interpreted as UTF-8.
|
||||||
- Avoid showing the "edited" indicator in the close button of document windows when the document content is empty and therefore can close the window without the confirmation dialog.
|
- Avoid showing the "edited" indicator in the close button of document windows when the document contents are empty and therefore can close the window without the confirmation dialog.
|
||||||
- Remove the toolbar button to toggle page guide visibility.
|
- Remove the toolbar button to toggle page guide visibility.
|
||||||
- Remove feature to import legacy syntax style definition files of which format was used in CotEditor 1.x.
|
- Remove feature to import legacy syntax style definition files of which format was used in CotEditor 1.x.
|
||||||
- [trivial] Improve tooltips of toolbar icons to reflect the current document state.
|
- [trivial] Improve tooltips of toolbar icons to reflect the current document state.
|
||||||
@ -2510,7 +2510,7 @@ no change.
|
|||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
- Add new variable “file content” to File Drop feature to insert the file content when the dropped file is a text file.
|
- Add new variable “file content” to File Drop feature to insert the file contents when the dropped file is a text file.
|
||||||
|
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
@ -5143,7 +5143,7 @@ no change.
|
|||||||
- Add stylesheet keyword to color code type.
|
- Add stylesheet keyword to color code type.
|
||||||
- Add stylesheet keyword color list to editor panel.
|
- Add stylesheet keyword color list to editor panel.
|
||||||
- Make editor panel resizable.
|
- Make editor panel resizable.
|
||||||
- Now syntax style is automatically set to XML on file opening if no appropriate style can be found but the file content starts with an XML declaration.
|
- Now syntax style is automatically set to XML on file opening if no appropriate style can be found but the file contents start with an XML declaration.
|
||||||
- Update word completion list setting in Edit pane in Preferences (The previous setting has been reset).
|
- Update word completion list setting in Edit pane in Preferences (The previous setting has been reset).
|
||||||
- Support “swipe to delete” for some tables in Preferences on El Capitan.
|
- Support “swipe to delete” for some tables in Preferences on El Capitan.
|
||||||
- Improve contextual menu for theme list on preferences.
|
- Improve contextual menu for theme list on preferences.
|
||||||
@ -5184,7 +5184,7 @@ no change.
|
|||||||
- __for advanced users__: In this feature, CotEditor saves an *extended attribute* which named `com.coteditor.VerticalText` to the file *only when* the editor's text orientation is vertical. You can even disable the feature running the command `defaults write com.coteditor.CotEditor savesTextOrientation -bool NO` in Terminal.
|
- __for advanced users__: In this feature, CotEditor saves an *extended attribute* which named `com.coteditor.VerticalText` to the file *only when* the editor's text orientation is vertical. You can even disable the feature running the command `defaults write com.coteditor.CotEditor savesTextOrientation -bool NO` in Terminal.
|
||||||
- Line number view for vertical text orientation.
|
- Line number view for vertical text orientation.
|
||||||
- Print with vertical text orientation.
|
- Print with vertical text orientation.
|
||||||
- Add interpreter name list to the syntax style definition to determine syntax style from the shebang in the file content for in case when syntax style cannot be determined from the file name.
|
- Add interpreter name list to the syntax style definition to determine syntax style from the shebang in the file contents for in case when syntax style cannot be determined from the file name.
|
||||||
- From this change, some of the bundled syntax styles are also updated.
|
- From this change, some of the bundled syntax styles are also updated.
|
||||||
- Add `encoding:` and `coding:` to the encoding declaration keywords which will be used on encoding auto-detection (interpreting priorities are: `charset=` > `encoding=` > `@charset` > `encoding:` > `coding:`).
|
- Add `encoding:` and `coding:` to the encoding declaration keywords which will be used on encoding auto-detection (interpreting priorities are: `charset=` > `encoding=` > `@charset` > `encoding:` > `coding:`).
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@
|
|||||||
<h2>Improvements</h2>
|
<h2>Improvements</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>When the file encoding is incompatible with the document content, display a notification instead of silently overwriting the document file with lossy data in autosaving until the user explicitly allows it.</li>
|
<li>When the file encoding is incompatible with the document contents, display a notification instead of silently overwriting the document file with lossy data in autosaving until the user explicitly allows it.</li>
|
||||||
<li>Suppress displaying the dialog for saving in an incompatible encoding when the user once allowed it.</li>
|
<li>Suppress displaying the dialog for saving in an incompatible encoding when the user once allowed it.</li>
|
||||||
<li>Update the C syntax to improve highlighting numbers.</li>
|
<li>Update the C syntax to improve highlighting numbers.</li>
|
||||||
<li>Deprecate the future to interpret <code>Shift_JIS</code> as Shift JIS or Shift JIS X0213 according to the user’s priority setting when referring to encoding declarations in documents in encoding detection.</li>
|
<li>Deprecate the future to interpret <code>Shift_JIS</code> as Shift JIS or Shift JIS X0213 according to the user’s priority setting when referring to encoding declarations in documents in encoding detection.</li>
|
||||||
@ -2230,7 +2230,7 @@
|
|||||||
<li>Scroll editor by swiping the line number area.</li>
|
<li>Scroll editor by swiping the line number area.</li>
|
||||||
<li>Reduce the priority that CotEditor implicitly becomes the default application for specific file types.</li>
|
<li>Reduce the priority that CotEditor implicitly becomes the default application for specific file types.</li>
|
||||||
<li>Previously, CotEditor scripts written in Unix scripts, such as Ruby or Python, were decoded using the user-preferred file-encoding set in the Format preferences pane for normal documents, now they are always interpreted as UTF-8.</li>
|
<li>Previously, CotEditor scripts written in Unix scripts, such as Ruby or Python, were decoded using the user-preferred file-encoding set in the Format preferences pane for normal documents, now they are always interpreted as UTF-8.</li>
|
||||||
<li>Avoid showing the “edited” indicator in the close button of document windows when the document content is empty and therefore can close the window without the confirmation dialog.</li>
|
<li>Avoid showing the “edited” indicator in the close button of document windows when the document contents are empty and therefore can close the window without the confirmation dialog.</li>
|
||||||
<li>Avoid discarding the current input when a new item is added while another item is in editing in the syntax style editor.</li>
|
<li>Avoid discarding the current input when a new item is added while another item is in editing in the syntax style editor.</li>
|
||||||
<li>Round the corners of current line highlight.</li>
|
<li>Round the corners of current line highlight.</li>
|
||||||
<li>Put only the filename rather than the absolute path for the relative path insertion (<code><<<RELATIVE-PATH>>></code>) when the document file itself is dropped into the editor.</li>
|
<li>Put only the filename rather than the absolute path for the relative path insertion (<code><<<RELATIVE-PATH>>></code>) when the document file itself is dropped into the editor.</li>
|
||||||
@ -3063,7 +3063,7 @@
|
|||||||
<h2>New Features</h2>
|
<h2>New Features</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Add new variable “file content” to File Drop feature to insert the file content when the dropped file is a text file.</li>
|
<li>Add new variable “file content” to File Drop feature to insert the file contents when the dropped file is a text file.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -6319,7 +6319,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><strong>for advanced users</strong>: In this feature, CotEditor saves an <i>extended attribute</i> which named <code>com.coteditor.VerticalText</code> to the file <strong>only when</strong> the editor’s text orientation is vertical. You can even disable the feature running the command <code>defaults write com.coteditor.CotEditor savesTextOrientation -bool NO</code> in Terminal.</li>
|
<li><strong>for advanced users</strong>: In this feature, CotEditor saves an <i>extended attribute</i> which named <code>com.coteditor.VerticalText</code> to the file <strong>only when</strong> the editor’s text orientation is vertical. You can even disable the feature running the command <code>defaults write com.coteditor.CotEditor savesTextOrientation -bool NO</code> in Terminal.</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>Add interpreter name list to the syntax style definition to determine syntax style from the shebang in the file content for in case when syntax style cannot be determined from the file name.</li>
|
<li>Add interpreter name list to the syntax style definition to determine syntax style from the shebang in the file contents for in case when syntax style cannot be determined from the file name.</li>
|
||||||
<ul>
|
<ul>
|
||||||
<li>From this change, some of the bundled syntax styles are also updated.</li>
|
<li>From this change, some of the bundled syntax styles are also updated.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -6367,7 +6367,7 @@
|
|||||||
<li>Add stylesheet keyword color list to editor panel.</li>
|
<li>Add stylesheet keyword color list to editor panel.</li>
|
||||||
<li>Make editor panel resizable.</li>
|
<li>Make editor panel resizable.</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>Now syntax style is automatically set to XML on file opening if no appropriate style can be found but the file content starts with an XML declaration.</li>
|
<li>Now syntax style is automatically set to XML on file opening if no appropriate style can be found but the file contents start with an XML declaration.</li>
|
||||||
<li>Update Swift syntax style:
|
<li>Update Swift syntax style:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Add new terms available in Swift 2.0.</li>
|
<li>Add new terms available in Swift 2.0.</li>
|
||||||
|
@ -222,7 +222,7 @@ This issue doesn’t occur with plain-text AppleScript (.applescript). </p>
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3>Selection object directly under the application</h3>
|
<h3>Selection object directly under the application</h3>
|
||||||
<p>In version 0.6, the initial release of CotEditor, if you didn’t specify the ‘selection’ object, the frontmost window’s contents is selected. But it actually didn’t work correctly and therefore deprecated. This method was kept valid however to maintain backward compatibility.</p>
|
<p>In version 0.6, the initial release of CotEditor, if you didn’t specify the ‘selection’ object, the frontmost window’s contents are selected. But it actually didn’t work correctly and therefore deprecated. This method was kept valid however to maintain backward compatibility.</p>
|
||||||
<p>On CotEditor 1.5, it is formally removed. Specify the target like below, when you get the ‘selection’ object.</p>
|
<p>On CotEditor 1.5, it is formally removed. Specify the target like below, when you get the ‘selection’ object.</p>
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
|
@ -36,12 +36,12 @@
|
|||||||
<li>e.g., makefile → Makefile</li>
|
<li>e.g., makefile → Makefile</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>Shebang in the first line of the document<ul>
|
<li>Shebang in the first line of the document<ul>
|
||||||
<li>When there is no corresponding syntax for the extension and the filename, and if the first line of the document content is a shebang, then try determining syntax from the shebang. In this trial, the interpreter names which is defined in the syntaxes are used. The interpreter can be either the last part of the path just after <code>#!</code> or the next term to the path if the path targets <code>env</code>.</li>
|
<li>When there is no corresponding syntax for the extension and the filename, and if the first line of the document contents are a shebang, then try determining syntax from the shebang. In this trial, the interpreter names which is defined in the syntaxes are used. The interpreter can be either the last part of the path just after <code>#!</code> or the next term to the path if the path targets <code>env</code>.</li>
|
||||||
<li>e.g., <code>#!/usr/bin/perl</code> → Perl (interpreter: <code>perl</code>)</li>
|
<li>e.g., <code>#!/usr/bin/perl</code> → Perl (interpreter: <code>perl</code>)</li>
|
||||||
<li>e.g., <code>#!/usr/bin/env python3</code> → Python (interpreter: <code>python3</code>)</li>
|
<li>e.g., <code>#!/usr/bin/env python3</code> → Python (interpreter: <code>python3</code>)</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>XML declaration<ul>
|
<li>XML declaration<ul>
|
||||||
<li>When there is no corresponding syntax up to here but the file content starts with an XML declaration, syntax is automatically set to XML.</li>
|
<li>When there is no corresponding syntax up to here but the file contents start with an XML declaration, syntax is automatically set to XML.</li>
|
||||||
<li>e.g., <code><?xml version="1.0" encoding="utf-8"?></code> → XML</li>
|
<li>e.g., <code><?xml version="1.0" encoding="utf-8"?></code> → XML</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>None<ul>
|
<li>None<ul>
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"FileDropItem.Variable.fileContent.description" : {
|
"FileDropItem.Variable.fileContents.description" : {
|
||||||
"extractionState" : "extracted_with_value",
|
"extractionState" : "extracted_with_value",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"cs" : {
|
"cs" : {
|
||||||
@ -185,13 +185,13 @@
|
|||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "new",
|
"state" : "new",
|
||||||
"value" : "(If the dropped file is a text file) file content."
|
"value" : "(If the dropped file is a text file) file contents."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"en-GB" : {
|
"en-GB" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "(If the dropped file is a text file) file content."
|
"value" : "(If the dropped file is a text file) file contents."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"es" : {
|
"es" : {
|
||||||
|
@ -124,12 +124,12 @@ extension FileDropItem {
|
|||||||
case fileExtensionLowercase = "FILEEXTENSION-LOWER"
|
case fileExtensionLowercase = "FILEEXTENSION-LOWER"
|
||||||
case fileExtensionUppercase = "FILEEXTENSION-UPPER"
|
case fileExtensionUppercase = "FILEEXTENSION-UPPER"
|
||||||
case directory = "DIRECTORY"
|
case directory = "DIRECTORY"
|
||||||
case fileContent = "FILECONTENT"
|
case fileContents = "FILECONTENT"
|
||||||
case imageWidth = "IMAGEWIDTH"
|
case imageWidth = "IMAGEWIDTH"
|
||||||
case imageHeight = "IMAGEHEIGHT"
|
case imageHeight = "IMAGEHEIGHT"
|
||||||
|
|
||||||
static let pathTokens: [Self] = [.absolutePath, .relativePath, .filename, .filenameWithoutExtension, .fileExtension, .fileExtensionLowercase, .fileExtensionUppercase, .directory]
|
static let pathTokens: [Self] = [.absolutePath, .relativePath, .filename, .filenameWithoutExtension, .fileExtension, .fileExtensionLowercase, .fileExtensionUppercase, .directory]
|
||||||
static let textTokens: [Self] = [.fileContent]
|
static let textTokens: [Self] = [.fileContents]
|
||||||
static let imageTokens: [Self] = [.imageWidth, .imageHeight]
|
static let imageTokens: [Self] = [.imageWidth, .imageHeight]
|
||||||
|
|
||||||
|
|
||||||
@ -168,9 +168,9 @@ extension FileDropItem {
|
|||||||
String(localized: "FileDropItem.Variable.directory.description",
|
String(localized: "FileDropItem.Variable.directory.description",
|
||||||
defaultValue: "The parent directory name of dropped file.",
|
defaultValue: "The parent directory name of dropped file.",
|
||||||
table: "FileDropItem")
|
table: "FileDropItem")
|
||||||
case .fileContent:
|
case .fileContents:
|
||||||
String(localized: "FileDropItem.Variable.fileContent.description",
|
String(localized: "FileDropItem.Variable.fileContents.description",
|
||||||
defaultValue: "(If the dropped file is a text file) file content.",
|
defaultValue: "(If the dropped file is a text file) file contents.",
|
||||||
table: "FileDropItem")
|
table: "FileDropItem")
|
||||||
case .imageWidth:
|
case .imageWidth:
|
||||||
String(localized: "FileDropItem.Variable.imageWidth.description",
|
String(localized: "FileDropItem.Variable.imageWidth.description",
|
||||||
@ -222,10 +222,10 @@ extension FileDropItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get text content if needed
|
// get text content if needed
|
||||||
// -> Replace this at last because the file content can contain other tokens.
|
// -> Replace this at last because the file contents can contain other tokens.
|
||||||
if self.format.contains(Variable.fileContent.token) {
|
if self.format.contains(Variable.fileContents.token) {
|
||||||
let content = try? String(contentsOf: droppedFileURL)
|
let contents = try? String(contentsOf: droppedFileURL)
|
||||||
dropText = dropText.replacing(Variable.fileContent.token, with: content ?? "")
|
dropText = dropText.replacing(Variable.fileContents.token, with: contents ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
return dropText
|
return dropText
|
||||||
|
Loading…
Reference in New Issue
Block a user