Skip to content

Commit 87a411a

Browse files
authored
Merge pull request #2 from ololx/develop
Version 0.0.1-alpha.1
2 parents 0a7db07 + 7b8c456 commit 87a411a

File tree

11 files changed

+894
-16
lines changed

11 files changed

+894
-16
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010

1111
- Refactor application.
1212

13-
## [0.0.2-alpha] - 2021-11-14
13+
## [0.0.1-alpha.1] - 2021-11-28
14+
15+
### Changed
16+
17+
- The iclon path scanning.
1418

1519
### Added
1620

21+
- The localization for `Russina`, `German` and `English`.
1722
- The scanning icons for menu items from the app `Info.plist`.
1823

1924
## [0.0.1-alpha] - 2021-11-03

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Quick Symlink is a `Finder extension` which provides a `contextual menu item` for the symbolic links creation on macOS.
44

5-
[![status](https://img.shields.io/badge/status-active-active?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-0.0.2--alpha-informational?style=flat-square)](BADGES_GUIDE.md#version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-active-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![last release](https://img.shields.io/badge/last_release-November_03,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-November_14,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date)
5+
[![status](https://img.shields.io/badge/status-active-active?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-0.0.1--alpha.1-informational?style=flat-square)](BADGES_GUIDE.md#version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-active-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![last release](https://img.shields.io/badge/last_release-November_28,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-November_28,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date)
66

77
[![license](https://img.shields.io/badge/license-MIT-informational?style=flat-square)](LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](CODE_OF_CONDUCT.md)
88

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
Localizable.strings
3+
empty-new-file
4+
5+
Created by Alexander A. Kropotin on 28.11.21.
6+
Copyright © 2021 Alexander A. Kropotin. All rights reserved.
7+
*/
8+
9+
/* Class = "NSMenuItem"; */
10+
"NEW_FILE_ACTION_NAME" = "New file";

empty-new-file/commons/ExtensionScanner.swift

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,22 @@ public class AppExtentionsScanner: ExtentionsScanner {
6868
}
6969

7070
for extensionName in exportedTypeDeclaration.typeConformsTo! {
71-
extentions.append(extensionName.lowercased())
72-
if (exportedTypeDeclaration.iconConformsTo != nil) {
73-
var iconName = exportedTypeDeclaration.iconConformsTo!;
74-
if (!iconName.contains(".icns")) {
75-
iconName.append(".icns");
76-
}
77-
print(iconName)
78-
icns.updateValue(app.appendingPathComponent("Contents").appendingPathComponent("Resources").appendingPathComponent(iconName).absoluteString, forKey: extensionName.lowercased())
71+
if (exportedTypeDeclaration.iconConformsTo == nil) {
72+
continue;
7973
}
74+
75+
var iconName = exportedTypeDeclaration.iconConformsTo!;
76+
if (!iconName.contains(".icns")) {
77+
iconName.append(".icns");
78+
}
79+
80+
let filename = app.appendingPathComponent("Contents").appendingPathComponent("Resources").appendingPathComponent(iconName);
81+
if(!FileManager.default.fileExists(atPath: filename.path)) {
82+
continue;
83+
}
84+
85+
icns.updateValue(filename.absoluteString, forKey: extensionName.lowercased());
86+
extentions.append(extensionName.lowercased());
8087
}
8188
}
8289
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
Localizable.strings
3+
empty-new-file
4+
5+
Created by Alexander A. Kropotin on 28.11.21.
6+
Copyright © 2021 Alexander A. Kropotin. All rights reserved.
7+
*/
8+
9+
/* Class = "NSMenuItem"; */
10+
"NEW_FILE_ACTION_NAME" = "Neue Datei";

empty-new-file/empty-new-file-menu/FinderSync.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FinderSync: FIFinderSync {
4949
override func menu(for menuKind: FIMenuKind) -> NSMenu {
5050
// Produce a menu for the extension (to be shown when right clicking a folder in Finder)
5151
let emptyBlankFileMenu = NSMenu(title: "");
52-
emptyBlankFileMenu.setAccessibilityIndex(0)
52+
emptyBlankFileMenu.setAccessibilityIndex(0);
5353

5454
let exts = EmptyNewFileExtension.extensions;
5555
let icns = EmptyNewFileExtension.incs;
@@ -70,7 +70,7 @@ class FinderSync: FIFinderSync {
7070

7171
let emptyBlankFileMainMenu = NSMenu(title: "");
7272
let emptyBlankFileMenuItem = NSMenuItem(
73-
title: "New file",
73+
title: NSLocalizedString("NEW_FILE_ACTION_NAME", comment: ""),
7474
action: nil,
7575
keyEquivalent: ""
7676
);
@@ -88,8 +88,8 @@ class FinderSync: FIFinderSync {
8888
}
8989

9090
var originalPath = target
91-
let originalFilename = "New file"
92-
var filename = "New file.\(sender.title)"
91+
let originalFilename = NSLocalizedString("NEW_FILE_ACTION_NAME", comment: "")
92+
var filename = "\(originalFilename).\(sender.title)"
9393
let fileType = ".\(sender.title)"
9494
var counter = 1
9595

empty-new-file/empty-new-file.xcodeproj/project.pbxproj

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
A37363472753EE92007E7867 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A373634A2753EE92007E7867 /* Localizable.strings */; };
11+
A37363482753EE92007E7867 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A373634A2753EE92007E7867 /* Localizable.strings */; };
1012
A3E5F32B2732D710002686A9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3E5F32A2732D710002686A9 /* AppDelegate.swift */; };
1113
A3E5F32D2732D710002686A9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3E5F32C2732D710002686A9 /* ViewController.swift */; };
1214
A3E5F32F2732D710002686A9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A3E5F32E2732D710002686A9 /* Assets.xcassets */; };
@@ -44,6 +46,12 @@
4446
/* End PBXCopyFilesBuildPhase section */
4547

4648
/* Begin PBXFileReference section */
49+
A37363422753EE2C007E7867 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = "<group>"; };
50+
A37363432753EE40007E7867 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
51+
A37363492753EE92007E7867 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
52+
A373634B2753EE94007E7867 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
53+
A373634C2753EE95007E7867 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
54+
A373634D2753F009007E7867 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
4755
A3E5F3272732D710002686A9 /* empty-new-file.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "empty-new-file.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4856
A3E5F32A2732D710002686A9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4957
A3E5F32C2732D710002686A9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -80,6 +88,7 @@
8088
A3E5F31E2732D710002686A9 = {
8189
isa = PBXGroup;
8290
children = (
91+
A373634A2753EE92007E7867 /* Localizable.strings */,
8392
A3E5F33A2732D750002686A9 /* commons */,
8493
A3E5F3292732D710002686A9 /* empty-new-file */,
8594
A3FAD3682732F3470025311C /* empty-new-file-menu */,
@@ -194,6 +203,8 @@
194203
knownRegions = (
195204
en,
196205
Base,
206+
ru,
207+
de,
197208
);
198209
mainGroup = A3E5F31E2732D710002686A9;
199210
productRefGroup = A3E5F3282732D710002686A9 /* Products */;
@@ -212,6 +223,7 @@
212223
buildActionMask = 2147483647;
213224
files = (
214225
A3E5F32F2732D710002686A9 /* Assets.xcassets in Resources */,
226+
A37363472753EE92007E7867 /* Localizable.strings in Resources */,
215227
A3E5F3322732D710002686A9 /* Main.storyboard in Resources */,
216228
);
217229
runOnlyForDeploymentPostprocessing = 0;
@@ -220,6 +232,7 @@
220232
isa = PBXResourcesBuildPhase;
221233
buildActionMask = 2147483647;
222234
files = (
235+
A37363482753EE92007E7867 /* Localizable.strings in Resources */,
223236
);
224237
runOnlyForDeploymentPostprocessing = 0;
225238
};
@@ -258,10 +271,23 @@
258271
/* End PBXTargetDependency section */
259272

260273
/* Begin PBXVariantGroup section */
274+
A373634A2753EE92007E7867 /* Localizable.strings */ = {
275+
isa = PBXVariantGroup;
276+
children = (
277+
A37363492753EE92007E7867 /* en */,
278+
A373634B2753EE94007E7867 /* ru */,
279+
A373634C2753EE95007E7867 /* de */,
280+
A373634D2753F009007E7867 /* Base */,
281+
);
282+
name = Localizable.strings;
283+
sourceTree = "<group>";
284+
};
261285
A3E5F3302732D710002686A9 /* Main.storyboard */ = {
262286
isa = PBXVariantGroup;
263287
children = (
264288
A3E5F3312732D710002686A9 /* Base */,
289+
A37363422753EE2C007E7867 /* ru */,
290+
A37363432753EE40007E7867 /* de */,
265291
);
266292
name = Main.storyboard;
267293
sourceTree = "<group>";
@@ -273,6 +299,7 @@
273299
isa = XCBuildConfiguration;
274300
buildSettings = {
275301
ALWAYS_SEARCH_USER_PATHS = NO;
302+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
276303
CLANG_ANALYZER_NONNULL = YES;
277304
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
278305
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -317,7 +344,7 @@
317344
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
318345
GCC_WARN_UNUSED_FUNCTION = YES;
319346
GCC_WARN_UNUSED_VARIABLE = YES;
320-
MACOSX_DEPLOYMENT_TARGET = 10.14;
347+
MACOSX_DEPLOYMENT_TARGET = 10.10;
321348
MTL_ENABLE_DEBUG_INFO = YES;
322349
ONLY_ACTIVE_ARCH = YES;
323350
SDKROOT = macosx;
@@ -330,6 +357,7 @@
330357
isa = XCBuildConfiguration;
331358
buildSettings = {
332359
ALWAYS_SEARCH_USER_PATHS = NO;
360+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
333361
CLANG_ANALYZER_NONNULL = YES;
334362
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
335363
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -368,7 +396,7 @@
368396
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
369397
GCC_WARN_UNUSED_FUNCTION = YES;
370398
GCC_WARN_UNUSED_VARIABLE = YES;
371-
MACOSX_DEPLOYMENT_TARGET = 10.14;
399+
MACOSX_DEPLOYMENT_TARGET = 10.10;
372400
MTL_ENABLE_DEBUG_INFO = NO;
373401
SDKROOT = macosx;
374402
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

0 commit comments

Comments
 (0)