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

Release/1.0.0 #193

Merged
merged 21 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cfcfe56
Separate Lingua Into Shared Library and Terminal App (#159)
EgzonArifi Aug 17, 2023
52fcb38
Setup macOS app and integrate LinguaLib as a local SPM dependency (#162)
EgzonArifi Aug 18, 2023
139f7ff
Implement a projects list feature in macOS app (#164)
EgzonArifi Aug 21, 2023
ddd9243
Implement DirectoryInputField and ValidatingTextField SwiftUI Compone…
EgzonArifi Aug 21, 2023
1e340e2
Implement ProjectFormView UI Component (#168)
EgzonArifi Aug 22, 2023
11c1c53
Implement create new project, duplicate and delete list actions (#170)
EgzonArifi Aug 22, 2023
6dcd4f8
Implement Project Localization Process and Overlays (#172)
EgzonArifi Aug 22, 2023
543ca83
Implement UserDefaults Extensions for Persistent Storage of Project D…
EgzonArifi Aug 23, 2023
a27036a
Add Lingua macOS app icon (#176)
EgzonArifi Aug 24, 2023
3b26921
Improve Security Scoping and Update Project Form for iOS Projects wit…
EgzonArifi Aug 25, 2023
dc31525
Implement InformationHolderView SwiftUI Component (#180)
EgzonArifi Aug 25, 2023
a17879a
Implement lastLocalizedAt functionality in the app (#182)
EgzonArifi Aug 25, 2023
da653d3
Chore/Keyboard shortcut (#184)
borut-t Sep 11, 2023
899cff7
Change the data structure for translation processing (#186)
EgzonArifi Sep 11, 2023
3c68f0b
Implement Search Functionality in Projects (#187)
EgzonArifi Sep 12, 2023
b4c68b8
Update readme with macOS app (#188)
EgzonArifi Sep 12, 2023
1ad8d4b
Add new app icon, preview image in readme (#189)
EgzonArifi Sep 22, 2023
7b96a77
Add the action to build macOS app (#191)
EgzonArifi Sep 26, 2023
ea94e1d
Chore/Cleanup (#190)
borut-t Sep 26, 2023
be1b113
Chore/build macos app (#192)
EgzonArifi Sep 27, 2023
61198ee
Merge branch 'main' into develop
EgzonArifi Sep 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ jobs:

- name: Run tests
run: swift test -v

- name: Build the macOS app without signing
working-directory: ./Lingua-App/Lingua
run: |
xcodebuild -project Lingua.xcodeproj -scheme LinguaApp clean build CODE_SIGNING_ALLOWED=NO
66 changes: 66 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/LinguaLib.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "LinguaLib"
BuildableName = "LinguaLib"
BlueprintName = "LinguaLib"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "LinguaLib"
BuildableName = "LinguaLib"
BlueprintName = "LinguaLib"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
746 changes: 746 additions & 0 deletions Lingua-App/Lingua/Lingua.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "774A1A3F2A8E588500789A04"
BuildableName = "Lingua.app"
BlueprintName = "Lingua"
ReferencedContainer = "container:Lingua.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</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 = "774A1A3F2A8E588500789A04"
BuildableName = "Lingua.app"
BlueprintName = "Lingua"
ReferencedContainer = "container:Lingua.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "774A1A3F2A8E588500789A04"
BuildableName = "Lingua.app"
BlueprintName = "Lingua"
ReferencedContainer = "container:Lingua.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
37 changes: 37 additions & 0 deletions Lingua-App/Lingua/Lingua/LinguaApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// LinguaApp.swift
// Lingua
//
// Created by Egzon Arifi on 17/08/2023.
//

import SwiftUI

@main
struct LinguaApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(replacing: .appInfo) {
Button(Lingua.App.about) {
NSApplication.shared.orderFrontStandardAboutPanel(
options: [
NSApplication.AboutPanelOptionKey.credits: NSAttributedString(
string: Lingua.App.description,
attributes: [
NSAttributedString.Key.font: NSFont.boldSystemFont(
ofSize: NSFont.smallSystemFontSize)
]
),
NSApplication.AboutPanelOptionKey(
rawValue: Lingua.App.copyright
): Lingua.App.copyrightYear
]
)
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// LocalizationPlatform+Extension.swift
// Lingua
//
// Created by Egzon Arifi on 17/08/2023.
//

import Foundation
import LinguaLib

extension LocalizationPlatform: Codable {
var title: String {
switch self {
case .ios:
return "iOS"
case .android:
return "Android"
}
}
}
89 changes: 89 additions & 0 deletions Lingua-App/Lingua/Lingua/Model/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//
// Project.swift
// Lingua
//
// Created by Egzon Arifi on 17/08/2023.
//

import SwiftUI
import LinguaLib

struct Project: Identifiable, Hashable, Equatable, Codable {
var id: UUID
var type: LocalizationPlatform
var apiKey: String
var sheetId: String
var directoryPath: String
var title: String
var swiftCode: SwiftCode
var swiftCodeEnabled: Bool = true
var createdAt: Date
var lastLocalizedAt: Date?

init(id: UUID,
type: LocalizationPlatform,
apiKey: String = "",
sheetId: String = "",
directoryPath: String = "",
title: String = "",
swiftCode: SwiftCode = .init(stringsDirectory: "", outputSwiftCodeFileDirectory: ""),
createdAt: Date = .init(),
lastLocalizedAt: Date? = nil) {
self.id = id
self.type = type
self.apiKey = apiKey
self.sheetId = sheetId
self.directoryPath = directoryPath
self.title = title
self.swiftCode = swiftCode
self.createdAt = createdAt
self.lastLocalizedAt = lastLocalizedAt
}

/// Custom initializer for decoding [Project] from persisted storage.
/// This initializer ensures that if new properties are added to [Project] in the future and the persisted
/// object doesn't contain those properties (due to being saved with an older app version), the new properties
/// will have default values rather than causing a decoding failure.
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)

id = try container.decode(UUID.self, forKey: .id)
type = try container.decode(LocalizationPlatform.self, forKey: .type)
apiKey = try container.decode(String.self, forKey: .apiKey)
sheetId = try container.decode(String.self, forKey: .sheetId)
directoryPath = try container.decode(String.self, forKey: .directoryPath)
title = try container.decode(String.self, forKey: .title)
swiftCode = try container.decode(SwiftCode.self, forKey: .swiftCode)
swiftCodeEnabled = try container.decode(Bool.self, forKey: .swiftCodeEnabled)
createdAt = try container.decodeIfPresent(Date.self, forKey: .createdAt) ?? Date()
lastLocalizedAt = try container.decodeIfPresent(Date.self, forKey: .lastLocalizedAt)
}
}

extension Project {
struct SwiftCode: Hashable, Equatable, Codable {
var stringsDirectory: String
var outputSwiftCodeFileDirectory: String
}

var bookmarkDataForDirectoryPath: String {
"\(id.uuidString)directoryPath"
}

var bookmarkDataForOutputSwiftCodeFileDirectory: String {
"\(id.uuidString)outputSwiftCodeFileDirectory"
}

var bookmarkDataForStringsDirectory: String {
"\(id.uuidString)stringsDirectory"
}

var icon: Image {
switch type {
case .ios:
return Image(systemName: "apple.logo")
case .android:
return Image(systemName: "a.square.fill")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading