-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
272 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: swift | ||
osx_image: xcode10 | ||
xcode_project: TranslateBar.xcworkspace | ||
xcode_scheme: TranslateBar | ||
podfile: Podfile | ||
cache: | ||
- bundler | ||
- cocoapods | ||
before_install: | ||
- bundle install | ||
- bundle exec pod keys set YandexDictionaryKey $YANDEXAPITRANSLATEKEY TranslateBar | ||
- bundle exec pod keys set YandexTranslateKey $YANDEXAPIDICTIONARYKEY TranslateBar | ||
- pod update | ||
- chmod +x ./install_swiftlint.sh | ||
install: | ||
- ./install_swiftlint.sh | ||
script: | ||
- swiftlint | ||
- xcodebuild clean build -workspace TranslateBar.xcworkspace -scheme TranslateBar | xcpretty -c && exit ${PIPESTATUS[0]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'cocoapods' | ||
gem 'cocoapods-keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Translate Bar | ||
|
||
<p align="center"> | ||
<img width="128" height="128" src="./img/icon.png"> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/artbobrov/Translate-Bar/blob/master/LICENSE.md"> | ||
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="License" /> | ||
</a> | ||
<a href="https://travis-ci.com/artbobrov/Translate-Bar"> | ||
<img src="https://travis-ci.com/artbobrov/Translate-Bar.svg?branch=master" alt="Build Status"> | ||
</a> | ||
<a href="https://app.codacy.com/app/artbobrov/Translate-Bar?utm_source=github.com&utm_medium=referral&utm_content=artbobrov/Translate-Bar&utm_campaign=badger"> | ||
<img src="https://api.codacy.com/project/badge/Grade/8bed2ddda5094f688e579ff3060157a8" alt="Codacy Badge" /> | ||
</a> | ||
</p> | ||
|
||
Translate Bar is an macOS app that allows you to translate text directly from your menu bar. Open-source appliction written in Swift using some third party libraries: | ||
* RxSwift | ||
* Moya | ||
* ITSwitch | ||
* KeyHolder | ||
|
||
Translation was implemented via [Yandex Translate API](https://tech.yandex.com/translate/) | ||
|
||
## Download | ||
Download latest version of the application for [macOS](https://github.com/artbobrov/Translate-Bar/releases) | ||
|
||
## Building | ||
Translate Bar uses [CocoaPods](https://github.com/CocoaPods/CocoaPods/) as a dependency manager and [Cocoapods-Keys](https://github.com/orta/cocoapods-keys) to store application keys. | ||
|
||
1. Clone project from Github to your local | ||
``` | ||
git clone https://github.com/artbobrov/Translate-Bar.git | ||
``` | ||
2. Get your [Yandex Dictionary API key](https://tech.yandex.com/dictionary/) and [Yandex Translate API key](https://tech.yandex.com/translate/) | ||
3. Install all pods and save Yandex API keys | ||
Run | ||
``` | ||
$ pod install | ||
CocoaPods-Keys has detected a keys mismatch for your setup. | ||
What is the key for YandexDictionaryKey | ||
> YOUR_YANDEX_DICTIONARY_API_KEY | ||
Saved YandexDictionaryKey to Translate Bar. | ||
What is the key for YandexTranslateKey | ||
> YOUR_YANDEX_TRANSLATE_API_KEY | ||
Saved YandexTranslateKey to Translate Bar. | ||
Analyzing dependencies | ||
Fetching podspec for `Keys` from `Pods/CocoaPodsKeys` | ||
Downloading dependencies | ||
Installing Alamofire (4.7.3) | ||
Installing ITSwitch (1.0) | ||
Installing KeyHolder (3.0.1) | ||
Using Keys (1.0.1) | ||
Installing Magnet (2.3.1) | ||
Installing Moya (11.0.2) | ||
Installing Result (3.2.4) | ||
Installing RxAtomic (4.4.0) | ||
Installing RxCocoa (4.4.0) | ||
Installing RxSwift (4.4.0) | ||
Generating Pods project | ||
Integrating client project | ||
Sending stats | ||
Pod installation complete! There are 8 dependencies from the Podfile and 11 total pods installed. | ||
``` | ||
or later | ||
``` | ||
pod keys set "YandexDictionaryKey" "YOUR_YANDEX_DICTIONARY_API_KEY" | ||
pod keys set "YandexTranslateKey" "YOUR_YANDEX_TRANSLATE_API_KEY" | ||
``` | ||
4. Just run your app in Xcode | ||
|
||
## Screenshots | ||
|
||
<img src="./img/screenshots/translate.png" alt="translation" width="400"/> | ||
<img src="./img/screenshots/language_pick.png" alt="language_pick" width="400"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
TranslateBar.xcodeproj/xcshareddata/xcschemes/TranslateBar.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1000" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A1C38D4A217BCE94002B4995" | ||
BuildableName = "Translate Bar.app" | ||
BlueprintName = "TranslateBar" | ||
ReferencedContainer = "container:TranslateBar.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A1C38D4A217BCE94002B4995" | ||
BuildableName = "Translate Bar.app" | ||
BlueprintName = "TranslateBar" | ||
ReferencedContainer = "container:TranslateBar.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A1C38D4A217BCE94002B4995" | ||
BuildableName = "Translate Bar.app" | ||
BlueprintName = "TranslateBar" | ||
ReferencedContainer = "container:TranslateBar.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A1C38D4A217BCE94002B4995" | ||
BuildableName = "Translate Bar.app" | ||
BlueprintName = "TranslateBar" | ||
ReferencedContainer = "container:TranslateBar.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.