Skip to content

Commit

Permalink
support slovak
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklandrin committed Jan 10, 2024
1 parent 386d99d commit a94d50c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 28 deletions.
Binary file added Localization/sk.lproj/Localizable.strings
Binary file not shown.
15 changes: 9 additions & 6 deletions OnlySwitch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@
047140BD2778A416005B160B /* PomodoroTimerSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PomodoroTimerSettingView.swift; sourceTree = "<group>"; };
047140BF2778A478005B160B /* PomodoroTimerSettingVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PomodoroTimerSettingVM.swift; sourceTree = "<group>"; };
047140C12778D2A1005B160B /* SmallLaunchpadIconSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallLaunchpadIconSwitch.swift; sourceTree = "<group>"; };
047594922B4DE208005FC87C /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = "<group>"; };
047C1E4B2A2251280061235D /* EvolutionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EvolutionView.swift; sourceTree = "<group>"; };
047C1E502A22525F0061235D /* EvolutionReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EvolutionReducer.swift; sourceTree = "<group>"; };
047C1E582A2255A00061235D /* EvolutionEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EvolutionEditorView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1716,6 +1717,7 @@
ko,
fr,
uk,
sk,
);
mainGroup = 04447B4F2754F08000CD2900;
packageReferences = (
Expand Down Expand Up @@ -2197,6 +2199,7 @@
9F3B2B04292FD1F000086461 /* ko */,
04F96737294A33370088112A /* fr */,
95FD4EEE2B44CA19008A73B9 /* uk */,
047594922B4DE208005FC87C /* sk */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -2218,7 +2221,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_TEAM = B22726TNGH;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = OnlySwitchTests/Info.plist;
Expand All @@ -2244,7 +2247,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_TEAM = B22726TNGH;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = OnlySwitchTests/Info.plist;
Expand Down Expand Up @@ -2393,7 +2396,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_ASSET_PATHS = "\"OnlySwitch/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = B22726TNGH;
Expand Down Expand Up @@ -2448,7 +2451,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_ASSET_PATHS = "\"OnlySwitch/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = B22726TNGH;
Expand Down Expand Up @@ -2499,7 +2502,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = B22726TNGH;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -2532,7 +2535,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 152;
CURRENT_PROJECT_VERSION = 155;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = B22726TNGH;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
2 changes: 1 addition & 1 deletion OnlySwitch/Extension/LocalizedString++.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import SwiftUI
extension Bundle {
private static var bundle: Bundle!
private static var supportLangs = ["en", "zh", "de", "hr", "tr","pl", "fil", "nl", "it", "ru", "es","ja", "so","kr","fr","uk"]
private static var supportLangs = ["en", "zh", "de", "hr", "tr","pl", "fil", "nl", "it", "ru", "es","ja", "so","kr","fr","uk","sk"]
public static func localizedBundle() -> Bundle! {
if bundle == nil {
let appLang = UserDefaults.standard.string(forKey: UserDefaults.Key.AppLanguage) ?? "en"
Expand Down
42 changes: 23 additions & 19 deletions OnlySwitch/Utilities/SupportedLanguage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,29 @@ struct SupportedLanguages {
static let korean = Language(name: "한국어", code: "ko")
static let french = Language(name: "Français", code: "fr")
static let ukrainian = Language(name: "Українська", code: "uk")

static let langList = [SupportedLanguages.english,
SupportedLanguages.simplifiedChinese,
SupportedLanguages.german,
SupportedLanguages.croatian,
SupportedLanguages.turkish,
SupportedLanguages.polish,
SupportedLanguages.filipino,
SupportedLanguages.dutch,
SupportedLanguages.italian,
SupportedLanguages.russian,
SupportedLanguages.spanish,
SupportedLanguages.japanese,
SupportedLanguages.somali,
SupportedLanguages.korean,
SupportedLanguages.french,
SupportedLanguages.ukrainian]

static func getLangName(code:String) -> String {
static let slovak = Language(name: "Slovenský", code: "sk")

static let langList = [
SupportedLanguages.english,
SupportedLanguages.simplifiedChinese,
SupportedLanguages.german,
SupportedLanguages.croatian,
SupportedLanguages.turkish,
SupportedLanguages.polish,
SupportedLanguages.filipino,
SupportedLanguages.dutch,
SupportedLanguages.italian,
SupportedLanguages.russian,
SupportedLanguages.spanish,
SupportedLanguages.japanese,
SupportedLanguages.somali,
SupportedLanguages.korean,
SupportedLanguages.french,
SupportedLanguages.ukrainian,
SupportedLanguages.slovak
]

static func getLangName(code: String) -> String {
let lang = SupportedLanguages.langList.filter{$0.code == code}.first
return lang?.name ?? "English"
}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Since Version 1.3, switches can be added to or removed from the list.
| Set dark mode | finished |

## Supported Languages 🇺🇳
English, Simplified Chinese, German, Croatian, Turkish, Polish, Filipino, Dutch, Italian, Russian, Spanish, Japanese, Somali, Korean, French, Ukrainian
English, Simplified Chinese, German, Croatian, Turkish, Polish, Filipino, Dutch, Italian, Russian, Spanish, Japanese, Somali, Korean, French, Ukrainian, Slovak

## Welcome to pull requests for these

Expand Down Expand Up @@ -235,8 +235,9 @@ S-GPT is already in Shortcuts gallery. Easily ask any questions to chatGPT via S
| Dutch | Alex | Somali | @abdorizak |
| Filipino | Rosel | Korean | @iosdevted |
| French | @BtKent and Ange Lefrère | Ukrainian | @andryua |
| Slovak | @Svec-Tomas | | |

@wrngwrld for volume slider of the radio player
@wrngwrld for the volume slider of the radio player

@kant for syntax issue

Expand Down

0 comments on commit a94d50c

Please sign in to comment.