Replace “content” with “contents”

This commit is contained in:
1024jp 2024-07-05 11:52:54 +09:00
parent 1753f82120
commit 048a3030f3
6 changed files with 25 additions and 25 deletions

View File

@ -282,7 +282,7 @@
### 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.
- 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.
@ -1880,7 +1880,7 @@
- Live update selection counts while moving the selection.
- 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.
- 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 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.
@ -2510,7 +2510,7 @@ no change.
### 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
@ -5143,7 +5143,7 @@ no change.
- Add stylesheet keyword to color code type.
- Add stylesheet keyword color list to editor panel.
- 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).
- Support “swipe to delete” for some tables in Preferences on El Capitan.
- 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.
- Line number view for 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.
- 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:`).

View File

@ -371,7 +371,7 @@
<h2>Improvements</h2>
<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>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 users 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>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>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>Round the corners of current line highlight.</li>
<li>Put only the filename rather than the absolute path for the relative path insertion (<code>&lt;&lt;&lt;RELATIVE-PATH&gt;&gt;&gt;</code>) when the document file itself is dropped into the editor.</li>
@ -3063,7 +3063,7 @@
<h2>New Features</h2>
<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>
</section>
@ -6319,7 +6319,7 @@
<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 editors 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>
<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>
<li>From this change, some of the bundled syntax styles are also updated.</li>
</ul>
@ -6367,7 +6367,7 @@
<li>Add stylesheet keyword color list to editor panel.</li>
<li>Make editor panel resizable.</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:
<ul>
<li>Add new terms available in Swift 2.0.</li>

View File

@ -222,7 +222,7 @@ This issue doesnt occur with plain-text AppleScript (.applescript). </p>
<section>
<h3>Selection object directly under the application</h3>
<p>In version 0.6, the initial release of CotEditor, if you didnt specify the selection object, the frontmost windows contents is selected. But it actually didnt 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 didnt specify the selection object, the frontmost windows contents are selected. But it actually didnt 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>
<figure>

View File

@ -36,12 +36,12 @@
<li>e.g., makefile → Makefile</li>
</ul></li>
<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/env python3</code> → Python (interpreter: <code>python3</code>)</li>
</ul></li>
<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>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</code> → XML</li>
</ul></li>
<li>None<ul>

View File

@ -167,7 +167,7 @@
}
}
},
"FileDropItem.Variable.fileContent.description" : {
"FileDropItem.Variable.fileContents.description" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"cs" : {
@ -185,13 +185,13 @@
"en" : {
"stringUnit" : {
"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" : {
"stringUnit" : {
"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" : {

View File

@ -124,12 +124,12 @@ extension FileDropItem {
case fileExtensionLowercase = "FILEEXTENSION-LOWER"
case fileExtensionUppercase = "FILEEXTENSION-UPPER"
case directory = "DIRECTORY"
case fileContent = "FILECONTENT"
case fileContents = "FILECONTENT"
case imageWidth = "IMAGEWIDTH"
case imageHeight = "IMAGEHEIGHT"
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]
@ -168,9 +168,9 @@ extension FileDropItem {
String(localized: "FileDropItem.Variable.directory.description",
defaultValue: "The parent directory name of dropped file.",
table: "FileDropItem")
case .fileContent:
String(localized: "FileDropItem.Variable.fileContent.description",
defaultValue: "(If the dropped file is a text file) file content.",
case .fileContents:
String(localized: "FileDropItem.Variable.fileContents.description",
defaultValue: "(If the dropped file is a text file) file contents.",
table: "FileDropItem")
case .imageWidth:
String(localized: "FileDropItem.Variable.imageWidth.description",
@ -222,10 +222,10 @@ extension FileDropItem {
}
// get text content if needed
// -> Replace this at last because the file content can contain other tokens.
if self.format.contains(Variable.fileContent.token) {
let content = try? String(contentsOf: droppedFileURL)
dropText = dropText.replacing(Variable.fileContent.token, with: content ?? "")
// -> Replace this at last because the file contents can contain other tokens.
if self.format.contains(Variable.fileContents.token) {
let contents = try? String(contentsOf: droppedFileURL)
dropText = dropText.replacing(Variable.fileContents.token, with: contents ?? "")
}
return dropText