diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6e71b83..22101c7b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/CotEditor/CotEditor.xcodeproj/project.pbxproj b/CotEditor/CotEditor.xcodeproj/project.pbxproj index e55fce8a8..18543fce0 100644 --- a/CotEditor/CotEditor.xcodeproj/project.pbxproj +++ b/CotEditor/CotEditor.xcodeproj/project.pbxproj @@ -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 = ""; }; 2A3FB2AB18ECEFF200D9CB2C /* CESyntaxEditSheetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CESyntaxEditSheetController.h; sourceTree = ""; }; 2A3FB2AC18ECEFF200D9CB2C /* CESyntaxEditSheetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CESyntaxEditSheetController.m; sourceTree = ""; }; + 2A456C431A1EDCFC00395158 /* en */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = en; path = en.lproj/ReportTemplate.md; sourceTree = ""; }; + 2A456C441A1EDD0400395158 /* ja */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = ja; path = ja.lproj/ReportTemplate.md; sourceTree = ""; }; 2A45AB9B1960BDED0020E72B /* Comment.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Comment.tiff; sourceTree = ""; }; 2A47A70B18CC8A7C0076B49A /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/ScriptErrorPanel.xib; sourceTree = ""; }; 2A4DB13B19A265BA005A4F7C /* CEDraggableArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEDraggableArrayController.h; sourceTree = ""; }; @@ -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 = ""; }; + 2A456C421A1EDCFC00395158 /* ReportTemplate.md */ = { + isa = PBXVariantGroup; + children = ( + 2A456C431A1EDCFC00395158 /* en */, + 2A456C441A1EDD0400395158 /* ja */, + ); + name = ReportTemplate.md; + sourceTree = ""; + }; 2A5411C119852C1C008B43DA /* NavigationBar.xib */ = { isa = PBXVariantGroup; children = ( diff --git a/CotEditor/Sources/CEAppDelegate.m b/CotEditor/Sources/CEAppDelegate.m index 79c7c4159..702c11573 100644 --- a/CotEditor/Sources/CEAppDelegate.m +++ b/CotEditor/Sources/CEAppDelegate.m @@ -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 diff --git a/CotEditor/en.lproj/MainMenu.xib b/CotEditor/en.lproj/MainMenu.xib index 83d1d15b7..c97a74025 100644 --- a/CotEditor/en.lproj/MainMenu.xib +++ b/CotEditor/en.lproj/MainMenu.xib @@ -1,5 +1,5 @@ - + @@ -902,8 +902,14 @@ - + + + + + + + diff --git a/CotEditor/en.lproj/ReportTemplate.md b/CotEditor/en.lproj/ReportTemplate.md new file mode 100644 index 000000000..c1f2e3a6c --- /dev/null +++ b/CotEditor/en.lproj/ReportTemplate.md @@ -0,0 +1,25 @@ + +Fill the following template, and post it on [GitHub Issues](https://github.com/coteditor/CotEditor/issues) or send to . 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 + + + + +## Steps to Reproduce the Issue + + + + +## Expected Result + + diff --git a/CotEditor/ja.lproj/Localizable.strings b/CotEditor/ja.lproj/Localizable.strings index 9030a2347..b5bde2596 100644 --- a/CotEditor/ja.lproj/Localizable.strings +++ b/CotEditor/ja.lproj/Localizable.strings @@ -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…" = "カラーリング設定を移行中…"; diff --git a/CotEditor/ja.lproj/MainMenu.xib b/CotEditor/ja.lproj/MainMenu.xib index abc65aedd..7c43a4c83 100644 --- a/CotEditor/ja.lproj/MainMenu.xib +++ b/CotEditor/ja.lproj/MainMenu.xib @@ -1,5 +1,5 @@ - + @@ -902,8 +902,14 @@ - + + + + + + + diff --git a/CotEditor/ja.lproj/ReportTemplate.md b/CotEditor/ja.lproj/ReportTemplate.md new file mode 100644 index 000000000..5bd96d29b --- /dev/null +++ b/CotEditor/ja.lproj/ReportTemplate.md @@ -0,0 +1,25 @@ + +以下のテンプレートに記入して [GitHub Issues](https://github.com/coteditor/CotEditor/issues) に投稿するか にメールをして下さい。送られたメールの内容は Issue ページで公開される可能があります。 + +----------------------------------------------- + +## 環境 + +- CotEditor: %SHORT_VERSION% (%BUNDLE_VERSION%) +- システム: OS X %SYSTEM_VERSION% +- 言語環境: 日本語 + + +## 簡単な説明 + + + + +## 不具合が発生したときに行っていた操作、または再現手順 + + + + +## 期待される挙動 + +