Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Preview when opening the non coding file #102

Merged
merged 15 commits into from
Mar 19, 2022
Merged

Message Preview when opening the non coding file #102

merged 15 commits into from
Mar 19, 2022

Conversation

nanashili
Copy link
Contributor

The current message that shows is not really informative when trying to open unsupported files in the editor. Updated it to give the user more of an idea of why it can't be opened. We should maybe show a popup in the future to that suggest this instead of an empty view.

But once we have extensions going we can prompt the user to install an extension that could help with this.

Screenshot 2022-03-19 at 20 28 58

Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t forget the translation 😊

@@ -40,7 +40,7 @@ struct SideBarItem: View {
}
}
} else {
Text("File cannot be opened")
Text("CodeEditor can currently not open this file type.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t forget to add it to the translations 😊

@nanashili
Copy link
Contributor Author

Don’t forget the translation 😊

Added the translations and added support for an additional language.

@nanashili
Copy link
Contributor Author

Updated with suggested changes!

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend that grammatical change. No need to use "currently". Keep it short and sweet. You may need to retranslate.

@@ -39,3 +39,6 @@
// Welcome Screen - Workspaces
"Open a project or file"="Адкрыйце праект або файл";
"Open an existing project or file on your Mac"="Адкрыйце існуючы праект або файл на вашым Mac";

//Editor Screen
"CodeEditor can currently not open this file type." = "Зараз CodeEditor не можа адкрыць файл гэтага тыпу.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"CodeEditor can currently not open this file type." = "Зараз CodeEditor не можа адкрыць файл гэтага тыпу.";
"CodeEdit cannot open this file type." = "Зараз CodeEditor не можа адкрыць файл гэтага тыпу.";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot is not something you want to say, whereas 'can currently not' suggests that it will eventually support the file type preview if it makes sense?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"can currently not" does not make grammatical sense in English, it would instead be "currently cannot". I don't know if we want to imply that we will one day support file types that we might never support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense... Idk our English is very different from most countries. But makes sense and I get you. The requested changes were made

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, technically we are opening a file of that specific file type rather than opening the file type itself. So it might say something like "CodeEdit cannot open this file because it's file type is not supported."

@@ -39,3 +39,6 @@
// Welcome Screen - Workspaces
"Open an existing project or file on your Mac"="Vorhandenes Projekt oder Datei auf Mac öffnen";
"Show this window when CodeEdit launches"="Zeigen wenn CodeEdit geöffnet wird";

//Editor Screen
"CodeEditor can currently not open this file type." = "CodeEditor kann diesen Dateityp derzeit nicht öffnen.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"CodeEditor can currently not open this file type." = "CodeEditor kann diesen Dateityp derzeit nicht öffnen.";
"CodeEdit cannot open this file type." = "CodeEditor kann diesen Dateityp derzeit nicht öffnen.";

@@ -39,3 +39,6 @@
// Welcome Screen - Workspaces
"Open an existing project or file on your Mac"="Open an existing project or file on your Mac";
"Show this window when CodeEdit launches"="Show this window when CodeEdit launches";

//Editor Screen
"CodeEditor can currently not open this file type." = "CodeEditor can currently not open this file type.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"CodeEditor can currently not open this file type." = "CodeEditor can currently not open this file type.";
"CodeEdit cannot open this file type." = "CodeEdit cannot open this file type.";

@@ -39,3 +39,6 @@
// Welcome Screen - Workspaces
"Open a project or file"="Откройте проект или файл";
"Open an existing project or file on your Mac"="Откройте существующий проект или файл на вашем Mac";

//Editor Screen
"CodeEditor can currently not open this file type." = "Сейчас CodeEditor не может открыть файл этого типа.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"CodeEditor can currently not open this file type." = "Сейчас CodeEditor не может открыть файл этого типа.";
"CodeEdit cannot open this file type." = "Сейчас CodeEditor не может открыть файл этого типа.";

"Show this window when CodeEdit launches"="Wys hierdie venster wanneer CodeEdit begin";

//Editor Screen
"CodeEditor can currently not open this file type." = "CodeEditor kan tans nie hierdie lêertipe oopmaak nie.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"CodeEditor can currently not open this file type." = "CodeEditor kan tans nie hierdie lêertipe oopmaak nie.";
"CodeEdit cannot open this file type." = "CodeEditor kan tans nie hierdie lêertipe oopmaak nie.";

@austincondiff austincondiff merged commit 1c3132e into CodeEditApp:main Mar 19, 2022
austincondiff pushed a commit that referenced this pull request Mar 20, 2022
* Cleaned up the typography for Welcome Screen

* Added support for more code editor themes

* Revert "Added support for more code editor themes"

This reverts commit 8139217.

* Revert "Cleaned up the typography for Welcome Screen"

This reverts commit 78b748b.

* Update the error message to be more informative when trying to open files that are not code related

* Added language translations for editor error and support for the Afrikaans Language

* Fixed localization changes in Russian and Belarusian

* Updated the editor error string to be short and sweet

* Update to editor error for file types.
austincondiff added a commit that referenced this pull request Mar 21, 2022
* Improved overall tab style to feel more native to macOS

* Fixed lint error

* More lint error fixes

* More lint error fixes

* More liner error fixes

* Create CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Fix "Welcome to CodeEdit" Main Menu item (#106)

* Fix data format (#105)

* Allow opening of `public.item` instead of `public.source-code`

* Handle errors

* Message Preview when opening the non coding file (#102)

* Cleaned up the typography for Welcome Screen

* Added support for more code editor themes

* Revert "Added support for more code editor themes"

This reverts commit 8139217.

* Revert "Cleaned up the typography for Welcome Screen"

This reverts commit 78b748b.

* Update the error message to be more informative when trying to open files that are not code related

* Added language translations for editor error and support for the Afrikaans Language

* Fixed localization changes in Russian and Belarusian

* Updated the editor error string to be short and sweet

* Update to editor error for file types.

* Change document types priority, prioritize workspace over source code file to fix #110

* Fix multiple welcome window

* Fix version localization key (#120)

* Improved overall tab style to feel more native to macOS

* Fixed lint error

* More lint error fixes

* Replicating aesthetic and behavior of standard tabs. Removed wrapper component so that code is more straightforward.

* Update WorkspaceCodeFileView.swift

Resolved conflicts

* Fixed lint errors and animations

* Added PressActionsModifier file to project

* Added PressActionsModifier.swift

* Fixed lint error

* Fixed lint error

Co-authored-by: Luke <lukas@pistrol.com>
Co-authored-by: Pavel Kasila <pavel.kasila@gmail.com>
Co-authored-by: Nanashi Li <tihan-nico@plexus.dev>
Co-authored-by: Ziyuan Zhao <ninjiacoder@gmail.com>
xinix909 pushed a commit to xinix909/CodeTransfer that referenced this pull request Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants