Add "Create Bug Report" action (#267)

This commit is contained in:
1024jp 2014-11-21 04:26:28 +01:00
parent 535ea82942
commit 40dcef31ec
8 changed files with 107 additions and 4 deletions

View File

@ -14,6 +14,7 @@ changelog
- Display a dialog if the opening file is larger than 100 MB.
- Change default value for “Comment always from line head” option to enable.
- Add “Create Bug Report” action to the Help menu.
- Rename labels for line endings.
- Update documents for scripting with AppleScript.

View File

@ -58,6 +58,7 @@
2A3A759419E77D66001DAB88 /* CEMigrationWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A3A759319E77D66001DAB88 /* CEMigrationWindowController.m */; };
2A3FB2AD18ECEFF200D9CB2C /* CESyntaxEditSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A3FB2AC18ECEFF200D9CB2C /* CESyntaxEditSheetController.m */; };
2A42825518FCD47B00386899 /* Acknowledgements.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A961C4518FC699E002076B6 /* Acknowledgements.rtf */; };
2A456C451A1EE38E00395158 /* ReportTemplate.md in Resources */ = {isa = PBXBuildFile; fileRef = 2A456C421A1EDCFC00395158 /* ReportTemplate.md */; };
2A45AB9C1960BDED0020E72B /* Comment.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 2A45AB9B1960BDED0020E72B /* Comment.tiff */; };
2A4DB13D19A265BA005A4F7C /* CEDraggableArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A4DB13C19A265BA005A4F7C /* CEDraggableArrayController.m */; };
2A5411C01983E5FA008B43DA /* CESplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A5411BF1983E5FA008B43DA /* CESplitViewController.m */; };
@ -264,6 +265,8 @@
2A3A759319E77D66001DAB88 /* CEMigrationWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CEMigrationWindowController.m; sourceTree = "<group>"; };
2A3FB2AB18ECEFF200D9CB2C /* CESyntaxEditSheetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CESyntaxEditSheetController.h; sourceTree = "<group>"; };
2A3FB2AC18ECEFF200D9CB2C /* CESyntaxEditSheetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CESyntaxEditSheetController.m; sourceTree = "<group>"; };
2A456C431A1EDCFC00395158 /* en */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = en; path = en.lproj/ReportTemplate.md; sourceTree = "<group>"; };
2A456C441A1EDD0400395158 /* ja */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = ja; path = ja.lproj/ReportTemplate.md; sourceTree = "<group>"; };
2A45AB9B1960BDED0020E72B /* Comment.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Comment.tiff; sourceTree = "<group>"; };
2A47A70B18CC8A7C0076B49A /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/ScriptErrorPanel.xib; sourceTree = "<group>"; };
2A4DB13B19A265BA005A4F7C /* CEDraggableArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEDraggableArrayController.h; sourceTree = "<group>"; };
@ -734,6 +737,7 @@
259C2316077678DE00BA61C5 /* Localizable.strings */,
2A1CFD0B18E5B64F00A5B664 /* Print.strings */,
2AEB8B7A19AF73980098D557 /* FileDropGlossary.txt */,
2A456C421A1EDCFC00395158 /* ReportTemplate.md */,
2A75ACCA19E86DDB00444894 /* CotEditor.sdef */,
2A6E3F3C19B5218300A63E97 /* CotEditor.help */,
2A2179F51A07093B002C4AB1 /* SyntaxMap.json */,
@ -998,6 +1002,7 @@
2A2179F61A07093B002C4AB1 /* SyntaxMap.json in Resources */,
6C6DAE3E13833C0E007F2326 /* dsa_pub.pem in Resources */,
2585914D080F503A0038F387 /* openDictionary.applescript in Resources */,
2A456C451A1EE38E00395158 /* ReportTemplate.md in Resources */,
8D15AC2D0486D014006FF6A4 /* MainMenu.xib in Resources */,
8D15AC2E0486D014006FF6A4 /* DocumentWindow.xib in Resources */,
2A15832118E3814200601026 /* SizeSampleWindow.xib in Resources */,
@ -1368,6 +1373,15 @@
name = MigrationWindow.xib;
sourceTree = "<group>";
};
2A456C421A1EDCFC00395158 /* ReportTemplate.md */ = {
isa = PBXVariantGroup;
children = (
2A456C431A1EDCFC00395158 /* en */,
2A456C441A1EDD0400395158 /* ja */,
);
name = ReportTemplate.md;
sourceTree = "<group>";
};
2A5411C119852C1C008B43DA /* NavigationBar.xib */ = {
isa = PBXVariantGroup;
children = (

View File

@ -629,6 +629,29 @@
}
// ------------------------------------------------------
///
- (IBAction)createBugReport:(id)sender
// ------------------------------------------------------
{
NSBundle *bundle = [NSBundle mainBundle];
NSURL *URL = [bundle URLForResource:@"ReportTemplate" withExtension:@"md"];
NSString *template = [NSString stringWithContentsOfURL:URL encoding:NSUTF8StringEncoding error:nil];
template = [template stringByReplacingOccurrencesOfString:@"%BUNDLE_VERSION%"
withString:[bundle objectForInfoDictionaryKey:@"CFBundleVersion"]];
template = [template stringByReplacingOccurrencesOfString:@"%SHORT_VERSION%"
withString:[bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];
template = [template stringByReplacingOccurrencesOfString:@"%SYSTEM_VERSION%"
withString:[[NSProcessInfo processInfo] operatingSystemVersionString]];
CEDocument *document = [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil];
[[document editor] setString:template];
[[document editor] setSyntaxStyleName:@"Markdown" recolorNow:YES];
[[[document windowController] window] setTitle:NSLocalizedString(@"Bug Report", nil)];
}
#pragma mark Private Methods

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
@ -902,8 +902,14 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="rfZ-hc-oJE"/>
<menuItem title="Report a Bug" id="Bk3-xx-uft">
<menuItem title="Create Bug Report…" id="iHn-Ed-A8u">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="createBugReport:" target="290" id="am0-BQ-ddP"/>
</connections>
</menuItem>
<menuItem title="Report Bug" alternate="YES" id="Bk3-xx-uft">
<modifierMask key="keyEquivalentModifierMask" option="YES"/>
<connections>
<action selector="reportBug:" target="290" id="KOP-ne-blB"/>
</connections>

View File

@ -0,0 +1,25 @@
Fill the following template, and post it on [GitHub Issues](https://github.com/coteditor/CotEditor/issues) or send to <coteditor.github@gmail.com>. Please note that the contents of the sent E-Mail can be shared on the Issue page.
-----------------------------------------------
## Environment
- CotEditor: %SHORT_VERSION% (%BUNDLE_VERSION%)
- System: OS X %SYSTEM_VERSION%
- Language: English
## Short Description
<!-- put your comment here -->
## Steps to Reproduce the Issue
<!-- put your comment here -->
## Expected Result
<!-- put your comment here -->

View File

@ -30,6 +30,9 @@
"Open as Text File" = "テキストファイルとして開く";
"A new theme named “%@” has been successfully installed." = "新しいテーマ“%@”がインストールされました。";
// Bug report
"Bug Report" = "不具合レポート";
// Migration from 1.x
"Restorering menu key bindings settings…" = "メニューキーバインド設定をリセット中…";
"Migrating coloring settings…" = "カラーリング設定を移行中…";

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
@ -902,8 +902,14 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="tV2-Tm-LbD"/>
<menuItem title="不具合を報告" id="qHT-FN-VpY">
<menuItem title="不具合レポートを作成…" id="rxT-7V-vLf">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="createBugReport:" target="290" id="Pgs-QI-0fH"/>
</connections>
</menuItem>
<menuItem title="不具合を報告" alternate="YES" id="qHT-FN-VpY">
<modifierMask key="keyEquivalentModifierMask" option="YES"/>
<connections>
<action selector="reportBug:" target="290" id="cdN-Ah-xEy"/>
</connections>

View File

@ -0,0 +1,25 @@
以下のテンプレートに記入して [GitHub Issues](https://github.com/coteditor/CotEditor/issues) に投稿するか <coteditor.github@gmail.com> にメールをして下さい。送られたメールの内容は Issue ページで公開される可能があります。
-----------------------------------------------
## 環境
- CotEditor: %SHORT_VERSION% (%BUNDLE_VERSION%)
- システム: OS X %SYSTEM_VERSION%
- 言語環境: 日本語
## 簡単な説明
<!-- ここに記入 -->
## 不具合が発生したときに行っていた操作、または再現手順
<!-- ここに記入 -->
## 期待される挙動
<!-- ここに記入 -->